Index: /issm/oecreview/Archive/12321-12677/Date.tex
===================================================================
--- /issm/oecreview/Archive/12321-12677/Date.tex	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/Date.tex	(revision 12679)
@@ -0,0 +1,1 @@
+Jul-20-2012
Index: /issm/oecreview/Archive/12321-12677/ISSM-12321-12322.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12321-12322.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12321-12322.diff	(revision 12679)
@@ -0,0 +1,295 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.h	(revision 12321)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.h	(revision 12322)
+@@ -19,13 +19,13 @@
+ 
+ 		int     id;
+ 		int	  nods;  //number of vertices in the contour
+-		double* x;
+-		double* y;
++		IssmDouble* x;
++		IssmDouble* y;
+ 		bool    closed; //is this contour closed?
+ 
+ 		/*Contour constructors, destructors {{{1*/
+ 		Contour();
+-		Contour(int id, int nods, double* x, double* y,bool closed);
++		Contour(int id, int nods, IssmDouble* x, IssmDouble* y,bool closed);
+ 		~Contour();
+ 		/*}}}*/
+ 		/*Object virtual functions{{{1*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Patch.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Patch.h	(revision 12321)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Patch.h	(revision 12322)
+@@ -33,13 +33,13 @@
+ 		int     maxvertices; //maxvertices corresponds to largest amount of vertices on a given element, determined by the geometry.
+ 		int     maxnodes;    // maxnodes corresponds to the largest amout of nodes on a given element, determined by the interpolation type.
+ 		
+-		double* values;  //result values
++		IssmDouble* values;  //result values
+ 
+ 		Patch();
+ 		Patch(int numrows, int maxvertices, int maxnodes);
+ 		~Patch();
+ 		void fillelementinfo(int row, int element_id, int* vertices_ids, int num_vertices);
+-		void fillresultinfo(int row,int enum_type,int step, double time, int interpolation, double* nodal_values, int num_nodes);
++		void fillresultinfo(int row,int enum_type,int step, IssmDouble time, int interpolation, IssmDouble* nodal_values, int num_nodes);
+ 		void Gather(void);
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Update.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Update.h	(revision 12321)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Update.h	(revision 12322)
+@@ -14,19 +14,19 @@
+ 
+ 	public:
+ 
+-		virtual void  InputUpdateFromVector(double* vector, int name, int type)=0;
++		virtual void  InputUpdateFromVector(IssmDouble* vector, int name, int type)=0;
+ 		virtual void  InputUpdateFromVector(int* vector, int name, int type)=0;
+ 		virtual void  InputUpdateFromVector(bool* vector, int name, int type)=0; 
+ 		#ifdef _HAVE_DAKOTA_
+-		virtual void  InputUpdateFromMatrixDakota(double* matrix, int rows, int ncols, int name, int type)=0;
+-		virtual void  InputUpdateFromVectorDakota(double* vector, int name, int type)=0;
++		virtual void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int rows, int ncols, int name, int type)=0;
++		virtual void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type)=0;
+ 		virtual void  InputUpdateFromVectorDakota(int* vector, int name, int type)=0;
+ 		virtual void  InputUpdateFromVectorDakota(bool* vector, int name, int type)=0;
+ 		#endif
+-		virtual void  InputUpdateFromConstant(double constant, int name)=0;
++		virtual void  InputUpdateFromConstant(IssmDouble constant, int name)=0;
+ 		virtual void  InputUpdateFromConstant(int constant, int name)=0;
+ 		virtual void  InputUpdateFromConstant(bool constant, int name)=0;
+-		virtual void  InputUpdateFromSolution(double* solution)=0;
++		virtual void  InputUpdateFromSolution(IssmDouble* solution)=0;
+ 		virtual void  InputUpdateFromIoModel(int index, IoModel* iomodel)=0;
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.h	(revision 12321)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.h	(revision 12322)
+@@ -31,7 +31,7 @@
+ 		Hook*          hvertex;
+ 		Inputs*        inputs; //properties of this node
+ 		int            analysis_type;
+-		double         coord_system[3][3];
++		IssmDouble         coord_system[3][3];
+ 
+ 		/*Node constructors, destructors {{{1*/
+ 		Node();
+@@ -48,17 +48,17 @@
+ 		/*}}}*/
+ 		/*Update virtual functions definitions: {{{1*/
+ 		
+-		void  InputUpdateFromVector(double* vector, int name, int type);
++		void  InputUpdateFromVector(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+ 		void  InputUpdateFromVector(bool* vector, int name, int type);
+-		void  InputUpdateFromMatrixDakota(double* matrix,int nrows, int ncols, int name, int type);
+-		void  InputUpdateFromVectorDakota(double* vector, int name, int type);
++		void  InputUpdateFromMatrixDakota(IssmDouble* matrix,int nrows, int ncols, int name, int type);
++		void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVectorDakota(int* vector, int name, int type);
+ 		void  InputUpdateFromVectorDakota(bool* vector, int name, int type);
+-		void  InputUpdateFromConstant(double constant, int name);
++		void  InputUpdateFromConstant(IssmDouble constant, int name);
+ 		void  InputUpdateFromConstant(int constant, int name);
+ 		void  InputUpdateFromConstant(bool constant, int name);
+-		void  InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");}
++		void  InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("Not implemented yet!");}
+ 		/*}}}*/
+ 		/*Node numerical routines {{{1*/
+@@ -69,14 +69,14 @@
+ 		int    GetVertexDof(void);
+ 		int    GetVertexId(void);
+ #ifdef _HAVE_DIAGNOSTIC_
+-		void   GetCoordinateSystem(double* coord_system_out);
++		void   GetCoordinateSystem(IssmDouble* coord_system_out);
+ #endif
+ 		void   SetVertexDof(int in_dof);
+ 		bool   InAnalysis(int analysis_type);
+ 		int    GetApproximation();
+ 		int    GetNumberOfDofs(int approximation_enum,int setenum);
+ 		int    IsClone();
+-		void   ApplyConstraint(int dof,double value);
++		void   ApplyConstraint(int dof,IssmDouble value);
+ 		void   RelaxConstraint(int dof);
+ 		void   DofInSSet(int dof);
+ 		void   DofInFSet(int dof);
+@@ -87,18 +87,18 @@
+ 		void   GetLocalDofList(int* poutdoflist,int approximation_enum,int setenum);
+ 		int    GetDofList1(void);
+ 		int    GetSidList(void);
+-		double GetX();
+-		double GetY();
+-		double GetZ();
+-		double GetSigma();
++		IssmDouble GetX();
++		IssmDouble GetY();
++		IssmDouble GetZ();
++		IssmDouble GetSigma();
+ 		int    IsOnBed();
+ 		int    IsOnSurface();
+ 		void   FreezeDof(int dof);
+ 		int    IsFloating();
+ 		int    IsGrounded();
+-		void   UpdateSpcs(double* ys);
+-		void   VecMerge(Vector* ug, double* vector_serial,int setenum);
+-		void   VecReduce(Vector* vector, double* ug_serial,int setnum);
++		void   UpdateSpcs(IssmDouble* ys);
++		void   VecMerge(Vector* ug, IssmDouble* vector_serial,int setenum);
++		void   VecReduce(Vector* vector, IssmDouble* ug_serial,int setnum);
+ 		
+ 		/*}}}*/
+ 		/*Dof Object routines {{{1*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h	(revision 12321)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h	(revision 12322)
+@@ -18,8 +18,8 @@
+ 
+ 	private: 
+ 		FILE        *fid;         //pointer to input file
+-		double     **data;        //this dataset holds temporary data, memory intensive.
+-		Parameters  *constants;   //this dataset holds all double, int, bool and char *parameters read in from the input file.*
++		IssmDouble     **data;        //this dataset holds temporary data, memory intensive.
++		Parameters  *constants;   //this dataset holds all IssmDouble, int, bool and char *parameters read in from the input file.*
+ 
+ 	public:
+ 		/*This data needs to stay memory resident at all time, even if it's memory intensive: */
+@@ -43,22 +43,22 @@
+ 		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(IssmDouble *poutput,int constant_enum);
+ 		void    Constant(char  **poutput,int constant_enum);
+ 		Param  *CopyConstantObject(int constant_enum);
+-		double *Data(int dataenum);
++		IssmDouble *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(IssmDouble*   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(IssmDouble**  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(IssmDouble*** 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);
++		void    FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum=NoneEnum,IssmDouble default_value=0);
+ 		FILE*   SetFilePointerToData(int* pcode,int* pvector_type, int data_enum);
+ };
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/OptPars.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/OptPars.h	(revision 12321)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/OptPars.h	(revision 12322)
+@@ -7,9 +7,9 @@
+ 
+ struct OptPars{
+ 
+-	double xmin;
+-	double xmax;
+-	double cm_jump;
++	IssmDouble xmin;
++	IssmDouble xmax;
++	IssmDouble cm_jump;
+ 	int maxiter;
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.h	(revision 12321)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.h	(revision 12322)
+@@ -5,6 +5,8 @@
+ #ifndef _DOFINDEXING_H_
+ #define  _DOFINDEXING_H_
+ 
++#include "../include/include.h"
++
+ class DofIndexing{
+ 	
+ 	public:
+@@ -20,7 +22,7 @@
+ 		/*boundary conditions sets: */
+ 		bool*     f_set; //is dof on f-set (on which we solve)
+ 		bool*     s_set; //is dof on s-set (on which boundary conditions -dirichlet- are applied)
+-		double*   svalues; //list of constraint values. size g_size, for ease of use.
++		IssmDouble*   svalues; //list of constraint values. size g_size, for ease of use.
+ 
+ 		/*types of dofs: */
+ 		int*     doftype; //approximation type of the dofs (used only for coupling), size g_size
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.h	(revision 12321)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.h	(revision 12322)
+@@ -14,14 +14,14 @@
+ 
+ 	public:
+ 		int eid;
+-		double x1;
+-		double y1;
+-		double x2;
+-		double y2;
++		IssmDouble x1;
++		IssmDouble y1;
++		IssmDouble x2;
++		IssmDouble y2;
+ 
+ 		/*Segment constructors, destructors {{{1*/
+ 		Segment();
+-		Segment(int eid,double x1,double y1, double x2, double y2);
++		Segment(int eid,IssmDouble x1,IssmDouble y1, IssmDouble x2, IssmDouble y2);
+ 		~Segment();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{1 */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.h	(revision 12321)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.h	(revision 12322)
+@@ -24,10 +24,10 @@
+ 
+ 		int    id;
+ 		int    sid;            //sid for "serial" id, ie the rank of this vertex in the vertices dataset, if the dataset was serial on 1 cpu.
+-		double x;
+-		double y;
+-		double z;
+-		double sigma;          //sigma coordinate: (z-bed)/thickness
++		IssmDouble x;
++		IssmDouble y;
++		IssmDouble z;
++		IssmDouble sigma;          //sigma coordinate: (z-bed)/thickness
+ 		int    connectivity;   //number of vertices connected to this vertex
+ 
+ 		/*dof management: */
+@@ -36,8 +36,8 @@
+ 
+ 		/*Vertex constructors, destructors {{{1*/
+ 		Vertex();
+-		Vertex(int id, int sid,double x, double y, double z, double sigma, int connectivity); 
+-		void Init(int id, int sid, double x, double y, double z, double sigma,int connectivity);
++		Vertex(int id, int sid,IssmDouble x, IssmDouble y, IssmDouble z, IssmDouble sigma, int connectivity); 
++		void Init(int id, int sid, IssmDouble x, IssmDouble y, IssmDouble z, IssmDouble sigma,int connectivity);
+ 		Vertex(int id, int sid, int i, IoModel* iomodel);
+ 		~Vertex();
+ 		/*}}}*/
+@@ -59,7 +59,7 @@
+ 		/*Vertex management: {{{1*/
+ 		int   Sid(void); 
+ 		int   Connectivity(void); 
+-		void  UpdatePosition(Vector* vz,Parameters* parameters,double* thickness,double* bed);
++		void  UpdatePosition(Vector* vz,Parameters* parameters,IssmDouble* thickness,IssmDouble* bed);
+ 		/*}}}*/
+ };
+ #endif  /* _VERTEX_H */
Index: /issm/oecreview/Archive/12321-12677/ISSM-12322-12323.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12322-12323.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12322-12323.diff	(revision 12679)
@@ -0,0 +1,113 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12322)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12323)
+@@ -307,26 +307,6 @@
+ 	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.]),
+@@ -352,6 +332,26 @@
+ 	fi
+ 	AM_CONDITIONAL([PYTHON], [test x$HAVE_PYTHON = xyes])
+ 	AC_MSG_RESULT($HAVE_PYTHON)
++
++	dnl python-version
++	HAVE_PYTHON3="no"
++	if test x$HAVE_PYTHON = xyes; then
++		AC_ARG_WITH([python-version],
++		  AS_HELP_STRING([--with-python-version = PYTHONVERSION],[python version.]),
++		  [PYTHONVERSION=$withval],[PYTHONVERSION=""])
++		AC_MSG_CHECKING(for python version)
++
++		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])
++		AC_MSG_RESULT($PYTHON_MAJOR)
++	fi
++	AM_CONDITIONAL([PYTHON3], [test x$HAVE_PYTHON3 = xyes])
+ 	dnl }}}
+ 	dnl python-numpy{{{
+ 	AC_ARG_WITH([python-numpy-dir],
+@@ -943,27 +943,36 @@
+ 	AC_MSG_RESULT(done)
+ 	dnl }}}
+ 	dnl fortran{{{
+-	dnl fortran library  option
+-	AC_MSG_CHECKING(for fortran library)
+-	AC_ARG_WITH([fortran-lib],
+-	  AS_HELP_STRING([--with-fortran-lib = options],[fortran options, for ex: "/usr/lib/gfortran.a]),
+-		[FORTRAN_LIB=$withval],[FORTRAN_LIB=""])
++	AC_ARG_WITH([fortran],
++		AS_HELP_STRING([--with-fortran = YES], [do we compile fortran code (default is yes)]),
++		[FORTRAN=$withval],[FORTRAN=yes]) 
++	AC_MSG_CHECKING(for fortran compilation)
++	if test "x$FORTRAN" = "xyes"; then
++		dnl defaults
++		HAVE_FORTRAN=yes
+ 
+-	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
+-            HAVE_FORTRAN=NO
+-        else
+-            HAVE_FORTRAN=yes
+-            FORTRANLIB="$FORTRAN_LIB"
++		AC_DEFINE([_HAVE_FORTRAN_],[1],[with fortran capability])
++	else
++		HAVE_FORTRAN=no
++	fi
++	AM_CONDITIONAL([FORTRAN], [test x$FORTRAN = xyes])
++	AC_MSG_RESULT($FORTRAN)
+ 
+-            AC_DEFINE([_HAVE_FORTRAN_],[1],[with FORTRAN in ISSM src])
+-            AC_SUBST([FORTRANLIB])
+-        fi
++	if test "x$FORTRAN" = "xyes"; then
++		dnl fortran library  option
++		AC_MSG_CHECKING(for fortran library)
++		AC_ARG_WITH([fortran-lib],
++		  AS_HELP_STRING([--with-fortran-lib = options],[fortran options, for ex: "/usr/lib/gfortran.a]),
++			[FORTRAN_LIB=$withval],[FORTRAN_LIB=""])
++
++		dnl check that --with-fortran-lib may have been provided
++		if test -n "$FORTRAN_LIB" ; then
++			FORTRANLIB="$FORTRAN_LIB"
++			AC_DEFINE([_HAVE_FORTRAN_],[1],[with FORTRAN in ISSM src])
++			AC_SUBST([FORTRANLIB])
++		fi
++		AC_MSG_RESULT(done)
+ 	fi
+-	AM_CONDITIONAL([FORTRAN], [test x$HAVE_FORTRAN = xyes])
+-	AC_MSG_RESULT(done)
+ 	dnl }}}
+ 	dnl graphics{{{
+ 	AC_MSG_CHECKING(for graphics library)
Index: /issm/oecreview/Archive/12321-12677/ISSM-12323-12324.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12323-12324.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12323-12324.diff	(revision 12679)
@@ -0,0 +1,22 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configure.ac
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configure.ac	(revision 12323)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configure.ac	(revision 12324)
+@@ -1,7 +1,7 @@
+ # Process this file with autoconf to produce a configure script.
+ 
+ #AUTOCONF
+-AC_INIT([ISSM],[4.1],[issm@jpl.nasa.gov],[issm],[http://issm.jpl.nasa.gov]) #Initializing configure
++AC_INIT([ISSM],[4.2],[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
+@@ -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/12321-12677/ISSM-12326-12327.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12326-12327.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12326-12327.diff	(revision 12679)
@@ -0,0 +1,14 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m	(revision 12326)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m	(revision 12327)
+@@ -352,6 +352,9 @@
+ 			 if ~isfield(structmd,'diagnostic_ref');
+ 				 md.diagnostic.referential=NaN*ones(md.mesh.numberofvertices,6);
+ 			 end
++			 if isfield(structmd,'npart');
++				 md.qmu.numberofpartitions=structmd.npart;
++			 end
+ 		 end% }}}
+ 		 function md = setdefaultparameters(md) % {{{1
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12327-12328.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12327-12328.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12327-12328.diff	(revision 12679)
@@ -0,0 +1,70 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12327)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12328)
+@@ -7,8 +7,6 @@
+ *            Please read README for more information
+ */
+ 
+-#include <cstring>
+-
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
+ #include "./StringToEnumx.h"
+@@ -261,13 +259,11 @@
+ 	      else if (strcmp(name,"Icefront")==0) return IcefrontEnum;
+ 	      else if (strcmp(name,"Input")==0) return InputEnum;
+ 	      else if (strcmp(name,"IntInput")==0) return IntInputEnum;
+-	      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 stage=3;
+    }
+    if(stage==3){
+-	      if (strcmp(name,"IntVecParam")==0) return IntVecParamEnum;
++	      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 if (strcmp(name,"Matice")==0) return MaticeEnum;
+@@ -386,13 +382,13 @@
+ 	      else if (strcmp(name,"StressTensoryy")==0) return StressTensoryyEnum;
+ 	      else if (strcmp(name,"StressTensoryz")==0) return StressTensoryzEnum;
+ 	      else if (strcmp(name,"StressTensorzz")==0) return StressTensorzzEnum;
+-	      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 stage=4;
+    }
+    if(stage==4){
+-	      if (strcmp(name,"P1DG")==0) return P1DGEnum;
++	      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 if (strcmp(name,"SaveResults")==0) return SaveResultsEnum;
+ 	      else if (strcmp(name,"BoolElementResult")==0) return BoolElementResultEnum;
+ 	      else if (strcmp(name,"BoolExternalResult")==0) return BoolExternalResultEnum;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12327)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12328)
+@@ -7,8 +7,6 @@
+ *            Please read README for more information
+ */
+ 
+-#include <cstring>
+-
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
+ #include "./EnumToStringx.h"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/MaximumNumberOfEnums.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/MaximumNumberOfEnums.m	(revision 12327)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/MaximumNumberOfEnums.m	(revision 12328)
+@@ -8,4 +8,4 @@
+ %   Usage:
+ %      macro=MaximumNumberOfEnums()
+ 
+-macro=437;
++macro=440;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12333-12334.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12333-12334.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12333-12334.diff	(revision 12679)
@@ -0,0 +1,61 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/dox/issm.dox
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/dox/issm.dox	(revision 12333)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/dox/issm.dox	(revision 12334)
+@@ -45,38 +45,47 @@
+ <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;">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>
++<th  bgcolor=#FFFFFF style="text-align:left;"> C++ </th><td  bgcolor=#FFFFFF style="text-align:right;">508</td><td  bgcolor=#FFFFFF style="text-align:right;">14595</td><td  bgcolor=#FFFFFF style="text-align:right;">16762</td><td  bgcolor=#FFFFFF style="text-align:right;">56034</td><td  bgcolor=#FFFFFF style="text-align:right;">87391</td>
+ </tr>
+ <tr>
+-<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>
++<th  bgcolor=#C6E2FF style="text-align:left;"> MATLAB </th><td  bgcolor=#C6E2FF style="text-align:right;">926</td><td  bgcolor=#C6E2FF style="text-align:right;">6911</td><td  bgcolor=#C6E2FF style="text-align:right;">13305</td><td  bgcolor=#C6E2FF style="text-align:right;">30623</td><td  bgcolor=#C6E2FF style="text-align:right;">50839</td>
+ </tr>
+ <tr>
+-<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>
++<th  bgcolor=#FFFFFF style="text-align:left;"> C/C++  Header </th><td  bgcolor=#FFFFFF style="text-align:right;">378</td><td  bgcolor=#FFFFFF style="text-align:right;">2754</td><td  bgcolor=#FFFFFF style="text-align:right;">2625</td><td  bgcolor=#FFFFFF style="text-align:right;">9801</td><td  bgcolor=#FFFFFF style="text-align:right;">15180</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;">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>
++<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;">997</td><td  bgcolor=#C6E2FF style="text-align:right;">80</td><td  bgcolor=#C6E2FF style="text-align:right;">8259</td><td  bgcolor=#C6E2FF style="text-align:right;">9336</td>
+ </tr>
+ <tr>
+-<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>
++<th  bgcolor=#FFFFFF style="text-align:left;"> Python </th><td  bgcolor=#FFFFFF style="text-align:right;">54</td><td  bgcolor=#FFFFFF style="text-align:right;">404</td><td  bgcolor=#FFFFFF style="text-align:right;">799</td><td  bgcolor=#FFFFFF style="text-align:right;">1435</td><td  bgcolor=#FFFFFF style="text-align:right;">2638</td>
+ </tr>
+ <tr>
+ <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>
++<th  bgcolor=#FFFFFF style="text-align:left;"> Bourne  Shell </th><td  bgcolor=#FFFFFF style="text-align:right;">6</td><td  bgcolor=#FFFFFF style="text-align:right;">47</td><td  bgcolor=#FFFFFF style="text-align:right;">73</td><td  bgcolor=#FFFFFF style="text-align:right;">241</td><td  bgcolor=#FFFFFF style="text-align:right;">361</td>
+ </tr>
+ <tr>
+-<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>
++<th  bgcolor=#C6E2FF style="text-align:left;"> Perl </th><td  bgcolor=#C6E2FF style="text-align:right;">3</td><td  bgcolor=#C6E2FF style="text-align:right;">21</td><td  bgcolor=#C6E2FF style="text-align:right;">23</td><td  bgcolor=#C6E2FF style="text-align:right;">240</td><td  bgcolor=#C6E2FF style="text-align:right;">284</td>
+ </tr>
+ <tr>
+ <th  bgcolor=#FFFFFF style="text-align:left;"> IDL </th><td  bgcolor=#FFFFFF style="text-align:right;">1</td><td  bgcolor=#FFFFFF style="text-align:right;">18</td><td  bgcolor=#FFFFFF style="text-align:right;">4</td><td  bgcolor=#FFFFFF style="text-align:right;">124</td><td  bgcolor=#FFFFFF style="text-align:right;">146</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#C6E2FF style="text-align:left;"> C </th><td  bgcolor=#C6E2FF style="text-align:right;">2</td><td  bgcolor=#C6E2FF style="text-align:right;">3</td><td  bgcolor=#C6E2FF style="text-align:right;">3</td><td  bgcolor=#C6E2FF style="text-align:right;">24</td><td  bgcolor=#C6E2FF style="text-align:right;">30</td>
++<th  bgcolor=#C6E2FF style="text-align:left;"> XML </th><td  bgcolor=#C6E2FF style="text-align:right;">8</td><td  bgcolor=#C6E2FF style="text-align:right;">37</td><td  bgcolor=#C6E2FF style="text-align:right;">121</td><td  bgcolor=#C6E2FF style="text-align:right;">85</td><td  bgcolor=#C6E2FF style="text-align:right;">243</td>
+ </tr>
+ <tr>
+-<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>
++<th  bgcolor=#FFFFFF style="text-align:left;"> Java </th><td  bgcolor=#FFFFFF style="text-align:right;">5</td><td  bgcolor=#FFFFFF style="text-align:right;">17</td><td  bgcolor=#FFFFFF style="text-align:right;">42</td><td  bgcolor=#FFFFFF style="text-align:right;">61</td><td  bgcolor=#FFFFFF style="text-align:right;">120</td>
+ </tr>
++<tr>
++<th  bgcolor=#C6E2FF style="text-align:left;"> D </th><td  bgcolor=#C6E2FF style="text-align:right;">7</td><td  bgcolor=#C6E2FF style="text-align:right;">3</td><td  bgcolor=#C6E2FF style="text-align:right;">0</td><td  bgcolor=#C6E2FF style="text-align:right;">27</td><td  bgcolor=#C6E2FF style="text-align:right;">30</td>
++</tr>
++<tr>
++<th  bgcolor=#FFFFFF style="text-align:left;"> C </th><td  bgcolor=#FFFFFF style="text-align:right;">3</td><td  bgcolor=#FFFFFF style="text-align:right;">4</td><td  bgcolor=#FFFFFF style="text-align:right;">35</td><td  bgcolor=#FFFFFF style="text-align:right;">21</td><td  bgcolor=#FFFFFF style="text-align:right;">60</td>
++</tr>
++<tr>
++<th  bgcolor=#C6E2FF style="text-align:left;"> SUM: </th><td  bgcolor=#C6E2FF style="text-align:right;">1915</td><td  bgcolor=#C6E2FF style="text-align:right;">25906</td><td  bgcolor=#C6E2FF style="text-align:right;">33869</td><td  bgcolor=#C6E2FF style="text-align:right;">107321</td><td  bgcolor=#C6E2FF style="text-align:right;">167096</td>
++</tr>
+ </table>
+ 
+ 	<I> Copyright (C) 2012 </I>
Index: /issm/oecreview/Archive/12321-12677/ISSM-12334-12335.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12334-12335.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12334-12335.diff	(revision 12679)
@@ -0,0 +1,30 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m	(revision 12334)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m	(revision 12335)
+@@ -243,6 +243,8 @@
+ 			 if isfield(structmd,'diagnostic_ref'), md.diagnostic.referential=structmd.diagnostic_ref; end
+ 
+ 
++
++
+ 			 %Field changes
+ 			 if (isfield(structmd,'type') & ischar(structmd.type)), 
+ 				 if strcmpi(structmd.type,'2d'), md.mesh.dimension=2; end
+@@ -349,12 +351,13 @@
+ 				 md.mesh.lowerelements=transpose(1:md.mesh.numberofelements)-md.mesh.numberofelements2d;
+ 				 md.mesh.lowerelements(1:md.mesh.numberofelements2d)=NaN;
+ 			 end
++				 
+ 			 if ~isfield(structmd,'diagnostic_ref');
+ 				 md.diagnostic.referential=NaN*ones(md.mesh.numberofvertices,6);
+ 			 end
+-			 if isfield(structmd,'npart');
+-				 md.qmu.numberofpartitions=structmd.npart;
+-			 end
++			 if isfield(structmd,'npart'); md.qmu.numberofpartitions=structmd.npart; end
++			 if isfield(structmd,'part'); md.qmu.partition=structmd.part; end
++				 
+ 		 end% }}}
+ 		 function md = setdefaultparameters(md) % {{{1
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12335-12336.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12335-12336.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12335-12336.diff	(revision 12679)
@@ -0,0 +1,9 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl	(revision 12335)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl	(revision 12336)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl
+___________________________________________________________________
+Modified: svn:mergeinfo
+   Merged /issm/trunk:r12334-12335
Index: /issm/oecreview/Archive/12321-12677/ISSM-12338-12339.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12338-12339.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12338-12339.diff	(revision 12679)
@@ -0,0 +1,15 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.cpp	(revision 12338)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.cpp	(revision 12339)
+@@ -28,8 +28,8 @@
+ 	this->y2=UNDEF;
+ }
+ /*}}}*/
+-/*FUNCTION Segment::Segment(int eid, double x1,double y1,double x2, double y2){{{1*/
+-Segment::Segment(int segment_eid, double segment_x1,double segment_y1,double segment_x2, double segment_y2){
++/*FUNCTION Segment::Segment(int eid, IssmDouble x1,IssmDouble y1,IssmDouble x2, IssmDouble y2){{{1*/
++Segment::Segment(int segment_eid, IssmDouble segment_x1,IssmDouble segment_y1,IssmDouble segment_x2, IssmDouble segment_y2){
+ 
+ 	this->eid=segment_eid;
+ 	this->x1=segment_x1;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12339-12340.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12339-12340.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12339-12340.diff	(revision 12679)
@@ -0,0 +1,38 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.cpp	(revision 12339)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.cpp	(revision 12340)
+@@ -22,8 +22,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Vertex::Vertex(int vertex_id, double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){{{1*/
+-Vertex::Vertex(int vertex_id, int vertex_sid,double vertex_x, double vertex_y, double vertex_z, double vertex_sigma,int vertex_connectivity){
++/*FUNCTION Vertex::Vertex(int vertex_id, IssmDouble vertex_x, IssmDouble vertex_y, IssmDouble vertex_z, IssmDouble vertex_sigma){{{1*/
++Vertex::Vertex(int vertex_id, int vertex_sid,IssmDouble vertex_x, IssmDouble vertex_y, IssmDouble vertex_z, IssmDouble vertex_sigma,int vertex_connectivity){
+ 	this->Init(vertex_id, vertex_sid,vertex_x, vertex_y, vertex_z, vertex_sigma,vertex_connectivity);
+ }
+ /*}}}*/
+@@ -43,7 +43,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vertex::Init{{{1*/
+-void Vertex::Init(int vertex_id, int vertex_sid,double vertex_x, double vertex_y, double vertex_z, double vertex_sigma,int vertex_connectivity){
++void Vertex::Init(int vertex_id, int vertex_sid,IssmDouble vertex_x, IssmDouble vertex_y, IssmDouble vertex_z, IssmDouble vertex_sigma,int vertex_connectivity){
+ 
+ 	/*all the initialization has been done by the initializer, just fill in the id: */
+ 	this->id=vertex_id;
+@@ -198,10 +198,10 @@
+ int    Vertex::Sid(void){ return sid; }
+ /*}}}*/
+ /*FUNCTION Vertex::UpdateVertexPosition {{{1*/
+-void  Vertex::UpdatePosition(Vector* vz,Parameters* parameters,double* thickness,double* bed){
++void  Vertex::UpdatePosition(Vector* vz,Parameters* parameters,IssmDouble* thickness,IssmDouble* bed){
+ 
+-	double oldz,newz;
+-	double dt,velz;
++	IssmDouble oldz,newz;
++	IssmDouble dt,velz;
+ 
+ 	/*Get time stepping*/
+ 	parameters->FindParam(&dt,TimesteppingTimeStepEnum);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12340-12341.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12340-12341.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12340-12341.diff	(revision 12679)
@@ -0,0 +1,24 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12340)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12341)
+@@ -24,6 +24,7 @@
+ *            Please read README for more information
+ */
+ 
++#include <cstring>
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
+ #include "./EnumToStringx.h"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12340)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12341)
+@@ -7,6 +7,7 @@
+ *            Please read README for more information
+ */
+ 
++#include <cstring>
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
+ #include "./EnumToStringx.h"
Index: /issm/oecreview/Archive/12321-12677/ISSM-12341-12342.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12341-12342.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12341-12342.diff	(revision 12679)
@@ -0,0 +1,24 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12341)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12342)
+@@ -67,6 +67,7 @@
+ *            Please read README for more information
+ */
+ 
++#include <cstring>
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
+ #include "./StringToEnumx.h"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12341)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12342)
+@@ -7,6 +7,7 @@
+ *            Please read README for more information
+ */
+ 
++#include <cstring>
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
+ #include "./StringToEnumx.h"
Index: /issm/oecreview/Archive/12321-12677/ISSM-12342-12343.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12342-12343.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12342-12343.diff	(revision 12679)
@@ -0,0 +1,12 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12342)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12343)
+@@ -175,6 +175,7 @@
+ 					./shared/shared.h\
+ 					./shared/Alloc/alloc.h\
+ 					./shared/Alloc/alloc.cpp\
++					./shared/Alloc/xNewDelete.h\
+ 					./shared/Matrix/matrix.h\
+ 					./shared/Matrix/MatrixUtils.cpp\
+ 					./shared/Dofs/dofs.h\
Index: /issm/oecreview/Archive/12321-12677/ISSM-12343-12344.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12343-12344.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12343-12344.diff	(revision 12679)
@@ -0,0 +1,12 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/shared.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/shared.h	(revision 12343)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/shared.h	(revision 12344)
+@@ -8,6 +8,7 @@
+ 
+ #include "Alloc/alloc.h"
+ #include "Alloc/alloc_module.h"
++#include "Alloc/xNewDelete.h"
+ #include "Exceptions/exceptions.h"
+ #include "Exp/exp.h"
+ #include "TriMesh/trimesh.h"
Index: /issm/oecreview/Archive/12321-12677/ISSM-12344-12345.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12344-12345.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12344-12345.diff	(revision 12679)
@@ -0,0 +1,215 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12344)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12345)
+@@ -438,7 +438,7 @@
+ /*}}}*/
+ #ifdef _HAVE_DIAGNOSTIC_
+ /*FUNCTION Node::GetCoordinateSystem{{{1*/
+-void Node::GetCoordinateSystem(double* coord_system_out){
++void Node::GetCoordinateSystem(IssmDouble* coord_system_out){
+ 
+ 	/*Copy coord_system*/
+ 	for(int k=0;k<3;k++) for(int l=0;l<3;l++) coord_system_out[3*k+l]=this->coord_system[k][l];
+@@ -465,7 +465,7 @@
+ 
+ /*Node numerics:*/
+ /*FUNCTION Node::ApplyConstraints{{{1*/
+-void  Node::ApplyConstraint(int dof,double value){
++void  Node::ApplyConstraint(int dof,IssmDouble value){
+ 
+ 	int index;
+ 
+@@ -486,8 +486,8 @@
+ /*FUNCTION Node::CreateVecSets {{{1*/
+ void  Node::CreateVecSets(Vector* pv_g,Vector* pv_f,Vector* pv_s){
+ 
+-	double gvalue=1.0; //all nodes are in the g set;
+-	double value;
++	IssmDouble gvalue=1.0; //all nodes are in the g set;
++	IssmDouble value;
+ 
+ 	int i;
+ 
+@@ -497,11 +497,11 @@
+ 		pv_g->SetValue(indexing.gdoflist[i],gvalue,INS_VAL);
+ 		
+ 		/*f set: */
+-		value=(double)this->indexing.f_set[i];
++		value=(IssmDouble)this->indexing.f_set[i];
+ 		pv_f->SetValue(indexing.gdoflist[i],value,INS_VAL);
+ 
+ 		/*s set: */
+-		value=(double)this->indexing.s_set[i];
++		value=(IssmDouble)this->indexing.s_set[i];
+ 		pv_s->SetValue(indexing.gdoflist[i],value,INS_VAL);
+ 
+ 	}
+@@ -513,12 +513,12 @@
+ void  Node::CreateNodalConstraints(Vector* ys){
+ 
+ 	int i;
+-	double* values=NULL;
++	IssmDouble* values=NULL;
+ 	int count;
+ 
+ 	/*Recover values for s set and plug them in constraints vector: */
+ 	if(this->indexing.ssize){
+-		values=(double*)xmalloc(this->indexing.ssize*sizeof(double));
++		values=xNew<IssmDouble>(this->indexing.ssize);
+ 		count=0;
+ 		for(i=0;i<this->indexing.gsize;i++){
+ 			if(this->indexing.s_set[i]){
+@@ -533,7 +533,7 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&values);
++	xDelete<IssmDouble>(values);
+ 
+ 
+ }
+@@ -633,7 +633,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Node::GetSigma {{{1*/
+-double Node::GetSigma(){
++IssmDouble Node::GetSigma(){
+ 	Vertex* vertex=NULL;
+ 
+ 	vertex=(Vertex*)hvertex->delivers();
+@@ -641,7 +641,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Node::GetX {{{1*/
+-double Node::GetX(){
++IssmDouble Node::GetX(){
+ 	Vertex* vertex=NULL;
+ 
+ 	vertex=(Vertex*)hvertex->delivers();
+@@ -649,7 +649,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Node::GetY {{{1*/
+-double Node::GetY(){
++IssmDouble Node::GetY(){
+ 	Vertex* vertex=NULL;
+ 
+ 	vertex=(Vertex*)hvertex->delivers();
+@@ -657,7 +657,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Node::GetZ {{{1*/
+-double Node::GetZ(){
++IssmDouble Node::GetZ(){
+ 	Vertex* vertex=NULL;
+ 
+ 	vertex=(Vertex*)hvertex->delivers();
+@@ -715,8 +715,8 @@
+ 	return onsurface;
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromVector(double* vector, int name, int type){{{1*/
+-void  Node::InputUpdateFromVector(double* vector, int name, int type){
++/*FUNCTION Node::InputUpdateFromVector(IssmDouble* vector, int name, int type){{{1*/
++void  Node::InputUpdateFromVector(IssmDouble* vector, int name, int type){
+ 
+ 	/*Nothing updated yet*/
+ }
+@@ -733,14 +733,14 @@
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromVectorDakota(double* vector, int name, int type){{{1*/
+-void  Node::InputUpdateFromVectorDakota(double* vector, int name, int type){
++/*FUNCTION Node::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){{{1*/
++void  Node::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){
+ 
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){{{1*/
+-void  Node::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
++/*FUNCTION Node::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){{{1*/
++void  Node::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){
+ 
+ 	/*Nothing updated yet*/
+ }
+@@ -757,8 +757,8 @@
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromConstant(double constant, int name){{{1*/
+-void  Node::InputUpdateFromConstant(double constant, int name){
++/*FUNCTION Node::InputUpdateFromConstant(IssmDouble constant, int name){{{1*/
++void  Node::InputUpdateFromConstant(IssmDouble constant, int name){
+ 
+ 	/*Nothing updated yet*/
+ }
+@@ -776,7 +776,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Node::UpdateSpcs {{{1*/
+-void   Node::UpdateSpcs(double* ys){
++void   Node::UpdateSpcs(IssmDouble* ys){
+ 
+ 	int     count=0;
+ 	int     i;
+@@ -791,9 +791,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION Node::VecMerge {{{1*/
+-void   Node::VecMerge(Vector* ug, double* vector_serial,int setenum){
++void   Node::VecMerge(Vector* ug, IssmDouble* vector_serial,int setenum){
+ 
+-	double* values=NULL;
++	IssmDouble* values=NULL;
+ 	int*    indices=NULL;
+ 	int     count=0;
+ 	int     i;
+@@ -801,7 +801,7 @@
+ 	if(setenum==FsetEnum){
+ 		if(this->indexing.fsize){
+ 			indices=(int*)xmalloc(this->indexing.fsize*sizeof(int));
+-			values=(double*)xmalloc(this->indexing.fsize*sizeof(double));
++			values=(IssmDouble*)xmalloc(this->indexing.fsize*sizeof(IssmDouble));
+ 
+ 			for(i=0;i<this->indexing.gsize;i++){
+ 				if(this->indexing.f_set[i]){
+@@ -819,7 +819,7 @@
+ 	else if(setenum==SsetEnum){
+ 		if(this->indexing.ssize){
+ 			indices=(int*)xmalloc(this->indexing.ssize*sizeof(int));
+-			values=(double*)xmalloc(this->indexing.ssize*sizeof(double));
++			values=(IssmDouble*)xmalloc(this->indexing.ssize*sizeof(IssmDouble));
+ 
+ 			for(i=0;i<this->indexing.gsize;i++){
+ 				if(this->indexing.s_set[i]){
+@@ -842,15 +842,15 @@
+ }
+ /*}}}*/
+ /*FUNCTION Node::VecReduce {{{1*/
+-void   Node::VecReduce(Vector* vector, double* ug_serial,int setenum){
++void   Node::VecReduce(Vector* vector, IssmDouble* ug_serial,int setenum){
+ 
+-	double* values=NULL;
++	IssmDouble* values=NULL;
+ 	int     count=0;
+ 	int     i;
+ 
+ 	if(setenum==FsetEnum){
+ 		if(this->indexing.fsize){
+-			values=(double*)xmalloc(this->indexing.fsize*sizeof(double));
++			values=(IssmDouble*)xmalloc(this->indexing.fsize*sizeof(IssmDouble));
+ 
+ 			for(i=0;i<this->indexing.gsize;i++){
+ 				if(this->indexing.f_set[i]){
+@@ -866,7 +866,7 @@
+ 	}
+ 	else if(setenum==SsetEnum){
+ 		if(this->indexing.ssize){
+-			values=(double*)xmalloc(this->indexing.ssize*sizeof(double));
++			values=(IssmDouble*)xmalloc(this->indexing.ssize*sizeof(IssmDouble));
+ 
+ 			for(i=0;i<this->indexing.gsize;i++){
+ 				if(this->indexing.s_set[i]){
Index: /issm/oecreview/Archive/12321-12677/ISSM-12350-12351.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12350-12351.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12350-12351.diff	(revision 12679)
@@ -0,0 +1,1223 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solveparallel.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solveparallel.m	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solveparallel.m	(revision 12351)
+@@ -1,58 +0,0 @@
+-function md=solveparallel(md,options)
+-%SOLVEPARALLEL - solution sequence using a cluster in parallel mode
+-%
+-%   Usage:
+-%      md=solveparallel(md);
+-
+-%retrieve cluster: otherwise, we can't call its methods (subsref bug)
+-cluster=md.cluster;
+-
+-if options.loadonly,  
+-	md=loadresultsfromcluster(md);
+-else
+-
+-	%In parallel mode, we need to make sure we have PETSC support, otherwise, we run with only one cpu: 
+-	if ~ispetsc,
+-		disp('PETSC support not included, running on 1 cpu only!');
+-		cluster.np=1;
+-	end
+-
+-	%First, build a runtime name that is unique, that we will use to create 
+-	%directories, name jobs, etc ...
+-	c=clock; md.private.runtimename=sprintf('%s-%02i-%02i-%04i-%02i-%02i-%02i-%i',md.miscellaneous.name,c(2),c(3),c(1),c(4),c(5),floor(c(6)),feature('GetPid'));
+-
+-	if verLessThan('matlab', '7.6')
+-		BuildQueueScript(cluster,md);
+-		LaunchQueueJob(cluster,md,options);
+-	else
+-		cluster.BuildQueueScript(md);
+-		cluster.LaunchQueueJob(md,options);
+-	end
+-
+-	if ~strcmpi(options.upload,'on'), %did we even try to run? if so, wait on lock
+-
+-		%Do we return, or just wait for results?
+-		if (md.settings.waitonlock>0 &  ~strcmpi(options.batch,'yes')),
+-			%we wait for the done file
+-			islock=waitonlock(md);
+-			if islock==0,
+-				%no results to be loaded
+-				disp('The results must be loaded manually with md=loadresultsfromcluster(md).');
+-			else
+-				%load results
+-				disp('loading results from cluster');
+-				md=loadresultsfromcluster(md);
+-			end
+-		end
+-
+-		%post processes qmu results if necessary
+-		if md.qmu.isdakota,
+-			if ~strncmpi(options.keep,'y',1)
+-				system(['rm -rf qmu' num2str(feature('GetPid'))]);
+-			end
+-		end
+-	else
+-		error('solveparallel done uploading test decks');
+-	end
+-
+-end
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solve.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solve.m	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solve.m	(revision 12351)
+@@ -23,10 +23,8 @@
+ %   Examples:
+ %      md=solve(md,DiagnosticSolutionEnum);
+ 
+-%recover options
++%recover and process solve options
+ options=pairoptions(varargin{:},'solution_type',solutionenum);
+-
+-%add default options
+ options=process_solve_options(options);
+ 
+ %recover some fields
+@@ -45,46 +43,64 @@
+ 	ismodelselfconsistent(md),
+ end
+ 
+-%if running qmu analysis, some preprocessing of dakota files using 
+-%models fields needs to be carried out. 
++%if running qmu analysis, some preprocessing of dakota files using models
++%fields needs to be carried out. 
+ if md.qmu.isdakota,
+ 	md=preqmu(md,options);
+ end
+ 
+-%Save model as is (in case of a crash)
+-assignin('base',inputname(1),md);
+-
+ %flaim analysis
+-if (md.private.solution == FlaimSolutionEnum)
++if (options.solution_type == FlaimSolutionEnum)
+ 	md=flaim_sol(md,options);
+ 	md.private.solution=EnumToString(options.solution_type);
+ 	return;
+ end
+ 
+-%Marshall model data into a binary file.
+-marshall(md);
++%Do we load results only?
++if options.loadonly,  
++	md=loadresultsfromcluster(md);
++	return;
++end
+ 
+-%write a template file for issm to use, in parallel
+-PetscFile(md.solver,[md.miscellaneous.name '.petsc']);
++%Wite all input files
++marshall(md);                                          % bin file
++PetscFile(md.solver,[md.miscellaneous.name '.petsc']); % petsc file
+ 
+-%If running in parallel, we have a different way of launching the solution
+-%sequences. 
+-if ~strcmpi(md.cluster.name,'none'),
+-	md=solveparallel(md,options);
+-	return;
++%Launch job on remote cluster
++cluster=md.cluster;
++
++%we need to make sure we have PETSC support, otherwise, we run with only one cpu: 
++if ~ispetsc,
++	disp('PETSC support not included, running on 1 cpu only!');
++	cluster.np=1;
+ end
+ 
+-%Launch correct solution sequence
+-md=issm(md,md.private.solution);
++%First, build a runtime name that is unique
++c=clock; md.private.runtimename=sprintf('%s-%02i-%02i-%04i-%02i-%02i-%02i-%i',md.miscellaneous.name,c(2),c(3),c(1),c(4),c(5),floor(c(6)),feature('GetPid'));
+ 
+-%post processes qmu results if necessary
+-if md.qmu.isdakota,
+-	md=postqmu(md);
+-	cd ..
+-	if ~strncmpi(options.keep,'y',1)
+-		system(['rm -rf qmu' num2str(feature('GetPid'))]);
++BuildQueueScript(cluster,md.miscellaneous.name,md.private.solution,md.settings.io_gather,md.debug.valgrind,md.debug.gprof);
++LaunchQueueJob(cluster,md,options);
++
++if ~strcmpi(options.upload,'on'), %did we even try to run? if so, wait on lock
++
++	%Do we return, or just wait for results?
++	if (md.settings.waitonlock>0 &  ~strcmpi(options.batch,'yes')),
++		%we wait for the done file
++		islock=waitonlock(md);
++		if islock==0, %no results to be loaded
++			disp('The results must be loaded manually with md=loadresultsfromcluster(md).');
++		else          %load results
++			disp('loading results from cluster');
++			md=loadresultsfromcluster(md);
++		end
+ 	end
++
++	%post processes qmu results if necessary
++	if md.qmu.isdakota,
++		if ~strncmpi(options.keep,'y',1)
++			system(['rm -rf qmu' num2str(feature('GetPid'))]);
++		end
++	end
++else
++	disp('solve done uploading test decks');
+ end
+-
+-%convert analysis type to string finally
+-md.private.solution=EnumToString(options.solution_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/pairoptions.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/pairoptions.m	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/pairoptions.m	(revision 12351)
+@@ -222,5 +222,20 @@
+ 				end
+ 			end
+ 		end % }}}
++		function marshall(obj,fid)% {{{
++			disp('No options marshalled for now');
++			for i=1:size(obj.list,1),
++				name  = obj.list{i,1};
++				value = obj.list{i,2};
++
++				if (isnumeric(value) & numel(value)==1),
++					%
++				elseif ischar(value),
++					%
++				else
++					error(['Cannot marshall option ' name ': format not supported yet']);
++				end
++			end
++		end % }}}
+ 	end
+ end
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/none.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/none.py	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/none.py	(revision 12351)
+@@ -1,24 +0,0 @@
+-#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: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/greenplanet.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/greenplanet.m	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/greenplanet.m	(revision 12351)
+@@ -7,7 +7,7 @@
+ 
+ classdef greenplanet
+     properties (SetAccess=public)  
+-		 % {{{1
++		 % {{{
+ 		 name='greenplanet'
+ 		 login='';
+ 		 numnodes=20;
+@@ -23,7 +23,7 @@
+ 		 % }}}
+ 	 end
+ 	 methods
+-		 function cluster=greenplanet(varargin) % {{{1
++		 function cluster=greenplanet(varargin) % {{{
+ 
+ 			 %initialize cluster using default settings if provided
+ 			 if (exist('greenplanet_settings')==2), greenplanet_settings; end
+@@ -32,7 +32,7 @@
+ 			 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster);
+ 		 end
+ 		 %}}}
+-		 function disp(cluster) % {{{1
++		 function disp(cluster) % {{{
+ 			 %  display the object
+ 			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+ 			 disp(sprintf('    name: %s',cluster.name));
+@@ -47,7 +47,7 @@
+ 			 disp(sprintf('    interactive: %i',cluster.interactive));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{1
++		 function checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'rignot','default'};
+ 			 queue_requirements_time=[Inf Inf];
+@@ -62,19 +62,16 @@
+ 
+ 		 end
+ 		 %}}}
+-		 function BuildQueueScript(cluster,md) % {{{1
++		 function BuildQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
+ 
+-			 %retrieve parameters 
+-			 modelname=md.miscellaneous.name; 
+-			 solution=md.private.solution;
+-			 isvalgrind=md.debug.valgrind;
++			 if(isvalgrind), disp('valgrind not supported by cluster, ignoring...'); end
++			 if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
+ 
+ 			 %compute number of processors
+ 			 cluster.np=cluster.numnodes*cluster.cpuspernode;
+ 
+-			 %open file for writing: 
++			 %write queuing script 
+ 			 fid=fopen([modelname '.queue'],'w');
+-
+ 			 fprintf(fid,'#PBS -S /bin/bash\n');
+ 			 fprintf(fid,'#PBS -N %s\n',modelname);
+ 			 fprintf(fid,'#PBS -q %s \n',cluster.queue);
+@@ -83,25 +80,18 @@
+ 			 fprintf(fid,'#PBS -M mmorligh@uci.edu\n');
+ 			 fprintf(fid,'#PBS -o %s.outlog \n',modelname);
+ 			 fprintf(fid,'#PBS -e %s.errlog \n\n',modelname);
+-
+ 			 fprintf(fid,'cd %s/%s\n\n',cluster.executionpath,md.private.runtimename);
+ 			 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
+-
+-			 if ~md.settings.io_gather,
+-				 %concatenate the output files:
++			 if ~io_gather, %concatenate the output files:
+ 				 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
+ 			 end
+-
+-			 %close file
+ 			 fclose(fid);
+ 
+ 			 %in interactive mode, create a run file, and errlog and outlog file
+ 			 if cluster.interactive,
+ 				 fid=fopen([modelname '.run'],'w');
+ 				 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
+-
+-				 if ~md.settings.io_gather,
+-					 %concatenate the output files:
++				 if ~io_gather, %concatenate the output files:
+ 					 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
+ 				 end
+ 				 fclose(fid);
+@@ -111,7 +101,7 @@
+ 				 fclose(fid);
+ 			 end
+ 		 end %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{1
++		 function LaunchQueueJob(cluster,md,options)% {{{
+ 			 
+ 			 %lauch command, to be executed via ssh
+ 			 if ~cluster.interactive, 
+@@ -151,7 +141,7 @@
+ 			end
+ 		 end
+ 		 %}}}
+-		 function Download(cluster,md)% {{{1
++		 function Download(cluster,md)% {{{
+ 
+ 			%some check
+ 			if isempty(md.private.runtimename),
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/gemini.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/gemini.m	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/gemini.m	(revision 12351)
+@@ -7,7 +7,7 @@
+ 
+ classdef gemini
+     properties (SetAccess=public) 
+-	% {{{1
++	% {{{
+ 		name='gemini'
+ 		login='username';
+ 		np=50;
+@@ -19,11 +19,11 @@
+ 	%}}}
+     end
+     methods
+-		 function cluster=gemini(varargin) % {{{1
++		 function cluster=gemini(varargin) % {{{
+ 			 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster);
+ 		 end
+ 		 %}}}
+-		 function disp(cluster) % {{{1
++		 function disp(cluster) % {{{
+ 			 %  display the object
+ 			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+ 			 disp(sprintf('    name: %s',cluster.name));
+@@ -36,7 +36,7 @@
+ 			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{1
++		 function checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'debug','shortg','longg'};
+ 			 queue_requirements_time=[60 180 720];
+@@ -45,15 +45,13 @@
+ 			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
+ 		 end
+ 		 %}}}
+-		 function BuildQueueScript(cluster,md) % {{{1
++		 function BuildQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
+ 
+-			 %retrieve parameters 
+-			 modelname=md.miscellaneous.name; 
+-			 solution=md.private.solution;
++			 if(isvalgrind), disp('valgrind not supported by cluster, ignoring...'); end
++			 if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
+ 
+-			 %open file for writing: 
++			 %write queuing script 
+ 			 fid=fopen([modelname '.queue'],'w');
+-
+ 			 fprintf(fid,'#!/bin/sh\n');
+ 			 fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds.
+ 			 fprintf(fid,'#PBS -N %s\n',modelname);
+@@ -68,13 +66,11 @@
+ 			 fprintf(fid,'cd $PBS_O_WORKDIR\n');
+ 			 fprintf(fid,'export OMP_NUM_THREADS=1\n');
+ 			 fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
+-
+-			 %close file
+ 			 fclose(fid);
+ 
+ 		 end
+ 		 %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{1
++		 function LaunchQueueJob(cluster,md,options)% {{{
+ 			 
+ 			 %lauch command, to be executed via ssh
+ 			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' md.private.runtimename ' && mkdir ' md.private.runtimename ...
+@@ -102,7 +98,7 @@
+ 
+ 		 end
+ 		 %}}}
+-		 function Download(cluster,md)% {{{1
++		 function Download(cluster,md)% {{{
+ 
+ 			%some check
+ 			if isempty(md.private.runtimename),
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.py	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.py	(revision 12351)
+@@ -35,183 +35,3 @@
+ 		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: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m	(revision 12351)
+@@ -7,7 +7,7 @@
+ 
+ classdef pfe
+     properties (SetAccess=public)  
+-		 % {{{1
++		 % {{{
+ 		 name='pfe'
+ 		 login='';
+ 		 numnodes=20;
+@@ -28,7 +28,7 @@
+ 		 % }}}
+ 	 end
+ 	 methods
+-		 function cluster=pfe(varargin) % {{{1
++		 function cluster=pfe(varargin) % {{{
+ 
+ 			 %initialize cluster using default settings if provided
+ 			 if (exist('pfe_settings')==2), pfe_settings; end
+@@ -37,7 +37,7 @@
+ 			 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster);
+ 		 end
+ 		 %}}}
+-		 function disp(cluster) % {{{1
++		 function disp(cluster) % {{{
+ 			 %  display the object
+ 			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+ 			 disp(sprintf('    name: %s',cluster.name));
+@@ -55,7 +55,7 @@
+ 			 disp(sprintf('    hyperthreading: %i',cluster.hyperthreading));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{1
++		 function checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'long','normal','debug'};
+ 			 queue_requirements_time=[5*24*60 8*60 2*60];
+@@ -95,19 +95,15 @@
+ 
+ 		 end
+ 		 %}}}
+-		 function BuildQueueScript(cluster,md) % {{{1
++		 function BuildQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
+ 
+-			 %retrieve parameters 
+-			 modelname=md.miscellaneous.name; 
+-			 solution=md.private.solution;
+-			 isvalgrind=md.debug.valgrind;
++			 if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
+ 
+ 			 %compute number of processors
+ 			 cluster.np=cluster.numnodes*cluster.cpuspernode;
+ 
+-			 %open file for writing: 
++			 %write queuing script 
+ 			 fid=fopen([modelname '.queue'],'w');
+-
+ 			 fprintf(fid,'#PBS -S /bin/bash\n');
+ %			 fprintf(fid,'#PBS -N %s\n',modelname);
+ 			 fprintf(fid,'#PBS -l select=%i:ncpus=%i:model=%s\n',cluster.numnodes,cluster.cpuspernode,cluster.processor);
+@@ -117,26 +113,17 @@
+ 			 fprintf(fid,'#PBS -m e\n');
+ 			 fprintf(fid,'#PBS -o %s.outlog \n',modelname);
+ 			 fprintf(fid,'#PBS -e %s.errlog \n\n',modelname);
+-
+ 			 fprintf(fid,'. /usr/share/modules/init/bash\n\n');
+-
+ 			 fprintf(fid,'module load comp-intel/11.1.046\n');
+ 			 fprintf(fid,'module load mpi/mpt.1.25\n');
+ 			 fprintf(fid,'module load math/intel_mkl_64_10.0.011\n\n');
+-
+ 			 fprintf(fid,'export PATH="$PATH:."\n\n');
+ 			 fprintf(fid,'export MPI_GROUP_MAX=64\n\n');
+-
+ 			 fprintf(fid,'cd $PBS_O_WORKDIR\n\n');
+-
+ 			 fprintf(fid,'mpiexec -np %i %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution),modelname);
+-
+-			 if ~md.settings.io_gather,
+-				 %concatenate the output files:
++			 if ~io_gather, %concatenate the output files:
+ 				 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
+ 			 end
+-
+-			 %close file
+ 			 fclose(fid);
+ 
+ 			 %in interactive mode, create a run file, and errlog and outlog file
+@@ -147,9 +134,7 @@
+ 				 else
+ 					 fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution),modelname);
+ 				 end
+-
+-				 if ~md.settings.io_gather,
+-					 %concatenate the output files:
++				 if ~io_gather, %concatenate the output files:
+ 					 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
+ 				 end
+ 				 fclose(fid);
+@@ -159,7 +144,7 @@
+ 				 fclose(fid);
+ 			 end
+ 		 end %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{1
++		 function LaunchQueueJob(cluster,md,options)% {{{
+ 			 
+ 			 %lauch command, to be executed via ssh
+ 			 if ~cluster.interactive, 
+@@ -203,7 +188,7 @@
+ 			end
+ 		 end
+ 		 %}}}
+-		 function Download(cluster,md)% {{{1
++		 function Download(cluster,md)% {{{
+ 
+ 			%some check
+ 			if isempty(md.private.runtimename),
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m	(revision 12351)
+@@ -7,7 +7,7 @@
+ 
+ classdef castor
+     properties (SetAccess=public) 
+-		 % {{{1
++		 % {{{
+ 		 name='castor'
+ 		 login='username';
+ 		 np   =128;
+@@ -19,11 +19,11 @@
+ 		 %}}}
+ 	 end
+ 	 methods
+-		 function cluster=castor(varargin) % {{{1
++		 function cluster=castor(varargin) % {{{
+ 			 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster);
+ 		 end
+ 		 %}}}
+-		 function disp(cluster) % {{{1
++		 function disp(cluster) % {{{
+ 			 %  display the object
+ 			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+ 			 disp(sprintf('    name: %s',cluster.name));
+@@ -36,7 +36,7 @@
+ 			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{1
++		 function checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'shortc','longc'};
+ 			 queue_requirements_time=[180 720];
+@@ -45,15 +45,13 @@
+ 			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
+ 		 end
+ 		 %}}}
+-		 function BuildQueueScript(cluster,md) % {{{1
++		 function BuildQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
+ 
+-			 %retrieve parameters 
+-			 modelname=md.miscellaneous.name; 
+-			 solution=md.private.solution;
++			 if(isvalgrind), disp('valgrind not supported by cluster, ignoring...'); end
++			 if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
+ 
+-			 %open file for writing: 
++			 %write queuing script 
+ 			 fid=fopen([modelname '.queue'],'w');
+-
+ 			 fprintf(fid,'#!/bin/sh\n');
+ 			 fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds.
+ 			 fprintf(fid,'#PBS -N %s\n',modelname);
+@@ -63,18 +61,15 @@
+ 			 end
+ 			 fprintf(fid,'#PBS -o %s.outlog \n',modelname);
+ 			 fprintf(fid,'#PBS -e %s.errlog \n',modelname);
+-
+ 			 fprintf(fid,'export PBS_O_WORKDIR=%s\n',cluster.executionpath);
+ 			 fprintf(fid,'cd $PBS_O_WORKDIR\n');
+ 			 fprintf(fid,'export OMP_NUM_THREADS=1\n');
+ 			 fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
+-
+-			 %close file
+ 			 fclose(fid);
+ 
+ 		 end
+ 		 %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{1
++		 function LaunchQueueJob(cluster,md,options)% {{{
+ 			 
+ 			 %lauch command, to be executed via ssh
+ 			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' md.private.runtimename ' && mkdir ' md.private.runtimename ...
+@@ -102,7 +97,7 @@
+ 
+ 		 end
+ 		 %}}}
+-		 function Download(cluster,md)% {{{1
++		 function Download(cluster,md)% {{{
+ 
+ 			%some check
+ 			if isempty(md.private.runtimename),
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m	(revision 12351)
+@@ -6,7 +6,7 @@
+ 
+ classdef generic
+     properties (SetAccess=public) 
+-		 % {{{1
++		 % {{{
+ 		 name='';
+ 		 login='';
+ 		 np=1;
+@@ -20,7 +20,7 @@
+ 		 %}}}
+ 	 end
+ 	 methods
+-		 function cluster=generic(varargin) % {{{1
++		 function cluster=generic(varargin) % {{{
+ 
+ 			 %use provided options to change fields
+ 			 options=pairoptions(varargin{:});
+@@ -35,7 +35,7 @@
+ 			 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster);
+ 		 end
+ 		 %}}}
+-		 function disp(cluster) % {{{1
++		 function disp(cluster) % {{{
+ 			 %  display the object
+ 			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+ 			 disp(sprintf('    name: %s',cluster.name));
+@@ -49,7 +49,7 @@
+ 			 disp(sprintf('    valgrindsup: %s',cluster.valgrindsup));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{1
++		 function checkconsistency(cluster,md,solution,analyses) % {{{
+ 			 if cluster.np<1
+ 				 checkmessage(['number of processors should be at least 1']);
+ 			 end
+@@ -58,15 +58,9 @@
+ 			 end
+ 		 end
+ 		 %}}}
+-		 function BuildQueueScript(cluster,md) % {{{1
++		 function BuildQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
+ 		 
+-			 %retrieve parameters
+-			 modelname=md.miscellaneous.name;
+-			 solution=md.private.solution;
+-			 isvalgrind=md.debug.valgrind;
+-			 isgprof=md.debug.gprof;
+-
+-			 %open file for writing: 
++			 %write queuing script 
+ 			 if ~ispc,
+ 				 fid=fopen([modelname '.queue'],'w');
+ 			 else
+@@ -114,17 +108,13 @@
+ 
+ 			 end
+ 
+-			 if ~md.settings.io_gather,
+-				 if ~ispc,
+-					 %concatenate the output files:
++			 if ~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
+@@ -132,11 +122,9 @@
+ 				 fid=fopen([modelname '.errlog'],'w'); fclose(fid);
+ 				 fid=fopen([modelname '.outlog'],'w'); fclose(fid);
+ 			 end
+-
+-
+ 		 end
+ 		 %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{1
++		 function LaunchQueueJob(cluster,md,options)% {{{
+ 			 
+ 			 if ~ispc,
+ 					 %lauch command, to be executed via ssh
+@@ -170,7 +158,7 @@
+ 			end
+ 
+ 		end %}}}
+-		 function Download(cluster,md)% {{{1
++		 function Download(cluster,md)% {{{
+ 
+ 			if ~ispc,
+ 				%some check
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/acenet.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/acenet.m	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/acenet.m	(revision 12351)
+@@ -7,7 +7,7 @@
+ 
+ classdef acenet
+     properties (SetAccess=public) 
+-		 % {{{1
++		 % {{{
+ 		 name='glacdyn.ace-net.ca'
+ 		 %name='placentia.ace-net.ca'
+ 		 %name='brasdor.ace-net.ca'
+@@ -22,7 +22,7 @@
+ 		 %}}}
+ 	 end
+ 	 methods
+-		 function cluster=acenet(varargin) % {{{1
++		 function cluster=acenet(varargin) % {{{
+ 			 %use provided options to change fields
+ 			 options=pairoptions(varargin{:});
+ 
+@@ -33,7 +33,7 @@
+ 			 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster);
+ 		 end
+ 		 %}}}
+-		 function disp(cluster) % {{{1
++		 function disp(cluster) % {{{
+ 			 %  display the object
+ 			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+ 			 disp(sprintf('    name: %s',cluster.name));
+@@ -46,7 +46,7 @@
+ 			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{1
++		 function checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'debug','shortq','longq'};
+ 			 queue_requirements_time=[60*1 60*3 60*17];
+@@ -55,54 +55,30 @@
+ 			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
+ 		 end
+ 		 %}}}
+-		 function BuildQueueScript(cluster,md) % {{{1
++		 function BuildQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
+ 
+-			 %retrieve parameters 
+-			 modelname=md.miscellaneous.name; 
+-			 solution=md.private.solution;
++			 if(isvalgrind), disp('valgrind not supported by cluster, ignoring...'); end
++			 if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
+ 
+-			 %open file for writing: 
++			 %write queuing script 
+ 			 fid=fopen([modelname '.queue'],'w');
+-
+-          %write instructions for launching a job on the cluster
+-          % fprintf(fid,'#!/bin/sh\n');
+ 			 fprintf(fid,'#!/bin/bash\n');
+-          %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);
+ 			 fprintf(fid,'#$ -cwd\n');
+           fprintf(fid,'#$ -N issm\n');
+-          %fprintf(fid,'#$ -l h_rt=%i\n',cluster.time);
+           fprintf(fid,'#$ -l h_rt=10:0:0\n');
+-          %fprintf(fid,'#$ -l h_rt=1:0:0,test=true\n');
+           fprintf(fid,'#$ -pe ompi* %i\n',cluster.np);
+           fprintf(fid,'#$ -j y\n');
+           fprintf(fid,'module purge\n');
+           fprintf(fid,'module load gcc openmpi/gcc\n');
+           fprintf(fid,'module load issm\n');
+           fprintf(fid,'\n');
+-          %fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
+           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);
+-
+-          % fprintf(fid,'#PBS -l select=%i:ncpus=1\n',cluster.np);
+-			 % fprintf(fid,'#PBS -N %s\n',modelname);
+-			 % fprintf(fid,'#PBS -l walltime=%i\n',time*60); %walltime is in seconds.
+-			 % fprintf(fid,'#PBS -q %s\n',queue);
+-			 % fprintf(fid,'#PBS -o %s.outlog \n',modelname);
+-			 % fprintf(fid,'#PBS -e %s.errlog \n',modelname);
+-			 % fprintf(fid,'export PBS_O_WORKDIR=%s\n',cluster.executionpath);
+-			 % fprintf(fid,'cd $PBS_O_WORKDIR\n');
+-			 % fprintf(fid,'export OMP_NUM_THREADS=1\n');
+-			 % fprintf(fid,'ulimit -s unlimited\n');
+-			 % fprintf(fid,'ulimit -c 0\n');
+-			 % fprintf(fid,'/opt/mpich/gm/intel10.1/bin/mpiexec -np %i %s/issm.exe %s %s %s',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
+-
+-			 %close file
+ 			 fclose(fid);
+ 
+ 		 end
+ 		 %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{1
++		 function LaunchQueueJob(cluster,md,options)% {{{
+ 			  %retrieve parameters 
+           modelname=md.miscellaneous.name;
+           solution=md.private.solution;
+@@ -133,7 +109,7 @@
+ 
+ 		 end
+ 		 %}}}
+-		 function Download(cluster,md)% {{{1
++		 function Download(cluster,md)% {{{
+ 
+ 			%some check
+ 			if isempty(md.private.runtimename),
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/none.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/none.m	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/none.m	(revision 12351)
+@@ -10,7 +10,7 @@
+ 		name='none'
+     end
+     methods
+-		 function cluster=none(varargin) % {{{1
++		 function cluster=none(varargin) % {{{
+ 			 error('Cannot assign md.cluster to ''none'': ISSM is not available in serial model anymore');
+ 		 end
+ 		 %}}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/cosmos.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/cosmos.m	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/cosmos.m	(revision 12351)
+@@ -7,7 +7,7 @@
+ 
+ classdef cosmos
+     properties (SetAccess=public) 
+-		 % {{{1
++		 % {{{
+ 		 name='cosmos'
+ 		 login='username';
+ 		 np=128;
+@@ -19,11 +19,11 @@
+ 		 %}}}
+ 	 end
+ 	 methods
+-		 function cluster=cosmos(varargin) % {{{1
++		 function cluster=cosmos(varargin) % {{{
+ 			 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster);
+ 		 end
+ 		 %}}}
+-		 function disp(cluster) % {{{1
++		 function disp(cluster) % {{{
+ 			 %  display the object
+ 			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+ 			 disp(sprintf('    name: %s',cluster.name));
+@@ -36,7 +36,7 @@
+ 			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{1
++		 function checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'debug','shortq','longq'};
+ 			 queue_requirements_time=[60*1 60*3 60*17];
+@@ -45,15 +45,13 @@
+ 			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
+ 		 end
+ 		 %}}}
+-		 function BuildQueueScript(cluster,md) % {{{1
++		 function BuildQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
+ 
+-			 %retrieve parameters 
+-			 modelname=md.miscellaneous.name; 
+-			 solution=md.private.solution;
++			 if(isvalgrind), disp('valgrind not supported by cluster, ignoring...'); end
++			 if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
+ 
+-			 %open file for writing: 
++			 %write queuing script 
+ 			 fid=fopen([modelname '.queue'],'w');
+-
+ 			 fprintf(fid,'#!/bin/bash\n');
+ 			 fprintf(fid,'#PBS -l select=%i:ncpus=1\n',cluster.np);
+ 			 fprintf(fid,'#PBS -N %s\n',modelname);
+@@ -67,13 +65,11 @@
+ 			 fprintf(fid,'ulimit -s unlimited\n');
+ 			 fprintf(fid,'ulimit -c 0\n');
+ 			 fprintf(fid,'/opt/mpich/gm/intel10.1/bin/mpiexec -np %i %s/issm.exe %s %s %s',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
+-
+-			 %close file
+ 			 fclose(fid);
+ 
+ 		 end
+ 		 %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{1
++		 function LaunchQueueJob(cluster,md,options)% {{{
+ 			 
+ 			 %lauch command, to be executed via ssh
+ 			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' md.private.runtimename ' && mkdir ' md.private.runtimename ...
+@@ -101,7 +97,7 @@
+ 
+ 		 end
+ 		 %}}}
+-		 function Download(cluster,md)% {{{1
++		 function Download(cluster,md)% {{{
+ 
+ 			%some check
+ 			if isempty(md.private.runtimename),
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pollux.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pollux.m	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pollux.m	(revision 12351)
+@@ -7,7 +7,7 @@
+ 
+ classdef pollux
+     properties (SetAccess=public) 
+-		 % {{{1
++		 % {{{
+ 		 name='pollux'
+ 		 login='username';
+ 		 np=128;
+@@ -19,11 +19,11 @@
+ 		 %}}}
+ 	 end
+ 	 methods
+-		 function cluster=pollux(varargin) % {{{1
++		 function cluster=pollux(varargin) % {{{
+ 			 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster);
+ 		 end
+ 		 %}}}
+-		 function disp(cluster) % {{{1
++		 function disp(cluster) % {{{
+ 			 %  display the object
+ 			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+ 			 disp(sprintf('    name: %s',cluster.name));
+@@ -36,7 +36,7 @@
+ 			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{1
++		 function checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'shortp','longp'};
+ 			 queue_requirements_time=[180 720];
+@@ -45,15 +45,13 @@
+ 			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
+ 		 end
+ 		 %}}}
+-		 function BuildQueueScript(cluster,md) % {{{1
++		 function BuildQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
+ 
+-			 %retrieve parameters 
+-			 modelname=md.miscellaneous.name; 
+-			 solution=md.private.solution;
++			 if(isvalgrind), disp('valgrind not supported by cluster, ignoring...'); end
++			 if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
+ 
+-			 %open file for writing: 
++			 %write queuing script 
+ 			 fid=fopen([modelname '.queue'],'w');
+-
+ 			 fprintf(fid,'#!/bin/sh\n');
+ 			 fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds.
+ 			 fprintf(fid,'#PBS -N %s\n',modelname);
+@@ -63,18 +61,15 @@
+ 			 end
+ 			 fprintf(fid,'#PBS -o %s.outlog \n',modelname);
+ 			 fprintf(fid,'#PBS -e %s.errlog \n',modelname);
+-
+ 			 fprintf(fid,'export PBS_O_WORKDIR=%s\n',cluster.executionpath);
+ 			 fprintf(fid,'cd $PBS_O_WORKDIR\n');
+ 			 fprintf(fid,'export OMP_NUM_THREADS=1\n');
+ 			 fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
+-
+-			 %close file
+ 			 fclose(fid);
+ 
+ 		 end
+ 		 %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{1
++		 function LaunchQueueJob(cluster,md,options)% {{{
+ 			 
+ 			 %lauch command, to be executed via ssh
+ 			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' md.private.runtimename ' && mkdir ' md.private.runtimename ...
+@@ -102,7 +97,7 @@
+ 
+ 		 end
+ 		 %}}}
+-		 function Download(cluster,md)% {{{1
++		 function Download(cluster,md)% {{{
+ 
+ 			%some check
+ 			if isempty(md.private.runtimename),
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m	(revision 12350)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m	(revision 12351)
+@@ -241,10 +241,9 @@
+ 			 if isfield(structmd,'mask'), md.flaim.criterion=structmd.mask; end
+ 			 if isfield(structmd,'pressureload'), md.diagnostic.icefront=structmd.pressureload; end
+ 			 if isfield(structmd,'diagnostic_ref'), md.diagnostic.referential=structmd.diagnostic_ref; end
+-
+-
+-
+-
++			 if isfield(structmd,'npart'); md.qmu.numberofpartitions=structmd.npart; end
++			 if isfield(structmd,'part'); md.qmu.partition=structmd.part; end
++				 
+ 			 %Field changes
+ 			 if (isfield(structmd,'type') & ischar(structmd.type)), 
+ 				 if strcmpi(structmd.type,'2d'), md.mesh.dimension=2; end
+@@ -355,9 +354,7 @@
+ 			 if ~isfield(structmd,'diagnostic_ref');
+ 				 md.diagnostic.referential=NaN*ones(md.mesh.numberofvertices,6);
+ 			 end
+-			 if isfield(structmd,'npart'); md.qmu.numberofpartitions=structmd.npart; end
+-			 if isfield(structmd,'part'); md.qmu.partition=structmd.part; end
+-				 
++
+ 		 end% }}}
+ 		 function md = setdefaultparameters(md) % {{{1
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12351-12352.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12351-12352.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12351-12352.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Basins/basinzoom.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Basins/basinzoom.m	(revision 12351)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Basins/basinzoom.m	(revision 12352)
+@@ -37,7 +37,7 @@
+ basindeltay=basindeltay*1000;
+ 
+ %Ok, find basin we are talking about: 
+-load([issmdir '/projects/ModelData/Names/Names.mat']);
++load([jplsvn() '/projects/ModelData/Names/Names.mat']);
+ 		
+ %Go through names: 
+ found=0;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12352-12353.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12352-12353.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12352-12353.diff	(revision 12679)
@@ -0,0 +1,20 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/xNewDelete.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/xNewDelete.h	(revision 12352)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/xNewDelete.h	(revision 12353)
+@@ -14,6 +14,15 @@
+   return aT_p;
+ };
+ 
++template <class T> 
++T* xNewInit(unsigned int size, const T initVal) {
++  T* aT_p=new T[size];
++  assert(aT_p);
++  for (int i=0; i<size;++i) 
++    aT_p[i]=initVal;
++  return aT_p;
++};
++
+ template <class T>
+ void xDelete(T*& aT_p) { 
+   if (aT_p) 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12353-12354.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12353-12354.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12353-12354.diff	(revision 12679)
@@ -0,0 +1,51 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DakotaPlugin.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DakotaPlugin.cpp	(revision 12353)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DakotaPlugin.cpp	(revision 12354)
+@@ -56,10 +56,10 @@
+ int DakotaPlugin::derived_map_ac(const Dakota::String& driver) {
+ 
+ 	int i;
+-	double* variables=NULL;
++	IssmDouble* variables=NULL;
+ 	char** variable_descriptors=NULL;
+ 	char*  variable_descriptor=NULL;
+-	double* responses=NULL;
++	IssmDouble* responses=NULL;
+ 
+ 	/*increae counter: */
+ 	counter++;
+@@ -68,7 +68,7 @@
+ 	 *readable variables: */
+ 
+ 	/*First, the variables: */
+-	variables=(double*)xmalloc(numACV*sizeof(double));
++	variables=xNew<IssmDouble>(numACV);
+ 	for(i=0;i<numACV;i++){
+ 		variables[i]=xC[i];
+ 	}
+@@ -84,7 +84,7 @@
+ 	}
+ 
+ 	/*Initialize responses: */
+-	responses=(double*)xcalloc(numFns,sizeof(double));
++	responses=xNewInit<IssmDouble>(numFns,0.0);
+ 
+ 	/*run core solution: */
+ 	SpawnCore(responses,numFns, variables,variable_descriptors,numACV,femmodel,counter);
+@@ -96,13 +96,13 @@
+ 
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&variables);
++	xDelete<IssmDouble>(variables);
+ 	for(i=0;i<numACV;i++){
+ 		variable_descriptor=variable_descriptors[i];
+ 		xfree((void**)&variable_descriptor);
+ 	}
+ 	xfree((void**)&variable_descriptors);
+-	xfree((void**)&responses);
++	xDelete<IssmDouble>(responses);
+ 
+ 	return 0;
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12354-12355.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12354-12355.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12354-12355.diff	(revision 12679)
@@ -0,0 +1,36 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/MemOps/xMemCpy.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/MemOps/xMemCpy.h	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/MemOps/xMemCpy.h	(revision 12355)
+@@ -0,0 +1,19 @@
++/* \file xMemCpy.h
++ * \brief: header file for templated memory operations
++ */
++
++#ifndef _XMEMCPY_H_
++#define _XMEMCPY_H_
++
++#include <cassert>
++
++template <class T> 
++T* xMemCpy(T* dest, const T* src, unsigned int size) {
++  assert(dest); assert(src);
++  for (int i=0; i<size;++i) 
++    dest[i]=src[i];
++  return dest;
++};
++
++#endif
++
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12354)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12355)
+@@ -176,6 +176,7 @@
+ 					./shared/Alloc/alloc.h\
+ 					./shared/Alloc/alloc.cpp\
+ 					./shared/Alloc/xNewDelete.h\
++					./shared/MemOps/xMemCpy.h\
+ 					./shared/Matrix/matrix.h\
+ 					./shared/Matrix/MatrixUtils.cpp\
+ 					./shared/Dofs/dofs.h\
Index: /issm/oecreview/Archive/12321-12677/ISSM-12355-12356.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12355-12356.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12355-12356.diff	(revision 12679)
@@ -0,0 +1,37 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp	(revision 12355)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp	(revision 12356)
+@@ -23,24 +23,24 @@
+ 	this->closed=false;
+ }
+ /*}}}*/
+-/*FUNCTION Contour::Contour(int pid, int nods, double* x, double* y,bool closed) {{{1*/
+-Contour::Contour(int pid,int pnods, double* px, double* py,bool pclosed){
++/*FUNCTION Contour::Contour(int pid, int nods, IssmDouble* x, IssmDouble* y,bool closed) {{{1*/
++Contour::Contour(int pid,int pnods, IssmDouble* px, IssmDouble* py,bool pclosed){
+ 	
+ 	this->id=pid;
+ 	this->nods=pnods;
+ 	this->closed=pclosed;
+ 	if(nods){
+-		this->x=(double*)xmalloc(nods*sizeof(double));
+-		memcpy(this->x,px,nods*sizeof(double));
+-		this->y=(double*)xmalloc(nods*sizeof(double));
+-		memcpy(this->y,py,nods*sizeof(double));
++		this->x=xNew<IssmDouble>(nods);
++		xMemCpy<IssmDouble>(this->x,px,nods);
++		this->y=xNew<IssmDouble>(nods);
++		xMemCpy<IssmDouble>(this->y,py,nods);
+ 	}
+ }
+ /*}}}*/
+ /*FUNCTION Contour::Contour() default constructor {{{1*/
+ Contour::~Contour(){
+-	xfree((void**)&this->x);
+-	xfree((void**)&this->y);
++	xDelete<IssmDouble>(this->x);
++	xDelete<IssmDouble>(this->y);
+ }
+ /*}}}*/
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12356-12357.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12356-12357.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12356-12357.diff	(revision 12679)
@@ -0,0 +1,12 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/shared.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/shared.h	(revision 12356)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/shared.h	(revision 12357)
+@@ -9,6 +9,7 @@
+ #include "Alloc/alloc.h"
+ #include "Alloc/alloc_module.h"
+ #include "Alloc/xNewDelete.h"
++#include "MemOps/xMemCpy.h"
+ #include "Exceptions/exceptions.h"
+ #include "Exp/exp.h"
+ #include "TriMesh/trimesh.h"
Index: /issm/oecreview/Archive/12321-12677/ISSM-12360-12361.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12360-12361.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12360-12361.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/materials.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/materials.m	(revision 12360)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/materials.m	(revision 12361)
+@@ -82,7 +82,7 @@
+ 
+ 			fielddisplay(obj,'rho_ice','ice density [kg/m^3]');
+ 			fielddisplay(obj,'rho_water','ocean water density [kg/m^3]');
+-			fielddisplay(obj,'freshrho_water','fresh water density [kg/m^3]');
++			fielddisplay(obj,'rho_freshwater','fresh water density [kg/m^3]');
+ 			fielddisplay(obj,'mu_water','water viscosity [N s/m^2]');
+ 			fielddisplay(obj,'heatcapacity','heat capacity [J/kg/K]');
+ 			fielddisplay(obj,'thermalconductivity','ice thermal conductivity [W/m/K]');
Index: /issm/oecreview/Archive/12321-12677/ISSM-12363-12364.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12363-12364.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12363-12364.diff	(revision 12679)
@@ -0,0 +1,72 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/dox/issm.dox
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/dox/issm.dox	(revision 12363)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/dox/issm.dox	(revision 12364)
+@@ -45,47 +45,38 @@
+ <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;">508</td><td  bgcolor=#FFFFFF style="text-align:right;">14595</td><td  bgcolor=#FFFFFF style="text-align:right;">16762</td><td  bgcolor=#FFFFFF style="text-align:right;">56034</td><td  bgcolor=#FFFFFF style="text-align:right;">87391</td>
++<th  bgcolor=#FFFFFF style="text-align:left;"> C++ </th><td  bgcolor=#FFFFFF style="text-align:right;">508</td><td  bgcolor=#FFFFFF style="text-align:right;">14595</td><td  bgcolor=#FFFFFF style="text-align:right;">16762</td><td  bgcolor=#FFFFFF style="text-align:right;">56036</td><td  bgcolor=#FFFFFF style="text-align:right;">87393</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#C6E2FF style="text-align:left;"> MATLAB </th><td  bgcolor=#C6E2FF style="text-align:right;">926</td><td  bgcolor=#C6E2FF style="text-align:right;">6911</td><td  bgcolor=#C6E2FF style="text-align:right;">13305</td><td  bgcolor=#C6E2FF style="text-align:right;">30623</td><td  bgcolor=#C6E2FF style="text-align:right;">50839</td>
++<th  bgcolor=#C6E2FF style="text-align:left;"> MATLAB </th><td  bgcolor=#C6E2FF style="text-align:right;">925</td><td  bgcolor=#C6E2FF style="text-align:right;">6851</td><td  bgcolor=#C6E2FF style="text-align:right;">13228</td><td  bgcolor=#C6E2FF style="text-align:right;">30468</td><td  bgcolor=#C6E2FF style="text-align:right;">50547</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#FFFFFF style="text-align:left;"> C/C++  Header </th><td  bgcolor=#FFFFFF style="text-align:right;">378</td><td  bgcolor=#FFFFFF style="text-align:right;">2754</td><td  bgcolor=#FFFFFF style="text-align:right;">2625</td><td  bgcolor=#FFFFFF style="text-align:right;">9801</td><td  bgcolor=#FFFFFF style="text-align:right;">15180</td>
++<th  bgcolor=#FFFFFF style="text-align:left;"> C/C++  Header </th><td  bgcolor=#FFFFFF style="text-align:right;">378</td><td  bgcolor=#FFFFFF style="text-align:right;">2758</td><td  bgcolor=#FFFFFF style="text-align:right;">2612</td><td  bgcolor=#FFFFFF style="text-align:right;">9818</td><td  bgcolor=#FFFFFF style="text-align:right;">15188</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;">997</td><td  bgcolor=#C6E2FF style="text-align:right;">80</td><td  bgcolor=#C6E2FF style="text-align:right;">8259</td><td  bgcolor=#C6E2FF style="text-align:right;">9336</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#FFFFFF style="text-align:left;"> Python </th><td  bgcolor=#FFFFFF style="text-align:right;">54</td><td  bgcolor=#FFFFFF style="text-align:right;">404</td><td  bgcolor=#FFFFFF style="text-align:right;">799</td><td  bgcolor=#FFFFFF style="text-align:right;">1435</td><td  bgcolor=#FFFFFF style="text-align:right;">2638</td>
++<th  bgcolor=#FFFFFF style="text-align:left;"> Python </th><td  bgcolor=#FFFFFF style="text-align:right;">53</td><td  bgcolor=#FFFFFF style="text-align:right;">400</td><td  bgcolor=#FFFFFF style="text-align:right;">610</td><td  bgcolor=#FFFFFF style="text-align:right;">1424</td><td  bgcolor=#FFFFFF style="text-align:right;">2434</td>
+ </tr>
+ <tr>
+ <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;"> Bourne  Shell </th><td  bgcolor=#FFFFFF style="text-align:right;">6</td><td  bgcolor=#FFFFFF style="text-align:right;">47</td><td  bgcolor=#FFFFFF style="text-align:right;">73</td><td  bgcolor=#FFFFFF style="text-align:right;">241</td><td  bgcolor=#FFFFFF style="text-align:right;">361</td>
++<th  bgcolor=#FFFFFF style="text-align:left;"> Perl </th><td  bgcolor=#FFFFFF style="text-align:right;">3</td><td  bgcolor=#FFFFFF style="text-align:right;">21</td><td  bgcolor=#FFFFFF style="text-align:right;">23</td><td  bgcolor=#FFFFFF style="text-align:right;">240</td><td  bgcolor=#FFFFFF style="text-align:right;">284</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#C6E2FF style="text-align:left;"> Perl </th><td  bgcolor=#C6E2FF style="text-align:right;">3</td><td  bgcolor=#C6E2FF style="text-align:right;">21</td><td  bgcolor=#C6E2FF style="text-align:right;">23</td><td  bgcolor=#C6E2FF style="text-align:right;">240</td><td  bgcolor=#C6E2FF style="text-align:right;">284</td>
++<th  bgcolor=#C6E2FF style="text-align:left;"> Bourne  Shell </th><td  bgcolor=#C6E2FF style="text-align:right;">5</td><td  bgcolor=#C6E2FF style="text-align:right;">47</td><td  bgcolor=#C6E2FF style="text-align:right;">75</td><td  bgcolor=#C6E2FF style="text-align:right;">239</td><td  bgcolor=#C6E2FF style="text-align:right;">361</td>
+ </tr>
+ <tr>
+ <th  bgcolor=#FFFFFF style="text-align:left;"> IDL </th><td  bgcolor=#FFFFFF style="text-align:right;">1</td><td  bgcolor=#FFFFFF style="text-align:right;">18</td><td  bgcolor=#FFFFFF style="text-align:right;">4</td><td  bgcolor=#FFFFFF style="text-align:right;">124</td><td  bgcolor=#FFFFFF style="text-align:right;">146</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#C6E2FF style="text-align:left;"> XML </th><td  bgcolor=#C6E2FF style="text-align:right;">8</td><td  bgcolor=#C6E2FF style="text-align:right;">37</td><td  bgcolor=#C6E2FF style="text-align:right;">121</td><td  bgcolor=#C6E2FF style="text-align:right;">85</td><td  bgcolor=#C6E2FF style="text-align:right;">243</td>
++<th  bgcolor=#C6E2FF style="text-align:left;"> C </th><td  bgcolor=#C6E2FF style="text-align:right;">1</td><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;">6</td><td  bgcolor=#C6E2FF style="text-align:right;">11</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#FFFFFF style="text-align:left;"> Java </th><td  bgcolor=#FFFFFF style="text-align:right;">5</td><td  bgcolor=#FFFFFF style="text-align:right;">17</td><td  bgcolor=#FFFFFF style="text-align:right;">42</td><td  bgcolor=#FFFFFF style="text-align:right;">61</td><td  bgcolor=#FFFFFF style="text-align:right;">120</td>
++<th  bgcolor=#FFFFFF style="text-align:left;"> SUM: </th><td  bgcolor=#FFFFFF style="text-align:right;">1890</td><td  bgcolor=#FFFFFF style="text-align:right;">25787</td><td  bgcolor=#FFFFFF style="text-align:right;">33397</td><td  bgcolor=#FFFFFF style="text-align:right;">106984</td><td  bgcolor=#FFFFFF style="text-align:right;">166168</td>
+ </tr>
+-<tr>
+-<th  bgcolor=#C6E2FF style="text-align:left;"> D </th><td  bgcolor=#C6E2FF style="text-align:right;">7</td><td  bgcolor=#C6E2FF style="text-align:right;">3</td><td  bgcolor=#C6E2FF style="text-align:right;">0</td><td  bgcolor=#C6E2FF style="text-align:right;">27</td><td  bgcolor=#C6E2FF style="text-align:right;">30</td>
+-</tr>
+-<tr>
+-<th  bgcolor=#FFFFFF style="text-align:left;"> C </th><td  bgcolor=#FFFFFF style="text-align:right;">3</td><td  bgcolor=#FFFFFF style="text-align:right;">4</td><td  bgcolor=#FFFFFF style="text-align:right;">35</td><td  bgcolor=#FFFFFF style="text-align:right;">21</td><td  bgcolor=#FFFFFF style="text-align:right;">60</td>
+-</tr>
+-<tr>
+-<th  bgcolor=#C6E2FF style="text-align:left;"> SUM: </th><td  bgcolor=#C6E2FF style="text-align:right;">1915</td><td  bgcolor=#C6E2FF style="text-align:right;">25906</td><td  bgcolor=#C6E2FF style="text-align:right;">33869</td><td  bgcolor=#C6E2FF style="text-align:right;">107321</td><td  bgcolor=#C6E2FF style="text-align:right;">167096</td>
+-</tr>
+ </table>
+ 
+ 	<I> Copyright (C) 2012 </I>
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/scripts/getloc.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/scripts/getloc.sh	(revision 12363)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/scripts/getloc.sh	(revision 12364)
+@@ -1,6 +1,6 @@
+ #!/bin/bash
+ #get number of lines of code
+-cloc-1.55.pl $ISSM_DIR/src $ISSM_DIR/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-dir=ad  --exclude-dir=android --exclude-ext=exp --exclude-lang=make --out=temp
+ cat temp
+ ./cloc2html.py
+ rm temp
Index: /issm/oecreview/Archive/12321-12677/ISSM-12364-12365.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12364-12365.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12364-12365.diff	(revision 12679)
@@ -0,0 +1,26551 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/objectivefunction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/objectivefunction.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/objectivefunction.cpp	(revision 12365)
+@@ -2,7 +2,7 @@
+  * \brief  objective function that returns a misfit, for a certain parameter.
+  */ 
+ 
+-/*include files: {{{1*/
++/*include files: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12365)
+@@ -55,7 +55,7 @@
+ }
+ END
+ #}}}
+-#Build StringToEnumx.cpp {{{1
++#Build StringToEnumx.cpp {{{
+ #Header
+ cat <<END > $ISSM_DIR/src/c/modules/StringToEnumx/StringToEnumx.cpp
+ /*
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h	(revision 12365)
+@@ -10,7 +10,7 @@
+ #include "../modules/StringToEnumx/StringToEnumx.h"
+ 
+ enum definitions{
+-	/*Model fields {{{1*/
++	/*Model fields {{{*/
+ 	AutodiffForwardEnum,
+ 	AutodiffIsautodiffEnum, 
+ 	AutodiffReverseEnum,
+@@ -182,7 +182,7 @@
+ 	TransientNumRequestedOutputsEnum,
+ 	TransientRequestedOutputsEnum,
+ 	/*}}}*/
+-	/*Solutions and Analyses{{{1 */
++	/*Solutions and Analyses{{{ */
+ 	SolutionTypeEnum,
+ 	AnalysisTypeEnum,
+ 	ConfigurationTypeEnum,
+@@ -219,7 +219,7 @@
+ 	ThermalSolutionEnum,
+ 	TransientSolutionEnum,
+ 	/*}}}*/
+-	/*Approximations {{{1*/
++	/*Approximations {{{*/
+ 	ApproximationEnum,
+ 	HutterApproximationEnum,
+ 	MacAyealApproximationEnum,
+@@ -230,7 +230,7 @@
+ 	PattynStokesApproximationEnum,
+ 	StokesApproximationEnum,
+ 	/*}}}*/
+-	/*Datasets {{{1*/
++	/*Datasets {{{*/
+ 	ConstraintsEnum,
+ 	LoadsEnum,
+ 	MaterialsEnum,
+@@ -239,7 +239,7 @@
+ 	VerticesEnum,
+ 	ResultsEnum,
+ 	/*}}}*/
+-	/*Objects {{{1*/
++	/*Objects {{{*/
+ 	BoolInputEnum,
+ 	BoolParamEnum,
+ 	ContourEnum,
+@@ -288,18 +288,18 @@
+ 	TriaP1InputEnum,
+ 	VertexEnum,
+ 	/*}}}*/
+-	/*Fill {{{1*/
++	/*Fill {{{*/
+ 	AirEnum,
+ 	IceEnum,
+ 	MelangeEnum,
+ 	WaterEnum,
+ 	/*}}}*/
+-	/*Rift state {{{1*/
++	/*Rift state {{{*/
+ 	ClosedEnum,
+ 	FreeEnum,
+ 	OpenEnum,
+ 	/*}}}*/
+-	/*Inputs {{{1*/
++	/*Inputs {{{*/
+ 	AdjointpEnum,
+ 	AdjointxEnum,
+ 	AdjointyEnum,
+@@ -387,12 +387,12 @@
+ 	StressTensorzzEnum,
+ 	IceVolumeEnum,
+ 	/*}}}*/
+-	/*Element Interpolations{{{1*/
++	/*Element Interpolations{{{*/
+ 	P0Enum,
+ 	P1Enum,
+ 	P1DGEnum,
+ 	/*}}}*/
+-	/*Results{{{1*/
++	/*Results{{{*/
+ 	SaveResultsEnum,
+ 	BoolElementResultEnum,
+ 	BoolExternalResultEnum,
+@@ -413,7 +413,7 @@
+ 	TriaP1ElementResultEnum,
+ 	WaterColumnOldEnum,
+ 	/*}}}*/
+-	/*Responses{{{1*/
++	/*Responses{{{*/
+ 	MinVelEnum,
+ 	MaxVelEnum,
+ 	MinVxEnum,
+@@ -426,20 +426,20 @@
+ 	MaxVzEnum,
+ 	MaxAbsVzEnum,
+ 	/*}}}*/
+-	/*Convergence{{{1*/
++	/*Convergence{{{*/
+ 	RelativeEnum,
+ 	AbsoluteEnum,
+ 	IncrementalEnum,
+ 	/*}}}*/
+-	/*Grounding Line{{{1*/
++	/*Grounding Line{{{*/
+ 	AgressiveMigrationEnum,
+ 	NoneEnum,
+ 	SoftMigrationEnum,
+ 	/*}}}*/
+-	/*Solver{{{1*/
++	/*Solver{{{*/
+ 	StokesSolverEnum,
+ 	/*}}}*/
+-	/*Parameters{{{1*/
++	/*Parameters{{{*/
+ 	AdjointEnum,
+ 	ColinearEnum,
+ 	ControlSteadyEnum,
+@@ -467,16 +467,16 @@
+ 	SsetEnum,
+ 	VerboseEnum,
+ 	/*}}}*/
+-	/*Interpolation {{{1*/
++	/*Interpolation {{{*/
+ 	TriangleInterpEnum,
+ 	BilinearInterpEnum,
+ 	NearestInterpEnum,
+ 	/*}}}*/
+-	/*Coordinate Systems{{{1*/
++	/*Coordinate Systems{{{*/
+ 	XYEnum,
+ 	XYZPEnum,
+ 	/*}}}*/
+-	/*Options{{{1*/
++	/*Options{{{*/
+ 	OptionEnum,
+ 	OptionCellEnum,
+ 	OptionCharEnum,
+@@ -484,7 +484,7 @@
+ 	OptionDoubleEnum,
+ 	OptionLogicalEnum,
+ 	/*}}}*/
+-	/*Rheology law (move too Material) {{{1*/
++	/*Rheology law (move too Material) {{{*/
+ 	PatersonEnum,
+ 	ArrheniusEnum,
+ 	/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/include/matlab_macros.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12365)
+@@ -2,7 +2,7 @@
+  * \brief: macros used for the matlab bindings
+  */
+ 
+-/*Header {{{1*/
++/*Header {{{*/
+ #ifndef _MATLAB_MACROS_H_
+ #define _MATLAB_MACROS_H_
+ 
+@@ -14,7 +14,7 @@
+ /*}}}*/
+ 
+ #ifdef _HAVE_MATLAB_
+-/* MODULEBOOT/MODULEEND {{{1*/
++/* MODULEBOOT/MODULEEND {{{*/
+ 
+ /*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 
+@@ -35,11 +35,11 @@
+ 		mexErrMsgTxt("An unexpected error occurred");\
+ 	}
+ //}}}
+-/* WRAPPER {{{1*/
++/* WRAPPER {{{*/
+ #define WRAPPER(modulename,...) void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) 
+ 
+ /*}}}*/
+-/* CHECKARGUMENTS {{{1*/
++/* CHECKARGUMENTS {{{*/
+ #define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,functionpointer)
+ /*}}}*/
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToSeqMat.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToSeqMat.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToSeqMat.cpp	(revision 12365)
+@@ -2,7 +2,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12365)
+@@ -14,7 +14,7 @@
+ 
+ #include <mex.h>
+ 
+-/*FUNCTION OptionDoubleParse {{{1*/
++/*FUNCTION OptionDoubleParse {{{*/
+ OptionDouble* OptionDoubleParse( char* name, const mxArray* prhs[]){
+ 
+ 	OptionDouble *odouble = NULL;
+@@ -33,7 +33,7 @@
+ 
+ 	return(odouble);
+ }/*}}}*/
+-/*FUNCTION OptionLogicalParse {{{1*/
++/*FUNCTION OptionLogicalParse {{{*/
+ OptionLogical* OptionLogicalParse( char* name, const mxArray* prhs[]){
+ 
+ 	OptionLogical *ological = NULL;
+@@ -52,7 +52,7 @@
+ 
+ 	return(ological);
+ }/*}}}*/
+-/*FUNCTION OptionCharParse {{{1*/
++/*FUNCTION OptionCharParse {{{*/
+ OptionChar* OptionCharParse( char* name, const mxArray* prhs[]){
+ 
+ 	OptionChar  *ochar = NULL;
+@@ -71,7 +71,7 @@
+ 
+ 	return(ochar);
+ }/*}}}*/
+-/*FUNCTION OptionStructParse {{{1*/
++/*FUNCTION OptionStructParse {{{*/
+ OptionStruct* OptionStructParse( char* name, const mxArray* prhs[]){
+ 
+ 	int            i;
+@@ -116,7 +116,7 @@
+ 
+ 	return(ostruct);
+ }/*}}}*/
+-/*FUNCTION OptionCellParse {{{1*/
++/*FUNCTION OptionCellParse {{{*/
+ OptionCell* OptionCellParse( char* name, const mxArray* prhs[]){
+ 
+ 	int            i;
+@@ -166,7 +166,7 @@
+ 
+ 	return(ocell);
+ }/*}}}*/
+-/*FUNCTION OptionParse{{{1*/
++/*FUNCTION OptionParse{{{*/
+ Option* OptionParse(char* name, const mxArray* prhs[]){
+ 
+ 	Option *option = NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12365)
+@@ -14,7 +14,7 @@
+ #include "./matlabio.h"
+ 
+ /*Primitive data types*/
+-/*FUNCTION FetchData(double** pmatrix,int* pM,int *pN,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(double** pmatrix,int* pM,int *pN,const mxArray* dataref){{{*/
+ void FetchData(double** pmatrix,int* pM,int *pN,const mxArray* dataref){
+ 
+ 	double*  outmatrix=NULL;
+@@ -50,7 +50,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(double** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(double** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){{{*/
+ void FetchData(double** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){
+ 
+ 	double*  outmatrix=NULL;
+@@ -93,7 +93,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(int** pmatrix,int* pM,int *pN,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(int** pmatrix,int* pM,int *pN,const mxArray* dataref){{{*/
+ void FetchData(int** pmatrix,int* pM,int *pN,const mxArray* dataref){
+ 
+ 	int     i,outmatrix_rows,outmatrix_cols;
+@@ -135,7 +135,7 @@
+ 	if (pN)*pN=outmatrix_cols;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(bool** pmatrix,int* pM,int *pN,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(bool** pmatrix,int* pM,int *pN,const mxArray* dataref){{{*/
+ void FetchData(bool** pmatrix,int* pM,int *pN,const mxArray* dataref){
+ 
+ 	int     i,outmatrix_rows,outmatrix_cols;
+@@ -177,7 +177,7 @@
+ 	if (pN)*pN=outmatrix_cols;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(bool** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(bool** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){{{*/
+ void FetchData(bool** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){
+ 
+ 	int      i;
+@@ -242,7 +242,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(double** pvector,int* pM,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(double** pvector,int* pM,const mxArray* dataref){{{*/
+ void FetchData(double** pvector,int* pM,const mxArray* dataref){
+ 
+ 	double* outvector=NULL;
+@@ -269,7 +269,7 @@
+ 	if (pM)*pM=outvector_rows;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(int** pvector,int* pM,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(int** pvector,int* pM,const mxArray* dataref){{{*/
+ void FetchData(int** pvector,int* pM,const mxArray* dataref){
+ 
+ 	int    i;
+@@ -301,7 +301,7 @@
+ 	if (pM)*pM=outvector_rows;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(bool** pvector,int* pM,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(bool** pvector,int* pM,const mxArray* dataref){{{*/
+ void FetchData(bool** pvector,int* pM,const mxArray* dataref){
+ 
+ 	int    i;
+@@ -333,7 +333,7 @@
+ 	if (pM)*pM=outvector_rows;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(float** pvector,int* pM,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(float** pvector,int* pM,const mxArray* dataref){{{*/
+ void FetchData(float** pvector,int* pM,const mxArray* dataref){
+ 
+ 	int    i;
+@@ -365,7 +365,7 @@
+ 	if (pM)*pM=outvector_rows;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(char** pstring,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(char** pstring,const mxArray* dataref){{{*/
+ void FetchData(char** pstring,const mxArray* dataref){
+ 
+ 	char* outstring=NULL;
+@@ -387,7 +387,7 @@
+ 	/*Assign output pointers:*/
+ 	*pstring=outstring;
+ }
+-/*FUNCTION FetchData(char** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(char** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){{{*/
+ void FetchData(char** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){
+ 
+ 	int      outmatrix_numel,outmatrix_ndims;
+@@ -420,7 +420,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(double* pscalar,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(double* pscalar,const mxArray* dataref){{{*/
+ void FetchData(double* pscalar,const mxArray* dataref){
+ 
+ 	double scalar;
+@@ -437,7 +437,7 @@
+ 	*pscalar=scalar;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(int* pinteger,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(int* pinteger,const mxArray* dataref){{{*/
+ void FetchData(int* pinteger,const mxArray* dataref){
+ 
+ 	int integer;
+@@ -454,7 +454,7 @@
+ 	*pinteger=integer;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(bool* pboolean,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(bool* pboolean,const mxArray* dataref){{{*/
+ void FetchData(bool* pboolean,const mxArray* dataref){
+ 
+ 	bool* mxbool_ptr=NULL;
+@@ -473,7 +473,7 @@
+ /*}}}*/
+ 
+ /*ISSM objects*/
+-/*FUNCTION FetchData(Matrix** pmatrix,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(Matrix** pmatrix,const mxArray* dataref){{{*/
+ void FetchData(Matrix** pmatrix,const mxArray* dataref){
+ 
+ 	Matrix* outmatrix=NULL;
+@@ -494,7 +494,7 @@
+ 	*pmatrix=outmatrix;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(Vector** pvector,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(Vector** pvector,const mxArray* dataref){{{*/
+ void FetchData(Vector** pvector,const mxArray* dataref){
+ 
+ 	Vector* vector=NULL;
+@@ -518,7 +518,7 @@
+ 	*pvector=vector;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(BamgGeom** pbamggeom,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(BamgGeom** pbamggeom,const mxArray* dataref){{{*/
+ void FetchData(BamgGeom** pbamggeom,const mxArray* dataref){
+ 
+ 	/*Initialize output*/
+@@ -537,7 +537,7 @@
+ 	*pbamggeom=bamggeom;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(BamgMesh** pbamgmesh,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(BamgMesh** pbamgmesh,const mxArray* dataref){{{*/
+ void FetchData(BamgMesh** pbamgmesh,const mxArray* dataref){
+ 
+ 	/*Initialize output*/
+@@ -557,7 +557,7 @@
+ 	*pbamgmesh=bamgmesh;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(BamgOpts** pbamgopts,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(BamgOpts** pbamgopts,const mxArray* dataref){{{*/
+ void FetchData(BamgOpts** pbamgopts,const mxArray* dataref){
+ 
+ 	/*Initialize output*/
+@@ -601,7 +601,7 @@
+ 	*pbamgopts=bamgopts;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(Options** poptions,const mxArray* dataref){{{1*/
++/*FUNCTION FetchData(Options** poptions,const mxArray* dataref){{{*/
+ void FetchData(Options** poptions,int istart, int nrhs,const mxArray** pdataref){
+ 
+ 	char   *name   = NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12365)
+@@ -16,7 +16,7 @@
+ 
+ 
+ /*Primitive data types*/
+-/*FUNCTION WriteData(mxArray** pdataref,double* matrix, int M,int N){{{1*/
++/*FUNCTION WriteData(mxArray** pdataref,double* matrix, int M,int N){{{*/
+ void WriteData(mxArray** pdataref,double* matrix, int M,int N){
+ 
+ 	mxArray *dataref  = NULL;
+@@ -41,7 +41,7 @@
+ 	*pdataref=dataref;
+ }
+ /*}}}*/
+-/*FUNCTION WriteData(mxArray** pdataref,int* matrix, int M,int N){{{1*/
++/*FUNCTION WriteData(mxArray** pdataref,int* matrix, int M,int N){{{*/
+ void WriteData(mxArray** pdataref,int* matrix, int M,int N){
+ 
+ 	mxArray* dataref = NULL;
+@@ -66,7 +66,7 @@
+ 	*pdataref=dataref;
+ }
+ /*}}}*/
+-/*FUNCTION WriteData(mxArray** pdataref,double* vector, int M){{{1*/
++/*FUNCTION WriteData(mxArray** pdataref,double* vector, int M){{{*/
+ void WriteData(mxArray** pdataref,double* vector, int M){
+ 	
+ 	mxArray* dataref       = NULL;
+@@ -89,27 +89,27 @@
+ 	*pdataref=dataref;
+ }
+ /*}}}*/
+-/*FUNCTION WriteData(mxArray** pdataref,double scalar){{{1*/
++/*FUNCTION WriteData(mxArray** pdataref,double scalar){{{*/
+ void WriteData(mxArray** pdataref,double scalar){
+ 
+ 	*pdataref=mxCreateDoubleScalar(scalar);
+ }
+ /*}}}*/
+-/*FUNCTION WriteData(mxArray** pdataref,int integer){{{1*/
++/*FUNCTION WriteData(mxArray** pdataref,int integer){{{*/
+ void WriteData(mxArray** pdataref,int integer){
+ 
+ 		*pdataref=mxCreateDoubleScalar((double)integer);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION WriteData(mxArray** pdataref,int boolean){{{1*/
++/*FUNCTION WriteData(mxArray** pdataref,int boolean){{{*/
+ void WriteData(mxArray** pdataref,bool boolean){
+ 
+ 	*pdataref=mxCreateDoubleScalar((double)boolean);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION WriteData(mxArray** pdataref,char* string){{{1*/
++/*FUNCTION WriteData(mxArray** pdataref,char* string){{{*/
+ void WriteData(mxArray** pdataref,char* string){
+ 
+ 		*pdataref=mxCreateString(string);
+@@ -117,7 +117,7 @@
+ /*}}}*/
+ 
+ /*ISSM objects*/
+-/*FUNCTION WriteData(mxArray** pdataref,BamgGeom* bamggeom){{{1*/
++/*FUNCTION WriteData(mxArray** pdataref,BamgGeom* bamggeom){{{*/
+ void WriteData(mxArray** pdataref,BamgGeom* bamggeom){
+ 
+ 	/*Intermediary*/
+@@ -157,7 +157,7 @@
+ 	*pdataref=dataref;
+ }
+ /*}}}*/
+-/*FUNCTION WriteData(mxArray** pdataref,BamgMesh* bamgmesh){{{1*/
++/*FUNCTION WriteData(mxArray** pdataref,BamgMesh* bamgmesh){{{*/
+ void WriteData(mxArray** pdataref,BamgMesh* bamgmesh){
+ 
+ 	/*Intermediary*/
+@@ -215,7 +215,7 @@
+ 	*pdataref=dataref;
+ }
+ /*}}}*/
+-/*FUNCTION WriteData(mxArray** pdataref,Matrix* matrix){{{1*/
++/*FUNCTION WriteData(mxArray** pdataref,Matrix* matrix){{{*/
+ void WriteData(mxArray** pdataref,Matrix* matrix){
+ 		
+ 	int      i,j;
+@@ -258,7 +258,7 @@
+ 	*pdataref=dataref;
+ }
+ /*}}}*/
+-/*FUNCTION WriteData(mxArray** pdataref,Vector* vector){{{1*/
++/*FUNCTION WriteData(mxArray** pdataref,Vector* vector){{{*/
+ void WriteData(mxArray** pdataref,Vector* vector){
+ 	
+ 	mxArray* dataref=NULL;
+@@ -295,7 +295,7 @@
+ /*}}}*/
+ 
+ /*Toolkit*/
+-/*FUNCTION SetStructureField{{{1*/
++/*FUNCTION SetStructureField{{{*/
+ void SetStructureField(mxArray* dataref,const char* fieldname,int M,int N,double* fieldpointer){
+ 
+ 	mxArray* field = NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToVector.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToVector.cpp	(revision 12365)
+@@ -2,7 +2,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToMatrix.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToMatrix.cpp	(revision 12365)
+@@ -2,7 +2,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp	(revision 12365)
+@@ -14,7 +14,7 @@
+ 
+ #include <mex.h>
+ 
+-/*FUNCTION MatlabNArrayToNArray(double** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){{{1*/
++/*FUNCTION MatlabNArrayToNArray(double** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){{{*/
+ int MatlabNArrayToNArray(double** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){
+ 
+ 	int  i,j,rows,cols;
+@@ -94,7 +94,7 @@
+ 	return 1;
+ }
+ /*}}}*/
+-/*FUNCTION MatlabNArrayToNArray(bool** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){{{1*/
++/*FUNCTION MatlabNArrayToNArray(bool** 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  i,j,rows,cols;
+@@ -174,7 +174,7 @@
+ 	return 1;
+ }
+ /*}}}*/
+-/*FUNCTION MatlabNArrayToNArray(char** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){{{1*/
++/*FUNCTION MatlabNArrayToNArray(char** 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  i,j,rows,cols;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToSeqVec.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToSeqVec.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToSeqVec.cpp	(revision 12365)
+@@ -2,7 +2,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/include/python_macros.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/include/python_macros.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/include/python_macros.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #ifndef _PYTHON_MACROS_H_
+ #define _PYTHON_MACROS_H_
+ 
+-/*Header {{{1*/
++/*Header {{{*/
+ 
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+@@ -15,7 +15,7 @@
+ /*}}}*/
+ 
+ #ifdef _HAVE_PYTHON_
+-/* MODULEBOOT/MODULEEND {{{1*/
++/* MODULEBOOT/MODULEEND {{{*/
+ 
+ /*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 
+@@ -29,7 +29,7 @@
+ 						 return output;
+ //}}}
+ #if _PYTHON_MAJOR_ >=3
+-/* WRAPPER 3.2 {{{1*/
++/* WRAPPER 3.2 {{{*/
+ #define WRAPPER(modulename,...)  \
+ \
+ static PyObject* modulename(PyObject* self,PyObject* args);\
+@@ -56,7 +56,7 @@
+ static PyObject* modulename(PyObject* self,PyObject* args)
+ /*}}}*/
+ #else
+-/* WRAPPER 2.7 {{{1*/
++/* WRAPPER 2.7 {{{*/
+ #define WRAPPER(modulename,...)  \
+ \
+ static PyObject* modulename(PyObject* self,PyObject* args);\
+@@ -74,7 +74,7 @@
+ static PyObject* modulename(PyObject* self,PyObject* args)
+ /*}}}*/
+ #endif
+-/* CHECKARGUMENTS {{{1*/
++/* CHECKARGUMENTS {{{*/
+ #define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumPythonArguments(args, NRHS,functionpointer)
+ /*}}}*/
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/io/FetchPythonData.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 12365)
+@@ -16,7 +16,7 @@
+ #include "../../shared/shared.h"
+ 
+ /*Primitive data types*/
+-/*FUNCTION FetchData(double* pscalar,PyObject* py_float){{{1*/
++/*FUNCTION FetchData(double* pscalar,PyObject* py_float){{{*/
+ void FetchData(double* pscalar,PyObject* py_float){
+ 
+ 	double scalar;
+@@ -28,7 +28,7 @@
+ 	*pscalar=scalar;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(int* pinteger,PyObject* py_long){{{1*/
++/*FUNCTION FetchData(int* pinteger,PyObject* py_long){{{*/
+ void FetchData(int* pinteger, PyObject* py_long){
+ 
+ 	int integer;
+@@ -40,7 +40,7 @@
+ 	*pinteger=integer;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(bool* pboolean,PyObject* py_boolean){{{1*/
++/*FUNCTION FetchData(bool* pboolean,PyObject* py_boolean){{{*/
+ void FetchData(bool* pboolean,PyObject* py_boolean){
+ 
+ 	bool boolean;
+@@ -56,7 +56,7 @@
+ 	
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(double** pmatrix,int* pM, int* pN, PyObject* py_matrix){{{1*/
++/*FUNCTION FetchData(double** pmatrix,int* pM, int* pN, PyObject* py_matrix){{{*/
+ void FetchData(double** pmatrix,int* pM,int *pN,PyObject* py_matrix){
+ 
+ 	/*output: */
+@@ -80,7 +80,7 @@
+ 	if(pmatrix)*pmatrix=matrix;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(double** pvector,int* pM, PyObject* py_vector){{{1*/
++/*FUNCTION FetchData(double** pvector,int* pM, PyObject* py_vector){{{*/
+ void FetchData(double** pvector,int* pM,PyObject* py_vector){
+ 
+ 	/*output: */
+@@ -106,7 +106,7 @@
+ 
+ /*Python version dependent: */
+ #if _PYTHON_MAJOR_ >= 3 
+-/*FUNCTION FetchData(char** pstring,PyObject* py_unicode){{{1*/
++/*FUNCTION FetchData(char** pstring,PyObject* py_unicode){{{*/
+ void FetchData(char** pstring,PyObject* py_unicode){
+ 
+ 	PyObject* py_bytes;
+@@ -123,7 +123,7 @@
+ }
+ /*}}}*/
+ #else
+-/*FUNCTION FetchData(char** pstring,PyObject* py_string){{{1*/
++/*FUNCTION FetchData(char** pstring,PyObject* py_string){{{*/
+ void FetchData(char** pstring,PyObject* py_string){
+ 
+ 	char* string=NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/io/WritePythonData.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/io/WritePythonData.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/io/WritePythonData.cpp	(revision 12365)
+@@ -20,14 +20,13 @@
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 
+ 
+-/*FUNCTION WriteData(PyObject* py_tuple,int index,char* string){{{1*/
++/*FUNCTION WriteData(PyObject* py_tuple,int index,char* string){{{*/
+ 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*/
++}/*}}}*/
++/*FUNCTION WriteData(PyObject* tuple,int index,Matrix* matrix){{{*/
+ void WriteData(PyObject* tuple,int index,Matrix* matrix){
+ 	
+ 	int M,N;
+@@ -44,8 +43,8 @@
+ 	PyTuple_SetItem(tuple, index, array);
+ 
+ 
+-}
+-/*FUNCTION WriteData(PyObject* py_tuple,int index,Vector* vector){{{1*/
++}/*}}}*/
++/*FUNCTION WriteData(PyObject* py_tuple,int index,Vector* vector){{{*/
+ void WriteData(PyObject* tuple,int index,Vector* vector){
+ 	
+ 	int M;
+@@ -63,7 +62,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION WriteData(PyObject* py_tuple,int index, double* matrix, int M, int N){{{1*/
++/*FUNCTION WriteData(PyObject* py_tuple,int index, double* matrix, int M, int N){{{*/
+ void WriteData(PyObject* tuple, int index, double* matrix, int M,int N){
+ 	
+ 	npy_intp dims[2]={0,0};
+@@ -75,4 +74,4 @@
+ 	
+ 	PyTuple_SetItem(tuple, index, array);
+ 
+-}
++}/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Results.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Results.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Results.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  * \brief: implementation of the Results class, derived from DataSet class
+  */
+ 
+-/*Headers: {{{1*/
++/*Headers: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -24,20 +24,20 @@
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION Results::Results(){{{1*/
++/*FUNCTION Results::Results(){{{*/
+ Results::Results(){
+ 	enum_type=ResultsEnum;
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Results::~Results(){{{1*/
++/*FUNCTION Results::~Results(){{{*/
+ Results::~Results(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object management*/
+-/*FUNCTION Results::SpawnTriaResults{{{1*/
++/*FUNCTION Results::SpawnTriaResults{{{*/
+ Results* Results::SpawnTriaResults(int* indices){
+ 
+ 	/*Intermediary*/
+@@ -63,7 +63,7 @@
+ 	return newresults;
+ }
+ /*}}}*/
+-/*FUNCTION Results::Write{{{1*/
++/*FUNCTION Results::Write{{{*/
+ void Results::Write(Parameters* parameters){
+ 	
+ 	int         i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Loads.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Loads.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Loads.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  * \brief: implementation of the Loads class, derived from DataSet class
+  */
+ 
+-/*Headers: {{{1*/
++/*Headers: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -24,20 +24,20 @@
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION Loads::Loads(){{{1*/
++/*FUNCTION Loads::Loads(){{{*/
+ Loads::Loads(){
+ 	enum_type=LoadsEnum;
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Loads::~Loads(){{{1*/
++/*FUNCTION Loads::~Loads(){{{*/
+ Loads::~Loads(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Numerics:*/
+-/*FUNCTION Loads::Configure{{{1*/
++/*FUNCTION Loads::Configure{{{*/
+ void Loads::Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){
+ 
+ 	vector<Object*>::iterator object;
+@@ -52,7 +52,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Loads::NumberOfLoads{{{1*/
++/*FUNCTION Loads::NumberOfLoads{{{*/
+ int Loads::NumberOfLoads(void){
+ 
+ 	int localloads=0;
+@@ -73,7 +73,7 @@
+ 	return numberofloads;
+ }
+ /*}}}*/
+-/*FUNCTION Loads::SetCurrentConfiguration{{{1*/
++/*FUNCTION Loads::SetCurrentConfiguration{{{*/
+ void Loads::SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){
+ 
+ 	vector<Object*>::iterator object;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  * \brief: implementation of the Parameters class, derived from DataSet class
+  */
+ 
+-/*Headers: {{{1*/
++/*Headers: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -24,20 +24,20 @@
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION Parameters::Parameters(){{{1*/
++/*FUNCTION Parameters::Parameters(){{{*/
+ Parameters::Parameters(){
+ 	enum_type=ParametersEnum;
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::~Parameters(){{{1*/
++/*FUNCTION Parameters::~Parameters(){{{*/
+ Parameters::~Parameters(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object management*/
+-/*FUNCTION Parameters::Exist{{{1*/
++/*FUNCTION Parameters::Exist{{{*/
+ bool Parameters::Exist(int enum_type){
+ 
+ 	vector<Object*>::iterator object;
+@@ -50,7 +50,7 @@
+ 	return false;
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(bool* pbool,int enum_type){{{1*/
++/*FUNCTION Parameters::FindParam(bool* pbool,int enum_type){{{*/
+ void Parameters::FindParam(bool* pbool,int enum_type){ _assert_(this);
+ 	
+ 	vector<Object*>::iterator object;
+@@ -67,7 +67,7 @@
+ 	_error_("could not find parameter %s",EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(int* pinteger,int enum_type){{{1*/
++/*FUNCTION Parameters::FindParam(int* pinteger,int enum_type){{{*/
+ void Parameters::FindParam(int* pinteger,int enum_type){ _assert_(this);
+ 	
+ 	vector<Object*>::iterator object;
+@@ -84,7 +84,7 @@
+ 	_error_("could not find parameter %s",EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(double* pscalar, int enum_type){{{1*/
++/*FUNCTION Parameters::FindParam(double* pscalar, int enum_type){{{*/
+ void Parameters::FindParam(double* pscalar, int enum_type){ _assert_(this);
+ 	
+ 	vector<Object*>::iterator object;
+@@ -101,7 +101,7 @@
+ 	_error_("could not find parameter %s",EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(char** pstring,int enum_type){{{1*/
++/*FUNCTION Parameters::FindParam(char** pstring,int enum_type){{{*/
+ void Parameters::FindParam(char** pstring,int enum_type){ _assert_(this);
+ 	
+ 	vector<Object*>::iterator object;
+@@ -119,7 +119,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){{{1*/
++/*FUNCTION Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){{{*/
+ void Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){ _assert_(this);
+ 	
+ 	vector<Object*>::iterator object;
+@@ -137,7 +137,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(int** pintarray,int* pM,int enum_type){{{1*/
++/*FUNCTION Parameters::FindParam(int** pintarray,int* pM,int enum_type){{{*/
+ void Parameters::FindParam(int** pintarray,int* pM, int enum_type){ _assert_(this);
+ 
+ 	vector<Object*>::iterator object;
+@@ -155,7 +155,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(int** pintarray,int* pM,int* pN,int enum_type){{{1*/
++/*FUNCTION Parameters::FindParam(int** pintarray,int* pM,int* pN,int enum_type){{{*/
+ void Parameters::FindParam(int** pintarray,int* pM,int *pN,int enum_type){ _assert_(this);
+ 
+ 	vector<Object*>::iterator object;
+@@ -173,7 +173,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM,int enum_type){{{1*/
++/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM,int enum_type){{{*/
+ void Parameters::FindParam(double** pdoublearray,int* pM, int enum_type){ _assert_(this);
+ 
+ 	vector<Object*>::iterator object;
+@@ -191,7 +191,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){{{1*/
++/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){{{*/
+ void Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){ _assert_(this);
+ 
+ 	vector<Object*>::iterator object;
+@@ -209,7 +209,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(double*** parray,int* pM,int** pmdims_array,int** pndims_array,int enum_type){{{1*/
++/*FUNCTION Parameters::FindParam(double*** parray,int* pM,int** pmdims_array,int** pndims_array,int enum_type){{{*/
+ void Parameters::FindParam(double*** parray,int* pM,int** pmdims_array,int** pndims_array,int enum_type){ _assert_(this);
+ 	
+ 	vector<Object*>::iterator object;
+@@ -226,7 +226,7 @@
+ 	_error_("could not find parameter %s",EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(Vector** pvec,int enum_type){{{1*/
++/*FUNCTION Parameters::FindParam(Vector** pvec,int enum_type){{{*/
+ void Parameters::FindParam(Vector** pvec,int enum_type){ _assert_(this);
+ 	
+ 	vector<Object*>::iterator object;
+@@ -244,7 +244,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(Matrix** pmat,int enum_type){{{1*/
++/*FUNCTION Parameters::FindParam(Matrix** pmat,int enum_type){{{*/
+ void Parameters::FindParam(Matrix** pmat,int enum_type){ _assert_(this);
+ 	
+ 	vector<Object*>::iterator object;
+@@ -262,7 +262,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(FILE** pfid,int enum_type){{{1*/
++/*FUNCTION Parameters::FindParam(FILE** pfid,int enum_type){{{*/
+ void Parameters::FindParam(FILE** pfid,int enum_type){ _assert_(this);
+ 
+ 	vector<Object*>::iterator object;
+@@ -280,7 +280,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION Parameters::SetParam(bool boolean,int enum_type);{{{1*/
++/*FUNCTION Parameters::SetParam(bool boolean,int enum_type);{{{*/
+ void   Parameters::SetParam(bool boolean,int enum_type){
+ 
+ 	Param* param=NULL;
+@@ -292,7 +292,7 @@
+ 	else this->AddObject(new BoolParam(enum_type,boolean)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(int integer,int enum_type);{{{1*/
++/*FUNCTION Parameters::SetParam(int integer,int enum_type);{{{*/
+ void   Parameters::SetParam(int integer,int enum_type){
+ 
+ 	Param* param=NULL;
+@@ -304,7 +304,7 @@
+ 	else this->AddObject(new IntParam(enum_type,integer)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(double scalar,int enum_type);{{{1*/
++/*FUNCTION Parameters::SetParam(double scalar,int enum_type);{{{*/
+ void   Parameters::SetParam(double scalar,int enum_type){
+ 
+ 	Param* param=NULL;
+@@ -316,7 +316,7 @@
+ 	else this->AddObject(new DoubleParam(enum_type,scalar)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(char* string,int enum_type);{{{1*/
++/*FUNCTION Parameters::SetParam(char* string,int enum_type);{{{*/
+ void   Parameters::SetParam(char* string,int enum_type){
+ 
+ 	Param* param=NULL;
+@@ -328,7 +328,7 @@
+ 	else this->AddObject(new StringParam(enum_type,string)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(char** stringarray,int M, int enum_type);{{{1*/
++/*FUNCTION Parameters::SetParam(char** stringarray,int M, int enum_type);{{{*/
+ void   Parameters::SetParam(char** stringarray,int M, int enum_type){
+ 
+ 	Param* param=NULL;
+@@ -340,7 +340,7 @@
+ 	else this->AddObject(new StringArrayParam(enum_type,stringarray,M)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(double* doublearray,int M,int enum_type);{{{1*/
++/*FUNCTION Parameters::SetParam(double* doublearray,int M,int enum_type);{{{*/
+ void   Parameters::SetParam(double* doublearray,int M, int enum_type){
+ 
+ 	Param* param=NULL;
+@@ -352,7 +352,7 @@
+ 	else this->AddObject(new DoubleVecParam(enum_type,doublearray,M)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(double* doublearray,int M,int N, int enum_type);{{{1*/
++/*FUNCTION Parameters::SetParam(double* doublearray,int M,int N, int enum_type);{{{*/
+ void   Parameters::SetParam(double* doublearray,int M, int N, int enum_type){
+ 
+ 	Param* param=NULL;
+@@ -364,7 +364,7 @@
+ 	else this->AddObject(new DoubleMatParam(enum_type,doublearray,M,N)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(int* intarray,int M,int enum_type);{{{1*/
++/*FUNCTION Parameters::SetParam(int* intarray,int M,int enum_type);{{{*/
+ void   Parameters::SetParam(int* intarray,int M, int enum_type){
+ 
+ 	Param* param=NULL;
+@@ -376,7 +376,7 @@
+ 	else this->AddObject(new IntVecParam(enum_type,intarray,M)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(int* intarray,int M,int N, int enum_type);{{{1*/
++/*FUNCTION Parameters::SetParam(int* intarray,int M,int N, int enum_type);{{{*/
+ void   Parameters::SetParam(int* intarray,int M, int N, int enum_type){
+ 
+ 	Param* param=NULL;
+@@ -388,7 +388,7 @@
+ 	else this->AddObject(new IntMatParam(enum_type,intarray,M,N)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(Vector* vector,int enum_type);{{{1*/
++/*FUNCTION Parameters::SetParam(Vector* vector,int enum_type);{{{*/
+ void   Parameters::SetParam(Vector* vector,int enum_type){
+ 
+ 	Param* param=NULL;
+@@ -400,7 +400,7 @@
+ 	else this->AddObject(new VectorParam(enum_type,vector)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(Matrix* matrix,int enum_type);{{{1*/
++/*FUNCTION Parameters::SetParam(Matrix* matrix,int enum_type);{{{*/
+ void   Parameters::SetParam(Matrix* matrix,int enum_type){
+ 
+ 	Param* param=NULL;
+@@ -412,7 +412,7 @@
+ 	else this->AddObject(new MatrixParam(enum_type,matrix)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(FILE* fid,int enum_type);{{{1*/
++/*FUNCTION Parameters::SetParam(FILE* fid,int enum_type);{{{*/
+ void   Parameters::SetParam(FILE* fid,int enum_type){
+ 
+ 	Param* param=NULL;
+@@ -424,7 +424,7 @@
+ 	else this->AddObject(new FileParam(enum_type,fid)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::UnitConversion(int direction_enum);{{{1*/
++/*FUNCTION Parameters::UnitConversion(int direction_enum);{{{*/
+ void   Parameters::UnitConversion(int direction_enum){
+ 
+ 	vector<Object*>::iterator object;
+@@ -438,7 +438,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION Parameters::FindParamObject{{{1*/
++/*FUNCTION Parameters::FindParamObject{{{*/
+ Object* Parameters::FindParamObject(int enum_type){
+ 
+ 	vector<Object*>::iterator object;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Results.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Results.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Results.h	(revision 12365)
+@@ -19,11 +19,11 @@
+ 
+ 	public:
+ 
+-		/*constructors, destructors: {{{1*/
++		/*constructors, destructors: {{{*/
+ 		Results();
+ 		~Results();
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		Results* SpawnTriaResults(int* indices);
+ 		void Write(Parameters* parameters);
+ 		/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Constraints.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Constraints.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Constraints.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  * \brief: implementation of the Constraints class, derived from DataSet class
+  */
+ 
+-/*Headers: {{{1*/
++/*Headers: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -24,20 +24,20 @@
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION Constraints::Constraints(){{{1*/
++/*FUNCTION Constraints::Constraints(){{{*/
+ Constraints::Constraints(){
+ 	enum_type=ConstraintsEnum;
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Constraints::~Constraints(){{{1*/
++/*FUNCTION Constraints::~Constraints(){{{*/
+ Constraints::~Constraints(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Numerics: */
+-/*FUNCTION Constraints::NumberOfConstraints{{{1*/
++/*FUNCTION Constraints::NumberOfConstraints{{{*/
+ int Constraints::NumberOfConstraints(void){
+ 
+ 	int localconstraints;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Loads.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Loads.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Loads.h	(revision 12365)
+@@ -19,11 +19,11 @@
+ 
+ 	public:
+ 
+-		/*constructors, destructors: {{{1*/
++		/*constructors, destructors: {{{*/
+ 		Loads();
+ 		~Loads();
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		void  Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters);
+ 		int   NumberOfLoads(void);
+ 		void  SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.h	(revision 12365)
+@@ -22,11 +22,11 @@
+ 
+ 	public:
+ 
+-		/*constructors, destructors: {{{1*/
++		/*constructors, destructors: {{{*/
+ 		Parameters();
+ 		~Parameters();
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		bool  Exist(int enum_type);
+ 
+ 		void  FindParam(bool* pinteger,int enum_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Nodes.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Nodes.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Nodes.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  * \brief: implementation of the Nodes class, derived from DataSet class
+  */
+ 
+-/*Headers: {{{1*/
++/*Headers: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -24,20 +24,20 @@
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION Nodes::Nodes(){{{1*/
++/*FUNCTION Nodes::Nodes(){{{*/
+ Nodes::Nodes(){
+ 	enum_type=NodesEnum;
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Nodes::~Nodes(){{{1*/
++/*FUNCTION Nodes::~Nodes(){{{*/
+ Nodes::~Nodes(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Numerics*/
+-/*FUNCTION Nodes::Configure{{{1*/
++/*FUNCTION Nodes::Configure{{{*/
+ void Nodes::Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){
+ 
+ 	vector<Object*>::iterator object;
+@@ -52,7 +52,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Nodes::DistributeDofs{{{1*/
++/*FUNCTION Nodes::DistributeDofs{{{*/
+ void  Nodes::DistributeDofs(int analysis_type,int setenum){
+ 
+ 	extern int num_procs;
+@@ -143,7 +143,7 @@
+ 	xfree((void**)&alltruedofs);
+ }
+ /*}}}*/
+-/*FUNCTION Nodes::FlagClones{{{1*/
++/*FUNCTION Nodes::FlagClones{{{*/
+ void  Nodes::FlagClones(int analysis_type){
+ 
+ 	int i;
+@@ -194,7 +194,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Nodes::MaxNumDofs{{{1*/
++/*FUNCTION Nodes::MaxNumDofs{{{*/
+ int   Nodes::MaxNumDofs(int analysis_type,int setenum){
+ 
+ 	int i;
+@@ -224,7 +224,7 @@
+ 	return max;
+ }
+ /*}}}*/
+-/*FUNCTION Nodes::NumberOfDofs{{{1*/
++/*FUNCTION Nodes::NumberOfDofs{{{*/
+ int   Nodes::NumberOfDofs(int analysis_type,int setenum){
+ 
+ 	int i;
+@@ -258,7 +258,7 @@
+ 	return allnumdofs;
+ }
+ /*}}}*/
+-/*FUNCTION Nodes::NumberOfNodes(){{{1*/
++/*FUNCTION Nodes::NumberOfNodes(){{{*/
+ int Nodes::NumberOfNodes(void){
+ 
+ 	/*Careful! only use once all clones have been setup for all nodes!: */
+@@ -286,7 +286,7 @@
+ 	return allnumnodes;
+ }
+ /*}}}*/
+-/*FUNCTION Nodes::NumberOfNodes(analysis){{{1*/
++/*FUNCTION Nodes::NumberOfNodes(analysis){{{*/
+ int Nodes::NumberOfNodes(int analysis_type){
+ 
+ 	int i;
+@@ -325,7 +325,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Nodes::Ranks{{{1*/
++/*FUNCTION Nodes::Ranks{{{*/
+ void   Nodes::Ranks(int* ranks,int analysis_type){
+ 
+ 	/*Go through nodes, and for each object, report it cpu: */
+@@ -351,7 +351,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Nodes::SetCurrentConfiguration{{{1*/
++/*FUNCTION Nodes::SetCurrentConfiguration{{{*/
+ void Nodes::SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){
+ 
+ 	vector<Object*>::iterator object;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Constraints.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Constraints.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Constraints.h	(revision 12365)
+@@ -20,11 +20,11 @@
+ 
+ 	public:
+ 
+-		/*constructors, destructors: {{{1*/
++		/*constructors, destructors: {{{*/
+ 		Constraints();
+ 		~Constraints();
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		int   NumberOfConstraints(void);
+ 		/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  * \brief: implementation of the Elements class, derived from DataSet class
+  */
+ 
+-/*Headers: {{{1*/
++/*Headers: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -24,20 +24,20 @@
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION Elements::Elements(){{{1*/
++/*FUNCTION Elements::Elements(){{{*/
+ Elements::Elements(){
+ 	enum_type=MeshElementsEnum;
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Elements::~Elements(){{{1*/
++/*FUNCTION Elements::~Elements(){{{*/
+ Elements::~Elements(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object management*/
+-/*FUNCTION Elements::Configure{{{1*/
++/*FUNCTION Elements::Configure{{{*/
+ void Elements::Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){
+ 
+ 	vector<Object*>::iterator object;
+@@ -52,7 +52,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Elements::ProcessResultsUnits{{{1*/
++/*FUNCTION Elements::ProcessResultsUnits{{{*/
+ void Elements::ProcessResultsUnits(void){
+ 
+ 	//Process results to be output in the correct units
+@@ -62,7 +62,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Elements::DeleteResults{{{1*/
++/*FUNCTION Elements::DeleteResults{{{*/
+ void Elements::DeleteResults(void){
+ 	
+ 	for (int i=0;i<this->Size();i++){
+@@ -71,7 +71,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Elements::ResultsToPatch{{{1*/
++/*FUNCTION Elements::ResultsToPatch{{{*/
+ Patch* Elements::ResultsToPatch(void){ 
+ 
+ 	/*output: */
+@@ -147,7 +147,7 @@
+ 	return patch;
+ }
+ /*}}}*/
+-/*FUNCTION Elements::SetCurrentConfiguration{{{1*/
++/*FUNCTION Elements::SetCurrentConfiguration{{{*/
+ void Elements::SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){
+ 
+ 	vector<Object*>::iterator object;
+@@ -162,7 +162,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Elements::ToResults{{{1*/
++/*FUNCTION Elements::ToResults{{{*/
+ void Elements::ToResults(Results* results,Parameters* parameters){
+ 
+ 	extern int my_rank;
+@@ -275,7 +275,7 @@
+ 	delete patch;
+ }
+ /*}}}*/
+-/*FUNCTION Elements::NumberOfElements{{{1*/
++/*FUNCTION Elements::NumberOfElements{{{*/
+ int Elements::NumberOfElements(void){
+ 
+ 	int local_nelem=0;
+@@ -291,7 +291,7 @@
+ 	return numberofelements;
+ }
+ /*}}}*/
+-/*FUNCTION Elements::InputCopy{{{1*/
++/*FUNCTION Elements::InputCopy{{{*/
+ void Elements::InputDuplicate(int input_enum,int output_enum){
+ 
+ 	for(int i=0;i<this->Size();i++){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Nodes.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Nodes.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Nodes.h	(revision 12365)
+@@ -12,11 +12,11 @@
+ 
+ 	public:
+ 
+-		/*constructors, destructors: {{{1*/
++		/*constructors, destructors: {{{*/
+ 		Nodes();
+ 		~Nodes();
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		void  Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters);
+ 		void  DistributeDofs(int analysis_type,int SETENUM);
+ 		void  FlagClones(int analysis_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.h	(revision 12365)
+@@ -20,11 +20,11 @@
+ 
+ 	public:
+ 
+-		/*constructors, destructors: {{{1*/
++		/*constructors, destructors: {{{*/
+ 		Elements();
+ 		~Elements();
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		void Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters);
+ 		void DeleteResults(void);
+ 		void ProcessResultsUnits(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Materials.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Materials.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Materials.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  * \brief: implementation of the Materials class, derived from DataSet class
+  */
+ 
+-/*Headers: {{{1*/
++/*Headers: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -24,20 +24,20 @@
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION Materials::Materials(){{{1*/
++/*FUNCTION Materials::Materials(){{{*/
+ Materials::Materials(){
+ 	enum_type=MaterialsEnum;
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Materials::~Materials(){{{1*/
++/*FUNCTION Materials::~Materials(){{{*/
+ Materials::~Materials(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object management*/
+-/*FUNCTION Materials::Configure{{{1*/
++/*FUNCTION Materials::Configure{{{*/
+ void Materials::Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){
+ 
+ 	vector<Object*>::iterator object;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  * \brief: implementation of the Inputs class, derived from DataSet class
+  */
+ 
+-/*Headers: {{{1*/
++/*Headers: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -24,19 +24,19 @@
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION Inputs::Inputs(){{{1*/
++/*FUNCTION Inputs::Inputs(){{{*/
+ Inputs::Inputs(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::~Inputs(){{{1*/
++/*FUNCTION Inputs::~Inputs(){{{*/
+ Inputs::~Inputs(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object management*/
+-/*FUNCTION Inputs::GetInputValue(bool* pvalue,int enum-type){{{1*/
++/*FUNCTION Inputs::GetInputValue(bool* pvalue,int enum-type){{{*/
+ void Inputs::GetInputValue(bool* pvalue,int enum_type){
+ 
+ 	vector<Object*>::iterator object;
+@@ -64,7 +64,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::GetInputValue(int* pvalue,int enum-type){{{1*/
++/*FUNCTION Inputs::GetInputValue(int* pvalue,int enum-type){{{*/
+ void Inputs::GetInputValue(int* pvalue,int enum_type){
+ 
+ 	vector<Object*>::iterator object;
+@@ -92,7 +92,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::GetInputValue(double* pvalue,int enum-type){{{1*/
++/*FUNCTION Inputs::GetInputValue(double* pvalue,int enum-type){{{*/
+ void Inputs::GetInputValue(double* pvalue,int enum_type){
+ 
+ 	vector<Object*>::iterator object;
+@@ -120,7 +120,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::GetInputAverage{{{1*/
++/*FUNCTION Inputs::GetInputAverage{{{*/
+ void Inputs::GetInputAverage(double* pvalue,int enum_type){
+ 
+ 	vector<Object*>::iterator object;
+@@ -148,7 +148,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::AddInput{{{1*/
++/*FUNCTION Inputs::AddInput{{{*/
+ int  Inputs::AddInput(Input* in_input){
+ 
+ 	/*First, go through dataset of inputs and check whether any input 
+@@ -174,7 +174,7 @@
+ 	return 1;
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::ChangeEnum{{{1*/
++/*FUNCTION Inputs::ChangeEnum{{{*/
+ void  Inputs::ChangeEnum(int oldenumtype,int newenumtype){
+ 
+ 	/*Go through dataset of inputs and look for input with 
+@@ -204,7 +204,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::ConstrainMin{{{1*/
++/*FUNCTION Inputs::ConstrainMin{{{*/
+ void  Inputs::ConstrainMin(int constrain_enum, double minimum){
+ 	   
+ 	Input* constrain_input=NULL; 
+@@ -218,7 +218,7 @@
+ 	constrain_input->ConstrainMin(minimum);
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::InfinityNorm{{{1*/
++/*FUNCTION Inputs::InfinityNorm{{{*/
+ double Inputs::InfinityNorm(int enumtype){
+ 
+ 	/*Output*/
+@@ -239,7 +239,7 @@
+ 	return norm;
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::Max{{{1*/
++/*FUNCTION Inputs::Max{{{*/
+ double Inputs::Max(int enumtype){
+ 
+ 	/*Output*/
+@@ -260,7 +260,7 @@
+ 	return max;
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::MaxAbs{{{1*/
++/*FUNCTION Inputs::MaxAbs{{{*/
+ double Inputs::MaxAbs(int enumtype){
+ 
+ 	/*Output*/
+@@ -281,7 +281,7 @@
+ 	return max;
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::Min{{{1*/
++/*FUNCTION Inputs::Min{{{*/
+ double Inputs::Min(int enumtype){
+ 
+ 	/*Output*/
+@@ -302,7 +302,7 @@
+ 	return min;
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::MinAbs{{{1*/
++/*FUNCTION Inputs::MinAbs{{{*/
+ double Inputs::MinAbs(int enumtype){
+ 
+ 	/*Output*/
+@@ -323,7 +323,7 @@
+ 	return min;
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::GetInput{{{1*/
++/*FUNCTION Inputs::GetInput{{{*/
+ Input* Inputs::GetInput(int enum_name){
+ 
+ 	vector<Object*>::iterator object;
+@@ -340,7 +340,7 @@
+ 	return NULL;
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::DeleteInput{{{1*/
++/*FUNCTION Inputs::DeleteInput{{{*/
+ int  Inputs::DeleteInput(int enum_type){
+ 
+ 	vector<Object*>::iterator object;
+@@ -360,7 +360,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::DuplicateInput{{{1*/
++/*FUNCTION Inputs::DuplicateInput{{{*/
+ void  Inputs::DuplicateInput(int original_enum,int new_enum){
+ 
+ 	Input* original=NULL;
+@@ -378,7 +378,7 @@
+ 	this->AddInput((Input*)copy);
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::SpawnTriaInputs{{{1*/
++/*FUNCTION Inputs::SpawnTriaInputs{{{*/
+ Inputs* Inputs::SpawnTriaInputs(int* indices){
+ 
+ 	/*Intermediary*/
+@@ -404,7 +404,7 @@
+ 	return newinputs;
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::AXPY{{{1*/
++/*FUNCTION Inputs::AXPY{{{*/
+ void  Inputs::AXPY(int MeshYEnum, double scalar, int MeshXEnum){
+ 	   
+ 	Input* xinput=NULL;
+@@ -422,7 +422,7 @@
+ 	yinput->AXPY(xinput,scalar);
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::Configure{{{1*/
++/*FUNCTION Inputs::Configure{{{*/
+ void Inputs::Configure(Parameters* parameters){
+ 
+ 	vector<Object*>::iterator object;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Vertices.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Vertices.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Vertices.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  * \brief: implementation of the Vertices class, derived from DataSet class
+  */
+ 
+-/*Headers: {{{1*/
++/*Headers: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -24,20 +24,20 @@
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION Vertices::Vertices(){{{1*/
++/*FUNCTION Vertices::Vertices(){{{*/
+ Vertices::Vertices(){
+ 	enum_type=VerticesEnum;
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Vertices::~Vertices(){{{1*/
++/*FUNCTION Vertices::~Vertices(){{{*/
+ Vertices::~Vertices(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Numerics management*/
+-/*FUNCTION Vertices::DistributeDofs{{{1*/
++/*FUNCTION Vertices::DistributeDofs{{{*/
+ void  Vertices::DistributeDofs(int numberofobjects,int numberofdofsperobject){
+ 
+ 	extern int num_procs;
+@@ -106,7 +106,7 @@
+ 	xfree((void**)&alltruedofs);
+ }
+ /*}}}*/
+-/*FUNCTION Vertices::FlagClones{{{1*/
++/*FUNCTION Vertices::FlagClones{{{*/
+ void  Vertices::FlagClones(int numberofobjects){
+ 
+ 	int i;
+@@ -147,7 +147,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vertices::NumberOfVertices{{{1*/
++/*FUNCTION Vertices::NumberOfVertices{{{*/
+ int Vertices::NumberOfVertices(void){
+ 
+ 	int i,sid;
+@@ -173,7 +173,7 @@
+ 	return max_sid;
+ }
+ /*}}}*/
+-/*FUNCTION Vertices::Ranks{{{1*/
++/*FUNCTION Vertices::Ranks{{{*/
+ void   Vertices::Ranks(int* ranks){
+ 
+ 	/*Go through a dataset, and for each object, report it cpu: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  * \brief: implementation of the DataSet class, and derived classes Inputs and Parameters
+  */
+ 
+-/*Headers: {{{1*/
++/*Headers: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -27,7 +27,7 @@
+ /*}}}*/
+ 
+ /*Constructors/Destructors*/
+-/*FUNCTION DataSet::DataSet(){{{1*/
++/*FUNCTION DataSet::DataSet(){{{*/
+ DataSet::DataSet(){
+ 	
+ 	sorted=0;
+@@ -36,7 +36,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::DataSet(int dataset_enum){{{1*/
++/*FUNCTION DataSet::DataSet(int dataset_enum){{{*/
+ DataSet::DataSet(int dataset_enum){
+ 	enum_type=dataset_enum;
+ 	
+@@ -46,7 +46,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::Copy{{{1*/
++/*FUNCTION DataSet::Copy{{{*/
+ DataSet*   DataSet::Copy(void){
+ 
+ 	DataSet* copy=NULL;
+@@ -76,7 +76,7 @@
+ 	return copy;
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::~DataSet{{{1*/
++/*FUNCTION DataSet::~DataSet{{{*/
+ DataSet::~DataSet(){
+ 	clear();
+ 	xfree((void**)&sorted_ids);
+@@ -85,7 +85,7 @@
+ /*}}}*/
+ 
+ /*Specific methods*/
+-/*FUNCTION DataSet::AddObject{{{1*/
++/*FUNCTION DataSet::AddObject{{{*/
+ int  DataSet::AddObject(Object* object){
+ 
+ 	objects.push_back(object);
+@@ -93,7 +93,7 @@
+ 	return 1;
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::clear{{{1*/
++/*FUNCTION DataSet::clear{{{*/
+ void  DataSet::clear(){
+ 
+ /*  use reverse_iterator for efficiency in matlab memory manager
+@@ -111,7 +111,7 @@
+ 	objects.clear();
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::DeleteObject{{{1*/
++/*FUNCTION DataSet::DeleteObject{{{*/
+ int  DataSet::DeleteObject(Object* object){
+ 
+ 	vector<Object*>::iterator iterator;
+@@ -126,7 +126,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::DeepEcho{{{1*/
++/*FUNCTION DataSet::DeepEcho{{{*/
+ void DataSet::DeepEcho(){
+ 
+ 
+@@ -144,7 +144,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::Echo{{{1*/
++/*FUNCTION DataSet::Echo{{{*/
+ void DataSet::Echo(){
+ 
+ 	vector<Object*>::iterator object;
+@@ -162,19 +162,19 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::GetEnum(){{{1*/
++/*FUNCTION DataSet::GetEnum(){{{*/
+ int  DataSet::GetEnum(){
+ 	return enum_type;
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::GetEnum(int offset){{{1*/
++/*FUNCTION DataSet::GetEnum(int offset){{{*/
+ int   DataSet::GetEnum(int offset){
+ 
+ 	return objects[offset]->ObjectEnum();
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::GetObjectByOffset{{{1*/
++/*FUNCTION DataSet::GetObjectByOffset{{{*/
+ Object* DataSet::GetObjectByOffset(int offset){
+ 
+ 	/*Check index in debugging mode*/
+@@ -185,7 +185,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::GetObjectById{{{1*/
++/*FUNCTION DataSet::GetObjectById{{{*/
+ Object* DataSet::GetObjectById(int* poffset,int eid){
+ 
+ 	int id_offset;
+@@ -210,7 +210,7 @@
+ 	return objects[offset];
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::Presort{{{1*/
++/*FUNCTION DataSet::Presort{{{*/
+ void DataSet::Presort(){
+ 
+ 	/*vector of objects is already sorted, just allocate the sorted ids and their
+@@ -238,7 +238,7 @@
+ 	sorted=1;
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::SetSorting{{{1*/
++/*FUNCTION DataSet::SetSorting{{{*/
+ void DataSet::SetSorting(int* in_sorted_ids,int* in_id_offsets){
+ 
+ 	sorted=1;
+@@ -246,14 +246,14 @@
+ 	id_offsets=in_id_offsets;
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::Size{{{1*/
++/*FUNCTION DataSet::Size{{{*/
+ int  DataSet::Size(void){
+ 	_assert_(this!=NULL);
+ 
+ 	return objects.size();
+ }
+ /*}}}*/
+-/*FUNCTION DataSet::Sort{{{1*/
++/*FUNCTION DataSet::Sort{{{*/
+ void DataSet::Sort(){
+ 
+ 	/*Only sort if we are not already sorted: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Materials.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Materials.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Materials.h	(revision 12365)
+@@ -18,11 +18,11 @@
+ 
+ 	public:
+ 
+-		/*constructors, destructors: {{{1*/
++		/*constructors, destructors: {{{*/
+ 		Materials();
+ 		~Materials();
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		void  Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters);
+ 		/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.h	(revision 12365)
+@@ -22,12 +22,12 @@
+ 
+ 	public:
+ 
+-		/*constructors, destructors: {{{1*/
++		/*constructors, destructors: {{{*/
+ 		Inputs();
+ 		~Inputs();
+ 
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		int     AddInput(Input* in_input);
+ 		void    ChangeEnum(int enumtype,int new_enumtype);
+ 		void    ConstrainMin(int constrain_enum, double minimum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Vertices.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Vertices.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Vertices.h	(revision 12365)
+@@ -18,11 +18,11 @@
+ 
+ 	public:
+ 
+-		/*constructors, destructors: {{{1*/
++		/*constructors, destructors: {{{*/
+ 		Vertices();
+ 		~Vertices();
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		void  DistributeDofs(int numberofnodes,int numdofspernode);
+ 		void  FlagClones(int numberofnodes);
+ 		int   NumberOfVertices(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.h	(revision 12365)
+@@ -38,12 +38,12 @@
+ 		int*            sorted_ids;
+ 		int*            id_offsets;
+ 
+-		/*constructors, destructors: {{{1*/
++		/*constructors, destructors: {{{*/
+ 		DataSet();
+ 		DataSet(int enum_type);
+ 		~DataSet();
+ 		/*}}}*/
+-		/*management: {{{1*/
++		/*management: {{{*/
+ 		int   GetEnum();
+ 		int   GetEnum(int offset);
+ 		void  Echo();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  * \brief: implementation of the Options class, derived from DataSet class
+  */
+ 
+-/*Headers: {{{1*/
++/*Headers: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -24,19 +24,19 @@
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION Options::Options(){{{1*/
++/*FUNCTION Options::Options(){{{*/
+ Options::Options(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Options::~Options(){{{1*/
++/*FUNCTION Options::~Options(){{{*/
+ Options::~Options(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object management*/
+-/*FUNCTION Options::AddOption{{{1*/
++/*FUNCTION Options::AddOption{{{*/
+ int  Options::AddOption(Option* in_option){
+ 
+ 	vector<Object*>::iterator object;
+@@ -67,7 +67,7 @@
+ 	return 1;
+ }
+ /*}}}*/
+-/*FUNCTION Options::Get(int* pvalue, char* name){{{1*/
++/*FUNCTION Options::Get(int* pvalue, char* name){{{*/
+ void Options::Get(int* pvalue,const char* name){
+ 
+ 	vector<Object*>::iterator object;
+@@ -86,7 +86,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Options::Get(int* pvalue, char* name,int default_value){{{1*/
++/*FUNCTION Options::Get(int* pvalue, char* name,int default_value){{{*/
+ void Options::Get(int* pvalue,const char* name,int default_value){
+ 
+ 	vector<Object*>::iterator object;
+@@ -105,7 +105,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Options::Get(double* pvalue, char* name){{{1*/
++/*FUNCTION Options::Get(double* pvalue, char* name){{{*/
+ void Options::Get(double* pvalue,const char* name){
+ 
+ 	vector<Object*>::iterator object;
+@@ -124,7 +124,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Options::Get(double* pvalue, char* name,double default_value){{{1*/
++/*FUNCTION Options::Get(double* pvalue, char* name,double default_value){{{*/
+ void Options::Get(double* pvalue,const char* name,double default_value){
+ 
+ 	vector<Object*>::iterator object;
+@@ -143,7 +143,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Options::Get(bool* pvalue, char* name){{{1*/
++/*FUNCTION Options::Get(bool* pvalue, char* name){{{*/
+ void Options::Get(bool* pvalue,const char* name){
+ 
+ 	vector<Object*>::iterator object;
+@@ -162,7 +162,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Options::Get(bool* pvalue, char* name,bool default_value){{{1*/
++/*FUNCTION Options::Get(bool* pvalue, char* name,bool default_value){{{*/
+ void Options::Get(bool* pvalue,const char* name,bool default_value){
+ 
+ 	vector<Object*>::iterator object;
+@@ -181,7 +181,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Options::Get(char** pvalue, char* name){{{1*/
++/*FUNCTION Options::Get(char** pvalue, char* name){{{*/
+ void Options::Get(char** pvalue,const char* name){
+ 
+ 	vector<Object*>::iterator object;
+@@ -203,7 +203,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Options::Get(char** pvalue, char* name,char* default_value){{{1*/
++/*FUNCTION Options::Get(char** pvalue, char* name,char* default_value){{{*/
+ void Options::Get(char** pvalue,const char* name,const char* default_value){
+ 
+ 	vector<Object*>::iterator object;
+@@ -228,7 +228,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Options::Get(char*** ppvalue,int* numel,char* name){{{1*/
++/*FUNCTION Options::Get(char*** ppvalue,int* numel,char* name){{{*/
+ void Options::Get(char*** ppvalue,int* numel,const char* name){
+ 
+ 	vector<Object*>::iterator object;
+@@ -274,7 +274,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Options::Get(double** pvalue,int* numel,const char* name){{{1*/
++/*FUNCTION Options::Get(double** pvalue,int* numel,const char* name){{{*/
+ void Options::Get(double** pvalue,int* numel,const char* name){
+ 
+ 	vector<Object*>::iterator object;
+@@ -293,7 +293,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Options::GetOption{{{1*/
++/*FUNCTION Options::GetOption{{{*/
+ Option* Options::GetOption(const char* name){
+ 
+ 	vector<Object*>::iterator object;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12365)
+@@ -2,7 +2,7 @@
+  * \brief: global macros used in the whole code
+  */
+ 
+-/*Header {{{1*/
++/*Header {{{*/
+ #ifndef _MACROS_H_
+ #define _MACROS_H_
+ 
+@@ -15,11 +15,11 @@
+ #endif
+ /*}}}*/
+ 
+-/* _printf_ {{{1*/
++/* _printf_ {{{*/
+ /*Printing macro: only cpu number 0 */
+ #define _printf_(flag,...) do { if(flag) PrintfFunction(__VA_ARGS__); }while (0)
+ /*}}}*/
+-/* _error_ {{{1*/
++/* _error_ {{{*/
+ /*Error exception macro*/
+ #ifdef _INTEL_WIN_
+ #define _error_(...)\
+@@ -29,7 +29,7 @@
+   throw ErrorException(__FILE__,__func__,__LINE__,exprintf(__VA_ARGS__))
+ #endif
+ /*}}}*/
+-/* _assert_ {{{1*/
++/* _assert_ {{{*/
+ /*Assertion macro: do nothing if macro _ISSM_DEBUG_ undefined*/
+ #ifdef _ISSM_DEBUG_ 
+ #define _assert_(statement)\
+@@ -39,7 +39,7 @@
+   ((void) 0)
+ #endif
+ /*}}}*/
+-/* ISSMBOOT/ISSMEND {{{1*/
++/* ISSMBOOT/ISSMEND {{{*/
+ 
+ /*The following macros hide the error exception handling in a matlab module. Just put 
+  * ISSMBOOT(); and ISSMEND(); at the beginning and end of a module, and c++ exceptions 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */ 
+ 
+ /*Headers*/
+-/*{{{1*/
++/*{{{*/
+ #include "./matrix.h"
+ #include "../Exceptions/exceptions.h"
+ #include "../Alloc/alloc.h"
+@@ -15,7 +15,7 @@
+ #include "../../io/io.h"
+ /*}}}*/
+ 
+-/*FUNCTION TripleMultiply {{{1*/
++/*FUNCTION TripleMultiply {{{*/
+ int TripleMultiply( double* a, int nrowa, int ncola, int itrna, double* b, int nrowb, int ncolb, int itrnb, double* c, int nrowc, int ncolc, int itrnc, double* d, int iaddd){
+ 	/*TripleMultiply    Perform triple matrix product a*b*c+d.*/
+ 	
+@@ -97,7 +97,7 @@
+ 
+ 	return 1;
+ }/*}}}*/
+-/*FUNCTION MatrixMuliply {{{1*/
++/*FUNCTION MatrixMuliply {{{*/
+ int MatrixMultiply( double* a, int nrowa, int ncola, int itrna, double* b, int nrowb, int ncolb, int itrnb, double* c, int iaddc ){
+ 	/*MatrixMultiply    Perform matrix multiplication a*b+c.*/
+ 	int noerr=1;
+@@ -166,7 +166,7 @@
+ 
+ 	return noerr;
+ }/*}}}*/
+-/*FUNCTION MatrixInverse {{{1*/
++/*FUNCTION MatrixInverse {{{*/
+ int MatrixInverse( double* a, int ndim, int nrow, double* b, int nvec, double* pdet ){
+ /* MatrixInverse    Perform matrix inversion and linear equation solution.
+ 
+@@ -343,7 +343,7 @@
+ 
+ 	return noerr;
+ }/*}}}*/
+-/*FUNCTION Matrix2x2Determinant(double* Adet,double* A) {{{1*/
++/*FUNCTION Matrix2x2Determinant(double* Adet,double* A) {{{*/
+ void Matrix2x2Determinant(double* Adet,double* A){
+ 	/*Compute determinant of a 2x2 matrix*/
+ 
+@@ -351,7 +351,7 @@
+ 	*Adet= A[0]*A[3]-A[2]*A[1];
+ }
+ /*}}}*/
+-/*FUNCTION Matrix2x2Invert(double* Ainv,double* A) {{{1*/
++/*FUNCTION Matrix2x2Invert(double* Ainv,double* A) {{{*/
+ void Matrix2x2Invert(double* Ainv,double* A){
+ 
+ 	/*Intermediaries*/
+@@ -368,7 +368,7 @@
+ 	Ainv[3]=   A[0]/det; /* =  a/det */
+ 
+ }/*}}}*/
+-/*FUNCTION Matrix3x3Determinant(double* Adet,double* A) {{{1*/
++/*FUNCTION Matrix3x3Determinant(double* Adet,double* A) {{{*/
+ void Matrix3x3Determinant(double* Adet,double* A){
+ 	/*Compute determinant of a 3x3 matrix*/
+ 
+@@ -376,7 +376,7 @@
+    *Adet= A[0]*A[4]*A[8]-A[0]*A[5]*A[7]-A[3]*A[1]*A[8]+A[3]*A[2]*A[7]+A[6]*A[1]*A[5]-A[6]*A[2]*A[4];
+ }
+ /*}}}*/
+-/*FUNCTION Matrix3x3Invert(double* Ainv,double* A) {{{1*/
++/*FUNCTION Matrix3x3Invert(double* Ainv,double* A) {{{*/
+ void Matrix3x3Invert(double* Ainv,double* A){
+ 
+ 	/*Intermediaries*/
+@@ -398,7 +398,7 @@
+ 	Ainv[8]=(A[0]*A[4]-A[1]*A[3])/det; /* = (a*e-b*d)/det */
+ 
+ }/*}}}*/
+-/*FUNCTION MatrixTranspose(double* Adet,double* A) {{{1*/
++/*FUNCTION MatrixTranspose(double* Adet,double* A) {{{*/
+ void MatrixTranspose(double* tA,double* A, int nrows, int ncols){
+ 	/*Transpose a n*m matrix*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/Synchronize.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/Synchronize.sh	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/Synchronize.sh	(revision 12365)
+@@ -7,7 +7,7 @@
+ 
+ #Get all lines of Verbosity.cpp
+ cat Verbosity.h |  grep "bool Verbose" | awk '{print $2}' | sed -e "s/(/ /" | awk '{print $1}' | awk '{ printf "%s %s\n", NR, $0 }' >temp
+-#Build header of Verbosity.cpp {{{1
++#Build header of Verbosity.cpp {{{
+ cat <<END > Verbosity.cpp
+ /*
+ * \file Verbosity.cpp:
+@@ -126,7 +126,7 @@
+ 
+ done
+ 
+-#Add footer of Verbosity.cpp{{{1
++#Add footer of Verbosity.cpp{{{
+ cat <<END >> Verbosity.cpp
+ 
+ /*Verbosity Setup*/
+@@ -146,7 +146,7 @@
+ }/*}}}*/
+ END
+ #}}}
+-#Complete verbose.m {{{1
++#Complete 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
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12365)
+@@ -9,7 +9,7 @@
+ #include <float.h>
+ 
+ /*General Gauss points*/
+-/*FUNCTION GaussLegendreLinear {{{1*/
++/*FUNCTION GaussLegendreLinear {{{*/
+ void GaussLegendreLinear( double** pxgaus, double** pxwgt, int ngaus){
+ 	/* Gauss-Legendre quadrature points.
+ 
+@@ -86,8 +86,8 @@
+ 		xfree((void **)&beta );
+ 		xfree((void **)&alpha);
+ 	}
+-}/*}}}1*/
+-/*FUNCTION GaussLegendreTria{{{1*/
++}/*}}}*/
++/*FUNCTION GaussLegendreTria{{{*/
+ void GaussLegendreTria( int* pngaus, double** pl1, double** pl2, double** pl3, double** pwgt, int iord ) {
+ 	/*Gauss quadrature points for the triangle.
+ 
+@@ -101,7 +101,7 @@
+ 	double *xgaus=NULL,*xwgt=NULL,*egaus,*ewgt;
+ 
+ 	/*Hardcoded Gauss points declaration*/
+-	/*p= 1, npoint= 1{{{2*/
++	/*p= 1, npoint= 1{{{*/
+ 	static double wgt1[]={
+ 		1.732050807568877};
+ 	static double l11[]={
+@@ -110,8 +110,8 @@
+ 		0.333333333333333};
+ 	static double l31[]={
+ 		0.333333333333333};
+-	/*}}}2*/
+-	/*p= 2, npoint= 3  {{{2*/
++	/*}}}*/
++	/*p= 2, npoint= 3  {{{*/
+ 	static double wgt2[]={
+ 		0.577350269189625, 0.577350269189625, 0.577350269189625};
+ 	static double l12[]={
+@@ -120,8 +120,8 @@
+ 		0.166666666666667, 0.666666666666667, 0.166666666666667};
+ 	static double l32[]={
+ 		0.166666666666667, 0.166666666666667, 0.666666666666667};
+-	/*}}}2*/
+-	/*p= 3, npoint= 4  {{{2*/
++	/*}}}*/
++	/*p= 3, npoint= 4  {{{*/
+ 	static double wgt3[]={
+ 		-0.974278579257493, 0.902109795608790, 0.902109795608790, 
+ 		0.902109795608790};
+@@ -134,8 +134,8 @@
+ 	static double l33[]={
+ 		0.333333333333333, 0.200000000000000, 0.200000000000000, 
+ 		0.600000000000000};
+-	/*}}}2*/
+-	/*p= 4, npoint= 6  {{{2*/
++	/*}}}*/
++	/*p= 4, npoint= 6  {{{*/
+ 	static double wgt4[]={
+ 		0.386908262797819, 0.386908262797819, 0.386908262797819, 
+ 		0.190442006391807, 0.190442006391807, 0.190442006391807};
+@@ -148,8 +148,8 @@
+ 	static double l34[]={
+ 		0.445948490915965, 0.445948490915965, 0.108103018168070, 
+ 		0.091576213509771, 0.091576213509771, 0.816847572980459};
+-	/*}}}2*/
+-	/*p= 5, npoint= 7  {{{2*/
++	/*}}}*/
++	/*p= 5, npoint= 7  {{{*/
+ 	static double wgt5[]={
+ 		0.389711431702997, 0.229313399254729, 0.229313399254729, 
+ 		0.229313399254729, 0.218133059367230, 0.218133059367230, 
+@@ -166,8 +166,8 @@
+ 		0.333333333333333, 0.470142064105115, 0.470142064105115, 
+ 		0.059715871789770, 0.101286507323456, 0.101286507323456, 
+ 		0.797426985353087};
+-	/*}}}2*/
+-	/*p= 6, npoint=12  {{{2*/
++	/*}}}*/
++	/*p= 6, npoint=12  {{{*/
+ 	static double wgt6[]={
+ 		0.202279763184836, 0.202279763184836, 0.202279763184836, 
+ 		0.088065961139281, 0.088065961139281, 0.088065961139281, 
+@@ -188,8 +188,8 @@
+ 		0.063089014491502, 0.063089014491502, 0.873821971016996, 
+ 		0.636502499121399, 0.310352451033784, 0.636502499121399, 
+ 		0.310352451033784, 0.053145049844817, 0.053145049844817};
+-	/*}}}2*/
+-	/*p= 7, npoint=13  {{{2*/
++	/*}}}*/
++	/*p= 7, npoint=13  {{{*/
+ 	static double wgt7[]={
+ 		-0.259062916308362, 0.304174548458604, 0.304174548458604, 
+ 		0.304174548458604, 0.092400122517855, 0.092400122517855, 
+@@ -214,8 +214,8 @@
+ 		0.869739794195568, 0.638444188569810, 0.312865496004874, 
+ 		0.638444188569810, 0.312865496004874, 0.048690315425316, 
+ 		0.048690315425316};
+-	/*}}}2*/
+-	/*p= 8, npoint=16  {{{2*/
++	/*}}}*/
++	/*p= 8, npoint=16  {{{*/
+ 	static double wgt8[]={
+ 		0.249961964823104, 0.164703541925695, 0.164703541925695, 
+ 		0.164703541925695, 0.178777729989794, 0.178777729989794, 
+@@ -244,8 +244,8 @@
+ 		0.898905543365938, 0.728492392955404, 0.263112829634638, 
+ 		0.728492392955404, 0.263112829634638, 0.008394777409958, 
+ 		0.008394777409958};
+-	/*}}}2*/
+-	/*p= 9, npoint=19  {{{2*/
++	/*}}}*/
++	/*p= 9, npoint=19  {{{*/
+ 	static double wgt9[]={
+ 		0.168244134395468, 0.054273292833345, 0.054273292833345, 
+ 		0.054273292833345, 0.134801255248419, 0.134801255248419, 
+@@ -278,8 +278,8 @@
+ 		0.910540973211095, 0.741198598784498, 0.221962989160766, 
+ 		0.741198598784498, 0.221962989160766, 0.036838412054736, 
+ 		0.036838412054736};
+-	/*}}}2*/
+-	/*p=10, npoint=25  {{{2*/
++	/*}}}*/
++	/*p=10, npoint=25  {{{*/
+ 	static double wgt10[]={
+ 		0.157301373584232, 0.063611224790829, 0.063611224790829, 
+ 		0.063611224790829, 0.078498377595183, 0.078498377595183, 
+@@ -320,8 +320,8 @@
+ 		0.025003534762686, 0.923655933587500, 0.066803251012200, 
+ 		0.923655933587500, 0.066803251012200, 0.009540815400299, 
+ 		0.009540815400299};
+-	/*}}}2*/
+-	/*p=11, npoint=27  {{{2*/
++	/*}}}*/
++	/*p=11, npoint=27  {{{*/
+ 	static double wgt11[]={
+ 		0.001605622060698, 0.001605622060698, 0.001605622060698, 
+ 		0.133626914252765, 0.133626914252765, 0.133626914252765, 
+@@ -362,8 +362,8 @@
+ 		0.356620648261293, 0.050178138310495, 0.050178138310495, 
+ 		0.807489003159792, 0.171488980304042, 0.807489003159792, 
+ 		0.171488980304042, 0.021022016536166, 0.021022016536166};
+-	/*}}}2*/
+-	/*p=12, npoint=33  {{{2*/
++	/*}}}*/
++	/*p=12, npoint=33  {{{*/
+ 	static double wgt12[]={
+ 		0.044567514407799, 0.044567514407799, 0.044567514407799, 
+ 		0.075677707051848, 0.075677707051848, 0.075677707051848, 
+@@ -412,8 +412,8 @@
+ 		0.281325580989940, 0.022838332222257, 0.022838332222257, 
+ 		0.858014033544073, 0.116251915907597, 0.858014033544073, 
+ 		0.116251915907597, 0.025734050548330, 0.025734050548330};
+-	/*}}}2*/
+-	/*  p=13, npoint=37  {{{2*/
++	/*}}}*/
++	/*  p=13, npoint=37  {{{*/
+ 	static double wgt13[]={
+ 		0.090968907790622, 0.019537784619314, 0.019537784619314, 
+ 		0.019537784619314, 0.054427130356344, 0.054427130356344, 
+@@ -470,8 +470,8 @@
+ 		0.018100773278807, 0.851409537834241, 0.126357385491669, 
+ 		0.851409537834241, 0.126357385491669, 0.022233076674090, 
+ 		0.022233076674090};
+-	/*}}}2*/
+-	/*p=14, npoint=42{{{2*/
++	/*}}}*/
++	/*p=14, npoint=42{{{*/
+ 	static double wgt14[]={
+ 		0.037903474783419, 0.037903474783419, 0.037903474783419, 
+ 		0.056791094234956, 0.056791094234956, 0.056791094234956, 
+@@ -532,8 +532,8 @@
+ 		0.298372882136258, 0.014646950055654, 0.014646950055654, 
+ 		0.879757171370171, 0.118974497696957, 0.879757171370171, 
+ 		0.118974497696957, 0.001268330932872, 0.001268330932872};
+-	/*}}}2*/
+-	/*p=15, npoint=48{{{2*/
++	/*}}}*/
++	/*p=15, npoint=48{{{*/
+ 	static double wgt15[]={
+ 		0.003320126005206, 0.003320126005206, 0.003320126005206, 
+ 		0.076641563419124, 0.076641563419124, 0.076641563419124, 
+@@ -602,8 +602,8 @@
+ 		0.215599664072284, 0.036843869875878, 0.036843869875878, 
+ 		0.883964574092416, 0.103575616576386, 0.883964574092416, 
+ 		0.103575616576386, 0.012459809331199, 0.012459809331199};
+-	/*}}}2*/
+-	/*p=16, npoint=52  {{{2*/
++	/*}}}*/
++	/*p=16, npoint=52  {{{*/
+ 	static double wgt16[]={
+ 		0.081191089584902, 0.011095307165226, 0.011095307165226, 
+ 		0.011095307165226, 0.072244353151393, 0.072244353151393, 
+@@ -680,8 +680,8 @@
+ 		0.041941786468010, 0.900399064086661, 0.085283615682657, 
+ 		0.900399064086661, 0.085283615682657, 0.014317320230681, 
+ 		0.014317320230681};
+-	/*}}}2*/
+-	/*p=17, npoint=61{{{2*/
++	/*}}}*/
++	/*p=17, npoint=61{{{*/
+ 	static double wgt17[]={
+ 		0.057914928034477, 0.008822054327014, 0.008822054327014, 
+ 		0.008822054327014, 0.025410682752829, 0.025410682752829, 
+@@ -770,8 +770,8 @@
+ 		0.067165782413524, 0.904625504095608, 0.080711313679564, 
+ 		0.904625504095608, 0.080711313679564, 0.014663182224828, 
+ 		0.014663182224828};
+-	/*}}}2*/
+-	/*  p=18, npoint=70  {{{2*/
++	/*}}}*/
++	/*  p=18, npoint=70  {{{*/
+ 
+ 	static double wgt18[]={
+ 		0.053364381350150, 0.015713921277179, 0.015713921277179, 
+@@ -873,8 +873,8 @@
+ 		0.014858100590125, 1.014347260005363, 0.020874755282586, 
+ 		1.014347260005363, 0.020874755282586,-0.035222015287949, 
+ 		-0.035222015287949};
+-	/*}}}2*/
+-	/*p=19, npoint=73  {{{2*/
++	/*}}}*/
++	/*p=19, npoint=73  {{{*/
+ 
+ 	static double wgt19[]={
+ 		0.056995437856306, 0.017893352515055, 0.017893352515055, 
+@@ -980,8 +980,8 @@
+ 		0.034647074816760, 0.924344252620784, 0.065494628082938, 
+ 		0.924344252620784, 0.065494628082938, 0.010161119296278, 
+ 		0.010161119296278};
+-	/*}}}2*/
+-	/*p=20, npoint=79 {{{2*/
++	/*}}}*/
++	/*p=20, npoint=79 {{{*/
+ 	static double wgt20[]={
+ 		0.057256499746719, 0.001501721280705, 0.001501721280705, 
+ 		0.001501721280705, 0.020195803723819, 0.020195803723819, 
+@@ -1094,7 +1094,7 @@
+ 		0.026686063258714, 0.929756171556853, 0.059696109149007, 
+ 		0.929756171556853, 0.059696109149007, 0.010547719294141, 
+ 		0.010547719294141};
+-	/*}}}2*/
++	/*}}}*/
+ 
+ 	static double* wgtp[MAX_TRIA_SYM_ORD]={
+ 		wgt1 ,wgt2 ,wgt3 ,wgt4 ,wgt5 ,
+@@ -1204,8 +1204,8 @@
+ 	//				 i,(*pl1 )[i],(*pl2 )[i],(*pl3 )[i],(*pwgt)[i]);
+ 
+ 	return;
+-}/*}}}1*/
+-/*FUNCTION GaussLegendreTetra{{{1*/
++}/*}}}*/
++/*FUNCTION GaussLegendreTetra{{{*/
+ void GaussLegendreTetra( int* pngaus, double** pl1, double** pl2, double** pl3, double** pl4, double** pwgt, int iord ) {
+ 	/* Gauss quadrature points for the tetrahedron.
+ 
+@@ -1223,7 +1223,7 @@
+ 	double *xgaus=NULL,*xwgt=NULL,*egaus,*ewgt,*zgaus,*zwgt;
+ 
+ 	/*Hardcoded Gauss points definition*/
+-	/*p= 1, npoint= 1  {{{2*/
++	/*p= 1, npoint= 1  {{{*/
+ 	static double wgt1[]={
+ 		1.000000000000000};
+ 	static double l11[]={
+@@ -1234,8 +1234,8 @@
+ 		0.250000000000000};
+ 	static double l41[]={
+ 		0.250000000000000};
+-	/*}}}2*/
+-	/*p= 2, npoint= 4  {{{2*/
++	/*}}}*/
++	/*p= 2, npoint= 4  {{{*/
+ 
+ 	static double wgt2[]={
+ 		0.250000000000000, 0.250000000000000, 0.250000000000000,
+@@ -1252,8 +1252,8 @@
+ 	static double l42[]={
+ 		0.138196601125011, 0.138196601125011, 0.138196601125011,
+ 		0.585410196624969};
+-	/*}}}2*/
+-	/*p= 3, npoint= 5  {{{2*/
++	/*}}}*/
++	/*p= 3, npoint= 5  {{{*/
+ 	static double wgt3[]={
+ 		-0.800000000000000, 0.450000000000000, 0.450000000000000, 
+ 		0.450000000000000, 0.450000000000000};
+@@ -1269,8 +1269,8 @@
+ 	static double l43[]={
+ 		0.250000000000000, 0.166666666666667, 0.166666666666667, 
+ 		0.166666666666667, 0.500000000000000};
+-	/*}}}2*/
+-	/*p= 4, npoint=11  {{{2*/
++	/*}}}*/
++	/*p= 4, npoint=11  {{{*/
+ 
+ 	static double wgt4[]={
+ 		-0.013155555555556, 0.007622222222222, 0.007622222222222, 
+@@ -1297,8 +1297,8 @@
+ 		0.071428571428571, 0.785714285714286, 0.100596423833201, 
+ 		0.100596423833201, 0.399403576166799, 0.100596423833201,
+ 		0.399403576166799, 0.399403576166799};
+-	/*}}}2*/
+-	/*p= 5, npoint=15  {{{2*/
++	/*}}}*/
++	/*p= 5, npoint=15  {{{*/
+ 
+ 	static double wgt5[]={
+ 		0.030283678097089, 0.006026785714286, 0.006026785714286, 
+@@ -1330,8 +1330,8 @@
+ 		0.090909090909091, 0.090909090909091, 0.727272727272727, 
+ 		0.433449846426336, 0.433449846426336, 0.066550153573664, 
+ 		0.433449846426336, 0.066550153573664, 0.066550153573664};
+-	/*}}}2*/
+-	/*p= 6, npoint=24  {{{2*/
++	/*}}}*/
++	/*p= 6, npoint=24  {{{*/
+ 
+ 	static double wgt6[]={
+ 		0.006653791709695, 0.006653791709695, 0.006653791709695, 
+@@ -1382,7 +1382,7 @@
+ 		0.269672331458316, 0.063661001875018, 0.063661001875018, 
+ 		0.603005664791649, 0.269672331458316, 0.063661001875018, 
+ 		0.063661001875018, 0.063661001875018, 0.063661001875018};
+-	/*}}}2*/
++	/*}}}*/
+ 
+ 	static double* wgtp[MAX_TETRA_SYM_ORD]={wgt1,wgt2,wgt3,wgt4,wgt5,wgt6};
+ 	static double* l1p [MAX_TETRA_SYM_ORD]={l11 ,l12 ,l13 ,l14 ,l15 ,l16 };
+@@ -1469,8 +1469,8 @@
+ 		xfree((void **)&xwgt );
+ 		xfree((void **)&xgaus);
+ 	}
+-}/*}}}1*/
+-/*FUNCTION GaussLobatto{{{1*/
++}/*}}}*/
++/*FUNCTION GaussLobatto{{{*/
+ void GaussLobatto( double** pxgaus, double** pxwgt, int ngaus ) {
+ 	/*Gauss-Lobatto quadrature points.
+ 
+@@ -1578,8 +1578,8 @@
+ 		xfree((void **)&alpha);
+ 	}
+ 
+-}/*}}}1*/
+-/*FUNCTION GaussRecur{{{1*/
++}/*}}}*/
++/*FUNCTION GaussRecur{{{*/
+ void GaussRecur( double* zero, double* weight, int n, double* alpha, double* beta ) {
+ 	/*Gauss quadrature points from recursion coefficients.
+ 	 *
+@@ -1699,18 +1699,18 @@
+ 	/*Cleanup*/
+ 	xfree((void **)&work);
+ 
+-}/*}}}1*/
++}/*}}}*/
+ 
+ /*Element Gauss points TO BE REMOVED*/
+-/*FUNCTION gaussQuad{{{1*/
++/*FUNCTION gaussQuad{{{*/
+ void gaussQuad( double** pxgaus, double** pxwgt, double** pegaus, double** pewgt, int nigaus, int njgaus ) { 
+ 	/*Gauss quadrature points for the quadrilaterial.*/
+ 
+ 	/*get the gauss points using the product of two line rules  */
+ 	GaussLegendreLinear(pxgaus, pxwgt, nigaus);
+ 	GaussLegendreLinear(pegaus, pewgt, njgaus);
+-}/*}}}1*/
+-/*FUNCTION gaussHexa{{{1*/
++}/*}}}*/
++/*FUNCTION gaussHexa{{{*/
+ void gaussHexa( double** pxgaus, double** pxwgt, double** pegaus, double** pewgt, double** pzgaus, double** pzwgt, int nigaus, int njgaus, int nkgaus ) {
+ 	/*Gauss quadrature points for the hexahedron.*/
+ 
+@@ -1718,4 +1718,4 @@
+ 	GaussLegendreLinear(pxgaus, pxwgt, nigaus);
+ 	GaussLegendreLinear(pegaus, pewgt, njgaus);
+ 	GaussLegendreLinear(pzgaus, pzwgt, nkgaus);
+-}/*}}}1*/
++}/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp	(revision 12365)
+@@ -2,7 +2,7 @@
+  * \brief: convert units from the model to IU or from IU to the model.
+  */ 
+ 
+-/*headers {{{1*/
++/*headers {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/IsInPoly.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/IsInPoly.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/IsInPoly.cpp	(revision 12365)
+@@ -13,7 +13,7 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-/*IsInPoly {{{1*/
++/*IsInPoly {{{*/
+ int IsInPoly(Vector* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){
+ 
+ 	int i;
+@@ -54,7 +54,7 @@
+ 	}
+ 	 return 1;
+ }/*}}}*/
+-/*IsOutsidePoly {{{1*/
++/*IsOutsidePoly {{{*/
+ int IsOutsidePoly(Vector* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){
+ 
+ 	int i,j;
+@@ -95,7 +95,7 @@
+ 	}
+ 	return 1;
+ }/*}}}*/
+-/*pnpoly{{{1*/
++/*pnpoly{{{*/
+ int pnpoly(int npol, double *xp, double *yp, double x, double y, int edgevalue) {
+ 	int i, j, c = 0;
+ 	double n1, n2, normp, scalar;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/io.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/io.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/io.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #ifndef _ISSM_IO_H_
+ #define _ISSM_IO_H_
+ 
+-#ifdef HAVE_CONFIG_H //config.h {{{1
++#ifdef HAVE_CONFIG_H //config.h {{{
+ #include <config.h>
+ #else
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12365)
+@@ -53,7 +53,7 @@
+ 	xfree((void**)&old_floatingice);
+ }
+ 
+-/*FUNCTION CreateNodesOnFloatingIce {{{1*/
++/*FUNCTION CreateNodesOnFloatingIce {{{*/
+ Vector* CreateNodesOnFloatingIce(Nodes* nodes,int configuration_type){ 
+ 
+ 	int     i,numnods;
+@@ -80,7 +80,7 @@
+ 	return vec_nodes_on_floatingice;
+ }
+ /*%}}}*/
+-/*FUNCTION PotentialSheetUngrounding {{{1*/
++/*FUNCTION PotentialSheetUngrounding {{{*/
+ double*    PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters){ 
+ 
+ 	int      i,numberofvertices;
+@@ -107,7 +107,7 @@
+ 	return vertices_potentially_ungrounding;
+ }
+ /*}}}*/
+-/*FUNCTION PropagateFloatingiceToGroundedNeighbors {{{1*/
++/*FUNCTION PropagateFloatingiceToGroundedNeighbors {{{*/
+ double*    PropagateFloatingiceToGroundedNeighbors(Elements* elements,Nodes* nodes,Vertices* vertices,Parameters* parameters,double* vertices_potentially_ungrounding){ 
+ 
+ 	int      i,analysis_type;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 12365)
+@@ -14,7 +14,7 @@
+ 
+ void CreateParametersDakota(Parameters** pparameters,IoModel* iomodel,int solution_type,int analysis_type){
+ 
+-	/*variable declarations: {{{1*/
++	/*variable declarations: {{{*/
+ 	int i,j,k;
+ 	
+ 	Parameters* parameters = NULL;
+@@ -72,7 +72,7 @@
+ 		iomodel->Constant(&numberofresponses,QmuNumberofresponsesEnum);
+ 		iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
+ 
+-		/*name of qmu input, error and output files:{{{1*/
++		/*name of qmu input, error and output files:{{{*/
+ 		qmuinname=(char*)xmalloc((strlen(name)+strlen(".qmu.in")+1)*sizeof(char));
+ 		sprintf(qmuinname,"%s%s",name,".qmu.in");
+ 		parameters->AddObject(new   StringParam(QmuInNameEnum,qmuinname));
+@@ -85,21 +85,21 @@
+ 		sprintf(qmuerrname,"%s%s",name,".qmu.err");
+ 		parameters->AddObject(new   StringParam(QmuErrNameEnum,qmuerrname));
+ 		/*}}}*/
+-		/*Fetch variable descriptors: {{{1*/
++		/*Fetch variable descriptors: {{{*/
+ 		iomodel->FetchData(&variabledescriptors,&numvariabledescriptors,QmuVariabledescriptorsEnum);
+ 
+ 		/*Ok, we have all the variable descriptors. Build a parameter with it: */
+ 		parameters->AddObject(new StringArrayParam(QmuVariabledescriptorsEnum,variabledescriptors,numvariabledescriptors));
+ 
+ 		/*}}}*/
+-		/*Fetch response descriptors: {{{1*/
++		/*Fetch response descriptors: {{{*/
+ 		iomodel->FetchData(&responsedescriptors,&numresponsedescriptors,QmuResponsedescriptorsEnum);
+ 
+ 		/*Ok, we have all the response descriptors. Build a parameter with it: */
+ 		parameters->AddObject(new StringArrayParam(QmuResponsedescriptorsEnum,responsedescriptors,numresponsedescriptors));
+ 		parameters->AddObject(new    IntParam(QmuNumberofresponsesEnum,numberofresponses));
+ 		/*}}}*/
+-		/*Deal with partitioning: {{{1*/
++		/*Deal with partitioning: {{{*/
+ 		/*partition vertices in iomodel->qmu_npart parts, unless a partition is already present: */
+ 		
+ 		parameters->AddObject(iomodel->CopyConstantObject(QmuNumberofpartitionsEnum));
+@@ -115,7 +115,7 @@
+ 		}
+ 		parameters->AddObject(new DoubleVecParam(QmuPartitionEnum,dpart,numberofvertices));
+ 		/*}}}*/
+-		/*Deal with data needed because of qmu variables: {{{1*/
++		/*Deal with data needed because of qmu variables: {{{*/
+ 		
+ 		for(i=0;i<numvariabledescriptors;i++){
+ 
+@@ -139,7 +139,7 @@
+ 			}
+ 		}
+ 		/*}}}*/
+-		/*Deal with data needed to compute qmu responses: {{{1*/
++		/*Deal with data needed to compute qmu responses: {{{*/
+ 		for(i=0;i<numresponsedescriptors;i++){
+ 			
+ 			if(strncmp(responsedescriptors[i],"indexed_MassFlux",16)==0){
+@@ -200,7 +200,7 @@
+ 			xfree((void**)&array);
+ 		}
+ 		/*}}}*/
+-		/*Free data: {{{1*/
++		/*Free data: {{{*/
+ 		for(i=0;i<numresponsedescriptors;i++){
+ 			descriptor=responsedescriptors[i];
+ 			xfree((void**)&descriptor);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 12365)
+@@ -11,7 +11,7 @@
+ #define _ZIGZAGCOUNTER_
+ 
+ /*current module: */
+-/*RiftIsPresent(Loads* loads,int configuration_type){{{1*/
++/*RiftIsPresent(Loads* loads,int configuration_type){{{*/
+ int RiftIsPresent(Loads* loads,int configuration_type){
+ 
+ 
+@@ -40,7 +40,7 @@
+ 	return found;
+ }
+ /*}}}*/
+-/*RiftConstraintsState(int* pconverged, int* pnum_unstable_constraints,Loads* loads,int min_mechanical_constraints,int configuration_type){{{1*/
++/*RiftConstraintsState(int* pconverged, int* pnum_unstable_constraints,Loads* loads,int min_mechanical_constraints,int configuration_type){{{*/
+ void RiftConstraintsState(int* pconverged, int* pnum_unstable_constraints,Loads* loads,int min_mechanical_constraints,int configuration_type){
+ 
+ 	int num_unstable_constraints=0;
+@@ -64,7 +64,7 @@
+ 	*pnum_unstable_constraints=num_unstable_constraints;
+ }
+ /*}}}*/
+-/*RiftConstrain(int* pnum_unstable_constraints,Loads* loads,int configuration_type){{{1*/
++/*RiftConstrain(int* pnum_unstable_constraints,Loads* loads,int configuration_type){{{*/
+ void RiftConstrain(int* pnum_unstable_constraints,Loads* loads,int configuration_type){
+ 
+ 	int			i;
+@@ -105,7 +105,7 @@
+ 
+ }
+ /*}}}*/
+-/*RiftIsFrozen(Loads* loads,int configuration_type){{{1*/
++/*RiftIsFrozen(Loads* loads,int configuration_type){{{*/
+ int RiftIsFrozen(Loads* loads,int configuration_type){
+ 
+ 	int			i;
+@@ -143,7 +143,7 @@
+ 	return found;
+ }
+ /*}}}*/
+-/*RiftFreezeConstraints(Loads* loads,int configuration_type){{{1*/
++/*RiftFreezeConstraints(Loads* loads,int configuration_type){{{*/
+ void RiftFreezeConstraints(Loads* loads,int configuration_type){
+ 
+ 	int			i;
+@@ -171,7 +171,7 @@
+ /*}}}*/
+ 
+ /*diverse trials and errors: */
+-/*RiftIsMaterialStable(Loads* loads){{{1*/
++/*RiftIsMaterialStable(Loads* loads){{{*/
+ int RiftIsMaterialStable(Loads* loads){
+ 
+ 	int i;
+@@ -203,7 +203,7 @@
+ 	return found;
+ }
+ /*}}}*/
+-/*RiftIsPreStable(Loads* loads){{{1*/
++/*RiftIsPreStable(Loads* loads){{{*/
+ int RiftIsPreStable(Loads* loads){
+ 
+ 
+@@ -242,7 +242,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*RiftSetPreStable(Loads* loads){{{1*/
++/*RiftSetPreStable(Loads* loads){{{*/
+ void RiftSetPreStable(Loads* loads){
+ 
+ 
+@@ -263,7 +263,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*RiftPreConstrain(int* pnum_unstable_constraints,Loads* loads){{{1*/
++/*RiftPreConstrain(int* pnum_unstable_constraints,Loads* loads){{{*/
+ void RiftPreConstrain(int* pnum_unstable_constraints,Loads* loads){
+ 
+ 	int			i;
+@@ -299,7 +299,7 @@
+ 
+ }
+ /*}}}*/
+-/*RiftMaxPenetrationInInputs(Loads* loads){{{1*/
++/*RiftMaxPenetrationInInputs(Loads* loads){{{*/
+ void RiftMaxPenetrationInInputs(Loads* loads){
+ 
+ 	int			i;
+@@ -341,7 +341,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*RiftPotentialUnstableConstraints(Loads* loads){{{1*/
++/*RiftPotentialUnstableConstraints(Loads* loads){{{*/
+ int RiftPotentialUnstableConstraints(Loads* loads){
+ 
+ 	int			i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12365)
+@@ -91,7 +91,7 @@
+ 	*pdata_mesh=data_mesh;
+ }
+ /*}}}*/
+-/*InterpFromGridToMeshxt {{{1*/
++/*InterpFromGridToMeshxt {{{*/
+ void* InterpFromGridToMeshxt(void* vpthread_handle){
+ 
+ 	/*gate variables :*/
+@@ -182,7 +182,7 @@
+ 	}
+ }/*}}}*/
+ 
+-/*findindices {{{1*/
++/*findindices {{{*/
+ bool findindices(int* pn,int* pm,double* x,int x_rows, double* y,int y_rows, double xgrid,double ygrid){
+ 
+ 	bool foundx=false,foundy=false;
+@@ -217,7 +217,7 @@
+ 	*pm=m; *pn=n;
+ 	return (foundx && foundy);
+ }/*}}}*/
+-/*triangleinterp{{{1*/
++/*triangleinterp{{{*/
+ double triangleinterp(double x1,double x2,double y1,double y2,double Q11,double Q12,double Q21,double Q22,double x,double y){
+ 	/*split the rectangle in 2 triangle and
+ 	 * use Lagrange P1 interpolation
+@@ -258,7 +258,7 @@
+ 		return area_1*Q22+area_2*Q11+area_3*Q21;
+ 	}
+ }/*}}}*/
+-/*bilinearinterp{{{1*/
++/*bilinearinterp{{{*/
+ double bilinearinterp(double x1,double x2,double y1,double y2,double Q11,double Q12,double Q21,double Q22,double x,double y){
+ 	/*Bilinear  interpolation: (http://en.wikipedia.org/wiki/Bilinear_interpolation) */
+ 
+@@ -285,7 +285,7 @@
+ 	  +Q22*(x-x1)*(y-y1)/((x2-x1)*(y2-y1));
+ }
+ /*}}}*/
+-/*nearestinterp{{{1*/
++/*nearestinterp{{{*/
+ double nearestinterp(double x1,double x2,double y1,double y2,double Q11,double Q12,double Q21,double Q22,double x,double y){
+ 	/*Nearest neighbor interpolation*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 12365)
+@@ -40,7 +40,7 @@
+ 
+ 	numberofdofspernode=nodes->MaxNumDofs(configuration_type,GsetEnum);
+ 
+-	/*Checks in debugging mode {{{1*/
++	/*Checks in debugging mode {{{*/
+ 	if(penalty_kflag)_assert_(kflag);
+ 	if(penalty_pflag)_assert_(pflag);
+ 	/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp	(revision 12365)
+@@ -37,7 +37,7 @@
+ 
+ 	/*If no mesh in input, generate one*/
+ 	if(bamgmesh_in->TrianglesSize[0]==0){
+-		/*Mesh generation {{{1*/
++		/*Mesh generation {{{*/
+ 
+ 		//Step1: generate geometry Gh
+ 		if (verbosity>0) printf("Construction of a mesh from a given geometry\n");
+@@ -83,7 +83,7 @@
+ 		/*}}}*/
+ 	}
+ 	else{
+-		/*Anisotropic mesh adaptation {{{1*/
++		/*Anisotropic mesh adaptation {{{*/
+ 
+ 		// read background mesh 
+ 		if (verbosity>0) printf("Anisotropic mesh adaptation\n");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _SEQMAT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -25,7 +25,7 @@
+ 		int M,N; 
+ 		double* matrix; 
+ 
+-		/*SeqMat constructors, destructors {{{1*/
++		/*SeqMat constructors, destructors {{{*/
+ 		SeqMat();
+ 		SeqMat(int M,int N);
+ 		SeqMat(int M,int N,double sparsity);
+@@ -33,7 +33,7 @@
+ 		SeqMat(int M,int N,int connectivity,int numberofdofspernode);
+ 		~SeqMat();
+ 		/*}}}*/
+-		/*SeqMat specific routines {{{1*/
++		/*SeqMat specific routines {{{*/
+ 		void Echo(void);
+ 		void Assemble(void);
+ 		double Norm(NormMode norm_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -18,14 +18,14 @@
+ /*}}}*/
+ 
+ /*SeqVec constructors and destructor*/
+-/*FUNCTION SeqVec::SeqVec(){{{1*/
++/*FUNCTION SeqVec::SeqVec(){{{*/
+ SeqVec::SeqVec(){
+ 
+ 	this->M=0;
+ 	this->vector=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::SeqVec(int M,bool fromlocalsize){{{1*/
++/*FUNCTION SeqVec::SeqVec(int M,bool fromlocalsize){{{*/
+ SeqVec::SeqVec(int pM,bool fromlocalsize){
+ 
+ 	this->M=pM;
+@@ -33,7 +33,7 @@
+ 	if(this->M) this->vector=(double*)xcalloc(pM,sizeof(double));
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::SeqVec(double* serial_vec,int M){{{1*/
++/*FUNCTION SeqVec::SeqVec(double* serial_vec,int M){{{*/
+ SeqVec::SeqVec(double* buffer,int pM){
+ 
+ 	int i,j;
+@@ -46,7 +46,7 @@
+ 	}
+ }
+ /*}}}*/
+-		/*FUNCTION SeqVec::~SeqVec(){{{1*/
++		/*FUNCTION SeqVec::~SeqVec(){{{*/
+ SeqVec::~SeqVec(){
+ 	xfree((void**)&this->vector);
+ 	M=0;
+@@ -54,7 +54,7 @@
+ /*}}}*/
+ 
+ /*SeqVec specific routines: */
+-/*FUNCTION SeqVec::Echo{{{1*/
++/*FUNCTION SeqVec::Echo{{{*/
+ void SeqVec::Echo(void){
+ 
+ 	int i;
+@@ -65,14 +65,14 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION SeqVec::Assemble{{{1*/
++/*FUNCTION SeqVec::Assemble{{{*/
+ void SeqVec::Assemble(void){
+ 		
+ 	/*do nothing*/
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::SetValues{{{1*/
++/*FUNCTION SeqVec::SetValues{{{*/
+ void SeqVec::SetValues(int ssize, int* list, double* values, InsMode mode){
+ 	
+ 	int i;
+@@ -90,7 +90,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::SetValue{{{1*/
++/*FUNCTION SeqVec::SetValue{{{*/
+ void SeqVec::SetValue(int dof, double value, InsMode mode){
+ 
+ 	switch(mode){
+@@ -106,7 +106,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::GetValue{{{1*/
++/*FUNCTION SeqVec::GetValue{{{*/
+ void SeqVec::GetValue(double* pvalue,int dof){
+ 
+ 	*pvalue=this->vector[dof];
+@@ -114,28 +114,28 @@
+ }
+ /*}}}*/
+ 		
+-/*FUNCTION SeqVec::GetSize{{{1*/
++/*FUNCTION SeqVec::GetSize{{{*/
+ void SeqVec::GetSize(int* pM){
+ 
+ 	*pM=this->M;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::GetLocalSize{{{1*/
++/*FUNCTION SeqVec::GetLocalSize{{{*/
+ void SeqVec::GetLocalSize(int* pM){
+ 	
+ 	*pM=this->M;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::Duplicate{{{1*/
++/*FUNCTION SeqVec::Duplicate{{{*/
+ SeqVec* SeqVec::Duplicate(void){
+ 	
+ 	return new SeqVec(this->vector,this->M);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::Set{{{1*/
++/*FUNCTION SeqVec::Set{{{*/
+ void SeqVec::Set(double value){
+ 
+ 	int i;
+@@ -143,7 +143,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::AXPY{{{1*/
++/*FUNCTION SeqVec::AXPY{{{*/
+ void SeqVec::AXPY(SeqVec* X, double a){
+ 
+ 	int i;
+@@ -153,7 +153,7 @@
+ 	
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::AYPX{{{1*/
++/*FUNCTION SeqVec::AYPX{{{*/
+ void SeqVec::AYPX(SeqVec* X, double a){
+ 	
+ 	int i;
+@@ -163,7 +163,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::ToMPISerial{{{1*/
++/*FUNCTION SeqVec::ToMPISerial{{{*/
+ double* SeqVec::ToMPISerial(void){
+ 
+ 	double* buffer=NULL;
+@@ -176,7 +176,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::Copy{{{1*/
++/*FUNCTION SeqVec::Copy{{{*/
+ void SeqVec::Copy(SeqVec* to){
+ 
+ 	int i;
+@@ -186,7 +186,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::Norm{{{1*/
++/*FUNCTION SeqVec::Norm{{{*/
+ double SeqVec::Norm(NormMode mode){
+ 
+ 	double norm;
+@@ -208,7 +208,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::Scale{{{1*/
++/*FUNCTION SeqVec::Scale{{{*/
+ void SeqVec::Scale(double scale_factor){
+ 
+ 	int i;
+@@ -216,7 +216,7 @@
+ 	
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::Dot{{{1*/
++/*FUNCTION SeqVec::Dot{{{*/
+ double SeqVec::Dot(SeqVec* input){
+ 
+ 	int i;
+@@ -227,7 +227,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::PointwiseDivide{{{1*/
++/*FUNCTION SeqVec::PointwiseDivide{{{*/
+ void SeqVec::PointwiseDivide(SeqVec* x,SeqVec* y){
+ 
+ 	int i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -18,7 +18,7 @@
+ /*}}}*/
+ 
+ /*SeqMat constructors and destructor*/
+-/*FUNCTION SeqMat::SeqMat(){{{1*/
++/*FUNCTION SeqMat::SeqMat(){{{*/
+ SeqMat::SeqMat(){
+ 
+ 	this->M=0;
+@@ -26,7 +26,7 @@
+ 	this->matrix=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::SeqMat(int M,int N){{{1*/
++/*FUNCTION SeqMat::SeqMat(int M,int N){{{*/
+ SeqMat::SeqMat(int pM,int pN){
+ 
+ 	this->M=pM;
+@@ -35,7 +35,7 @@
+ 	if(M*N) this->matrix=(double*)xcalloc(pM*pN,sizeof(double));
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::SeqMat(int M,int N, double sparsity){{{1*/
++/*FUNCTION SeqMat::SeqMat(int M,int N, double sparsity){{{*/
+ SeqMat::SeqMat(int pM,int pN, double sparsity){
+ 
+ 	this->M=pM;
+@@ -44,7 +44,7 @@
+ 	if(M*N) this->matrix=(double*)xcalloc(pM*pN,sizeof(double));
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat(double* serial_mat,int M,int N,double sparsity){{{1*/
++/*FUNCTION SeqMat(double* serial_mat,int M,int N,double sparsity){{{*/
+ SeqMat::SeqMat(double* serial_mat,int pM,int pN,double sparsity){
+ 
+ 	int i,j;
+@@ -59,7 +59,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::SeqMat(int M,int N, int connectivity, int numberofdofspernode){{{1*/
++/*FUNCTION SeqMat::SeqMat(int M,int N, int connectivity, int numberofdofspernode){{{*/
+ SeqMat::SeqMat(int pM,int pN, int connectivity,int numberofdofspernode){
+ 
+ 	this->M=pM;
+@@ -68,7 +68,7 @@
+ 	if(M*N)this->matrix=(double*)xcalloc(pM*pN,sizeof(double));
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::~SeqMat(){{{1*/
++/*FUNCTION SeqMat::~SeqMat(){{{*/
+ SeqMat::~SeqMat(){
+ 
+ 	xfree((void**)&this->matrix);
+@@ -78,7 +78,7 @@
+ /*}}}*/
+ 
+ /*SeqMat specific routines: */
+-/*FUNCTION SeqMat::Echo{{{1*/
++/*FUNCTION SeqMat::Echo{{{*/
+ void SeqMat::Echo(void){
+ 
+ 	int i,j;
+@@ -91,14 +91,14 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::Assemble{{{1*/
++/*FUNCTION SeqMat::Assemble{{{*/
+ void SeqMat::Assemble(void){
+ 		
+ 	/*do nothing*/
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::Norm{{{1*/
++/*FUNCTION SeqMat::Norm{{{*/
+ double SeqMat::Norm(NormMode mode){
+ 
+ 	double norm;
+@@ -123,7 +123,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::GetSize{{{1*/
++/*FUNCTION SeqMat::GetSize{{{*/
+ void SeqMat::GetSize(int* pM,int* pN){
+ 
+ 	*pM=this->M;
+@@ -131,7 +131,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::GetLocalSize{{{1*/
++/*FUNCTION SeqMat::GetLocalSize{{{*/
+ void SeqMat::GetLocalSize(int* pM,int* pN){
+ 	
+ 	*pM=this->M;
+@@ -139,7 +139,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::MatMult{{{1*/
++/*FUNCTION SeqMat::MatMult{{{*/
+ void SeqMat::MatMult(SeqVec* X,SeqVec* AX){
+ 
+ 	int i,j;
+@@ -162,7 +162,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::Duplicate{{{1*/
++/*FUNCTION SeqMat::Duplicate{{{*/
+ SeqMat* SeqMat::Duplicate(void){
+ 
+ 	double dummy=0;
+@@ -171,7 +171,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::ToSerial{{{1*/
++/*FUNCTION SeqMat::ToSerial{{{*/
+ double* SeqMat::ToSerial(void){
+ 
+ 	double* buffer=NULL;
+@@ -184,7 +184,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::SetValues{{{1*/
++/*FUNCTION SeqMat::SetValues{{{*/
+ void SeqMat::SetValues(int m,int* idxm,int n,int* idxn,double* values,InsMode mode){
+ 	
+ 	int i,j;
+@@ -202,7 +202,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::Convert{{{1*/
++/*FUNCTION SeqMat::Convert{{{*/
+ void SeqMat::Convert(MatrixType type){
+ 
+ 	/*do nothing*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _SEQVEC_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -24,13 +24,13 @@
+ 		double* vector;
+ 		int M;
+ 
+-		/*SeqVec constructors, destructors {{{1*/
++		/*SeqVec constructors, destructors {{{*/
+ 		SeqVec();
+ 		SeqVec(int M,bool fromlocalsize=false);
+ 		SeqVec(double* buffer, int M);
+ 		~SeqVec();
+ 		/*}}}*/
+-		/*SeqVec specific routines {{{1*/
++		/*SeqVec specific routines {{{*/
+ 		void Echo(void);
+ 		void Assemble(void);
+ 		void SetValues(int ssize, int* list, double* values, InsMode mode);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/NewMat.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/NewMat.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/NewMat.cpp	(revision 12365)
+@@ -19,7 +19,7 @@
+ #include "../../../include/include.h"
+ #include "../../mpi/patches/mpipatches.h"
+ 
+-/*NewMat(int M,int N){{{1*/
++/*NewMat(int M,int N){{{*/
+ Mat NewMat(int M,int N){
+ 
+ 	/*output:*/
+@@ -47,7 +47,7 @@
+ 	return outmatrix;
+ }
+ /*}}}*/
+-/*NewMat(int M,int N,double sparsity){{{1*/
++/*NewMat(int M,int N,double sparsity){{{*/
+ Mat NewMat(int M,int N,double sparsity){
+ 
+ 	/*output:*/
+@@ -80,7 +80,7 @@
+ 	return outmatrix;
+ }
+ /*}}}*/
+-/*NewMat(int M,int N,int connectivity,int numberofdofspernode){{{1*/
++/*NewMat(int M,int N,int connectivity,int numberofdofspernode){{{*/
+ Mat NewMat(int M,int N,int connectivity,int numberofdofspernode){
+ 
+ 	/*output:*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _CONTOUR_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Object.h"
+ #include "../shared/Exceptions/exceptions.h"
+ #include "../toolkits/toolkits.h"
+@@ -23,12 +23,12 @@
+ 		IssmDouble* y;
+ 		bool    closed; //is this contour closed?
+ 
+-		/*Contour constructors, destructors {{{1*/
++		/*Contour constructors, destructors {{{*/
+ 		Contour();
+ 		Contour(int id, int nods, IssmDouble* x, IssmDouble* y,bool closed);
+ 		~Contour();
+ 		/*}}}*/
+-		/*Object virtual functions{{{1*/
++		/*Object virtual functions{{{*/
+ 		void  Echo(void);
+ 		void  DeepEcho(void);
+ 		int   Id(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12365)
+@@ -17,7 +17,7 @@
+ #include "../include/include.h"
+ 
+ /*DofIndexing constructors and destructor*/
+-/*FUNCTION DofIndexing::DofIndexing(){{{1*/
++/*FUNCTION DofIndexing::DofIndexing(){{{*/
+ DofIndexing::DofIndexing(){
+ 
+ 	this->gsize=UNDEF;
+@@ -34,12 +34,12 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DofIndexing::DofIndexing(int gsize){{{1*/
++/*FUNCTION DofIndexing::DofIndexing(int gsize){{{*/
+ DofIndexing::DofIndexing(int in_gsize){
+ 	this->Init(in_gsize,NULL);
+ }
+ /*}}}*/
+-/*FUNCTION DofIndexing::DofIndexing(DofIndexing* in)  -> copy{{{1*/
++/*FUNCTION DofIndexing::DofIndexing(DofIndexing* in)  -> copy{{{*/
+ DofIndexing::DofIndexing(DofIndexing* in){ //copy constructor
+ 
+ 	int i;
+@@ -78,7 +78,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DofIndexing::~DofIndexing() {{{1*/
++/*FUNCTION DofIndexing::~DofIndexing() {{{*/
+ DofIndexing::~DofIndexing(){ //destructor
+ 
+ 	xfree((void**)&f_set); 
+@@ -91,7 +91,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DofIndexing::Init{{{1*/
++/*FUNCTION DofIndexing::Init{{{*/
+ void DofIndexing::Init(int in_gsize,int* in_doftype){
+ 
+ 	int i;
+@@ -118,7 +118,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION DofIndexing::InitSet{{{1*/
++/*FUNCTION DofIndexing::InitSet{{{*/
+ void DofIndexing::InitSet(int setenum){
+ 
+ 	int i;
+@@ -147,7 +147,7 @@
+ /*}}}*/
+ 
+ /*Some of the Object functionality: */
+-/*FUNCTION DofIndexing::Echo{{{1*/
++/*FUNCTION DofIndexing::Echo{{{*/
+ void DofIndexing::Echo(void){
+ 
+ 	int i;
+@@ -157,7 +157,7 @@
+ 	printf("   clone: %i\n",clone);
+ }
+ /*}}}*/
+-/*FUNCTION DofIndexing::DeepEcho{{{1*/
++/*FUNCTION DofIndexing::DeepEcho{{{*/
+ void DofIndexing::DeepEcho(void){
+ 
+ 	int i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12365)
+@@ -16,14 +16,14 @@
+ #include "../../include/include.h"
+ 		
+ /*Matice constructors and destructor*/
+-/*FUNCTION Matice::Matice(){{{1*/
++/*FUNCTION Matice::Matice(){{{*/
+ Matice::Matice(){
+ 	this->inputs=NULL;
+ 	this->helement=NULL;
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Matice::Matice(int id, int index, IoModel* iomodel, int num_vertices){{{1*/
++/*FUNCTION Matice::Matice(int id, int index, IoModel* iomodel, int num_vertices){{{*/
+ Matice::Matice(int matice_mid,int index, IoModel* iomodel){
+ 
+ 	/*Intermediaries:*/
+@@ -47,7 +47,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Matice::~Matice(){{{1*/
++/*FUNCTION Matice::~Matice(){{{*/
+ Matice::~Matice(){
+ 	delete helement;
+ 	delete inputs;
+@@ -56,7 +56,7 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION Matice::Echo {{{1*/
++/*FUNCTION Matice::Echo {{{*/
+ void Matice::Echo(void){
+ 
+ 	printf("Matice:\n");
+@@ -67,7 +67,7 @@
+ 	helement->Echo();
+ }
+ /*}}}*/
+-/*FUNCTION Matice::DeepEcho {{{1*/
++/*FUNCTION Matice::DeepEcho {{{*/
+ void Matice::DeepEcho(void){
+ 
+ 	printf("Matice:\n");
+@@ -78,23 +78,23 @@
+ 	helement->Echo();
+ }		
+ /*}}}*/
+-/*FUNCTION Matice::Id {{{1*/
++/*FUNCTION Matice::Id {{{*/
+ int    Matice::Id(void){ return mid; }
+ /*}}}*/
+-/*FUNCTION Matice::MyRank {{{1*/
++/*FUNCTION Matice::MyRank {{{*/
+ int    Matice::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION Matice::ObjectEnum{{{1*/
++/*FUNCTION Matice::ObjectEnum{{{*/
+ int Matice::ObjectEnum(void){
+ 
+ 	return MaticeEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Matice::copy {{{1*/
++/*FUNCTION Matice::copy {{{*/
+ Object* Matice::copy() {
+ 
+ 	/*Output*/
+@@ -114,7 +114,7 @@
+ /*}}}*/
+ 
+ /*Matice management*/
+-/*FUNCTION Matice::Configure {{{1*/
++/*FUNCTION Matice::Configure {{{*/
+ void  Matice::Configure(Elements* elementsin){
+ 
+ 	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+@@ -122,12 +122,12 @@
+ 	helement->configure(elementsin);
+ }
+ /*}}}*/
+-/*FUNCTION Matice::SetCurrentConfiguration {{{1*/
++/*FUNCTION Matice::SetCurrentConfiguration {{{*/
+ void  Matice::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Matice::GetB {{{1*/
++/*FUNCTION Matice::GetB {{{*/
+ double Matice::GetB(){
+ 
+ 	/*Output*/
+@@ -137,7 +137,7 @@
+ 	return B;
+ }
+ /*}}}*/
+-/*FUNCTION Matice::GetBbar {{{1*/
++/*FUNCTION Matice::GetBbar {{{*/
+ double Matice::GetBbar(){
+ 
+ 	/*Output*/
+@@ -147,7 +147,7 @@
+ 	return Bbar;
+ }
+ /*}}}*/
+-/*FUNCTION Matice::GetN {{{1*/
++/*FUNCTION Matice::GetN {{{*/
+ double Matice::GetN(){
+ 
+ 	/*Output*/
+@@ -157,7 +157,7 @@
+ 	return n;
+ }
+ /*}}}*/
+-/*FUNCTION Matice::GetVectorFromInputs{{{1*/
++/*FUNCTION Matice::GetVectorFromInputs{{{*/
+ void  Matice::GetVectorFromInputs(Vector* vector,int input_enum){
+ 
+ 	/*Intermediaries*/
+@@ -189,7 +189,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Matice::GetViscosity2d {{{1*/
++/*FUNCTION Matice::GetViscosity2d {{{*/
+ void  Matice::GetViscosity2d(double* pviscosity, double* epsilon){
+ 	/*From a string tensor and a material object, return viscosity, using Glen's flow law.
+ 												    B
+@@ -253,7 +253,7 @@
+ 	*pviscosity=viscosity;
+ }
+ /*}}}*/
+-/*FUNCTION Matice::GetViscosity3d {{{1*/
++/*FUNCTION Matice::GetViscosity3d {{{*/
+ void  Matice::GetViscosity3d(double* pviscosity3d, double* epsilon){
+ 
+ 	/*Return viscosity accounting for steady state power law creep [Thomas and MacAyeal, 1982]: 
+@@ -324,7 +324,7 @@
+ 	*pviscosity3d=viscosity3d;
+ }
+ /*}}}*/
+-/*FUNCTION Matice::GetViscosity3dStokes {{{1*/
++/*FUNCTION Matice::GetViscosity3dStokes {{{*/
+ void  Matice::GetViscosity3dStokes(double* pviscosity3d, double* epsilon){
+ 	/*Return viscosity accounting for steady state power law creep [Thomas and MacAyeal, 1982]: 
+ 	 *
+@@ -396,7 +396,7 @@
+ 	*pviscosity3d=viscosity3d;
+ }
+ /*}}}*/
+-/*FUNCTION Matice::GetViscosityComplement {{{1*/
++/*FUNCTION Matice::GetViscosityComplement {{{*/
+ void  Matice::GetViscosityComplement(double* pviscosity_complement, double* epsilon){
+ 	/*Return viscosity accounting for steady state power law creep [Thomas and MacAyeal, 1982]: 
+ 	 *
+@@ -452,7 +452,7 @@
+ 	*pviscosity_complement=viscosity_complement;
+ }
+ /*}}}*/
+-/*FUNCTION Matice::GetViscosityDerivativeEpsSquare{{{1*/
++/*FUNCTION Matice::GetViscosityDerivativeEpsSquare{{{*/
+ void  Matice::GetViscosityDerivativeEpsSquare(double* pmu_prime, double* epsilon){
+ 
+ 	/*output: */
+@@ -486,7 +486,7 @@
+ 	*pmu_prime=mu_prime;
+ }
+ /*}}}*/
+-/*FUNCTION Matice::GetViscosity2dDerivativeEpsSquare{{{1*/
++/*FUNCTION Matice::GetViscosity2dDerivativeEpsSquare{{{*/
+ void  Matice::GetViscosity2dDerivativeEpsSquare(double* pmu_prime, double* epsilon){
+ 
+ 	/*output: */
+@@ -517,7 +517,7 @@
+ 	*pmu_prime=mu_prime;
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputDuplicate{{{1*/
++/*FUNCTION Matice::InputDuplicate{{{*/
+ void  Matice::InputDuplicate(int original_enum,int new_enum){
+ 
+ 	/*Call inputs method*/
+@@ -525,7 +525,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromVector(double* vector, int name, int type) {{{1*/
++/*FUNCTION Matice::InputUpdateFromVector(double* vector, int name, int type) {{{*/
+ void  Matice::InputUpdateFromVector(double* vector, int name, int type){
+ 
+ 	/*Intermediaries*/
+@@ -555,17 +555,17 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromVector(int* vector, int name, int type) {{{1*/
++/*FUNCTION Matice::InputUpdateFromVector(int* vector, int name, int type) {{{*/
+ void  Matice::InputUpdateFromVector(int* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromVector(bool* vector, int name, int type) {{{1*/
++/*FUNCTION Matice::InputUpdateFromVector(bool* vector, int name, int type) {{{*/
+ void  Matice::InputUpdateFromVector(bool* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromVectorDakota(double* vector, int name, int type) {{{1*/
++/*FUNCTION Matice::InputUpdateFromVectorDakota(double* vector, int name, int type) {{{*/
+ void  Matice::InputUpdateFromVectorDakota(double* vector, int name, int type){
+ 
+ 	/*Intermediaries*/
+@@ -589,7 +589,7 @@
+ 					double values[3];
+ 					for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetSidList()]; //use sid list, to index into serial oriented vector 
+ 					this->inputs->AddInput(new TriaP1Input(name,values));
+-					/*Special case for rheology B in 2D: Pourave land for this solution{{{2*/
++					/*Special case for rheology B in 2D: Pourave land for this solution{{{*/
+ 					if(name==MaterialsRheologyBEnum){
+ 						/*Are we in 2D?:*/
+ 						if(element->ObjectEnum()==TriaEnum){
+@@ -616,42 +616,42 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromMatrixDakota(int* vector, int name, int type) {{{1*/
++/*FUNCTION Matice::InputUpdateFromMatrixDakota(int* vector, int name, int type) {{{*/
+ void  Matice::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols,int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromVectorDakota(int* vector, int name, int type) {{{1*/
++/*FUNCTION Matice::InputUpdateFromVectorDakota(int* vector, int name, int type) {{{*/
+ void  Matice::InputUpdateFromVectorDakota(int* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromVectorDakota(bool* vector, int name, int type) {{{1*/
++/*FUNCTION Matice::InputUpdateFromVectorDakota(bool* vector, int name, int type) {{{*/
+ void  Matice::InputUpdateFromVectorDakota(bool* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromConstant(double constant, int name) {{{1*/
++/*FUNCTION Matice::InputUpdateFromConstant(double constant, int name) {{{*/
+ void  Matice::InputUpdateFromConstant(double constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromConstant(int constant, int name) {{{1*/
++/*FUNCTION Matice::InputUpdateFromConstant(int constant, int name) {{{*/
+ void  Matice::InputUpdateFromConstant(int constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromConstant(bool constant, int name) {{{1*/
++/*FUNCTION Matice::InputUpdateFromConstant(bool constant, int name) {{{*/
+ void  Matice::InputUpdateFromConstant(bool constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromSolution{{{1*/
++/*FUNCTION Matice::InputUpdateFromSolution{{{*/
+ void  Matice::InputUpdateFromSolution(double* solution){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromIoModel{{{1*/
++/*FUNCTION Matice::InputUpdateFromIoModel{{{*/
+ void Matice::InputUpdateFromIoModel(int index, IoModel* iomodel){
+ 
+ 	int i,j;
+@@ -755,7 +755,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Matice::IsInput{{{1*/
++/*FUNCTION Matice::IsInput{{{*/
+ bool Matice::IsInput(int name){
+ 	if (
+ 				name==MaterialsRheologyBEnum ||
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Material.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Material.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Material.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _MATERIAL_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ class Object;
+ #include "../Object.h"
+ #include "../../toolkits/toolkits.h"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.cpp	(revision 12365)
+@@ -16,12 +16,12 @@
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 		
+ /*Matpar constructors and destructor*/
+-/*FUNCTION Matpar::Matpar() {{{1*/
++/*FUNCTION Matpar::Matpar() {{{*/
+ Matpar::Matpar(){
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::Matpar(int matpar_mid,IoModel* iomodel){{{1*/
++/*}}}*/
++/*FUNCTION Matpar::Matpar(int matpar_mid,IoModel* iomodel){{{*/
+ Matpar::Matpar(int matpar_mid, IoModel* iomodel){
+ 
+ 	this->mid = matpar_mid;
+@@ -45,15 +45,15 @@
+ 	iomodel->Constant(&this->hydro_p,HydrologyPEnum);
+ 	iomodel->Constant(&this->hydro_q,HydrologyQEnum);
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::~Matpar() {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::~Matpar() {{{*/
+ Matpar::~Matpar(){
+ 	return;
+ }
+-/*}}}1*/
++/*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION Matpar::Echo {{{1*/
++/*FUNCTION Matpar::Echo {{{*/
+ void Matpar::Echo(void){
+ 
+ 	printf("Matpar:\n");
+@@ -73,72 +73,72 @@
+ 	printf("   g: %g\n",g);
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::DeepEcho {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::DeepEcho {{{*/
+ void Matpar::DeepEcho(void){
+ 
+ 	this->Echo();
+ }		
+-/*}}}1*/
+-/*FUNCTION Matpar::Id {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::Id {{{*/
+ int    Matpar::Id(void){ return mid; }
+-/*}}}1*/
+-/*FUNCTION Matpar::MyRank {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::MyRank {{{*/
+ int    Matpar::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::ObjectEnum{{{1*/
++/*}}}*/
++/*FUNCTION Matpar::ObjectEnum{{{*/
+ int Matpar::ObjectEnum(void){
+ 
+ 	return MatparEnum;
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::copy {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::copy {{{*/
+ Object* Matpar::copy() {
+ 	return new Matpar(*this); 
+ }
+-/*}}}1*/
++/*}}}*/
+ 
+ /*Update virtual functions definitions:*/
+-/*FUNCTION Matpar::InputUpdateFromVector(double* vector, int name, int type) {{{1*/
++/*FUNCTION Matpar::InputUpdateFromVector(double* vector, int name, int type) {{{*/
+ void   Matpar::InputUpdateFromVector(double* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matpar::InputUpdateFromVector(int* vector, int name, int type) {{{1*/
++/*FUNCTION Matpar::InputUpdateFromVector(int* vector, int name, int type) {{{*/
+ void   Matpar::InputUpdateFromVector(int* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matpar::InputUpdateFromVector(bool* vector, int name, int type) {{{1*/
++/*FUNCTION Matpar::InputUpdateFromVector(bool* vector, int name, int type) {{{*/
+ void   Matpar::InputUpdateFromVector(bool* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matpar::InputUpdateFromVectorDakota(double* vector, int name, int type) {{{1*/
++/*FUNCTION Matpar::InputUpdateFromVectorDakota(double* vector, int name, int type) {{{*/
+ void   Matpar::InputUpdateFromVectorDakota(double* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matpar::InputUpdateFromVectorDakota(int* vector, int name, int type) {{{1*/
++/*FUNCTION Matpar::InputUpdateFromVectorDakota(int* vector, int name, int type) {{{*/
+ void   Matpar::InputUpdateFromVectorDakota(int* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matpar::InputUpdateFromVectorDakota(bool* vector, int name, int type) {{{1*/
++/*FUNCTION Matpar::InputUpdateFromVectorDakota(bool* vector, int name, int type) {{{*/
+ void   Matpar::InputUpdateFromVectorDakota(bool* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matpar::InputUpdateFromMatrixDakota(int* vector, int name, int type) {{{1*/
++/*FUNCTION Matpar::InputUpdateFromMatrixDakota(int* vector, int name, int type) {{{*/
+ void  Matpar::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols,int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matpar::InputUpdateFromConstant(double constant, int name) {{{1*/
++/*FUNCTION Matpar::InputUpdateFromConstant(double constant, int name) {{{*/
+ void   Matpar::InputUpdateFromConstant(double constant, int name){
+ 
+ 	switch(name){
+@@ -187,132 +187,132 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Matpar::InputUpdateFromConstant(int constant, int name) {{{1*/
++/*FUNCTION Matpar::InputUpdateFromConstant(int constant, int name) {{{*/
+ void   Matpar::InputUpdateFromConstant(int constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matpar::InputUpdateFromConstant(bool constant, int name) {{{1*/
++/*FUNCTION Matpar::InputUpdateFromConstant(bool constant, int name) {{{*/
+ void   Matpar::InputUpdateFromConstant(bool constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matpar::InputUpdateFromSolution{{{1*/
++/*FUNCTION Matpar::InputUpdateFromSolution{{{*/
+ void   Matpar::InputUpdateFromSolution(double* solution){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+ 
+ /*Matpar management: */
+-/*FUNCTION Matpar::Configure {{{1*/
++/*FUNCTION Matpar::Configure {{{*/
+ void  Matpar::Configure(Elements* elementsin){
+ 
+ 	/*nothing done yet!*/
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Matpar::GetBeta {{{1*/
++/*FUNCTION Matpar::GetBeta {{{*/
+ double Matpar::GetBeta(){
+ 	return beta;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetG {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::GetG {{{*/
+ double Matpar::GetG(){
+ 	return g;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetHeatCapacity {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::GetHeatCapacity {{{*/
+ double Matpar::GetHeatCapacity(){
+ 	return heatcapacity;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetLatentHeat {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::GetLatentHeat {{{*/
+ double Matpar::GetLatentHeat(){
+ 	return latentheat;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetMeltingPoint {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::GetMeltingPoint {{{*/
+ double Matpar::GetMeltingPoint(){
+ 	return meltingpoint;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetReferenceTemperature {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::GetReferenceTemperature {{{*/
+ double Matpar::GetReferenceTemperature(){
+ 	return referencetemperature;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetMixedLayerCapacity {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::GetMixedLayerCapacity {{{*/
+ double Matpar::GetMixedLayerCapacity(){
+ 	return mixed_layer_capacity;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetRhoIce {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::GetRhoIce {{{*/
+ double Matpar::GetRhoIce(){
+ 	
+ 	return rho_ice;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetRhoWater {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::GetRhoWater {{{*/
+ double Matpar::GetRhoWater(){
+ 	return rho_water;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetRhoFreshwater {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::GetRhoFreshwater {{{*/
+ double Matpar::GetRhoFreshwater(){
+ 	return rho_freshwater;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetMuWater {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::GetMuWater {{{*/
+ double Matpar::GetMuWater(){
+ 	return mu_water;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetThermalConductivity {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::GetThermalConductivity {{{*/
+ double Matpar::GetThermalConductivity(){
+ 	return thermalconductivity;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetThermalExchangeVelocity {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::GetThermalExchangeVelocity {{{*/
+ double Matpar::GetThermalExchangeVelocity(){
+ 	return thermal_exchange_velocity;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetKn {{{1*/		 
++/*}}}*/
++/*FUNCTION Matpar::GetKn {{{*/		 
+ double Matpar::GetKn(){			 
+ 	return kn;		 
+ }		 
+-/*}}}1*/			 
+-/*FUNCTION Matpar::GetHydrologyP {{{1*/			 
++/*}}}*/			 
++/*FUNCTION Matpar::GetHydrologyP {{{*/			 
+ double Matpar::GetHydrologyP(){		 
+ 	return hydro_p;			 
+ }		 
+-/*}}}1*/			 
+-/*FUNCTION Matqar::GetHydrologyQ {{{1*/			 
++/*}}}*/			 
++/*FUNCTION Matqar::GetHydrologyQ {{{*/			 
+ double Matpar::GetHydrologyQ(){		 
+ 	return hydro_q;			 
+ }		 
+-/*}}}1*/			 
+-/*FUNCTION Matpar::GetHydrologyCR {{{1*/		 
++/*}}}*/			 
++/*FUNCTION Matpar::GetHydrologyCR {{{*/		 
+ double Matpar::GetHydrologyCR(){		 
+ 	return hydro_CR;		 
+ }		 
+-/*}}}1*/			 
+-/*FUNCTION Matpar::GetHydrologyN {{{1*/			 
++/*}}}*/			 
++/*FUNCTION Matpar::GetHydrologyN {{{*/			 
+ double Matpar::GetHydrologyN(){		 
+ 	return hydro_n;			 
+ }		 
+-/*}}}1*/ 
+-/*FUNCTION Matpar::TMeltingPoint {{{1*/
++/*}}}*/ 
++/*FUNCTION Matpar::TMeltingPoint {{{*/
+ double Matpar::TMeltingPoint(double pressure){
+ 	return meltingpoint-beta*pressure;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::PureIceEnthalpy{{{1*/
++/*}}}*/
++/*FUNCTION Matpar::PureIceEnthalpy{{{*/
+ double Matpar::PureIceEnthalpy(double pressure){
+ 	return heatcapacity*(TMeltingPoint(pressure)-referencetemperature);
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::GetEnthalpyDiffusionParameter{{{1*/
++/*}}}*/
++/*FUNCTION Matpar::GetEnthalpyDiffusionParameter{{{*/
+ double Matpar::GetEnthalpyDiffusionParameter(double enthalpy,double pressure){
+ 	if(enthalpy<PureIceEnthalpy(pressure)){
+ 		return thermalconductivity/(rho_ice*heatcapacity);
+@@ -321,8 +321,8 @@
+ 		return 0.1*thermalconductivity/(rho_ice*heatcapacity);
+ 	}
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::EnthalpyToThermal {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::EnthalpyToThermal {{{*/
+ void Matpar::EnthalpyToThermal(double* ptemperature,double* pwaterfraction,double enthalpy,double pressure){
+ 
+ 	/*Ouput*/
+@@ -341,8 +341,8 @@
+ 	*pwaterfraction=waterfraction;
+ 	*ptemperature=temperature;
+ }
+-/*}}}1*/
+-/*FUNCTION Matpar::ThermalToEnthalpy {{{1*/
++/*}}}*/
++/*FUNCTION Matpar::ThermalToEnthalpy {{{*/
+ void Matpar::ThermalToEnthalpy(double * penthalpy,double temperature,double waterfraction,double pressure){
+ 
+ 	/*Ouput*/
+@@ -358,4 +358,4 @@
+ 	/*Assign output pointers:*/
+ 	*penthalpy=enthalpy;
+ }
+-/*}}}1*/
++/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define MATICE_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Material.h"
+ class IoModel;
+ /*}}}*/
+@@ -24,12 +24,12 @@
+ 		/*WARNING: input should not be public but it is an easy way to update B from T (using UpdateFromSolution) from Pentas*/
+ 		Inputs*  inputs;
+ 
+-		/*Matice constructors, destructors: {{{1*/
++		/*Matice constructors, destructors: {{{*/
+ 		Matice();
+ 		Matice(int mid,int i, IoModel* iomodel);
+ 		~Matice();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -37,7 +37,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Update virtual functions definitions: {{{1*/
++		/*Update virtual functions definitions: {{{*/
+ 		void  InputUpdateFromVector(double* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+ 		void  InputUpdateFromVector(bool* vector, int name, int type);
+@@ -51,12 +51,12 @@
+ 		void  InputUpdateFromSolution(double* solution);
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel);
+ 		/*}}}*/
+-		/*Material virtual functions resolution: {{{1*/
++		/*Material virtual functions resolution: {{{*/
+ 		void   InputDuplicate(int original_enum,int new_enum);
+ 		void   Configure(Elements* elements);
+ 		void   GetVectorFromInputs(Vector* vector,int input_enum);
+ 		/*}}}*/
+-		/*Matice Numerics: {{{1*/
++		/*Matice Numerics: {{{*/
+ 		void   SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin);
+ 		void   GetViscosity2d(double* pviscosity, double* pepsilon);
+ 		void   GetViscosity3d(double* pviscosity3d, double* pepsilon);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _MATPAR_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Material.h"
+ class IoModel;
+ /*}}}*/
+@@ -41,7 +41,7 @@
+ 		Matpar(int matpar_id, IoModel* iomodel);
+ 		~Matpar();
+ 
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -49,7 +49,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Update virtual functions resolution: {{{1*/
++		/*Update virtual functions resolution: {{{*/
+ 		void   InputUpdateFromVector(double* vector, int name, int type);
+ 		void   InputUpdateFromVector(int* vector, int name, int type);
+ 		void   InputUpdateFromVector(bool* vector, int name, int type);
+@@ -63,12 +63,12 @@
+ 		void   InputUpdateFromSolution(double* solution);
+ 		void   InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
+ 		/*}}}*/
+-		/*Material virtual functions resolution: {{{1*/
++		/*Material virtual functions resolution: {{{*/
+ 		void   InputDuplicate(int original_enum,int new_enum){_error_("not implemented yet");};
+ 		void   Configure(Elements* elements);
+ 		void   GetVectorFromInputs(Vector* vector,int input_enum){return;}
+ 		/*}}}*/
+-		/*Numerics: {{{1*/
++		/*Numerics: {{{*/
+ 		double GetG();
+ 		double GetRhoIce();
+ 		double GetRhoWater();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _GAUSSPENTA_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./../../shared/shared.h"
+ class GaussTria;
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp	(revision 12365)
+@@ -2,12 +2,12 @@
+  * \brief: implementation of the GaussTria object
+  */
+ 
+-/*Include files: {{{1*/
++/*Include files: {{{*/
+ #include "./../objects.h"
+ /*}}}*/
+ 
+ /*GaussTria constructors and destructors:*/
+-/*FUNCTION GaussTria::GaussTria() {{{1*/
++/*FUNCTION GaussTria::GaussTria() {{{*/
+ GaussTria::GaussTria(){
+ 
+ 	numgauss=-1;
+@@ -23,7 +23,7 @@
+ 	coord3=UNDEF;
+ }
+ /*}}}*/
+-/*FUNCTION GaussTria::GaussTria(int order) {{{1*/
++/*FUNCTION GaussTria::GaussTria(int order) {{{*/
+ GaussTria::GaussTria(int order){
+ 
+ 	/*Get gauss points*/
+@@ -37,7 +37,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussTria::GaussTria(int index1,int index2,int order) {{{1*/
++/*FUNCTION GaussTria::GaussTria(int index1,int index2,int order) {{{*/
+ GaussTria::GaussTria(int index1,int index2,int order){
+ 
+ 	/*Intermediaties*/
+@@ -94,7 +94,7 @@
+ 	xfree((void**)&seg_weights);
+ }
+ /*}}}*/
+-/*FUNCTION GaussTria::~GaussTria(){{{1*/
++/*FUNCTION GaussTria::~GaussTria(){{{*/
+ GaussTria::~GaussTria(){
+ 	xfree((void**)&weights);
+ 	xfree((void**)&coords1);
+@@ -104,7 +104,7 @@
+ /*}}}*/
+ 
+ /*Methods*/
+-/*FUNCTION GaussTria::Echo{{{1*/
++/*FUNCTION GaussTria::Echo{{{*/
+ void GaussTria::Echo(void){
+ 
+ 	printf("GaussTria:\n");
+@@ -142,7 +142,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussTria::GaussCenter{{{1*/
++/*FUNCTION GaussTria::GaussCenter{{{*/
+ void GaussTria::GaussCenter(void){
+ 
+ 	/*update static arrays*/
+@@ -152,7 +152,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussTria::GaussEdgeCenter{{{1*/
++/*FUNCTION GaussTria::GaussEdgeCenter{{{*/
+ void GaussTria::GaussEdgeCenter(int index1,int index2){
+ 
+ 	int     index3;
+@@ -183,7 +183,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussTria::GaussPoint{{{1*/
++/*FUNCTION GaussTria::GaussPoint{{{*/
+ void GaussTria::GaussPoint(int ig){
+ 
+ 	/*Check input in debugging mode*/
+@@ -197,7 +197,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussTria::GaussFromCoords{{{1*/
++/*FUNCTION GaussTria::GaussFromCoords{{{*/
+ void GaussTria::GaussFromCoords(double x,double y,double* xyz_list){
+ 
+ 	/*Intermediaries*/
+@@ -224,7 +224,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussTria::GaussVertex{{{1*/
++/*FUNCTION GaussTria::GaussVertex{{{*/
+ void GaussTria::GaussVertex(int iv){
+ 
+ 	/*in debugging mode: check that the default constructor has been called*/
+@@ -248,7 +248,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussTria::begin{{{1*/
++/*FUNCTION GaussTria::begin{{{*/
+ int GaussTria::begin(void){
+ 
+ 	/*Check that this has been initialized*/
+@@ -262,7 +262,7 @@
+ 	return 0;
+ }
+ /*}}}*/
+-/*FUNCTION GaussTria::end{{{1*/
++/*FUNCTION GaussTria::end{{{*/
+ int GaussTria::end(void){
+ 
+ 	/*Check that this has been initialized*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _GAUSSTRIA_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./../../shared/shared.h"
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp	(revision 12365)
+@@ -2,12 +2,12 @@
+  * \brief: implementation of the GaussPenta object
+  */
+ 
+-/*Include files: {{{1*/
++/*Include files: {{{*/
+ #include "./../objects.h"
+ /*}}}*/
+ 
+ /*GaussPenta constructors and destructors:*/
+-/*FUNCTION GaussPenta::GaussPenta() {{{1*/
++/*FUNCTION GaussPenta::GaussPenta() {{{*/
+ GaussPenta::GaussPenta(){
+ 
+ 	numgauss=-1;
+@@ -25,7 +25,7 @@
+ 	coord4=UNDEF;
+ }
+ /*}}}*/
+-/*FUNCTION GaussPenta::GaussPenta(int order_horiz,int order_vert) {{{1*/
++/*FUNCTION GaussPenta::GaussPenta(int order_horiz,int order_vert) {{{*/
+ GaussPenta::GaussPenta(int order_horiz,int order_vert){
+ 
+ 	/*Intermediaries*/
+@@ -79,7 +79,7 @@
+ 	xfree((void**)&weights_vert);
+ }
+ /*}}}*/
+-/*FUNCTION GaussPenta::GaussPenta(int index1, int index2, int order){{{1*/
++/*FUNCTION GaussPenta::GaussPenta(int index1, int index2, int order){{{*/
+ GaussPenta::GaussPenta(int index1, int index2,int order){
+ 
+ 	/*Intermediaties*/
+@@ -136,7 +136,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussPenta::GaussPenta(int index1, int index2, int index3, int order){{{1*/
++/*FUNCTION GaussPenta::GaussPenta(int index1, int index2, int index3, int order){{{*/
+ GaussPenta::GaussPenta(int index1, int index2, int index3, int order){
+ 
+ 	/*Basal Tria*/
+@@ -165,7 +165,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussPenta::GaussPenta(int index1, int index2, int index3, int index4,int order_horiz,int order_vert){{{1*/
++/*FUNCTION GaussPenta::GaussPenta(int index1, int index2, int index3, int index4,int order_horiz,int order_vert){{{*/
+ GaussPenta::GaussPenta(int index1, int index2, int index3, int index4,int order_horiz,int order_vert){
+ 
+ 	/*Intermediaties*/
+@@ -232,7 +232,7 @@
+ 	xfree((void**)&seg_vert_weights);
+ }
+ /*}}}*/
+-/*FUNCTION GaussPenta::~GaussPenta(){{{1*/
++/*FUNCTION GaussPenta::~GaussPenta(){{{*/
+ GaussPenta::~GaussPenta(){
+ 	xfree((void**)&weights);
+ 	xfree((void**)&coords1);
+@@ -243,7 +243,7 @@
+ /*}}}*/
+ 
+ /*Methods*/
+-/*FUNCTION GaussPenta::Echo{{{1*/
++/*FUNCTION GaussPenta::Echo{{{*/
+ void GaussPenta::Echo(void){
+ 
+ 	printf("GaussPenta:\n");
+@@ -288,7 +288,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussPenta::GaussCenter{{{1*/
++/*FUNCTION GaussPenta::GaussCenter{{{*/
+ void GaussPenta::GaussCenter(void){
+ 
+ 	/*update static arrays*/
+@@ -299,7 +299,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussPenta::GaussPoint{{{1*/
++/*FUNCTION GaussPenta::GaussPoint{{{*/
+ void GaussPenta::GaussPoint(int ig){
+ 
+ 	/*Check input in debugging mode*/
+@@ -314,7 +314,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussPenta::GaussVertex{{{1*/
++/*FUNCTION GaussPenta::GaussVertex{{{*/
+ void GaussPenta::GaussVertex(int iv){
+ 
+ 	/*in debugging mode: check that the default constructor has been called*/
+@@ -347,7 +347,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussPenta::GaussFaceTria{{{1*/
++/*FUNCTION GaussPenta::GaussFaceTria{{{*/
+ void GaussPenta::GaussFaceTria(int index1, int index2, int index3, int order){
+ 
+ 	/*in debugging mode: check that the default constructor has been called*/
+@@ -365,7 +365,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION GaussPenta::begin{{{1*/
++/*FUNCTION GaussPenta::begin{{{*/
+ int GaussPenta::begin(void){
+ 
+ 	/*Check that this has been initialized*/
+@@ -380,7 +380,7 @@
+ 	return 0;
+ }
+ /*}}}*/
+-/*FUNCTION GaussPenta::end{{{1*/
++/*FUNCTION GaussPenta::end{{{*/
+ int GaussPenta::end(void){
+ 
+ 	/*Check that this has been initialized*/
+@@ -395,7 +395,7 @@
+ 	return numgauss;
+ }
+ /*}}}*/
+-/*FUNCTION GaussPenta::SynchronizeGaussTria{{{1*/
++/*FUNCTION GaussPenta::SynchronizeGaussTria{{{*/
+ void GaussPenta::SynchronizeGaussTria(GaussTria* gauss_tria){
+ 
+ 	gauss_tria->coord1=this->coord1;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _DOUBLEVECPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -27,12 +27,12 @@
+ 		int M;
+ 
+ 	public:
+-		/*DoubleVecParam constructors, destructors: {{{1*/
++		/*DoubleVecParam constructors, destructors: {{{*/
+ 		DoubleVecParam();
+ 		DoubleVecParam(int enum_type,IssmDouble* values,int M);
+ 		~DoubleVecParam();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -40,7 +40,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Param virtual functions definitions: {{{1*/
++		/*Param virtual functions definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){_error_("DoubleVec param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int* pinteger){_error_("DoubleVec param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _DOUBLEPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -27,12 +27,12 @@
+ 		IssmDouble value;
+ 
+ 	public:
+-		/*DoubleParam constructors, destructors: {{{1*/
++		/*DoubleParam constructors, destructors: {{{*/
+ 		DoubleParam();
+ 		DoubleParam(int enum_type,IssmDouble value);
+ 		~DoubleParam();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -40,7 +40,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Param vritual function definitions: {{{1*/
++		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool);
+ 		void  GetParameterValue(int* pinteger);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,31 +20,31 @@
+ /*}}}*/
+ 
+ /*FileParam constructors and destructor*/
+-/*FUNCTION FileParam::FileParam(){{{1*/
++/*FUNCTION FileParam::FileParam(){{{*/
+ FileParam::FileParam(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION FileParam::FileParam(int enum_type,FILE *value){{{1*/
++/*FUNCTION FileParam::FileParam(int enum_type,FILE *value){{{*/
+ FileParam::FileParam(int in_enum_type,FILE* in_value){
+ 
+ 	enum_type=in_enum_type;
+ 	value=in_value;
+ }
+ /*}}}*/
+-/*FUNCTION FileParam::~FileParam(){{{1*/
++/*FUNCTION FileParam::~FileParam(){{{*/
+ FileParam::~FileParam(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION FileParam::Echo {{{1*/
++/*FUNCTION FileParam::Echo {{{*/
+ void FileParam::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION FileParam::DeepEcho{{{1*/
++/*FUNCTION FileParam::DeepEcho{{{*/
+ void FileParam::DeepEcho(void){
+ 
+ 	printf("FileParam:\n");
+@@ -52,23 +52,23 @@
+ 	printf("   value: %p\n",this->value);
+ }
+ /*}}}*/
+-/*FUNCTION FileParam::Id{{{1*/
++/*FUNCTION FileParam::Id{{{*/
+ int    FileParam::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION FileParam::MyRank{{{1*/
++/*FUNCTION FileParam::MyRank{{{*/
+ int    FileParam::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION FileParam::ObjectEnum{{{1*/
++/*FUNCTION FileParam::ObjectEnum{{{*/
+ int FileParam::ObjectEnum(void){
+ 
+ 	return FileParamEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION FileParam::copy{{{1*/
++/*FUNCTION FileParam::copy{{{*/
+ Object* FileParam::copy() {
+ 	
+ 	return new FileParam(this->enum_type,this->value);
+@@ -77,12 +77,12 @@
+ /*}}}*/
+ 
+ /*FileParam virtual functions definitions: */
+-/*FUNCTION FileParam::GetParameterName{{{1*/
++/*FUNCTION FileParam::GetParameterName{{{*/
+ void FileParam::GetParameterName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION FileParam::UnitConversion{{{1*/
++/*FUNCTION FileParam::UnitConversion{{{*/
+ void  FileParam::UnitConversion(int direction_enum){
+ 	/*do nothing, no unit conversion*/
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _DOUBLEMATARRAYPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -29,12 +29,12 @@
+ 		int*     ndim_array; //n-dimensions -f matrices in the array
+ 
+ 	public:
+-		/*DoubleMatArrayParam constructors, destructors: {{{1*/
++		/*DoubleMatArrayParam constructors, destructors: {{{*/
+ 		DoubleMatArrayParam();
+ 		DoubleMatArrayParam(int enum_type,double** array, int M, int* mdim_array, int* ndim_array);
+ 		~DoubleMatArrayParam();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -42,7 +42,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Param vritual function definitions: {{{1*/
++		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){_error_("DoubleMatArray param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int* pinteger){_error_("DoubleMatArray param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _DOUBLEMATPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -28,12 +28,12 @@
+ 		int N;
+ 
+ 	public:
+-		/*DoubleMatParam constructors, destructors: {{{1*/
++		/*DoubleMatParam constructors, destructors: {{{*/
+ 		DoubleMatParam();
+ 		DoubleMatParam(int enum_type,IssmDouble* value,int M,int N);
+ 		~DoubleMatParam();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -41,7 +41,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Param vritual function definitions: {{{1*/
++		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){_error_("DoubleMat param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int* pinteger){_error_("DoubleMat param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/Param.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/Param.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/Param.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _PARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ 
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _FILEPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -26,12 +26,12 @@
+ 		FILE* value;
+ 
+ 	public:
+-		/*FileParam constructors, destructors: {{{1*/
++		/*FileParam constructors, destructors: {{{*/
+ 		FileParam();
+ 		FileParam(int enum_type,FILE* fid);
+ 		~FileParam();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -39,7 +39,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Param vritual function definitions: {{{1*/
++		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){  _error_("FileParam of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int* pinteger){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*IntVecParam constructors and destructor*/
+-/*FUNCTION IntVecParam::IntVecParam(){{{1*/
++/*FUNCTION IntVecParam::IntVecParam(){{{*/
+ IntVecParam::IntVecParam(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION IntVecParam::IntVecParam(int enum_type,int* values,int M){{{1*/
++/*FUNCTION IntVecParam::IntVecParam(int enum_type,int* values,int M){{{*/
+ IntVecParam::IntVecParam(int in_enum_type,int* in_values, int in_M){
+ 
+ 	enum_type=in_enum_type;
+@@ -38,7 +38,7 @@
+ 	else values=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION IntVecParam::IntVecParam(int enum_type,double* values,int M){{{1*/
++/*FUNCTION IntVecParam::IntVecParam(int enum_type,double* values,int M){{{*/
+ IntVecParam::IntVecParam(int in_enum_type,double* in_values, int in_M){
+ 
+ 	enum_type=in_enum_type;
+@@ -51,7 +51,7 @@
+ 	else values=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION IntVecParam::~IntVecParam(){{{1*/
++/*FUNCTION IntVecParam::~IntVecParam(){{{*/
+ IntVecParam::~IntVecParam(){
+ 	xfree((void**)&values);
+ 	return;
+@@ -59,7 +59,7 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION IntVecParam::Echo {{{1*/
++/*FUNCTION IntVecParam::Echo {{{*/
+ void IntVecParam::Echo(void){
+ 
+ 	printf("IntVecParam:\n");
+@@ -68,7 +68,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IntVecParam::DeepEcho{{{1*/
++/*FUNCTION IntVecParam::DeepEcho{{{*/
+ void IntVecParam::DeepEcho(void){
+ 
+ 	int i;
+@@ -81,23 +81,23 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION IntVecParam::Id{{{1*/
++/*FUNCTION IntVecParam::Id{{{*/
+ int    IntVecParam::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION IntVecParam::MyRank{{{1*/
++/*FUNCTION IntVecParam::MyRank{{{*/
+ int    IntVecParam::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION IntVecParam::ObjectEnum{{{1*/
++/*FUNCTION IntVecParam::ObjectEnum{{{*/
+ int IntVecParam::ObjectEnum(void){
+ 
+ 	return IntVecParamEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IntVecParam::copy{{{1*/
++/*FUNCTION IntVecParam::copy{{{*/
+ Object* IntVecParam::copy() {
+ 	
+ 	return new IntVecParam(this->enum_type,this->values,this->M);
+@@ -106,7 +106,7 @@
+ /*}}}*/
+ 
+ /*IntVecParam virtual functions definitions: */
+-/*FUNCTION IntVecParam::GetParameterValue{{{1*/
++/*FUNCTION IntVecParam::GetParameterValue{{{*/
+ void  IntVecParam::GetParameterValue(int** pintarray,int* pM){
+ 	int* output=NULL;
+ 
+@@ -120,12 +120,12 @@
+ 	*pintarray=output;
+ }
+ /*}}}*/
+-/*FUNCTION IntVecParam::GetParameterName{{{1*/
++/*FUNCTION IntVecParam::GetParameterName{{{*/
+ void IntVecParam::GetParameterName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION IntVecParam::SetValue{{{1*/
++/*FUNCTION IntVecParam::SetValue{{{*/
+ void  IntVecParam::SetValue(int* intarray,int in_M){
+ 
+ 	/*avoid leak: */
+@@ -140,7 +140,7 @@
+ 	this->M=in_M;
+ }
+ /*}}}*/
+-/*FUNCTION IntVecParam::UnitConversion{{{1*/
++/*FUNCTION IntVecParam::UnitConversion{{{*/
+ void  IntVecParam::UnitConversion(int direction_enum){
+ 	/*do nothing, no unit conversion*/
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,31 +20,31 @@
+ /*}}}*/
+ 
+ /*IntParam constructors and destructor*/
+-/*FUNCTION IntParam::IntParam(){{{1*/
++/*FUNCTION IntParam::IntParam(){{{*/
+ IntParam::IntParam(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION IntParam::IntParam(int enum_type,IssmInt value){{{1*/
++/*FUNCTION IntParam::IntParam(int enum_type,IssmInt value){{{*/
+ IntParam::IntParam(int in_enum_type,IssmInt in_value){
+ 
+ 	enum_type=in_enum_type;
+ 	value=in_value;
+ }
+ /*}}}*/
+-/*FUNCTION IntParam::~IntParam(){{{1*/
++/*FUNCTION IntParam::~IntParam(){{{*/
+ IntParam::~IntParam(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION IntParam::Echo {{{1*/
++/*FUNCTION IntParam::Echo {{{*/
+ void IntParam::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION IntParam::DeepEcho{{{1*/
++/*FUNCTION IntParam::DeepEcho{{{*/
+ void IntParam::DeepEcho(void){
+ 
+ 	printf("IntParam:\n");
+@@ -52,23 +52,23 @@
+ 	printf("   value: %i\n",this->value);
+ }
+ /*}}}*/
+-/*FUNCTION IntParam::Id{{{1*/
++/*FUNCTION IntParam::Id{{{*/
+ int    IntParam::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION IntParam::MyRank{{{1*/
++/*FUNCTION IntParam::MyRank{{{*/
+ int    IntParam::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION IntParam::ObjectEnum{{{1*/
++/*FUNCTION IntParam::ObjectEnum{{{*/
+ int IntParam::ObjectEnum(void){
+ 
+ 	return IntParamEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IntParam::copy{{{1*/
++/*FUNCTION IntParam::copy{{{*/
+ Object* IntParam::copy() {
+ 	
+ 	return new IntParam(this->enum_type,this->value);
+@@ -77,12 +77,12 @@
+ /*}}}*/
+ 
+ /*IntParam virtual functions definitions: */
+-/*FUNCTION IntParam::GetParameterName{{{1*/
++/*FUNCTION IntParam::GetParameterName{{{*/
+ void IntParam::GetParameterName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION IntParam::UnitConversion{{{1*/
++/*FUNCTION IntParam::UnitConversion{{{*/
+ void  IntParam::UnitConversion(int direction_enum){
+ 	/*do nothing, no unit conversion*/
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,31 +20,31 @@
+ /*}}}*/
+ 
+ /*BoolParam constructors and destructor*/
+-/*FUNCTION BoolParam::BoolParam(){{{1*/
++/*FUNCTION BoolParam::BoolParam(){{{*/
+ BoolParam::BoolParam(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION BoolParam::BoolParam(int enum_type,IssmBool value){{{1*/
++/*FUNCTION BoolParam::BoolParam(int enum_type,IssmBool value){{{*/
+ BoolParam::BoolParam(int in_enum_type,IssmBool in_value){
+ 
+ 	enum_type=in_enum_type;
+ 	value=in_value;
+ }
+ /*}}}*/
+-/*FUNCTION BoolParam::~BoolParam(){{{1*/
++/*FUNCTION BoolParam::~BoolParam(){{{*/
+ BoolParam::~BoolParam(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION BoolParam::Echo {{{1*/
++/*FUNCTION BoolParam::Echo {{{*/
+ void BoolParam::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION BoolParam::DeepEcho{{{1*/
++/*FUNCTION BoolParam::DeepEcho{{{*/
+ void BoolParam::DeepEcho(void){
+ 
+ 	printf("BoolParam:\n");
+@@ -52,23 +52,23 @@
+ 	printf("   value: %s\n",this->value?"true":"false");
+ }
+ /*}}}*/
+-/*FUNCTION BoolParam::Id{{{1*/
++/*FUNCTION BoolParam::Id{{{*/
+ int    BoolParam::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION BoolParam::MyRank{{{1*/
++/*FUNCTION BoolParam::MyRank{{{*/
+ int    BoolParam::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION BoolParam::ObjectEnum{{{1*/
++/*FUNCTION BoolParam::ObjectEnum{{{*/
+ int BoolParam::ObjectEnum(void){
+ 
+ 	return BoolParamEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolParam::copy{{{1*/
++/*FUNCTION BoolParam::copy{{{*/
+ Object* BoolParam::copy() {
+ 	
+ 	return new BoolParam(this->enum_type,this->value);
+@@ -77,12 +77,12 @@
+ /*}}}*/
+ 
+ /*BoolParam virtual functions definitions: */
+-/*FUNCTION BoolParam::GetParameterName{{{1*/
++/*FUNCTION BoolParam::GetParameterName{{{*/
+ void BoolParam::GetParameterName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION BoolParam::UnitConversion{{{1*/
++/*FUNCTION BoolParam::UnitConversion{{{*/
+ void  BoolParam::UnitConversion(int direction_enum){
+ 	/*do nothing, no unit conversion*/
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*IntMatParam constructors and destructor*/
+-/*FUNCTION IntMatParam::IntMatParam(){{{1*/
++/*FUNCTION IntMatParam::IntMatParam(){{{*/
+ IntMatParam::IntMatParam(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION IntMatParam::IntMatParam(int enum_type,IssmIntMat value){{{1*/
++/*FUNCTION IntMatParam::IntMatParam(int enum_type,IssmIntMat value){{{*/
+ IntMatParam::IntMatParam(int in_enum_type,int* in_value, int in_M,int in_N){
+ 
+ 	enum_type=in_enum_type;
+@@ -36,7 +36,7 @@
+ 	memcpy(value,in_value,M*N*sizeof(int));
+ }
+ /*}}}*/
+-/*FUNCTION IntMatParam::~IntMatParam(){{{1*/
++/*FUNCTION IntMatParam::~IntMatParam(){{{*/
+ IntMatParam::~IntMatParam(){
+ 	xfree((void**)&value);
+ 	return;
+@@ -44,7 +44,7 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION IntMatParam::Echo {{{1*/
++/*FUNCTION IntMatParam::Echo {{{*/
+ void IntMatParam::Echo(void){
+ 
+ 	printf("IntMatParam:\n");
+@@ -53,7 +53,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IntMatParam::DeepEcho{{{1*/
++/*FUNCTION IntMatParam::DeepEcho{{{*/
+ void IntMatParam::DeepEcho(void){
+ 
+ 	int i,j;
+@@ -68,23 +68,23 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION IntMatParam::Id{{{1*/
++/*FUNCTION IntMatParam::Id{{{*/
+ int    IntMatParam::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION IntMatParam::MyRank{{{1*/
++/*FUNCTION IntMatParam::MyRank{{{*/
+ int    IntMatParam::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION IntMatParam::ObjectEnum{{{1*/
++/*FUNCTION IntMatParam::ObjectEnum{{{*/
+ int IntMatParam::ObjectEnum(void){
+ 
+ 	return IntMatParamEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IntMatParam::copy{{{1*/
++/*FUNCTION IntMatParam::copy{{{*/
+ Object* IntMatParam::copy() {
+ 	
+ 	return new IntMatParam(this->enum_type,this->value,this->M,this->N);
+@@ -93,7 +93,7 @@
+ /*}}}*/
+ 
+ /*IntMatParam virtual functions definitions: */
+-/*FUNCTION IntMatParam::GetParameterValue{{{1*/
++/*FUNCTION IntMatParam::GetParameterValue{{{*/
+ void  IntMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){
+ 	int* output=NULL;
+ 
+@@ -106,12 +106,12 @@
+ 	*pintarray=output;
+ }
+ /*}}}*/
+-/*FUNCTION IntMatParam::GetParameterName{{{1*/
++/*FUNCTION IntMatParam::GetParameterName{{{*/
+ void IntMatParam::GetParameterName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION IntMatParam::SetValue{{{1*/
++/*FUNCTION IntMatParam::SetValue{{{*/
+ void  IntMatParam::SetValue(int* intarray,int in_M,int in_N){
+ 
+ 	/*avoid leak: */
+@@ -124,7 +124,7 @@
+ 	this->N=in_N;
+ }
+ /*}}}*/
+-/*FUNCTION IntMatParam::UnitConversion{{{1*/
++/*FUNCTION IntMatParam::UnitConversion{{{*/
+ void  IntMatParam::UnitConversion(int direction_enum){
+ 	/*do nothing, no unit conversion*/
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _INTVECPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -27,13 +27,13 @@
+ 		int M;
+ 
+ 	public:
+-		/*IntVecParam constructors, destructors: {{{1*/
++		/*IntVecParam constructors, destructors: {{{*/
+ 		IntVecParam();
+ 		IntVecParam(int enum_type,int* values,int M);
+ 		IntVecParam(int enum_type,double* values,int M);
+ 		~IntVecParam();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -41,7 +41,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Param virtual functions definitions: {{{1*/
++		/*Param virtual functions definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){_error_("IntVec param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int* pinteger){_error_("IntVec param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _INTPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -27,12 +27,12 @@
+ 		IssmInt value;
+ 
+ 	public:
+-		/*IntParam constructors, destructors: {{{1*/
++		/*IntParam constructors, destructors: {{{*/
+ 		IntParam();
+ 		IntParam(int enum_type,IssmInt value);
+ 		~IntParam();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -40,7 +40,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Param vritual function definitions: {{{1*/
++		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){_error_("Int param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int* pinteger){*pinteger=value;}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _BOOLPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -26,12 +26,12 @@
+ 		int enum_type;
+ 		IssmBool value;
+ 
+-		/*BoolParam constructors, destructors: {{{1*/
++		/*BoolParam constructors, destructors: {{{*/
+ 		BoolParam();
+ 		BoolParam(int enum_type,IssmBool value);
+ 		~BoolParam();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -39,7 +39,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Param vritual function definitions: {{{1*/
++		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){*pbool=value;}
+ 		void  GetParameterValue(int* pinteger){_error_("Bool param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _INTMATPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -28,12 +28,12 @@
+ 		int N;
+ 
+ 	public:
+-		/*IntMatParam constructors, destructors: {{{1*/
++		/*IntMatParam constructors, destructors: {{{*/
+ 		IntMatParam();
+ 		IntMatParam(int enum_type,int* value,int M,int N);
+ 		~IntMatParam();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -41,7 +41,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Param vritual function definitions: {{{1*/
++		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){_error_("IntMat param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int* pinteger){_error_("IntMat param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*VectorParam constructors and destructor*/
+-/*FUNCTION VectorParam::VectorParam(){{{1*/
++/*FUNCTION VectorParam::VectorParam(){{{*/
+ VectorParam::VectorParam(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION VectorParam::VectorParam(int enum_type,IssmVector value){{{1*/
++/*FUNCTION VectorParam::VectorParam(int enum_type,IssmVector value){{{*/
+ VectorParam::VectorParam(int in_enum_type,Vector* in_value){
+ 
+ 	enum_type=in_enum_type;
+@@ -38,14 +38,14 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION VectorParam::~VectorParam(){{{1*/
++/*FUNCTION VectorParam::~VectorParam(){{{*/
+ VectorParam::~VectorParam(){
+ 	xdelete(&value);
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION VectorParam::Echo {{{1*/
++/*FUNCTION VectorParam::Echo {{{*/
+ void VectorParam::Echo(void){
+ 
+ 	printf("VectorParam:\n");
+@@ -53,7 +53,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION VectorParam::DeepEcho{{{1*/
++/*FUNCTION VectorParam::DeepEcho{{{*/
+ void VectorParam::DeepEcho(void){
+ 
+ 	int i;
+@@ -62,23 +62,23 @@
+ 	value->Echo();
+ }
+ /*}}}*/
+-/*FUNCTION VectorParam::Id{{{1*/
++/*FUNCTION VectorParam::Id{{{*/
+ int    VectorParam::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION VectorParam::MyRank{{{1*/
++/*FUNCTION VectorParam::MyRank{{{*/
+ int    VectorParam::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION VectorParam::ObjectEnum{{{1*/
++/*FUNCTION VectorParam::ObjectEnum{{{*/
+ int VectorParam::ObjectEnum(void){
+ 
+ 	return VectorParamEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION VectorParam::copy{{{1*/
++/*FUNCTION VectorParam::copy{{{*/
+ Object* VectorParam::copy() {
+ 	
+ 	return new VectorParam(this->enum_type,this->value);
+@@ -87,7 +87,7 @@
+ /*}}}*/
+ 
+ /*VectorParam virtual functions definitions: */
+-/*FUNCTION VectorParam::GetParameterValue{{{1*/
++/*FUNCTION VectorParam::GetParameterValue{{{*/
+ void  VectorParam::GetParameterValue(Vector** poutput){
+ 	Vector*  output=NULL;
+ 
+@@ -98,12 +98,12 @@
+ 	*poutput=output;
+ }
+ /*}}}*/
+-/*FUNCTION VectorParam::GetParameterName{{{1*/
++/*FUNCTION VectorParam::GetParameterName{{{*/
+ void VectorParam::GetParameterName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION VectorParam::SetValue{{{1*/
++/*FUNCTION VectorParam::SetValue{{{*/
+ void  VectorParam::SetValue(Vector* vector){
+ 
+ 	/*avoid leak: */
+@@ -114,7 +114,7 @@
+ 	vector->Copy(value);
+ }
+ /*}}}*/
+-/*FUNCTION VectorParam::UnitConversion{{{1*/
++/*FUNCTION VectorParam::UnitConversion{{{*/
+ void  VectorParam::UnitConversion(int direction_enum){
+ 	/*do nothing, no unit conversion*/
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -19,12 +19,12 @@
+ #include "../../include/include.h"
+ /*}}}*/
+ 
+-/*FUNCTION DoubleTransientMatParam::DoubleTransientMatParam(int enum_type,IssmDoubleMat value){{{1*/
++/*FUNCTION DoubleTransientMatParam::DoubleTransientMatParam(int enum_type,IssmDoubleMat value){{{*/
+ DoubleTransientMatParam::DoubleTransientMatParam(int in_enum_type,double* in_value, int in_M,int in_N):DoubleMatParam(in_enum_type,in_value,in_M,in_N){
+ }
+ /*}}}*/
+ 
+-/*FUNCTION DoubleTransientMatParam::UnitConversion{{{1*/
++/*FUNCTION DoubleTransientMatParam::UnitConversion{{{*/
+ void  DoubleTransientMatParam::UnitConversion(int direction_enum){
+ 	::UnitConversion(this->value,(this->M-1)*this->N,direction_enum,this->enum_type);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*MatrixParam constructors and destructor*/
+-/*FUNCTION MatrixParam::MatrixParam(){{{1*/
++/*FUNCTION MatrixParam::MatrixParam(){{{*/
+ MatrixParam::MatrixParam(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION MatrixParam::MatrixParam(int enum_type,Matrix* value){{{1*/
++/*FUNCTION MatrixParam::MatrixParam(int enum_type,Matrix* value){{{*/
+ MatrixParam::MatrixParam(int in_enum_type,Matrix* in_value){
+ 
+ 	enum_type=in_enum_type;
+@@ -36,14 +36,14 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION MatrixParam::~MatrixParam(){{{1*/
++/*FUNCTION MatrixParam::~MatrixParam(){{{*/
+ MatrixParam::~MatrixParam(){
+ 	xdelete(&value);
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION MatrixParam::Echo {{{1*/
++/*FUNCTION MatrixParam::Echo {{{*/
+ void MatrixParam::Echo(void){
+ 
+ 	printf("MatrixParam:\n");
+@@ -51,7 +51,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION MatrixParam::DeepEcho{{{1*/
++/*FUNCTION MatrixParam::DeepEcho{{{*/
+ void MatrixParam::DeepEcho(void){
+ 
+ 	int i;
+@@ -60,23 +60,23 @@
+ 	this->value->Echo();
+ }
+ /*}}}*/
+-/*FUNCTION MatrixParam::Id{{{1*/
++/*FUNCTION MatrixParam::Id{{{*/
+ int    MatrixParam::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION MatrixParam::MyRank{{{1*/
++/*FUNCTION MatrixParam::MyRank{{{*/
+ int    MatrixParam::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION MatrixParam::ObjectEnum{{{1*/
++/*FUNCTION MatrixParam::ObjectEnum{{{*/
+ int MatrixParam::ObjectEnum(void){
+ 
+ 	return MatrixParamEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION MatrixParam::copy{{{1*/
++/*FUNCTION MatrixParam::copy{{{*/
+ Object* MatrixParam::copy() {
+ 	
+ 	return new MatrixParam(this->enum_type,this->value);
+@@ -85,7 +85,7 @@
+ /*}}}*/
+ 
+ /*MatrixParam virtual functions definitions: */
+-/*FUNCTION MatrixParam::GetParameterValue{{{1*/
++/*FUNCTION MatrixParam::GetParameterValue{{{*/
+ void  MatrixParam::GetParameterValue(Matrix** poutput){
+ 	Matrix* output=NULL;
+ 
+@@ -95,12 +95,12 @@
+ 	*poutput=output;
+ }
+ /*}}}*/
+-/*FUNCTION MatrixParam::GetParameterName{{{1*/
++/*FUNCTION MatrixParam::GetParameterName{{{*/
+ void MatrixParam::GetParameterName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION MatrixParam::SetValue{{{1*/
++/*FUNCTION MatrixParam::SetValue{{{*/
+ void  MatrixParam::SetValue(Matrix* matrix){
+ 	
+ 	/*avoid leak: */
+@@ -110,7 +110,7 @@
+ 	value=matrix->Duplicate();
+ }
+ /*}}}*/
+-/*FUNCTION MatrixParam::UnitConversion{{{1*/
++/*FUNCTION MatrixParam::UnitConversion{{{*/
+ void  MatrixParam::UnitConversion(int direction_enum){
+ 	/*do nothing, no unit conversion*/
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*StringArrayParam constructors and destructor*/
+-/*FUNCTION StringArrayParam::StringArrayParam(){{{1*/
++/*FUNCTION StringArrayParam::StringArrayParam(){{{*/
+ StringArrayParam::StringArrayParam(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION StringArrayParam::StringArrayParam(int enum_type,char** in_values,int in_numstrings){{{1*/
++/*FUNCTION StringArrayParam::StringArrayParam(int enum_type,char** in_values,int in_numstrings){{{*/
+ StringArrayParam::StringArrayParam(int in_enum_type,char** in_values, int in_numstrings){
+ 
+ 	int i;
+@@ -48,7 +48,7 @@
+ 	
+ }
+ /*}}}*/
+-/*FUNCTION StringArrayParam::~StringArrayParam(){{{1*/
++/*FUNCTION StringArrayParam::~StringArrayParam(){{{*/
+ StringArrayParam::~StringArrayParam(){
+ 		
+ 	int i;
+@@ -63,12 +63,12 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION StringArrayParam::Echo {{{1*/
++/*FUNCTION StringArrayParam::Echo {{{*/
+ void StringArrayParam::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION StringArrayParam::DeepEcho{{{1*/
++/*FUNCTION StringArrayParam::DeepEcho{{{*/
+ void StringArrayParam::DeepEcho(void){
+ 
+ 	int i;
+@@ -82,23 +82,23 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION StringArrayParam::Id{{{1*/
++/*FUNCTION StringArrayParam::Id{{{*/
+ int    StringArrayParam::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION StringArrayParam::MyRank{{{1*/
++/*FUNCTION StringArrayParam::MyRank{{{*/
+ int    StringArrayParam::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION StringArrayParam::ObjectEnum{{{1*/
++/*FUNCTION StringArrayParam::ObjectEnum{{{*/
+ int StringArrayParam::ObjectEnum(void){
+ 
+ 	return StringArrayParamEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION StringArrayParam::copy{{{1*/
++/*FUNCTION StringArrayParam::copy{{{*/
+ Object* StringArrayParam::copy() {
+ 	
+ 	return new StringArrayParam(this->enum_type,this->value,this->numstrings);
+@@ -107,7 +107,7 @@
+ /*}}}*/
+ 
+ /*StringArrayParam virtual functions definitions: */
+-/*FUNCTION StringArrayParam::GetParameterValue{{{1*/
++/*FUNCTION StringArrayParam::GetParameterValue{{{*/
+ void  StringArrayParam::GetParameterValue(char*** pstringarray,int* pM){
+ 	
+ 	int   i;
+@@ -138,12 +138,12 @@
+ 	*pstringarray=outstrings;
+ }
+ /*}}}*/
+-/*FUNCTION StringArrayParam::GetParameterName{{{1*/
++/*FUNCTION StringArrayParam::GetParameterName{{{*/
+ void StringArrayParam::GetParameterName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION StringArrayParam::SetValue{{{1*/
++/*FUNCTION StringArrayParam::SetValue{{{*/
+ void  StringArrayParam::SetValue(char** stringarray,int M){
+ 	
+ 	int   i;
+@@ -172,7 +172,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION StringArrayParam::UnitConversion{{{1*/
++/*FUNCTION StringArrayParam::UnitConversion{{{*/
+ void  StringArrayParam::UnitConversion(int direction_enum){
+ 	/*do nothing, no unit conversion*/
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*StringParam constructors and destructor*/
+-/*FUNCTION StringParam::StringParam(){{{1*/
++/*FUNCTION StringParam::StringParam(){{{*/
+ StringParam::StringParam(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION StringParam::StringParam(int enum_type,IssmString value){{{1*/
++/*FUNCTION StringParam::StringParam(int enum_type,IssmString value){{{*/
+ StringParam::StringParam(int in_enum_type,char* in_value){
+ 
+ 	enum_type=in_enum_type;
+@@ -35,42 +35,42 @@
+ 	
+ }
+ /*}}}*/
+-/*FUNCTION StringParam::~StringParam(){{{1*/
++/*FUNCTION StringParam::~StringParam(){{{*/
+ StringParam::~StringParam(){
+ 	xfree((void**)&value);
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION StringParam::Echo {{{1*/
++/*FUNCTION StringParam::Echo {{{*/
+ void StringParam::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION StringParam::DeepEcho{{{1*/
++/*FUNCTION StringParam::DeepEcho{{{*/
+ void StringParam::DeepEcho(void){
+ 	printf("StringParam:\n");
+ 	printf("   enum:  %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+ 	printf("   value: %s\n",this->value);
+ }
+ /*}}}*/
+-/*FUNCTION StringParam::Id{{{1*/
++/*FUNCTION StringParam::Id{{{*/
+ int    StringParam::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION StringParam::MyRank{{{1*/
++/*FUNCTION StringParam::MyRank{{{*/
+ int    StringParam::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION StringParam::ObjectEnum{{{1*/
++/*FUNCTION StringParam::ObjectEnum{{{*/
+ int StringParam::ObjectEnum(void){
+ 
+ 	return StringParamEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION StringParam::copy{{{1*/
++/*FUNCTION StringParam::copy{{{*/
+ Object* StringParam::copy() {
+ 	
+ 	return new StringParam(this->enum_type,this->value);
+@@ -79,7 +79,7 @@
+ /*}}}*/
+ 
+ /*StringParam virtual functions definitions: */
+-/*FUNCTION StringParam::GetParameterValue{{{1*/
++/*FUNCTION StringParam::GetParameterValue{{{*/
+ void  StringParam::GetParameterValue(char** pstring){
+ 	
+ 	char* outstring=NULL;
+@@ -94,12 +94,12 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION StringParam::GetParameterName{{{1*/
++/*FUNCTION StringParam::GetParameterName{{{*/
+ void StringParam::GetParameterName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION StringParam::SetValue{{{1*/
++/*FUNCTION StringParam::SetValue{{{*/
+ void  StringParam::SetValue(char* string){
+ 	
+ 	int   stringsize;
+@@ -114,7 +114,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION StringParam::UnitConversion{{{1*/
++/*FUNCTION StringParam::UnitConversion{{{*/
+ void  StringParam::UnitConversion(int direction_enum){
+ 	/*do nothing, no unit conversion*/
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _VECTORPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -27,12 +27,12 @@
+ 		Vector* value;
+ 
+ 	public:
+-		/*VectorParam constructors, destructors: {{{1*/
++		/*VectorParam constructors, destructors: {{{*/
+ 		VectorParam();
+ 		VectorParam(int enum_type,Vector* value);
+ 		~VectorParam();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -40,7 +40,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Param vritual function definitions: {{{1*/
++		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){_error_("Vector param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int* pinteger){_error_("Vector param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*DoubleVecParam constructors and destructor*/
+-/*FUNCTION DoubleVecParam::DoubleVecParam(){{{1*/
++/*FUNCTION DoubleVecParam::DoubleVecParam(){{{*/
+ DoubleVecParam::DoubleVecParam(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::DoubleVecParam(int enum_type,IssmDoubleVec values,int M){{{1*/
++/*FUNCTION DoubleVecParam::DoubleVecParam(int enum_type,IssmDoubleVec values,int M){{{*/
+ DoubleVecParam::DoubleVecParam(int in_enum_type,double* in_values, int in_M){
+ 
+ 	enum_type=in_enum_type;
+@@ -35,7 +35,7 @@
+ 	memcpy(values,in_values,M*sizeof(double));
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::~DoubleVecParam(){{{1*/
++/*FUNCTION DoubleVecParam::~DoubleVecParam(){{{*/
+ DoubleVecParam::~DoubleVecParam(){
+ 	xfree((void**)&values);
+ 	return;
+@@ -43,7 +43,7 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION DoubleVecParam::Echo {{{1*/
++/*FUNCTION DoubleVecParam::Echo {{{*/
+ void DoubleVecParam::Echo(void){
+ 
+ 	printf("DoubleVecParam:\n");
+@@ -52,7 +52,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::DeepEcho{{{1*/
++/*FUNCTION DoubleVecParam::DeepEcho{{{*/
+ void DoubleVecParam::DeepEcho(void){
+ 
+ 	int i;
+@@ -65,23 +65,23 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::Id{{{1*/
++/*FUNCTION DoubleVecParam::Id{{{*/
+ int    DoubleVecParam::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::MyRank{{{1*/
++/*FUNCTION DoubleVecParam::MyRank{{{*/
+ int    DoubleVecParam::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::ObjectEnum{{{1*/
++/*FUNCTION DoubleVecParam::ObjectEnum{{{*/
+ int DoubleVecParam::ObjectEnum(void){
+ 
+ 	return DoubleVecParamEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::copy{{{1*/
++/*FUNCTION DoubleVecParam::copy{{{*/
+ Object* DoubleVecParam::copy() {
+ 	
+ 	return new DoubleVecParam(this->enum_type,this->values,this->M);
+@@ -90,7 +90,7 @@
+ /*}}}*/
+ 
+ /*DoubleVecParam virtual functions definitions: */
+-/*FUNCTION DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM){{{1*/
++/*FUNCTION DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM){{{*/
+ void  DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM){
+ 	double* output=NULL;
+ 	int M;
+@@ -104,7 +104,7 @@
+ 	*pdoublearray=output;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM){{{1*/
++/*FUNCTION DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM){{{*/
+ void  DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){
+ 	double* output=NULL;
+ 	int M;
+@@ -121,17 +121,17 @@
+ 	*pdoublearray=output;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::GetParameterValue(int** pintarray,int* pM){{{1*/
++/*FUNCTION DoubleVecParam::GetParameterValue(int** pintarray,int* pM){{{*/
+ void  DoubleVecParam::GetParameterValue(int** pintarray,int* pM){
+ 	_error_("DoubleVec param of enum %i (%s) cannot return an array of int",enum_type,EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::GetParameterName{{{1*/
++/*FUNCTION DoubleVecParam::GetParameterName{{{*/
+ void DoubleVecParam::GetParameterName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::SetValue{{{1*/
++/*FUNCTION DoubleVecParam::SetValue{{{*/
+ void  DoubleVecParam::SetValue(double* doublearray,int in_M){
+ 
+ 	/*avoid leak: */
+@@ -143,7 +143,7 @@
+ 	this->M=in_M;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::UnitConversion{{{1*/
++/*FUNCTION DoubleVecParam::UnitConversion{{{*/
+ void  DoubleVecParam::UnitConversion(int direction_enum){
+ 	::UnitConversion(this->values,this->M,direction_enum,this->enum_type);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _DOUBLETRANSIENTMATPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -22,10 +22,10 @@
+ class DoubleTransientMatParam: public DoubleMatParam{
+ 
+ 	public:
+-		/*DoubleTransientMatParam constructors, destructors: {{{1*/
++		/*DoubleTransientMatParam constructors, destructors: {{{*/
+ 		DoubleTransientMatParam(int enum_type,IssmDouble* value,int M,int N);
+ 		/*}}}*/
+-		/*Param vritual function definitions: {{{1*/
++		/*Param vritual function definitions: {{{*/
+ 		void  UnitConversion(int direction_enum);
+ 		/*}}}*/
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _MATRIXPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -27,12 +27,12 @@
+ 		Matrix* value;
+ 
+ 	public:
+-		/*MatrixParam constructors, destructors: {{{1*/
++		/*MatrixParam constructors, destructors: {{{*/
+ 		MatrixParam();
+ 		MatrixParam(int enum_type,Matrix* value);
+ 		~MatrixParam();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -40,7 +40,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Param vritual function definitions: {{{1*/
++		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){_error_("Matrix param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int* pinteger){_error_("Matrix param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12365)
+@@ -17,31 +17,31 @@
+ #include "../../include/include.h"
+ 
+ /*DoubleParam constructors and destructor*/
+-/*FUNCTION DoubleParam::DoubleParam(){{{1*/
++/*FUNCTION DoubleParam::DoubleParam(){{{*/
+ DoubleParam::DoubleParam(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::DoubleParam(int enum_type,IssmDouble value){{{1*/
++/*FUNCTION DoubleParam::DoubleParam(int enum_type,IssmDouble value){{{*/
+ DoubleParam::DoubleParam(int in_enum_type,IssmDouble in_value){
+ 
+ 	enum_type=in_enum_type;
+ 	value=in_value;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::~DoubleParam(){{{1*/
++/*FUNCTION DoubleParam::~DoubleParam(){{{*/
+ DoubleParam::~DoubleParam(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION DoubleParam::Echo {{{1*/
++/*FUNCTION DoubleParam::Echo {{{*/
+ void DoubleParam::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::DeepEcho{{{1*/
++/*FUNCTION DoubleParam::DeepEcho{{{*/
+ void DoubleParam::DeepEcho(void){
+ 
+ 	printf("DoubleParam:\n");
+@@ -49,23 +49,23 @@
+ 	printf("   value: %g\n",this->value);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::Id{{{1*/
++/*FUNCTION DoubleParam::Id{{{*/
+ int    DoubleParam::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION DoubleParam::MyRank{{{1*/
++/*FUNCTION DoubleParam::MyRank{{{*/
+ int    DoubleParam::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::ObjectEnum{{{1*/
++/*FUNCTION DoubleParam::ObjectEnum{{{*/
+ int DoubleParam::ObjectEnum(void){
+ 
+ 	return DoubleParamEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::copy{{{1*/
++/*FUNCTION DoubleParam::copy{{{*/
+ Object* DoubleParam::copy() {
+ 	
+ 	return new DoubleParam(this->enum_type,this->value);
+@@ -74,42 +74,42 @@
+ /*}}}*/
+ 
+ /*DoubleParam virtual functions definitions: */
+-/*FUNCTION DoubleParam::GetParameterName{{{1*/
++/*FUNCTION DoubleParam::GetParameterName{{{*/
+ void DoubleParam::GetParameterName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::GetParameterValue(int* pinteger){{{1*/
++/*FUNCTION DoubleParam::GetParameterValue(int* pinteger){{{*/
+ void DoubleParam::GetParameterValue(int* pinteger){
+ 	_error_("Double param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::GetParameterValue(bool* pbool){{{1*/
++/*FUNCTION DoubleParam::GetParameterValue(bool* pbool){{{*/
+ void DoubleParam::GetParameterValue(bool* pbool){
+ 	_error_("Double param of enum %i (%s) cannot return an bool",enum_type,EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM){{{1*/
++/*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM){{{*/
+ void DoubleParam::GetParameterValue(int** pintarray,int* pM){
+ 	_error_("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{1*/
++/*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{*/
+ void DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){
+ 	_error_("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::GetParameterValue(double** pdoublearray,int* pM){{{1*/
++/*FUNCTION DoubleParam::GetParameterValue(double** pdoublearray,int* pM){{{*/
+ void DoubleParam::GetParameterValue(double** pdoublearray,int* pM){
+ 	_error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){{{1*/
++/*FUNCTION DoubleParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){{{*/
+ void DoubleParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){
+ 	_error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::UnitConversion{{{1*/
++/*FUNCTION DoubleParam::UnitConversion{{{*/
+ void  DoubleParam::UnitConversion(int direction_enum){
+ 	::UnitConversion(&this->value,1,direction_enum,this->enum_type);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _STRINGARRAYPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -29,12 +29,12 @@
+ 
+ 
+ 	public:
+-		/*StringArrayParam constructors, destructors: {{{1*/
++		/*StringArrayParam constructors, destructors: {{{*/
+ 		StringArrayParam();
+ 		StringArrayParam(int enum_type,char** values, int numstrings);
+ 		~StringArrayParam();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -42,7 +42,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Param vritual function definitions: {{{1*/
++		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){_error_("StringArray param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int* pinteger){_error_("StringArray param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*DoubleMatArrayParam constructors and destructor*/
+-/*FUNCTION DoubleMatArrayParam::DoubleMatArrayParam(){{{1*/
++/*FUNCTION DoubleMatArrayParam::DoubleMatArrayParam(){{{*/
+ DoubleMatArrayParam::DoubleMatArrayParam(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatArrayParam::DoubleMatArrayParam(int enum_type,double** array, int M, int* mdim_array, int* ndim_array){{{1*/
++/*FUNCTION DoubleMatArrayParam::DoubleMatArrayParam(int enum_type,double** array, int M, int* mdim_array, int* ndim_array){{{*/
+ DoubleMatArrayParam::DoubleMatArrayParam(int in_enum_type,double** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){
+ 
+ 	int i;
+@@ -63,7 +63,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatArrayParam::~DoubleMatArrayParam(){{{1*/
++/*FUNCTION DoubleMatArrayParam::~DoubleMatArrayParam(){{{*/
+ DoubleMatArrayParam::~DoubleMatArrayParam(){
+ 
+ 	int i;
+@@ -83,7 +83,7 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION DoubleMatArrayParam::Echo {{{1*/
++/*FUNCTION DoubleMatArrayParam::Echo {{{*/
+ void DoubleMatArrayParam::Echo(void){
+ 
+ 	printf("DoubleMatArrayParam:\n");
+@@ -93,7 +93,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatArrayParam::DeepEcho{{{1*/
++/*FUNCTION DoubleMatArrayParam::DeepEcho{{{*/
+ void DoubleMatArrayParam::DeepEcho(void){
+ 
+ 	int i,j,k;
+@@ -117,23 +117,23 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatArrayParam::Id{{{1*/
++/*FUNCTION DoubleMatArrayParam::Id{{{*/
+ int    DoubleMatArrayParam::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION DoubleMatArrayParam::MyRank{{{1*/
++/*FUNCTION DoubleMatArrayParam::MyRank{{{*/
+ int    DoubleMatArrayParam::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatArrayParam::ObjectEnum{{{1*/
++/*FUNCTION DoubleMatArrayParam::ObjectEnum{{{*/
+ int DoubleMatArrayParam::ObjectEnum(void){
+ 
+ 	return DoubleMatArrayParamEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatArrayParam::copy{{{1*/
++/*FUNCTION DoubleMatArrayParam::copy{{{*/
+ Object* DoubleMatArrayParam::copy() {
+ 	
+ 	return new DoubleMatArrayParam(this->enum_type,this->array, this->M, this->mdim_array,this->ndim_array);
+@@ -142,7 +142,7 @@
+ /*}}}*/
+ 
+ /*DoubleMatArrayParam virtual functions definitions: */
+-/*FUNCTION DoubleMatArrayParam::GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){{{1*/
++/*FUNCTION DoubleMatArrayParam::GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){{{*/
+ void  DoubleMatArrayParam::GetParameterValue(double*** pout_array, int* pout_M,int** pout_mdim_array, int** pout_ndim_array){
+ 
+ 	int i,m,n;
+@@ -195,12 +195,12 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatArrayParam::GetParameterName{{{1*/
++/*FUNCTION DoubleMatArrayParam::GetParameterName{{{*/
+ void DoubleMatArrayParam::GetParameterName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatArrayParam::SetValue(double** array, int M, int* mdim_array, int* ndim_array){{{1*/
++/*FUNCTION DoubleMatArrayParam::SetValue(double** array, int M, int* mdim_array, int* ndim_array){{{*/
+ void  DoubleMatArrayParam::SetValue(double** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){
+ 
+ 	int i,m,n;
+@@ -238,7 +238,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatArrayParam::UnitConversion{{{1*/
++/*FUNCTION DoubleMatArrayParam::UnitConversion{{{*/
+ void  DoubleMatArrayParam::UnitConversion(int direction_enum){
+ 	/*go through all matrices and convert: */
+ 	for (int i=0;i<this->M;i++){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _STRINGPARAM_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -27,12 +27,12 @@
+ 		char* value;
+ 
+ 	public:
+-		/*StringParam constructors, destructors: {{{1*/
++		/*StringParam constructors, destructors: {{{*/
+ 		StringParam();
+ 		StringParam(int enum_type,char* value);
+ 		~StringParam();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -40,7 +40,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Param vritual function definitions: {{{1*/
++		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){_error_("String param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int* pinteger){_error_("String param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*DoubleMatParam constructors and destructor*/
+-/*FUNCTION DoubleMatParam::DoubleMatParam(){{{1*/
++/*FUNCTION DoubleMatParam::DoubleMatParam(){{{*/
+ DoubleMatParam::DoubleMatParam(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatParam::DoubleMatParam(int enum_type,IssmDoubleMat value){{{1*/
++/*FUNCTION DoubleMatParam::DoubleMatParam(int enum_type,IssmDoubleMat value){{{*/
+ DoubleMatParam::DoubleMatParam(int in_enum_type,double* in_value, int in_M,int in_N){
+ 
+ 	enum_type=in_enum_type;
+@@ -36,7 +36,7 @@
+ 	memcpy(value,in_value,M*N*sizeof(double));
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatParam::~DoubleMatParam(){{{1*/
++/*FUNCTION DoubleMatParam::~DoubleMatParam(){{{*/
+ DoubleMatParam::~DoubleMatParam(){
+ 	xfree((void**)&value);
+ 	return;
+@@ -44,7 +44,7 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION DoubleMatParam::Echo {{{1*/
++/*FUNCTION DoubleMatParam::Echo {{{*/
+ void DoubleMatParam::Echo(void){
+ 
+ 	printf("DoubleMatParam:\n");
+@@ -53,7 +53,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatParam::DeepEcho{{{1*/
++/*FUNCTION DoubleMatParam::DeepEcho{{{*/
+ void DoubleMatParam::DeepEcho(void){
+ 
+ 	int i,j;
+@@ -68,23 +68,23 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatParam::Id{{{1*/
++/*FUNCTION DoubleMatParam::Id{{{*/
+ int    DoubleMatParam::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION DoubleMatParam::MyRank{{{1*/
++/*FUNCTION DoubleMatParam::MyRank{{{*/
+ int    DoubleMatParam::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatParam::ObjectEnum{{{1*/
++/*FUNCTION DoubleMatParam::ObjectEnum{{{*/
+ int DoubleMatParam::ObjectEnum(void){
+ 
+ 	return DoubleMatParamEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatParam::copy{{{1*/
++/*FUNCTION DoubleMatParam::copy{{{*/
+ Object* DoubleMatParam::copy() {
+ 	
+ 	return new DoubleMatParam(this->enum_type,this->value,this->M,this->N);
+@@ -93,7 +93,7 @@
+ /*}}}*/
+ 
+ /*DoubleMatParam virtual functions definitions: */
+-/*FUNCTION DoubleMatParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){{{1*/
++/*FUNCTION DoubleMatParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){{{*/
+ void  DoubleMatParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){
+ 	double* output=NULL;
+ 
+@@ -106,17 +106,17 @@
+ 	*pdoublearray=output;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{1*/
++/*FUNCTION DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{*/
+ void  DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){
+ 	_error_("DoubleMat of enum %i (%s) cannot return an array of int",enum_type,EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatParam::GetParameterName{{{1*/
++/*FUNCTION DoubleMatParam::GetParameterName{{{*/
+ void DoubleMatParam::GetParameterName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatParam::SetValue{{{1*/
++/*FUNCTION DoubleMatParam::SetValue{{{*/
+ void  DoubleMatParam::SetValue(double* doublearray,int in_M,int in_N){
+ 
+ 	/*avoid leak: */
+@@ -129,14 +129,14 @@
+ 	this->N=in_N;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatParam::UnitConversion{{{1*/
++/*FUNCTION DoubleMatParam::UnitConversion{{{*/
+ void  DoubleMatParam::UnitConversion(int direction_enum){
+ 	::UnitConversion(this->value,this->M*this->N,direction_enum,this->enum_type);
+ }
+ /*}}}*/
+ 		
+ /*diverse: */
+-/*FUNCTION DoubleMatParam::GetPointer{{{1*/
++/*FUNCTION DoubleMatParam::GetPointer{{{*/
+ double* DoubleMatParam::GetPointer(void){
+ 	return this->value;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Geometry.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Geometry.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Geometry.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -19,14 +19,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Geometry::KML_Geometry(){{{1*/
++/*FUNCTION KML_Geometry::KML_Geometry(){{{*/
+ KML_Geometry::KML_Geometry(){
+ 
+ 	;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Geometry::~KML_Geometry(){{{1*/
++/*FUNCTION KML_Geometry::~KML_Geometry(){{{*/
+ KML_Geometry::~KML_Geometry(){
+ 
+ 	;
+@@ -35,7 +35,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Geometry::Echo {{{1*/
++/*FUNCTION KML_Geometry::Echo {{{*/
+ void  KML_Geometry::Echo(){
+ 
+ 	this->KML_Object::Echo();
+@@ -44,7 +44,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Geometry::DeepEcho {{{1*/
++/*FUNCTION KML_Geometry::DeepEcho {{{*/
+ void  KML_Geometry::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -55,7 +55,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Geometry::DeepEcho {{{1*/
++/*FUNCTION KML_Geometry::DeepEcho {{{*/
+ void  KML_Geometry::DeepEcho(const char* indent){
+ 
+ 	this->KML_Object::DeepEcho(indent);
+@@ -64,7 +64,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Geometry::Write {{{1*/
++/*FUNCTION KML_Geometry::Write {{{*/
+ void  KML_Geometry::Write(FILE* filout,const char* indent){
+ 
+ 	KML_Object::Write(filout,indent);
+@@ -73,7 +73,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Geometry::Read {{{1*/
++/*FUNCTION KML_Geometry::Read {{{*/
+ void  KML_Geometry::Read(FILE* fid,char* kstr){
+ 
+ /*  process field within opening and closing tags  */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.h	(revision 12365)
+@@ -12,7 +12,7 @@
+ #define KML_ICON_HQUERY_LENGTH    800
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -33,11 +33,11 @@
+ 		char  vformat[KML_ICON_VFORMAT_LENGTH+1];
+ 		char  hquery[KML_ICON_HQUERY_LENGTH+1];
+ 
+-		/*KML_Icon constructors, destructors {{{1*/
++		/*KML_Icon constructors, destructors {{{*/
+ 		KML_Icon();
+ 		~KML_Icon();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.h	(revision 12365)
+@@ -8,7 +8,7 @@
+ #define KML_POINT_ALTMODE_LENGTH    18
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -24,11 +24,11 @@
+ 		char  altmode[KML_POINT_ALTMODE_LENGTH+1];
+ 		double coords[3];
+ 
+-		/*KML_Point constructors, destructors {{{1*/
++		/*KML_Point constructors, destructors {{{*/
+ 		KML_Point();
+ 		~KML_Point();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.h	(revision 12365)
+@@ -8,7 +8,7 @@
+ #define KML_LINEARRING_ALTMODE_LENGTH    18
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -26,11 +26,11 @@
+         int   ncoord;
+ 		double (*coords)[3];
+ 
+-		/*KML_LinearRing constructors, destructors {{{1*/
++		/*KML_LinearRing constructors, destructors {{{*/
+ 		KML_LinearRing();
+ 		~KML_LinearRing();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_ColorStyle::KML_ColorStyle(){{{1*/
++/*FUNCTION KML_ColorStyle::KML_ColorStyle(){{{*/
+ KML_ColorStyle::KML_ColorStyle(){
+ 
+ 	strcpy(color     ,"ffffffff");
+@@ -28,7 +28,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_ColorStyle::~KML_ColorStyle(){{{1*/
++/*FUNCTION KML_ColorStyle::~KML_ColorStyle(){{{*/
+ KML_ColorStyle::~KML_ColorStyle(){
+ 
+ 	;
+@@ -37,7 +37,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_ColorStyle::Echo {{{1*/
++/*FUNCTION KML_ColorStyle::Echo {{{*/
+ void  KML_ColorStyle::Echo(){
+ 
+ 	bool  flag=true;
+@@ -50,7 +50,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_ColorStyle::DeepEcho {{{1*/
++/*FUNCTION KML_ColorStyle::DeepEcho {{{*/
+ void  KML_ColorStyle::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -60,7 +60,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_ColorStyle::DeepEcho {{{1*/
++/*FUNCTION KML_ColorStyle::DeepEcho {{{*/
+ void  KML_ColorStyle::DeepEcho(const char* indent){
+ 
+ 	bool  flag=true;
+@@ -73,7 +73,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_ColorStyle::Write {{{1*/
++/*FUNCTION KML_ColorStyle::Write {{{*/
+ void  KML_ColorStyle::Write(FILE* filout,const char* indent){
+ 
+ 	KML_SubStyle::Write(filout,indent);
+@@ -86,7 +86,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_ColorStyle::Read {{{1*/
++/*FUNCTION KML_ColorStyle::Read {{{*/
+ void  KML_ColorStyle::Read(FILE* fid,char* kstr){
+ 
+ /*  process field within opening and closing tags  */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Placemark::KML_Placemark(){{{1*/
++/*FUNCTION KML_Placemark::KML_Placemark(){{{*/
+ KML_Placemark::KML_Placemark(){
+ 
+ 	geometry  =new DataSet;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Placemark::~KML_Placemark(){{{1*/
++/*FUNCTION KML_Placemark::~KML_Placemark(){{{*/
+ KML_Placemark::~KML_Placemark(){
+ 
+ 	if (geometry) {
+@@ -39,7 +39,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Placemark::Echo {{{1*/
++/*FUNCTION KML_Placemark::Echo {{{*/
+ void  KML_Placemark::Echo(){
+ 
+ 	bool  flag=true;
+@@ -52,7 +52,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Placemark::DeepEcho {{{1*/
++/*FUNCTION KML_Placemark::DeepEcho {{{*/
+ void  KML_Placemark::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -62,7 +62,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Placemark::DeepEcho {{{1*/
++/*FUNCTION KML_Placemark::DeepEcho {{{*/
+ void  KML_Placemark::DeepEcho(const char* indent){
+ 
+ 	int   i;
+@@ -89,7 +89,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Placemark::Write {{{1*/
++/*FUNCTION KML_Placemark::Write {{{*/
+ void  KML_Placemark::Write(FILE* filout,const char* indent){
+ 
+ 	int   i;
+@@ -116,7 +116,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Placemark::Read {{{1*/
++/*FUNCTION KML_Placemark::Read {{{*/
+ void  KML_Placemark::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+@@ -188,7 +188,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Placemark::WriteExp {{{1*/
++/*FUNCTION KML_Placemark::WriteExp {{{*/
+ void  KML_Placemark::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){
+ 
+ 	int   i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Unknown::KML_Unknown(){{{1*/
++/*FUNCTION KML_Unknown::KML_Unknown(){{{*/
+ KML_Unknown::KML_Unknown(){
+ 
+ 	name      =NULL;
+@@ -28,7 +28,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Unknown::~KML_Unknown(){{{1*/
++/*FUNCTION KML_Unknown::~KML_Unknown(){{{*/
+ KML_Unknown::~KML_Unknown(){
+ 
+ 	if (name      ) xfree((void**)&name);
+@@ -38,7 +38,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Unknown::Echo {{{1*/
++/*FUNCTION KML_Unknown::Echo {{{*/
+ void  KML_Unknown::Echo(){
+ 
+ 	bool  flag=true;
+@@ -54,7 +54,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Unknown::DeepEcho {{{1*/
++/*FUNCTION KML_Unknown::DeepEcho {{{*/
+ void  KML_Unknown::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -64,7 +64,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Unknown::DeepEcho {{{1*/
++/*FUNCTION KML_Unknown::DeepEcho {{{*/
+ void  KML_Unknown::DeepEcho(const char* indent){
+ 
+ 	char*        valuei;
+@@ -94,7 +94,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Unknown::Write {{{1*/
++/*FUNCTION KML_Unknown::Write {{{*/
+ void  KML_Unknown::Write(FILE* filout,const char* indent){
+ 
+ 	char*        valuei;
+@@ -126,7 +126,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Unknown::Read {{{1*/
++/*FUNCTION KML_Unknown::Read {{{*/
+ void  KML_Unknown::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_GroundOverlay::KML_GroundOverlay(){{{1*/
++/*FUNCTION KML_GroundOverlay::KML_GroundOverlay(){{{*/
+ KML_GroundOverlay::KML_GroundOverlay(){
+ 
+ 	altitude  = 0.;
+@@ -30,7 +30,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_GroundOverlay::~KML_GroundOverlay(){{{1*/
++/*FUNCTION KML_GroundOverlay::~KML_GroundOverlay(){{{*/
+ KML_GroundOverlay::~KML_GroundOverlay(){
+ 
+ 	if (llbox) {
+@@ -42,7 +42,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_GroundOverlay::Echo {{{1*/
++/*FUNCTION KML_GroundOverlay::Echo {{{*/
+ void  KML_GroundOverlay::Echo(){
+ 
+ 	bool  flag=true;
+@@ -58,7 +58,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_GroundOverlay::DeepEcho {{{1*/
++/*FUNCTION KML_GroundOverlay::DeepEcho {{{*/
+ void  KML_GroundOverlay::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -69,7 +69,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_GroundOverlay::DeepEcho {{{1*/
++/*FUNCTION KML_GroundOverlay::DeepEcho {{{*/
+ void  KML_GroundOverlay::DeepEcho(const char* indent){
+ 
+ 	char  indent2[81];
+@@ -92,7 +92,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_GroundOverlay::Write {{{1*/
++/*FUNCTION KML_GroundOverlay::Write {{{*/
+ void  KML_GroundOverlay::Write(FILE* filout,const char* indent){
+ 
+ 	char  indent2[81];
+@@ -119,7 +119,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_GroundOverlay::Read {{{1*/
++/*FUNCTION KML_GroundOverlay::Read {{{*/
+ void  KML_GroundOverlay::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.h	(revision 12365)
+@@ -11,7 +11,7 @@
+ #define KML_FEATURE_STYLEURL_LENGTH     80
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -33,11 +33,11 @@
+ 		char  styleurl[KML_FEATURE_STYLEURL_LENGTH+1];
+ 		DataSet* style;
+ 
+-		/*KML_Feature constructors, destructors {{{1*/
++		/*KML_Feature constructors, destructors {{{*/
+ 		KML_Feature();
+ 		~KML_Feature();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Style::KML_Style(){{{1*/
++/*FUNCTION KML_Style::KML_Style(){{{*/
+ KML_Style::KML_Style(){
+ 
+ 	icon      =NULL;
+@@ -32,7 +32,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Style::~KML_Style(){{{1*/
++/*FUNCTION KML_Style::~KML_Style(){{{*/
+ KML_Style::~KML_Style(){
+ 
+ 	if (list) {
+@@ -68,7 +68,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Style::Echo {{{1*/
++/*FUNCTION KML_Style::Echo {{{*/
+ void  KML_Style::Echo(){
+ 
+ 	bool  flag=true;
+@@ -87,7 +87,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Style::DeepEcho {{{1*/
++/*FUNCTION KML_Style::DeepEcho {{{*/
+ void  KML_Style::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -98,7 +98,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Style::DeepEcho {{{1*/
++/*FUNCTION KML_Style::DeepEcho {{{*/
+ void  KML_Style::DeepEcho(const char* indent){
+ 
+ 	char  indent2[81];
+@@ -139,7 +139,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Style::Write {{{1*/
++/*FUNCTION KML_Style::Write {{{*/
+ void  KML_Style::Write(FILE* filout,const char* indent){
+ 
+ 	char  indent2[81];
+@@ -174,7 +174,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Style::Read {{{1*/
++/*FUNCTION KML_Style::Read {{{*/
+ void  KML_Style::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #ifndef _KMLFILEREADUTILS_H
+ #define _KMLFILEREADUTILS_H
+ 
+-/*Headers:{{{1*/
++/*Headers:{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Comment::KML_Comment(){{{1*/
++/*FUNCTION KML_Comment::KML_Comment(){{{*/
+ KML_Comment::KML_Comment(){
+ 
+ 	value     =NULL;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Comment::~KML_Comment(){{{1*/
++/*FUNCTION KML_Comment::~KML_Comment(){{{*/
+ KML_Comment::~KML_Comment(){
+ 
+ 	if (value     ) xfree((void**)&value);
+@@ -36,7 +36,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Comment::Echo {{{1*/
++/*FUNCTION KML_Comment::Echo {{{*/
+ void  KML_Comment::Echo(){
+ 
+ 	bool  flag=true;
+@@ -47,7 +47,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Comment::DeepEcho {{{1*/
++/*FUNCTION KML_Comment::DeepEcho {{{*/
+ void  KML_Comment::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -57,7 +57,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Comment::DeepEcho {{{1*/
++/*FUNCTION KML_Comment::DeepEcho {{{*/
+ void  KML_Comment::DeepEcho(const char* indent){
+ 
+ 	bool  flag=true;
+@@ -68,7 +68,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Comment::Write {{{1*/
++/*FUNCTION KML_Comment::Write {{{*/
+ void  KML_Comment::Write(FILE* filout,const char* indent){
+ 
+ 	if (strncmp(&value[0]              ,"<!--",4))
+@@ -80,7 +80,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Comment::Read {{{1*/
++/*FUNCTION KML_Comment::Read {{{*/
+ void  KML_Comment::Read(FILE* fid,char* kstr){
+ 
+ //  comments always read as part of KMLFileToken
+@@ -90,7 +90,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Comment::Alloc {{{1*/
++/*FUNCTION KML_Comment::Alloc {{{*/
+ void  KML_Comment::Alloc(const char* valuei){
+ 
+ 	value=(char *) xmalloc((strlen(valuei)+1)*sizeof(char));
+@@ -99,7 +99,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Comment::Add {{{1*/
++/*FUNCTION KML_Comment::Add {{{*/
+ void  KML_Comment::Add(DataSet* commnt){
+ 
+ 	commnt->AddObject((Object*)this);
+@@ -107,7 +107,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Comment::Get {{{1*/
++/*FUNCTION KML_Comment::Get {{{*/
+ void  KML_Comment::Get(char** pvalueo){
+ 
+ 	*pvalueo=(char *) xmalloc((strlen(value)+1)*sizeof(char));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_MultiGeometry::KML_MultiGeometry(){{{1*/
++/*FUNCTION KML_MultiGeometry::KML_MultiGeometry(){{{*/
+ KML_MultiGeometry::KML_MultiGeometry(){
+ 
+ 	geometry  =new DataSet;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_MultiGeometry::~KML_MultiGeometry(){{{1*/
++/*FUNCTION KML_MultiGeometry::~KML_MultiGeometry(){{{*/
+ KML_MultiGeometry::~KML_MultiGeometry(){
+ 
+ 	if (geometry) {
+@@ -39,7 +39,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_MultiGeometry::Echo {{{1*/
++/*FUNCTION KML_MultiGeometry::Echo {{{*/
+ void  KML_MultiGeometry::Echo(){
+ 
+ 	bool  flag=true;
+@@ -53,7 +53,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_MultiGeometry::DeepEcho {{{1*/
++/*FUNCTION KML_MultiGeometry::DeepEcho {{{*/
+ void  KML_MultiGeometry::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -64,7 +64,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_MultiGeometry::DeepEcho {{{1*/
++/*FUNCTION KML_MultiGeometry::DeepEcho {{{*/
+ void  KML_MultiGeometry::DeepEcho(const char* indent){
+ 
+ 	int   i;
+@@ -92,7 +92,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_MultiGeometry::Write {{{1*/
++/*FUNCTION KML_MultiGeometry::Write {{{*/
+ void  KML_MultiGeometry::Write(FILE* filout,const char* indent){
+ 
+ 	int   i;
+@@ -120,7 +120,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_MultiGeometry::Read {{{1*/
++/*FUNCTION KML_MultiGeometry::Read {{{*/
+ void  KML_MultiGeometry::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+@@ -193,7 +193,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_MultiGeometry::WriteExp {{{1*/
++/*FUNCTION KML_MultiGeometry::WriteExp {{{*/
+ void  KML_MultiGeometry::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){
+ 
+ 	int   i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_StyleSelector.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_StyleSelector.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_StyleSelector.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_STYLESELECTOR_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -18,11 +18,11 @@
+ 
+ 	public:
+ 
+-		/*KML_StyleSelector constructors, destructors {{{1*/
++		/*KML_StyleSelector constructors, destructors {{{*/
+ 		KML_StyleSelector();
+ 		~KML_StyleSelector();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_LATLONBOX_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -24,11 +24,11 @@
+ 		double west;
+ 		double rotation;
+ 
+-		/*KML_LatLonBox constructors, destructors {{{1*/
++		/*KML_LatLonBox constructors, destructors {{{*/
+ 		KML_LatLonBox();
+ 		~KML_LatLonBox();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #ifndef _KML_ATTRIBUTE_H_
+ #define _KML_ATTRIBUTE_H_
+ 
+-/*Headers:{{{1*/
++/*Headers:{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -21,11 +21,11 @@
+ 		char* name;
+ 		char* value;
+ 
+-		/*KML_Attribute constructors, destructors {{{1*/
++		/*KML_Attribute constructors, destructors {{{*/
+ 		KML_Attribute();
+ 		~KML_Attribute();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		virtual void  Echo();
+ 		virtual void  DeepEcho();
+ 		virtual void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_LineStyle::KML_LineStyle(){{{1*/
++/*FUNCTION KML_LineStyle::KML_LineStyle(){{{*/
+ KML_LineStyle::KML_LineStyle(){
+ 
+ 	width     =1.;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_LineStyle::~KML_LineStyle(){{{1*/
++/*FUNCTION KML_LineStyle::~KML_LineStyle(){{{*/
+ KML_LineStyle::~KML_LineStyle(){
+ 
+ 	;
+@@ -36,7 +36,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_LineStyle::Echo {{{1*/
++/*FUNCTION KML_LineStyle::Echo {{{*/
+ void  KML_LineStyle::Echo(){
+ 
+ 	bool  flag=true;
+@@ -50,7 +50,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_LineStyle::DeepEcho {{{1*/
++/*FUNCTION KML_LineStyle::DeepEcho {{{*/
+ void  KML_LineStyle::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -61,7 +61,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_LineStyle::DeepEcho {{{1*/
++/*FUNCTION KML_LineStyle::DeepEcho {{{*/
+ void  KML_LineStyle::DeepEcho(const char* indent){
+ 
+ 	int   i;
+@@ -76,7 +76,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_LineStyle::Write {{{1*/
++/*FUNCTION KML_LineStyle::Write {{{*/
+ void  KML_LineStyle::Write(FILE* filout,const char* indent){
+ 
+ 	fprintf(filout,"%s<LineStyle",indent);
+@@ -94,7 +94,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_LineStyle::Read {{{1*/
++/*FUNCTION KML_LineStyle::Read {{{*/
+ void  KML_LineStyle::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_POLYSTYLE_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -21,11 +21,11 @@
+ 		int   fill;
+ 		int   outline;
+ 
+-		/*KML_PolyStyle constructors, destructors {{{1*/
++		/*KML_PolyStyle constructors, destructors {{{*/
+ 		KML_PolyStyle();
+ 		~KML_PolyStyle();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #ifndef _KML_OBJECT_H_
+ #define _KML_OBJECT_H_
+ 
+-/*Headers:{{{1*/
++/*Headers:{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -22,11 +22,11 @@
+ 		DataSet* commnt;
+ 		DataSet* kmlobj;
+ 
+-		/*KML_Object constructors, destructors {{{1*/
++		/*KML_Object constructors, destructors {{{*/
+ 		KML_Object();
+ 		~KML_Object();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		virtual void  Echo();
+ 		virtual void  DeepEcho();
+ 		virtual void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Folder::KML_Folder(){{{1*/
++/*FUNCTION KML_Folder::KML_Folder(){{{*/
+ KML_Folder::KML_Folder(){
+ 
+ 	;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Folder::~KML_Folder(){{{1*/
++/*FUNCTION KML_Folder::~KML_Folder(){{{*/
+ KML_Folder::~KML_Folder(){
+ 
+ 	;
+@@ -36,7 +36,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Folder::Echo {{{1*/
++/*FUNCTION KML_Folder::Echo {{{*/
+ void  KML_Folder::Echo(){
+ 
+ 	bool  flag=true;
+@@ -48,7 +48,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Folder::DeepEcho {{{1*/
++/*FUNCTION KML_Folder::DeepEcho {{{*/
+ void  KML_Folder::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -59,7 +59,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Folder::DeepEcho {{{1*/
++/*FUNCTION KML_Folder::DeepEcho {{{*/
+ void  KML_Folder::DeepEcho(const char* indent){
+ 
+ 	bool  flag=true;
+@@ -71,7 +71,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Folder::Write {{{1*/
++/*FUNCTION KML_Folder::Write {{{*/
+ void  KML_Folder::Write(FILE* filout,const char* indent){
+ 
+ 	fprintf(filout,"%s<Folder",indent);
+@@ -87,7 +87,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Folder::Read {{{1*/
++/*FUNCTION KML_Folder::Read {{{*/
+ void  KML_Folder::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Document::KML_Document(){{{1*/
++/*FUNCTION KML_Document::KML_Document(){{{*/
+ KML_Document::KML_Document(){
+ 
+ 	;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Document::~KML_Document(){{{1*/
++/*FUNCTION KML_Document::~KML_Document(){{{*/
+ KML_Document::~KML_Document(){
+ 
+ 	;
+@@ -36,7 +36,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Document::Echo {{{1*/
++/*FUNCTION KML_Document::Echo {{{*/
+ void  KML_Document::Echo(){
+ 
+ 	bool  flag=true;
+@@ -48,7 +48,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Document::DeepEcho {{{1*/
++/*FUNCTION KML_Document::DeepEcho {{{*/
+ void  KML_Document::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -59,7 +59,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Document::DeepEcho {{{1*/
++/*FUNCTION KML_Document::DeepEcho {{{*/
+ void  KML_Document::DeepEcho(const char* indent){
+ 
+ 	bool  flag=true;
+@@ -71,7 +71,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Document::Write {{{1*/
++/*FUNCTION KML_Document::Write {{{*/
+ void  KML_Document::Write(FILE* filout,const char* indent){
+ 
+ 	fprintf(filout,"%s<Document",indent);
+@@ -87,7 +87,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Document::Read {{{1*/
++/*FUNCTION KML_Document::Read {{{*/
+ void  KML_Document::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_SubStyle.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_SubStyle.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_SubStyle.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_SUBSTYLE_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -18,11 +18,11 @@
+ 
+ 	public:
+ 
+-		/*KML_SubStyle constructors, destructors {{{1*/
++		/*KML_SubStyle constructors, destructors {{{*/
+ 		KML_SubStyle();
+ 		~KML_SubStyle();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_File::KML_File(){{{1*/
++/*FUNCTION KML_File::KML_File(){{{*/
+ KML_File::KML_File(){
+ 
+ 	;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_File::~KML_File(){{{1*/
++/*FUNCTION KML_File::~KML_File(){{{*/
+ KML_File::~KML_File(){
+ 
+ 	;
+@@ -36,7 +36,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_File::Echo {{{1*/
++/*FUNCTION KML_File::Echo {{{*/
+ void  KML_File::Echo(){
+ 
+ 	bool  flag=true;
+@@ -47,7 +47,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_File::DeepEcho {{{1*/
++/*FUNCTION KML_File::DeepEcho {{{*/
+ void  KML_File::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -57,7 +57,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_File::DeepEcho {{{1*/
++/*FUNCTION KML_File::DeepEcho {{{*/
+ void  KML_File::DeepEcho(const char* indent){
+ 
+ 	bool  flag=true;
+@@ -68,7 +68,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_File::Write {{{1*/
++/*FUNCTION KML_File::Write {{{*/
+ void  KML_File::Write(FILE* filout,const char* indent){
+ 
+ 	fprintf(filout,"%s<kml",indent);
+@@ -83,7 +83,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_File::Read {{{1*/
++/*FUNCTION KML_File::Read {{{*/
+ void  KML_File::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+@@ -125,7 +125,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_File::WriteExp {{{1*/
++/*FUNCTION KML_File::WriteExp {{{*/
+ void  KML_File::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){
+ 
+ 	int   i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.h	(revision 12365)
+@@ -8,7 +8,7 @@
+ #define KML_LINESTRING_ALTMODE_LENGTH    18
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -26,11 +26,11 @@
+         int   ncoord;
+ 		double (*coords)[3];
+ 
+-		/*KML_LineString constructors, destructors {{{1*/
++		/*KML_LineString constructors, destructors {{{*/
+ 		KML_LineString();
+ 		~KML_LineString();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.h	(revision 12365)
+@@ -8,7 +8,7 @@
+ #define KML_OVERLAY_COLOR_LENGTH  8
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -25,11 +25,11 @@
+ 		int   draword;
+ 		KML_Icon* icon;
+ 
+-		/*KML_Overlay constructors, destructors {{{1*/
++		/*KML_Overlay constructors, destructors {{{*/
+ 		KML_Overlay();
+ 		~KML_Overlay();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_CONTAINER_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -21,11 +21,11 @@
+ 
+ 		DataSet* feature;
+ 
+-		/*KML_Container constructors, destructors {{{1*/
++		/*KML_Container constructors, destructors {{{*/
+ 		KML_Container();
+ 		~KML_Container();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Icon::KML_Icon(){{{1*/
++/*FUNCTION KML_Icon::KML_Icon(){{{*/
+ KML_Icon::KML_Icon(){
+ 
+ 	strcpy(href      ,"");
+@@ -34,7 +34,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Icon::~KML_Icon(){{{1*/
++/*FUNCTION KML_Icon::~KML_Icon(){{{*/
+ KML_Icon::~KML_Icon(){
+ 
+ 	;
+@@ -43,7 +43,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Icon::Echo {{{1*/
++/*FUNCTION KML_Icon::Echo {{{*/
+ void  KML_Icon::Echo(){
+ 
+ 	bool  flag=true;
+@@ -64,7 +64,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Icon::DeepEcho {{{1*/
++/*FUNCTION KML_Icon::DeepEcho {{{*/
+ void  KML_Icon::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -75,7 +75,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Icon::DeepEcho {{{1*/
++/*FUNCTION KML_Icon::DeepEcho {{{*/
+ void  KML_Icon::DeepEcho(const char* indent){
+ 
+ 	bool  flag=true;
+@@ -96,7 +96,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Icon::Write {{{1*/
++/*FUNCTION KML_Icon::Write {{{*/
+ void  KML_Icon::Write(FILE* filout,const char* indent){
+ 
+ 	fprintf(filout,"%s<Icon",indent);
+@@ -126,7 +126,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Icon::Read {{{1*/
++/*FUNCTION KML_Icon::Read {{{*/
+ void  KML_Icon::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -21,7 +21,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Point::KML_Point(){{{1*/
++/*FUNCTION KML_Point::KML_Point(){{{*/
+ KML_Point::KML_Point(){
+ 
+ 	extrude   =false;
+@@ -33,7 +33,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Point::~KML_Point(){{{1*/
++/*FUNCTION KML_Point::~KML_Point(){{{*/
+ KML_Point::~KML_Point(){
+ 
+ 	;
+@@ -42,7 +42,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Point::Echo {{{1*/
++/*FUNCTION KML_Point::Echo {{{*/
+ void  KML_Point::Echo(){
+ 
+ 	bool  flag=true;
+@@ -57,7 +57,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Point::DeepEcho {{{1*/
++/*FUNCTION KML_Point::DeepEcho {{{*/
+ void  KML_Point::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -67,7 +67,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Point::DeepEcho {{{1*/
++/*FUNCTION KML_Point::DeepEcho {{{*/
+ void  KML_Point::DeepEcho(const char* indent){
+ 
+ 	bool  flag=true;
+@@ -82,7 +82,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Point::Write {{{1*/
++/*FUNCTION KML_Point::Write {{{*/
+ void  KML_Point::Write(FILE* filout,const char* indent){
+ 
+ 	fprintf(filout,"%s<Point",indent);
+@@ -102,7 +102,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Point::Read {{{1*/
++/*FUNCTION KML_Point::Read {{{*/
+ void  KML_Point::Read(FILE* fid,char* kstr){
+ 
+ 	double*      pcoords=&coords[0];
+@@ -157,7 +157,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Point::WriteExp {{{1*/
++/*FUNCTION KML_Point::WriteExp {{{*/
+ void  KML_Point::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){
+ 
+ 	int     i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -21,7 +21,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_LinearRing::KML_LinearRing(){{{1*/
++/*FUNCTION KML_LinearRing::KML_LinearRing(){{{*/
+ KML_LinearRing::KML_LinearRing(){
+ 
+ 	extrude   =false;
+@@ -33,7 +33,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_LinearRing::~KML_LinearRing(){{{1*/
++/*FUNCTION KML_LinearRing::~KML_LinearRing(){{{*/
+ KML_LinearRing::~KML_LinearRing(){
+ 
+ 	if (coords) xfree((void**)&coords);
+@@ -45,7 +45,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_LinearRing::Echo {{{1*/
++/*FUNCTION KML_LinearRing::Echo {{{*/
+ void  KML_LinearRing::Echo(){
+ 
+ 	bool  flag=true;
+@@ -62,7 +62,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_LinearRing::DeepEcho {{{1*/
++/*FUNCTION KML_LinearRing::DeepEcho {{{*/
+ void  KML_LinearRing::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -73,7 +73,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_LinearRing::DeepEcho {{{1*/
++/*FUNCTION KML_LinearRing::DeepEcho {{{*/
+ void  KML_LinearRing::DeepEcho(const char* indent){
+ 
+ 	int   i;
+@@ -94,7 +94,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_LinearRing::Write {{{1*/
++/*FUNCTION KML_LinearRing::Write {{{*/
+ void  KML_LinearRing::Write(FILE* filout,const char* indent){
+ 
+ 	int   i;
+@@ -124,7 +124,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_LinearRing::Read {{{1*/
++/*FUNCTION KML_LinearRing::Read {{{*/
+ void  KML_LinearRing::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+@@ -183,7 +183,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_LinearRing::WriteExp {{{1*/
++/*FUNCTION KML_LinearRing::WriteExp {{{*/
+ void  KML_LinearRing::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){
+ 
+ 	int     i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Feature::KML_Feature(){{{1*/
++/*FUNCTION KML_Feature::KML_Feature(){{{*/
+ KML_Feature::KML_Feature(){
+ 
+ 	memcpy(name,"",(strlen("")+1)*sizeof(char));
+@@ -34,7 +34,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Feature::~KML_Feature(){{{1*/
++/*FUNCTION KML_Feature::~KML_Feature(){{{*/
+ KML_Feature::~KML_Feature(){
+ 
+ 	if (style) {
+@@ -46,7 +46,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Feature::Echo {{{1*/
++/*FUNCTION KML_Feature::Echo {{{*/
+ void  KML_Feature::Echo(){
+ 
+ 	bool  flag=true;
+@@ -65,7 +65,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Feature::DeepEcho {{{1*/
++/*FUNCTION KML_Feature::DeepEcho {{{*/
+ void  KML_Feature::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -76,7 +76,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Feature::DeepEcho {{{1*/
++/*FUNCTION KML_Feature::DeepEcho {{{*/
+ void  KML_Feature::DeepEcho(const char* indent){
+ 
+ 	int   i;
+@@ -110,7 +110,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Feature::Write {{{1*/
++/*FUNCTION KML_Feature::Write {{{*/
+ void  KML_Feature::Write(FILE* filout,const char* indent){
+ 
+ 	int   i;
+@@ -142,7 +142,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Feature::Read {{{1*/
++/*FUNCTION KML_Feature::Read {{{*/
+ void  KML_Feature::Read(FILE* fid,char* kstr){
+ 
+ 	KML_Object*  kobj;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.h	(revision 12365)
+@@ -8,7 +8,7 @@
+ #define KML_POLYGON_ALTMODE_LENGTH    18
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -28,11 +28,11 @@
+ 		DataSet* outer;
+ 		DataSet* inner;
+ 
+-		/*KML_Polygon constructors, destructors {{{1*/
++		/*KML_Polygon constructors, destructors {{{*/
+ 		KML_Polygon();
+ 		~KML_Polygon();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -19,7 +19,7 @@
+ #include "../../include/include.h"
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileToken(FILE* fid,int* pncom=NULL,char*** ppcom=NULL) {{{1*/
++/*FUNCTION  KMLFileToken(FILE* fid,int* pncom=NULL,char*** ppcom=NULL) {{{*/
+ char* KMLFileToken(FILE* fid,
+ 				   int* pncom=NULL,char*** ppcom=NULL){
+ 
+@@ -138,7 +138,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTokenComment(FILE* fid) {{{1*/
++/*FUNCTION  KMLFileTokenComment(FILE* fid) {{{*/
+ char* KMLFileTokenComment(FILE* fid){
+ 
+ /*  check for comment in the file and read it  */
+@@ -203,7 +203,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTokenBuffer {{{1*/
++/*FUNCTION  KMLFileTokenBuffer {{{*/
+ void KMLFileTokenBuffer(char** pbuffer,int* pibuf,int* pbuflen,
+ 						int c,
+ 						int bufblk){
+@@ -228,7 +228,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTagName {{{1*/
++/*FUNCTION  KMLFileTagName {{{*/
+ char* KMLFileTagName(char* pname,
+ 					 char* ktag){
+ 
+@@ -237,7 +237,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTagName {{{1*/
++/*FUNCTION  KMLFileTagName {{{*/
+ char* KMLFileTagName(char* pname,int *m,int maxlen,
+ 					 char* ktag){
+ 
+@@ -283,7 +283,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTagAttrib {{{1*/
++/*FUNCTION  KMLFileTagAttrib {{{*/
+ int KMLFileTagAttrib(KML_Object* kobj,
+ 					 char* ktag){
+ 
+@@ -333,7 +333,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTokenParse {{{1*/
++/*FUNCTION  KMLFileTokenParse {{{*/
+ int KMLFileTokenParse(int* pival,
+ 					  char* ktag,
+ 					  FILE* fid){
+@@ -368,7 +368,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTokenParse {{{1*/
++/*FUNCTION  KMLFileTokenParse {{{*/
+ int KMLFileTokenParse(bool* pbval,
+ 					  char* ktag,
+ 					  FILE* fid){
+@@ -405,7 +405,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTokenParse {{{1*/
++/*FUNCTION  KMLFileTokenParse {{{*/
+ char* KMLFileTokenParse(char* pstr,
+ 						char* ktag,
+ 						FILE* fid){
+@@ -416,7 +416,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTokenParse {{{1*/
++/*FUNCTION  KMLFileTokenParse {{{*/
+ char* KMLFileTokenParse(char* pstr,int *m,int maxlen,
+ 						char* ktag,
+ 						FILE* fid){
+@@ -468,7 +468,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTokenParse {{{1*/
++/*FUNCTION  KMLFileTokenParse {{{*/
+ int KMLFileTokenParse(float* pfval,
+ 					  char* ktag,
+ 					  FILE* fid){
+@@ -503,7 +503,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTokenParse {{{1*/
++/*FUNCTION  KMLFileTokenParse {{{*/
+ int KMLFileTokenParse(double* pdval,
+ 					  char* ktag,
+ 					  FILE* fid){
+@@ -538,7 +538,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTokenParse {{{1*/
++/*FUNCTION  KMLFileTokenParse {{{*/
+ int KMLFileTokenParse(double **pdval,int* m,int maxlen,
+ 					  char* ktag,
+ 					  FILE* fid){
+@@ -599,7 +599,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTokenParse {{{1*/
++/*FUNCTION  KMLFileTokenParse {{{*/
+ int KMLFileTokenParse(double (**pdval3)[3],int* m,int maxlen,
+ 					  char* ktag,
+ 					  FILE* fid){
+@@ -667,7 +667,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION  KMLFileTagSkip {{{1*/
++/*FUNCTION  KMLFileTagSkip {{{*/
+ int KMLFileTagSkip(char* ktag,
+ 				   FILE* fid){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Geometry.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Geometry.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Geometry.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_GEOMETRY_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -18,11 +18,11 @@
+ 
+ 	public:
+ 
+-		/*KML_Geometry constructors, destructors {{{1*/
++		/*KML_Geometry constructors, destructors {{{*/
+ 		KML_Geometry();
+ 		~KML_Geometry();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_StyleSelector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_StyleSelector.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_StyleSelector.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -19,14 +19,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_StyleSelector::KML_StyleSelector(){{{1*/
++/*FUNCTION KML_StyleSelector::KML_StyleSelector(){{{*/
+ KML_StyleSelector::KML_StyleSelector(){
+ 
+ 	;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_StyleSelector::~KML_StyleSelector(){{{1*/
++/*FUNCTION KML_StyleSelector::~KML_StyleSelector(){{{*/
+ KML_StyleSelector::~KML_StyleSelector(){
+ 
+ 	;
+@@ -35,7 +35,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_StyleSelector::Echo {{{1*/
++/*FUNCTION KML_StyleSelector::Echo {{{*/
+ void  KML_StyleSelector::Echo(){
+ 
+ 	KML_Object::Echo();
+@@ -44,7 +44,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_StyleSelector::DeepEcho {{{1*/
++/*FUNCTION KML_StyleSelector::DeepEcho {{{*/
+ void  KML_StyleSelector::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -55,7 +55,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_StyleSelector::DeepEcho {{{1*/
++/*FUNCTION KML_StyleSelector::DeepEcho {{{*/
+ void  KML_StyleSelector::DeepEcho(const char* indent){
+ 
+ 	KML_Object::DeepEcho(indent);
+@@ -64,7 +64,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_StyleSelector::Write {{{1*/
++/*FUNCTION KML_StyleSelector::Write {{{*/
+ void  KML_StyleSelector::Write(FILE* filout,const char* indent){
+ 
+ 	KML_Object::Write(filout,indent);
+@@ -73,7 +73,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_StyleSelector::Read {{{1*/
++/*FUNCTION KML_StyleSelector::Read {{{*/
+ void  KML_StyleSelector::Read(FILE* fid,char* kstr){
+ 
+ /*  process field within opening and closing tags  */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_LatLonBox::KML_LatLonBox(){{{1*/
++/*FUNCTION KML_LatLonBox::KML_LatLonBox(){{{*/
+ KML_LatLonBox::KML_LatLonBox(){
+ 
+ 	north     = 0.;
+@@ -31,7 +31,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_LatLonBox::~KML_LatLonBox(){{{1*/
++/*FUNCTION KML_LatLonBox::~KML_LatLonBox(){{{*/
+ KML_LatLonBox::~KML_LatLonBox(){
+ 
+ 	;
+@@ -40,7 +40,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_LatLonBox::Echo {{{1*/
++/*FUNCTION KML_LatLonBox::Echo {{{*/
+ void  KML_LatLonBox::Echo(){
+ 
+ 	bool  flag=true;
+@@ -58,7 +58,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_LatLonBox::DeepEcho {{{1*/
++/*FUNCTION KML_LatLonBox::DeepEcho {{{*/
+ void  KML_LatLonBox::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -69,7 +69,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_LatLonBox::DeepEcho {{{1*/
++/*FUNCTION KML_LatLonBox::DeepEcho {{{*/
+ void  KML_LatLonBox::DeepEcho(const char* indent){
+ 
+ 	bool  flag=true;
+@@ -87,7 +87,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_LatLonBox::Write {{{1*/
++/*FUNCTION KML_LatLonBox::Write {{{*/
+ void  KML_LatLonBox::Write(FILE* filout,const char* indent){
+ 
+ 	fprintf(filout,"%s<LatLonBox",indent);
+@@ -109,7 +109,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_LatLonBox::Read {{{1*/
++/*FUNCTION KML_LatLonBox::Read {{{*/
+ void  KML_LatLonBox::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Attribute::KML_Attribute(){{{1*/
++/*FUNCTION KML_Attribute::KML_Attribute(){{{*/
+ KML_Attribute::KML_Attribute(){
+ 
+ 	name      =NULL;
+@@ -28,7 +28,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Attribute::~KML_Attribute(){{{1*/
++/*FUNCTION KML_Attribute::~KML_Attribute(){{{*/
+ KML_Attribute::~KML_Attribute(){
+ 
+ 	if (name      ) xfree((void**)&name);
+@@ -38,7 +38,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Attribute::Echo {{{1*/
++/*FUNCTION KML_Attribute::Echo {{{*/
+ void  KML_Attribute::Echo(){
+ 
+ 	int   i;
+@@ -52,7 +52,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Attribute::DeepEcho {{{1*/
++/*FUNCTION KML_Attribute::DeepEcho {{{*/
+ void  KML_Attribute::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -62,7 +62,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Attribute::DeepEcho {{{1*/
++/*FUNCTION KML_Attribute::DeepEcho {{{*/
+ void  KML_Attribute::DeepEcho(const char* indent){
+ 
+ 	int   i;
+@@ -76,7 +76,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Attribute::Write {{{1*/
++/*FUNCTION KML_Attribute::Write {{{*/
+ void  KML_Attribute::Write(FILE* filout,const char* indent){
+ 
+ //  attributes always written in keyword line of kml_object
+@@ -86,7 +86,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Attribute::Read {{{1*/
++/*FUNCTION KML_Attribute::Read {{{*/
+ void  KML_Attribute::Read(FILE* fid,char* kstr){
+ 
+ //  attributes always read in keyword line of kml_object
+@@ -96,7 +96,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Attribute::Alloc {{{1*/
++/*FUNCTION KML_Attribute::Alloc {{{*/
+ void  KML_Attribute::Alloc(const char* namei,const char* valuei){
+ 
+ 	name =(char *) xmalloc((strlen(namei )+1)*sizeof(char));
+@@ -108,7 +108,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Attribute::Add {{{1*/
++/*FUNCTION KML_Attribute::Add {{{*/
+ void  KML_Attribute::Add(DataSet* attrib){
+ 
+ 	attrib->AddObject((Object*)this);
+@@ -116,7 +116,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Attribute::Get {{{1*/
++/*FUNCTION KML_Attribute::Get {{{*/
+ void  KML_Attribute::Get(char** pvalueo,char* deflt){
+ 
+ 	if (!value || !strlen(value)) {
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.h	(revision 12365)
+@@ -9,7 +9,7 @@
+ #define KML_COLORSTYLE_COLORMODE_LENGTH  6
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -24,11 +24,11 @@
+ 		char  color[KML_COLORSTYLE_COLOR_LENGTH+1];
+ 		char  colormode[KML_COLORSTYLE_COLORMODE_LENGTH+1];
+ 
+-		/*KML_ColorStyle constructors, destructors {{{1*/
++		/*KML_ColorStyle constructors, destructors {{{*/
+ 		KML_ColorStyle();
+ 		~KML_ColorStyle();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_PLACEMARK_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -22,11 +22,11 @@
+ 
+ 		DataSet* geometry;
+ 
+-		/*KML_Placemark constructors, destructors {{{1*/
++		/*KML_Placemark constructors, destructors {{{*/
+ 		KML_Placemark();
+ 		~KML_Placemark();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_PolyStyle::KML_PolyStyle(){{{1*/
++/*FUNCTION KML_PolyStyle::KML_PolyStyle(){{{*/
+ KML_PolyStyle::KML_PolyStyle(){
+ 
+ 	fill      =true;
+@@ -28,7 +28,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_PolyStyle::~KML_PolyStyle(){{{1*/
++/*FUNCTION KML_PolyStyle::~KML_PolyStyle(){{{*/
+ KML_PolyStyle::~KML_PolyStyle(){
+ 
+ 	;
+@@ -37,7 +37,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_PolyStyle::Echo {{{1*/
++/*FUNCTION KML_PolyStyle::Echo {{{*/
+ void  KML_PolyStyle::Echo(){
+ 
+ 	bool  flag=true;
+@@ -52,7 +52,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_PolyStyle::DeepEcho {{{1*/
++/*FUNCTION KML_PolyStyle::DeepEcho {{{*/
+ void  KML_PolyStyle::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -63,7 +63,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_PolyStyle::DeepEcho {{{1*/
++/*FUNCTION KML_PolyStyle::DeepEcho {{{*/
+ void  KML_PolyStyle::DeepEcho(const char* indent){
+ 
+ 	int   i;
+@@ -79,7 +79,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_PolyStyle::Write {{{1*/
++/*FUNCTION KML_PolyStyle::Write {{{*/
+ void  KML_PolyStyle::Write(FILE* filout,const char* indent){
+ 
+ 	fprintf(filout,"%s<PolyStyle",indent);
+@@ -98,7 +98,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_PolyStyle::Read {{{1*/
++/*FUNCTION KML_PolyStyle::Read {{{*/
+ void  KML_PolyStyle::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_UNKNOWN_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -21,11 +21,11 @@
+ 		char* name;
+ 		char* value;
+ 
+-		/*KML_Unknown constructors, destructors {{{1*/
++		/*KML_Unknown constructors, destructors {{{*/
+ 		KML_Unknown();
+ 		~KML_Unknown();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.h	(revision 12365)
+@@ -8,7 +8,7 @@
+ #define KML_GROUNDOVERLAY_ALTMODE_LENGTH    18
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -25,11 +25,11 @@
+ 		char  altmode[KML_GROUNDOVERLAY_ALTMODE_LENGTH+1];
+ 		KML_LatLonBox* llbox;
+ 
+-		/*KML_GroundOverlay constructors, destructors {{{1*/
++		/*KML_GroundOverlay constructors, destructors {{{*/
+ 		KML_GroundOverlay();
+ 		~KML_GroundOverlay();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_STYLE_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -27,11 +27,11 @@
+ 		void* balloon;
+ 		void* list;
+ 
+-		/*KML_Style constructors, destructors {{{1*/
++		/*KML_Style constructors, destructors {{{*/
+ 		KML_Style();
+ 		~KML_Style();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Object::KML_Object(){{{1*/
++/*FUNCTION KML_Object::KML_Object(){{{*/
+ KML_Object::KML_Object(){
+ 
+ 	attrib    =new DataSet;
+@@ -29,7 +29,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Object::~KML_Object(){{{1*/
++/*FUNCTION KML_Object::~KML_Object(){{{*/
+ KML_Object::~KML_Object(){
+ 
+ 	if (attrib) {
+@@ -49,7 +49,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Object::Echo {{{1*/
++/*FUNCTION KML_Object::Echo {{{*/
+ void  KML_Object::Echo(){
+ 
+ 	bool  flag=true;
+@@ -61,7 +61,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Object::DeepEcho {{{1*/
++/*FUNCTION KML_Object::DeepEcho {{{*/
+ void  KML_Object::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -71,7 +71,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Object::DeepEcho {{{1*/
++/*FUNCTION KML_Object::DeepEcho {{{*/
+ void  KML_Object::DeepEcho(const char* indent){
+ 
+ 	int   i;
+@@ -113,7 +113,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Object::Write {{{1*/
++/*FUNCTION KML_Object::Write {{{*/
+ void  KML_Object::Write(FILE* filout,const char* indent){
+ 
+ 	int   i;
+@@ -135,7 +135,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Object::Read {{{1*/
++/*FUNCTION KML_Object::Read {{{*/
+ void  KML_Object::Read(FILE* fid,char* kstr){
+ 
+ 	KML_Object*  kobj;
+@@ -263,7 +263,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Object::WriteExp {{{1*/
++/*FUNCTION KML_Object::WriteExp {{{*/
+ void  KML_Object::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){
+ 
+ 	;
+@@ -271,7 +271,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Object::AddAttrib {{{1*/
++/*FUNCTION KML_Object::AddAttrib {{{*/
+ void  KML_Object::AddAttrib(const char* name,const char* value){
+ 
+ 	KML_Attribute* katt=NULL;
+@@ -283,7 +283,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Object::FindAttrib {{{1*/
++/*FUNCTION KML_Object::FindAttrib {{{*/
+ void  KML_Object::FindAttrib(char** pvalue,char* name,char* deflt){
+ 
+ 	int   i;
+@@ -310,7 +310,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Object::WriteAttrib {{{1*/
++/*FUNCTION KML_Object::WriteAttrib {{{*/
+ void  KML_Object::WriteAttrib(FILE* filout,const char* indent){
+ 
+ //  attributes always written in keyword line of kml_object
+@@ -324,7 +324,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Object::AddCommnt {{{1*/
++/*FUNCTION KML_Object::AddCommnt {{{*/
+ void  KML_Object::AddCommnt(int ncom,char** pcom){
+ 
+ 	int   i;
+@@ -339,7 +339,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Object::AddCommnt {{{1*/
++/*FUNCTION KML_Object::AddCommnt {{{*/
+ void  KML_Object::AddCommnt(char* value){
+ 
+ 	KML_Comment* kcom=NULL;
+@@ -351,7 +351,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Object::FindCommnt {{{1*/
++/*FUNCTION KML_Object::FindCommnt {{{*/
+ void  KML_Object::FindCommnt(char** pvalue,int inum){
+ 
+ 	KML_Comment* kcom=NULL;
+@@ -369,7 +369,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Object::WriteCommnt {{{1*/
++/*FUNCTION KML_Object::WriteCommnt {{{*/
+ void  KML_Object::WriteCommnt(FILE* filout,const char* indent){
+ 
+ 	int   i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #ifndef _KML_COMMENT_H_
+ #define _KML_COMMENT_H_
+ 
+-/*Headers:{{{1*/
++/*Headers:{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -21,11 +21,11 @@
+ 		char* name;
+ 		char* value;
+ 
+-		/*KML_Comment constructors, destructors {{{1*/
++		/*KML_Comment constructors, destructors {{{*/
+ 		KML_Comment();
+ 		~KML_Comment();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		virtual void  Echo();
+ 		virtual void  DeepEcho();
+ 		virtual void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_SubStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_SubStyle.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_SubStyle.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -19,14 +19,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_SubStyle::KML_SubStyle(){{{1*/
++/*FUNCTION KML_SubStyle::KML_SubStyle(){{{*/
+ KML_SubStyle::KML_SubStyle(){
+ 
+ 	;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_SubStyle::~KML_SubStyle(){{{1*/
++/*FUNCTION KML_SubStyle::~KML_SubStyle(){{{*/
+ KML_SubStyle::~KML_SubStyle(){
+ 
+ 	;
+@@ -35,7 +35,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_SubStyle::Echo {{{1*/
++/*FUNCTION KML_SubStyle::Echo {{{*/
+ void  KML_SubStyle::Echo(){
+ 
+ 	KML_Object::Echo();
+@@ -44,7 +44,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_SubStyle::DeepEcho {{{1*/
++/*FUNCTION KML_SubStyle::DeepEcho {{{*/
+ void  KML_SubStyle::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -55,7 +55,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_SubStyle::DeepEcho {{{1*/
++/*FUNCTION KML_SubStyle::DeepEcho {{{*/
+ void  KML_SubStyle::DeepEcho(const char* indent){
+ 
+ 	KML_Object::DeepEcho(indent);
+@@ -64,7 +64,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_SubStyle::Write {{{1*/
++/*FUNCTION KML_SubStyle::Write {{{*/
+ void  KML_SubStyle::Write(FILE* filout,const char* indent){
+ 
+ 	KML_Object::Write(filout,indent);
+@@ -73,7 +73,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_SubStyle::Read {{{1*/
++/*FUNCTION KML_SubStyle::Read {{{*/
+ void  KML_SubStyle::Read(FILE* fid,char* kstr){
+ 
+ /*  process field within opening and closing tags  */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_MULTIGEOMETRY_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -22,11 +22,11 @@
+ 
+ 		DataSet* geometry;
+ 
+-		/*KML_MultiGeometry constructors, destructors {{{1*/
++		/*KML_MultiGeometry constructors, destructors {{{*/
+ 		KML_MultiGeometry();
+ 		~KML_MultiGeometry();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_LINESTYLE_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -20,11 +20,11 @@
+ 
+ 		float width;
+ 
+-		/*KML_LineStyle constructors, destructors {{{1*/
++		/*KML_LineStyle constructors, destructors {{{*/
+ 		KML_LineStyle();
+ 		~KML_LineStyle();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -21,7 +21,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_LineString::KML_LineString(){{{1*/
++/*FUNCTION KML_LineString::KML_LineString(){{{*/
+ KML_LineString::KML_LineString(){
+ 
+ 	extrude   =false;
+@@ -33,7 +33,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_LineString::~KML_LineString(){{{1*/
++/*FUNCTION KML_LineString::~KML_LineString(){{{*/
+ KML_LineString::~KML_LineString(){
+ 
+ 	if (coords) xfree((void**)&coords);
+@@ -45,7 +45,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_LineString::Echo {{{1*/
++/*FUNCTION KML_LineString::Echo {{{*/
+ void  KML_LineString::Echo(){
+ 
+ 	bool  flag=true;
+@@ -61,7 +61,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_LineString::DeepEcho {{{1*/
++/*FUNCTION KML_LineString::DeepEcho {{{*/
+ void  KML_LineString::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -71,7 +71,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_LineString::DeepEcho {{{1*/
++/*FUNCTION KML_LineString::DeepEcho {{{*/
+ void  KML_LineString::DeepEcho(const char* indent){
+ 
+ 	int   i;
+@@ -91,7 +91,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_LineString::Write {{{1*/
++/*FUNCTION KML_LineString::Write {{{*/
+ void  KML_LineString::Write(FILE* filout,const char* indent){
+ 
+ 	int   i;
+@@ -120,7 +120,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_LineString::Read {{{1*/
++/*FUNCTION KML_LineString::Read {{{*/
+ void  KML_LineString::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+@@ -178,7 +178,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_LineString::WriteExp {{{1*/
++/*FUNCTION KML_LineString::WriteExp {{{*/
+ void  KML_LineString::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){
+ 
+ 	int     i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_FOLDER_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -19,11 +19,11 @@
+ 
+ 	public:
+ 
+-		/*KML_Folder constructors, destructors {{{1*/
++		/*KML_Folder constructors, destructors {{{*/
+ 		KML_Folder();
+ 		~KML_Folder();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Overlay::KML_Overlay(){{{1*/
++/*FUNCTION KML_Overlay::KML_Overlay(){{{*/
+ KML_Overlay::KML_Overlay(){
+ 
+ 	strcpy(color     ,"ffffffff");
+@@ -31,7 +31,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Overlay::~KML_Overlay(){{{1*/
++/*FUNCTION KML_Overlay::~KML_Overlay(){{{*/
+ KML_Overlay::~KML_Overlay(){
+ 
+ 	if (icon) {
+@@ -43,7 +43,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Overlay::Echo {{{1*/
++/*FUNCTION KML_Overlay::Echo {{{*/
+ void  KML_Overlay::Echo(){
+ 
+ 	bool  flag=true;
+@@ -58,7 +58,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Overlay::DeepEcho {{{1*/
++/*FUNCTION KML_Overlay::DeepEcho {{{*/
+ void  KML_Overlay::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -69,7 +69,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Overlay::DeepEcho {{{1*/
++/*FUNCTION KML_Overlay::DeepEcho {{{*/
+ void  KML_Overlay::DeepEcho(const char* indent){
+ 
+ 	char  indent2[81];
+@@ -91,7 +91,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Overlay::Write {{{1*/
++/*FUNCTION KML_Overlay::Write {{{*/
+ void  KML_Overlay::Write(FILE* filout,const char* indent){
+ 
+ 	char  indent2[81];
+@@ -112,7 +112,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION KML_Overlay::Read {{{1*/
++/*FUNCTION KML_Overlay::Read {{{*/
+ void  KML_Overlay::Read(FILE* fid,char* kstr){
+ 
+ /*  process field within opening and closing tags  */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Container::KML_Container(){{{1*/
++/*FUNCTION KML_Container::KML_Container(){{{*/
+ KML_Container::KML_Container(){
+ 
+ 	feature   =new DataSet;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Container::~KML_Container(){{{1*/
++/*FUNCTION KML_Container::~KML_Container(){{{*/
+ KML_Container::~KML_Container(){
+ 
+ 	if (feature) {
+@@ -39,7 +39,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Container::Echo {{{1*/
++/*FUNCTION KML_Container::Echo {{{*/
+ void  KML_Container::Echo(){
+ 
+ 	bool  flag=true;
+@@ -51,7 +51,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Container::DeepEcho {{{1*/
++/*FUNCTION KML_Container::DeepEcho {{{*/
+ void  KML_Container::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -61,7 +61,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Container::DeepEcho {{{1*/
++/*FUNCTION KML_Container::DeepEcho {{{*/
+ void  KML_Container::DeepEcho(const char* indent){
+ 
+ 	int   i;
+@@ -87,7 +87,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Container::Write {{{1*/
++/*FUNCTION KML_Container::Write {{{*/
+ void  KML_Container::Write(FILE* filout,const char* indent){
+ 
+ 	int   i;
+@@ -107,7 +107,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Container::Read {{{1*/
++/*FUNCTION KML_Container::Read {{{*/
+ void  KML_Container::Read(FILE* fid,char* kstr){
+ 
+ 	KML_Object*  kobj;
+@@ -153,7 +153,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Container::WriteExp {{{1*/
++/*FUNCTION KML_Container::WriteExp {{{*/
+ void  KML_Container::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){
+ 
+ 	int   i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_DOCUMENT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -19,11 +19,11 @@
+ 
+ 	public:
+ 
+-		/*KML_Document constructors, destructors {{{1*/
++		/*KML_Document constructors, destructors {{{*/
+ 		KML_Document();
+ 		~KML_Document();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _KML_FILE_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -19,11 +19,11 @@
+ 
+ 	public:
+ 
+-		/*KML_File constructors, destructors {{{1*/
++		/*KML_File constructors, destructors {{{*/
+ 		KML_File();
+ 		~KML_File();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(const char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION KML_Polygon::KML_Polygon(){{{1*/
++/*FUNCTION KML_Polygon::KML_Polygon(){{{*/
+ KML_Polygon::KML_Polygon(){
+ 
+ 	extrude   =false;
+@@ -32,7 +32,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION KML_Polygon::~KML_Polygon(){{{1*/
++/*FUNCTION KML_Polygon::~KML_Polygon(){{{*/
+ KML_Polygon::~KML_Polygon(){
+ 
+ 	if (inner) {
+@@ -49,7 +49,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION KML_Polygon::Echo {{{1*/
++/*FUNCTION KML_Polygon::Echo {{{*/
+ void  KML_Polygon::Echo(){
+ 
+ 	bool  flag=true;
+@@ -66,7 +66,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Polygon::DeepEcho {{{1*/
++/*FUNCTION KML_Polygon::DeepEcho {{{*/
+ void  KML_Polygon::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -76,7 +76,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Polygon::DeepEcho {{{1*/
++/*FUNCTION KML_Polygon::DeepEcho {{{*/
+ void  KML_Polygon::DeepEcho(const char* indent){
+ 
+ 	int   i;
+@@ -114,7 +114,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Polygon::Write {{{1*/
++/*FUNCTION KML_Polygon::Write {{{*/
+ void  KML_Polygon::Write(FILE* filout,const char* indent){
+ 
+ 	int   i;
+@@ -154,7 +154,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Polygon::Read {{{1*/
++/*FUNCTION KML_Polygon::Read {{{*/
+ void  KML_Polygon::Read(FILE* fid,char* kstr){
+ 
+ 	char*        kstri;
+@@ -265,7 +265,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION KML_Polygon::WriteExp {{{1*/
++/*FUNCTION KML_Polygon::WriteExp {{{*/
+ void  KML_Polygon::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){
+ 
+ 	int   i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.cpp	(revision 12365)
+@@ -2,7 +2,7 @@
+  * \brief: implementation of the Segment object
+  */
+ 
+-/*Include files: {{{1*/
++/*Include files: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -19,7 +19,7 @@
+ /*}}}*/
+ 
+ /*Segment constructors and destructors:*/
+-/*FUNCTION Segment::Segment() default constructor {{{1*/
++/*FUNCTION Segment::Segment() default constructor {{{*/
+ Segment::Segment(){
+ 	this->eid=UNDEF;
+ 	this->x1=UNDEF;
+@@ -28,7 +28,7 @@
+ 	this->y2=UNDEF;
+ }
+ /*}}}*/
+-/*FUNCTION Segment::Segment(int eid, IssmDouble x1,IssmDouble y1,IssmDouble x2, IssmDouble y2){{{1*/
++/*FUNCTION Segment::Segment(int eid, IssmDouble x1,IssmDouble y1,IssmDouble x2, IssmDouble y2){{{*/
+ Segment::Segment(int segment_eid, IssmDouble segment_x1,IssmDouble segment_y1,IssmDouble segment_x2, IssmDouble segment_y2){
+ 
+ 	this->eid=segment_eid;
+@@ -39,13 +39,13 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Segment::~Segment(){{{1*/
++/*FUNCTION Segment::~Segment(){{{*/
+ Segment::~Segment(){
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION Segment::Echo{{{1*/
++/*FUNCTION Segment::Echo{{{*/
+ void Segment::Echo(void){
+ 
+ 	printf("Segment:\n");
+@@ -55,29 +55,29 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Segment::DeepEcho{{{1*/
++/*FUNCTION Segment::DeepEcho{{{*/
+ void Segment::DeepEcho(void){
+ 	this->Echo();
+ }
+ /*}}}*/
+-/*FUNCTION Segment::Id{{{1*/
++/*FUNCTION Segment::Id{{{*/
+ int    Segment::Id(void){ return eid; }
+ /*}}}*/
+-/*FUNCTION Segment::MyRank{{{1*/
++/*FUNCTION Segment::MyRank{{{*/
+ int    Segment::MyRank(void){ 
+ 	extern int my_rank;
+ 
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION Segment::ObjectEnum{{{1*/
++/*FUNCTION Segment::ObjectEnum{{{*/
+ int Segment::ObjectEnum(void){
+ 
+ 	return SegmentEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Segment::copy {{{1*/
++/*FUNCTION Segment::copy {{{*/
+ Object* Segment::copy() {
+ 	return new Segment(this->eid,this->x1,this->y1,this->x2,this->y2);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -19,7 +19,7 @@
+ /*}}}*/
+ 
+ /*ElementMatrix constructors and destructor*/
+-/*FUNCTION ElementMatrix::ElementMatrix(){{{1*/
++/*FUNCTION ElementMatrix::ElementMatrix(){{{*/
+ ElementMatrix::ElementMatrix(){
+ 
+ 	this->nrows=0;
+@@ -43,7 +43,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION ElementMatrix::ElementMatrix(ElementMatrix* Ke){{{1*/
++/*FUNCTION ElementMatrix::ElementMatrix(ElementMatrix* Ke){{{*/
+ ElementMatrix::ElementMatrix(ElementMatrix* Ke){
+ 
+ 	if(!Ke) _error_("Input Element Matrix is a NULL pointer");
+@@ -51,7 +51,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION ElementMatrix::ElementMatrix(ElementMatrix* Ke1, ElementMatrix* Ke2){{{1*/
++/*FUNCTION ElementMatrix::ElementMatrix(ElementMatrix* Ke1, ElementMatrix* Ke2){{{*/
+ ElementMatrix::ElementMatrix(ElementMatrix* Ke1, ElementMatrix* Ke2){
+ 
+ 	/*intermediaries*/
+@@ -180,7 +180,7 @@
+ 	xfree((void**)&P);
+ }
+ /*}}}*/
+-/*FUNCTION ElementMatrix::ElementMatrix(ElementMatrix* Ke1, ElementMatrix* Ke2,ElementMatrix* Ke3){{{1*/
++/*FUNCTION ElementMatrix::ElementMatrix(ElementMatrix* Ke1, ElementMatrix* Ke2,ElementMatrix* Ke3){{{*/
+ ElementMatrix::ElementMatrix(ElementMatrix* Ke1, ElementMatrix* Ke2,ElementMatrix* Ke3){
+ 
+ 	/*Concatenate all matrices*/
+@@ -195,7 +195,7 @@
+ 	delete Ke123;
+ }
+ /*}}}*/
+-/*FUNCTION ElementMatrix::ElementMatrix(Node** nodes,int numnodes,Parameters* parameters,int approximation){{{1*/
++/*FUNCTION ElementMatrix::ElementMatrix(Node** nodes,int numnodes,Parameters* parameters,int approximation){{{*/
+ ElementMatrix::ElementMatrix(Node** nodes,int numnodes,Parameters* parameters,int approximation){
+ 
+ 	/*get Matrix size and properties*/
+@@ -227,7 +227,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION ElementMatrix::~ElementMatrix(){{{1*/
++/*FUNCTION ElementMatrix::~ElementMatrix(){{{*/
+ ElementMatrix::~ElementMatrix(){
+ 	
+ 	xfree((void**)&this->values);
+@@ -244,7 +244,7 @@
+ /*}}}*/
+ 
+ /*ElementMatrix specific routines: */
+-/*FUNCTION ElementMatrix::AddToGlobal(Matrix* Kff, Matrix* Kfs){{{1*/
++/*FUNCTION ElementMatrix::AddToGlobal(Matrix* Kff, Matrix* Kfs){{{*/
+ void ElementMatrix::AddToGlobal(Matrix* Kff, Matrix* Kfs){
+ 
+ 	int i,j;
+@@ -299,7 +299,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION ElementMatrix::AddToGlobal(Matrix* Jff){{{1*/
++/*FUNCTION ElementMatrix::AddToGlobal(Matrix* Jff){{{*/
+ void ElementMatrix::AddToGlobal(Matrix* Jff){
+ 
+ 	int i,j;
+@@ -336,7 +336,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION ElementMatrix::CheckConsistency{{{1*/
++/*FUNCTION ElementMatrix::CheckConsistency{{{*/
+ void ElementMatrix::CheckConsistency(void){
+ 	/*Check element matrix values, only in debugging mode*/
+ 	#ifdef _ISSM_DEBUG_ 
+@@ -349,7 +349,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION ElementMatrix::Transpose{{{1*/
++/*FUNCTION ElementMatrix::Transpose{{{*/
+ void ElementMatrix::Transpose(void){
+ 
+ 	/*Intermediaries*/
+@@ -372,7 +372,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION ElementMatrix::Echo{{{1*/
++/*FUNCTION ElementMatrix::Echo{{{*/
+ void ElementMatrix::Echo(void){
+ 
+ 	int i,j;
+@@ -418,7 +418,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION ElementMatrix::Init{{{1*/
++/*FUNCTION ElementMatrix::Init{{{*/
+ void ElementMatrix::Init(ElementMatrix* Ke){
+ 
+ 	_assert_(Ke);
+@@ -482,7 +482,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION ElementMatrix::SetDiag{{{1*/
++/*FUNCTION ElementMatrix::SetDiag{{{*/
+ void ElementMatrix::SetDiag(double scalar){
+ 
+ 	int i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.h	(revision 12365)
+@@ -9,7 +9,7 @@
+ #define _ELEMENT_VECTOR_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../Object.h"
+ #include "../../toolkits/toolkits.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -31,14 +31,14 @@
+ 		int*     flocaldoflist;
+ 		int*     fglobaldoflist;
+ 		
+-		/*ElementVector constructors, destructors {{{1*/
++		/*ElementVector constructors, destructors {{{*/
+ 		ElementVector();
+ 		ElementVector(ElementVector* pe1,ElementVector* pe2);
+ 		ElementVector(ElementVector* pe1,ElementVector* pe2,ElementVector* pe3);
+ 		ElementVector(Node** nodes,int numnodes,Parameters* parameters,int approximation=NoneApproximationEnum);
+ 		~ElementVector();
+ 		/*}}}*/
+-		/*ElementVector specific routines {{{1*/
++		/*ElementVector specific routines {{{*/
+ 		void AddToGlobal(Vector* pf);
+ 		void InsertIntoGlobal(Vector* pf);
+ 		void Echo(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -21,7 +21,7 @@
+ /*}}}*/
+ 
+ /*Vector constructors and destructor*/
+-/*FUNCTION Vector::Vector(){{{1*/
++/*FUNCTION Vector::Vector(){{{*/
+ Vector::Vector(){
+ 
+ 	#ifdef _HAVE_PETSC_
+@@ -34,7 +34,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Vector::Vector(int M,bool fromlocalsize){{{1*/
++/*FUNCTION Vector::Vector(int M,bool fromlocalsize){{{*/
+ Vector::Vector(int pM,bool fromlocalsize){
+ 
+ 	#ifdef _HAVE_PETSC_
+@@ -47,7 +47,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Vector::Vector(double* serial_vec,int M){{{1*/
++/*FUNCTION Vector::Vector(double* serial_vec,int M){{{*/
+ Vector::Vector(double* serial_vec,int M){
+ 
+ 	#ifdef _HAVE_PETSC_
+@@ -69,7 +69,7 @@
+ }
+ /*}}}*/
+ #ifdef _HAVE_PETSC_
+-/*FUNCTION Vector::Vector(Vec petsc_vec){{{1*/
++/*FUNCTION Vector::Vector(Vec petsc_vec){{{*/
+ Vector::Vector(Vec petsc_vec){
+ 
+ 	if(petsc_vec==NULL){
+@@ -85,7 +85,7 @@
+ /*}}}*/
+ #endif
+ #if defined(_HAVE_GSL_) && !defined(_HAVE_PETSC_)
+-/*FUNCTION Vector::Vector(SeqVec* seq_vec){{{1*/
++/*FUNCTION Vector::Vector(SeqVec* seq_vec){{{*/
+ Vector::Vector(SeqVec*  seq_vec){
+ 
+ 	if(seq_vec==NULL){
+@@ -99,7 +99,7 @@
+ /*}}}*/
+ #endif
+ 
+-		/*FUNCTION Vector::~Vector(){{{1*/
++		/*FUNCTION Vector::~Vector(){{{*/
+ Vector::~Vector(){
+ 
+  	#ifdef _HAVE_PETSC_
+@@ -114,7 +114,7 @@
+ /*}}}*/
+ 
+ /*Vector specific routines: */
+-/*FUNCTION Vector::Echo{{{1*/
++/*FUNCTION Vector::Echo{{{*/
+ void Vector::Echo(void){
+ 
+ 	int i;
+@@ -131,7 +131,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Vector::Assemble{{{1*/
++/*FUNCTION Vector::Assemble{{{*/
+ void Vector::Assemble(void){
+ 		
+ 	#ifdef _HAVE_PETSC_
+@@ -144,7 +144,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vector::SetValues{{{1*/
++/*FUNCTION Vector::SetValues{{{*/
+ void Vector::SetValues(int ssize, int* list, double* values, InsMode mode){
+ 		
+ 		
+@@ -157,7 +157,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vector::SetValue{{{1*/
++/*FUNCTION Vector::SetValue{{{*/
+ void Vector::SetValue(int dof, double value, InsMode mode){
+ 		
+ 	#ifdef _HAVE_PETSC_
+@@ -169,7 +169,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vector::GetValue{{{1*/
++/*FUNCTION Vector::GetValue{{{*/
+ void Vector::GetValue(double* pvalue,int dof){
+ 		
+ 	#ifdef _HAVE_PETSC_
+@@ -180,7 +180,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Vector::GetSize{{{1*/
++/*FUNCTION Vector::GetSize{{{*/
+ void Vector::GetSize(int* pM){
+ 		
+ 	#ifdef _HAVE_PETSC_
+@@ -192,7 +192,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vector::IsEmpty{{{1*/
++/*FUNCTION Vector::IsEmpty{{{*/
+ bool Vector::IsEmpty(void){
+ 
+ 	int M;
+@@ -206,7 +206,7 @@
+ 	 return false;
+ }
+ /*}}}*/
+-/*FUNCTION Vector::GetLocalSize{{{1*/
++/*FUNCTION Vector::GetLocalSize{{{*/
+ void Vector::GetLocalSize(int* pM){
+ 		
+ 	#ifdef _HAVE_PETSC_
+@@ -218,7 +218,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vector::Duplicate{{{1*/
++/*FUNCTION Vector::Duplicate{{{*/
+ Vector* Vector::Duplicate(void){
+ 	
+ 	Vector* output=NULL;
+@@ -236,7 +236,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vector::Set{{{1*/
++/*FUNCTION Vector::Set{{{*/
+ void Vector::Set(double value){
+ 	
+ 	#ifdef _HAVE_PETSC_
+@@ -248,7 +248,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vector::AXPY{{{1*/
++/*FUNCTION Vector::AXPY{{{*/
+ void Vector::AXPY(Vector* X, double a){
+ 	
+ 	#ifdef _HAVE_PETSC_
+@@ -259,7 +259,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Vector::AYPX{{{1*/
++/*FUNCTION Vector::AYPX{{{*/
+ void Vector::AYPX(Vector* X, double a){
+ 	
+ 	#ifdef _HAVE_PETSC_
+@@ -271,7 +271,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vector::ToMPISerial{{{1*/
++/*FUNCTION Vector::ToMPISerial{{{*/
+ double* Vector::ToMPISerial(void){
+ 
+ 	double* vec_serial=NULL;
+@@ -286,7 +286,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vector::Copy{{{1*/
++/*FUNCTION Vector::Copy{{{*/
+ void Vector::Copy(Vector* to){
+ 
+ 	#ifdef _HAVE_PETSC_
+@@ -297,7 +297,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vector::Norm{{{1*/
++/*FUNCTION Vector::Norm{{{*/
+ double Vector::Norm(NormMode norm_type){
+ 	
+ 	double norm=0;
+@@ -310,7 +310,7 @@
+ 	return norm;
+ }
+ /*}}}*/
+-/*FUNCTION Vector::Scale{{{1*/
++/*FUNCTION Vector::Scale{{{*/
+ void Vector::Scale(double scale_factor){
+ 	
+ 	#ifdef _HAVE_PETSC_
+@@ -321,7 +321,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Vector::Dot{{{1*/
++/*FUNCTION Vector::Dot{{{*/
+ double Vector::Dot(Vector* vector){
+ 
+ 	double dot;
+@@ -334,7 +334,7 @@
+ 	return dot;
+ }
+ /*}}}*/
+-/*FUNCTION Vector::PointwiseDivide{{{1*/
++/*FUNCTION Vector::PointwiseDivide{{{*/
+ void Vector::PointwiseDivide(Vector* x,Vector* y){
+ 
+ 	#ifdef _HAVE_PETSC_
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.h	(revision 12365)
+@@ -9,7 +9,7 @@
+ #define _ELEMENT_MATRIX_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../Object.h"
+ #include "../../toolkits/toolkits.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -48,7 +48,7 @@
+ 		int*     col_slocaldoflist;
+ 		int*     col_sglobaldoflist;
+ 
+-		/*ElementMatrix constructors, destructors {{{1*/
++		/*ElementMatrix constructors, destructors {{{*/
+ 		ElementMatrix();
+ 		ElementMatrix(ElementMatrix* Ke);
+ 		ElementMatrix(ElementMatrix* Ke1,ElementMatrix* Ke2);
+@@ -56,7 +56,7 @@
+ 		ElementMatrix(Node** nodes,int numnodes,Parameters* parameters,int approximation=NoneApproximationEnum);
+ 		~ElementMatrix();
+ 		/*}}}*/
+-		/*ElementMatrix specific routines {{{1*/
++		/*ElementMatrix specific routines {{{*/
+ 		void AddToGlobal(Matrix* Kff, Matrix* Kfs);
+ 		void AddToGlobal(Matrix* Jff);
+ 		void Echo(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -22,7 +22,7 @@
+ /*}}}*/
+ 
+ /*Matrix constructors and destructor*/
+-/*FUNCTION Matrix::Matrix(){{{1*/
++/*FUNCTION Matrix::Matrix(){{{*/
+ Matrix::Matrix(){
+ 
+ 	#ifdef _HAVE_PETSC_
+@@ -35,7 +35,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::Matrix(int M,int N){{{1*/
++/*FUNCTION Matrix::Matrix(int M,int N){{{*/
+ Matrix::Matrix(int M,int N){
+ 
+ 	#ifdef _HAVE_PETSC_
+@@ -48,7 +48,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::Matrix(int M,int N,double sparsity){{{1*/
++/*FUNCTION Matrix::Matrix(int M,int N,double sparsity){{{*/
+ Matrix::Matrix(int M,int N,double sparsity){
+ 
+ 	#ifdef _HAVE_PETSC_
+@@ -61,7 +61,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::Matrix(double* serial_mat, int M,int N,double sparsity){{{1*/
++/*FUNCTION Matrix::Matrix(double* serial_mat, int M,int N,double sparsity){{{*/
+ Matrix::Matrix(double* serial_mat, int M,int N,double sparsity){
+ 
+ 	#ifdef _HAVE_PETSC_
+@@ -88,7 +88,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::Matrix(int M,int N,int connectivity,int numberofdofspernode){{{1*/
++/*FUNCTION Matrix::Matrix(int M,int N,int connectivity,int numberofdofspernode){{{*/
+ Matrix::Matrix(int M,int N,int connectivity,int numberofdofspernode){
+ 	
+ 	#ifdef _HAVE_PETSC_
+@@ -101,7 +101,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::~Matrix(){{{1*/
++/*FUNCTION Matrix::~Matrix(){{{*/
+ Matrix::~Matrix(){
+ 
+  	#ifdef _HAVE_PETSC_
+@@ -116,7 +116,7 @@
+ /*}}}*/
+ 
+ /*Matrix specific routines: */
+-/*FUNCTION Matrix::Echo{{{1*/
++/*FUNCTION Matrix::Echo{{{*/
+ void Matrix::Echo(void){
+ 
+ 	int i,j;
+@@ -139,7 +139,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::Assemble{{{1*/
++/*FUNCTION Matrix::Assemble{{{*/
+ void Matrix::Assemble(void){
+ 	#ifdef _HAVE_PETSC_
+ 		_assert_(this->matrix);
+@@ -154,7 +154,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::Norm{{{1*/
++/*FUNCTION Matrix::Norm{{{*/
+ double Matrix::Norm(NormMode norm_type){
+ 	
+ 	double norm=0;
+@@ -167,7 +167,7 @@
+ 	return norm;
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::GetSize{{{1*/
++/*FUNCTION Matrix::GetSize{{{*/
+ void Matrix::GetSize(int* pM,int* pN){
+ 	
+ 	#ifdef _HAVE_PETSC_
+@@ -178,7 +178,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::GetLocalSize{{{1*/
++/*FUNCTION Matrix::GetLocalSize{{{*/
+ void Matrix::GetLocalSize(int* pM,int* pN){
+ 	
+ 	#ifdef _HAVE_PETSC_
+@@ -189,7 +189,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::MatMult{{{1*/
++/*FUNCTION Matrix::MatMult{{{*/
+ void Matrix::MatMult(Vector* X,Vector* AX){
+ 
+ 	#ifdef _HAVE_PETSC_
+@@ -201,7 +201,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::Duplicate{{{1*/
++/*FUNCTION Matrix::Duplicate{{{*/
+ Matrix* Matrix::Duplicate(void){
+ 
+ 	Matrix* output=NULL;
+@@ -218,7 +218,7 @@
+ 	return output;
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::ToSerial{{{1*/
++/*FUNCTION Matrix::ToSerial{{{*/
+ double* Matrix::ToSerial(void){
+ 
+ 	double* output=NULL;
+@@ -231,7 +231,7 @@
+ 	return output;
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::SetValues{{{1*/
++/*FUNCTION Matrix::SetValues{{{*/
+ void Matrix::SetValues(int m,int* idxm,int n,int* idxn,double* values,InsMode mode){
+ 
+ 	#ifdef _HAVE_PETSC_
+@@ -241,7 +241,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::Convert{{{1*/
++/*FUNCTION Matrix::Convert{{{*/
+ void Matrix::Convert(MatrixType type){
+ 
+ 	#ifdef _HAVE_PETSC_
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _VECTOR_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -35,7 +35,7 @@
+ 			adouble* avector;
+ 		#endif
+ 
+-		/*Vector constructors, destructors {{{1*/
++		/*Vector constructors, destructors {{{*/
+ 		Vector();
+ 		Vector(int M,bool fromlocalsize=false);
+ 		Vector(double* serial_vec,int pM);
+@@ -47,7 +47,7 @@
+ 		#endif
+ 		~Vector();
+ 		/*}}}*/
+-		/*Vector specific routines {{{1*/
++		/*Vector specific routines {{{*/
+ 		void Echo(void);
+ 		void    AXPY(Vector *X, double a);
+ 		void    AYPX(Vector *X, double a);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _MATRIX_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -37,7 +37,7 @@
+ 		adouble* amatrix;
+ 		#endif
+ 
+-		/*Matrix constructors, destructors {{{1*/
++		/*Matrix constructors, destructors {{{*/
+ 		Matrix();
+ 		Matrix(int M,int N);
+ 		Matrix(int M,int N,double sparsity);
+@@ -45,7 +45,7 @@
+ 		Matrix(int M,int N,int connectivity,int numberofdofspernode);
+ 		~Matrix();
+ 		/*}}}*/
+-		/*Matrix specific routines {{{1*/
++		/*Matrix specific routines {{{*/
+ 		void Echo(void);
+ 		void Assemble(void);
+ 		double Norm(NormMode norm_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -19,7 +19,7 @@
+ /*}}}*/
+ 
+ /*ElementVector constructors and destructor*/
+-/*FUNCTION ElementVector::ElementVector(){{{1*/
++/*FUNCTION ElementVector::ElementVector(){{{*/
+ ElementVector::ElementVector(){
+ 
+ 	this->nrows=0;
+@@ -30,7 +30,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION ElementVector::ElementVector(ElementVector* pe1, ElementVector* pe2){{{1*/
++/*FUNCTION ElementVector::ElementVector(ElementVector* pe1, ElementVector* pe2){{{*/
+ ElementVector::ElementVector(ElementVector* pe1, ElementVector* pe2){
+ 
+ 	/*intermediaries*/
+@@ -115,7 +115,7 @@
+ 	xfree((void**)&P);
+ }
+ /*}}}*/
+-/*FUNCTION ElementVector::ElementVector(ElementVector* pe1, ElementVector* pe2,ElementVector* pe3){{{1*/
++/*FUNCTION ElementVector::ElementVector(ElementVector* pe1, ElementVector* pe2,ElementVector* pe3){{{*/
+ ElementVector::ElementVector(ElementVector* pe1, ElementVector* pe2,ElementVector* pe3){
+ 
+ 	/*Concatenate all matrices*/
+@@ -130,7 +130,7 @@
+ 	delete pe123;
+ }
+ /*}}}*/
+-/*FUNCTION ElementVector::ElementVector(Node** nodes,int numnodes,Parameters* parameters,int approximation){{{1*/
++/*FUNCTION ElementVector::ElementVector(Node** nodes,int numnodes,Parameters* parameters,int approximation){{{*/
+ ElementVector::ElementVector(Node** nodes,int numnodes,Parameters* parameters,int approximation){
+ 
+ 	/*get Vector size and properties*/
+@@ -148,7 +148,7 @@
+ 	this->fglobaldoflist=GetGlobalDofList(nodes,numnodes,FsetEnum,approximation);
+ }
+ /*}}}*/
+-/*FUNCTION ElementVector::~ElementVector(){{{1*/
++/*FUNCTION ElementVector::~ElementVector(){{{*/
+ ElementVector::~ElementVector(){
+ 	
+ 	xfree((void**)&this->values);
+@@ -159,7 +159,7 @@
+ /*}}}*/
+ 
+ /*ElementVector specific routines: */
+-/*FUNCTION ElementVector::AddToGlobal(Vector* pf){{{1*/
++/*FUNCTION ElementVector::AddToGlobal(Vector* pf){{{*/
+ void ElementVector::AddToGlobal(Vector* pf){
+ 
+ 	int i;
+@@ -183,7 +183,7 @@
+ 	
+ }
+ /*}}}*/
+-/*FUNCTION ElementVector::InsertIntoGlobal(Vector* pf){{{1*/
++/*FUNCTION ElementVector::InsertIntoGlobal(Vector* pf){{{*/
+ void ElementVector::InsertIntoGlobal(Vector* pf){
+ 
+ 	int i;
+@@ -204,7 +204,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION ElementVector::CheckConsistency{{{1*/
++/*FUNCTION ElementVector::CheckConsistency{{{*/
+ void ElementVector::CheckConsistency(void){
+ 	/*Check element matrix values, only in debugging mode*/
+ #ifdef _ISSM_DEBUG_ 
+@@ -215,7 +215,7 @@
+ #endif
+ }
+ /*}}}*/
+-/*FUNCTION ElementVector::Echo{{{1*/
++/*FUNCTION ElementVector::Echo{{{*/
+ void ElementVector::Echo(void){
+ 
+ 	int i,j;
+@@ -237,7 +237,7 @@
+ 	if(fglobaldoflist)for(i=0;i<fsize;i++)printf("%i ",fglobaldoflist[i]); printf("\n");
+ }
+ /*}}}*/
+-/*FUNCTION ElementVector::Init{{{1*/
++/*FUNCTION ElementVector::Init{{{*/
+ void ElementVector::Init(ElementVector* pe){
+ 
+ 	_assert_(pe);
+@@ -263,7 +263,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION ElementVector::SetValue{{{1*/
++/*FUNCTION ElementVector::SetValue{{{*/
+ void ElementVector::SetValue(double scalar){
+ 
+ 	int i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.h	(revision 12365)
+@@ -9,7 +9,7 @@
+ #define _HOOK_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Object.h"
+ class DataSet;
+ /*}}}*/
+@@ -30,12 +30,12 @@
+ 		Hook(int* ids, int num);
+ 		~Hook();
+ 		/*}}}*/
+-		/*Object like functionality:{{{1*/
++		/*Object like functionality:{{{*/
+ 		void       Echo(void);
+ 		void       DeepEcho(void);
+ 		Object*    copy(void);
+ 		/*}}}*/
+-		/*Hook management: {{{1*/
++		/*Hook management: {{{*/
+ 		Object*    delivers(void); //single object deliver
+ 		Object**   deliverp(void); //deliver all objects
+ 		void       configure(DataSet* dataset);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #ifndef _OPTIONSTRUCT_H_
+ #define _OPTIONSTRUCT_H_
+ 
+-/*Headers:{{{1*/
++/*Headers:{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -19,11 +19,11 @@
+ 
+ 		Options** values;
+ 
+-		/*OptionStruct constructors, destructors {{{1*/
++		/*OptionStruct constructors, destructors {{{*/
+ 		OptionStruct();
+ 		~OptionStruct();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION OptionDouble::OptionDouble(){{{1*/
++/*FUNCTION OptionDouble::OptionDouble(){{{*/
+ OptionDouble::OptionDouble(){
+ 
+ 	values    =NULL;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::~OptionDouble(){{{1*/
++/*FUNCTION OptionDouble::~OptionDouble(){{{*/
+ OptionDouble::~OptionDouble(){
+ 
+ 	if (values) xfree((void**)&values);
+@@ -36,7 +36,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION OptionDouble::Echo {{{1*/
++/*FUNCTION OptionDouble::Echo {{{*/
+ void  OptionDouble::Echo(){
+ 
+ 	char  cstr[81];
+@@ -55,7 +55,7 @@
+ 	else _printf_(flag,"        values: [empty]\n" );
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::DeepEcho() {{{1*/
++/*FUNCTION OptionDouble::DeepEcho() {{{*/
+ void  OptionDouble::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -65,7 +65,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::DeepEcho(char* indent) {{{1*/
++/*FUNCTION OptionDouble::DeepEcho(char* indent) {{{*/
+ void  OptionDouble::DeepEcho(char* indent){
+ 
+ 	int   i;
+@@ -95,31 +95,31 @@
+ 	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::Name {{{1*/
++/*FUNCTION OptionDouble::Name {{{*/
+ char* OptionDouble::Name(){
+ 
+ 	return(Option::Name());
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::NumEl {{{1*/
++/*FUNCTION OptionDouble::NumEl {{{*/
+ int   OptionDouble::NumEl(){
+ 
+ 	return(Option::NumEl());
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::NDims {{{1*/
++/*FUNCTION OptionDouble::NDims {{{*/
+ int   OptionDouble::NDims(){
+ 
+ 	return(Option::NDims());
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::Size {{{1*/
++/*FUNCTION OptionDouble::Size {{{*/
+ int*  OptionDouble::Size(){
+ 
+ 	return(Option::Size());
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::Get(int* pvalue) {{{1*/
++/*FUNCTION OptionDouble::Get(int* pvalue) {{{*/
+ void OptionDouble::Get(int* pvalue){
+ 
+ 	/*We should first check that the size is one*/
+@@ -131,7 +131,7 @@
+ 	*pvalue=(int)this->values[0];
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::Get(double* pvalue) {{{1*/
++/*FUNCTION OptionDouble::Get(double* pvalue) {{{*/
+ void OptionDouble::Get(double* pvalue){
+ 
+ 	/*We should first check that the size is one*/
+@@ -143,7 +143,7 @@
+ 	*pvalue=this->values[0];
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::Get(double** pvalue,int* numel) {{{1*/
++/*FUNCTION OptionDouble::Get(double** pvalue,int* numel) {{{*/
+ void OptionDouble::Get(double** pvalue,int* numel){
+ 
+ 	/*We should first check that the size is at least one*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION OptionLogical::OptionLogical(){{{1*/
++/*FUNCTION OptionLogical::OptionLogical(){{{*/
+ OptionLogical::OptionLogical(){
+ 
+ 	values    =NULL;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION OptionLogical::~OptionLogical(){{{1*/
++/*FUNCTION OptionLogical::~OptionLogical(){{{*/
+ OptionLogical::~OptionLogical(){
+ 
+ 	if (values) xfree((void**)&values);
+@@ -36,7 +36,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION OptionLogical::Echo {{{1*/
++/*FUNCTION OptionLogical::Echo {{{*/
+ void  OptionLogical::Echo(){
+ 
+ 	char  cstr[81];
+@@ -55,7 +55,7 @@
+ 	else _printf_(flag,"        values: [empty]\n" );
+ }
+ /*}}}*/
+-/*FUNCTION OptionLogical::DeepEcho() {{{1*/
++/*FUNCTION OptionLogical::DeepEcho() {{{*/
+ void  OptionLogical::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -65,7 +65,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION OptionLogical::DeepEcho(char* indent) {{{1*/
++/*FUNCTION OptionLogical::DeepEcho(char* indent) {{{*/
+ void  OptionLogical::DeepEcho(char* indent){
+ 
+ 	int   i;
+@@ -95,31 +95,31 @@
+ 	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+ }
+ /*}}}*/
+-/*FUNCTION OptionLogical::Name {{{1*/
++/*FUNCTION OptionLogical::Name {{{*/
+ char* OptionLogical::Name(){
+ 
+ 	return(Option::Name());
+ }
+ /*}}}*/
+-/*FUNCTION OptionLogical::NumEl {{{1*/
++/*FUNCTION OptionLogical::NumEl {{{*/
+ int   OptionLogical::NumEl(){
+ 
+ 	return(Option::NumEl());
+ }
+ /*}}}*/
+-/*FUNCTION OptionLogical::NDims {{{1*/
++/*FUNCTION OptionLogical::NDims {{{*/
+ int   OptionLogical::NDims(){
+ 
+ 	return(Option::NDims());
+ }
+ /*}}}*/
+-/*FUNCTION OptionLogical::Size {{{1*/
++/*FUNCTION OptionLogical::Size {{{*/
+ int*  OptionLogical::Size(){
+ 
+ 	return(Option::Size());
+ }
+ /*}}}*/
+-/*FUNCTION OptionLogical::Get(bool* pvalue) {{{1*/
++/*FUNCTION OptionLogical::Get(bool* pvalue) {{{*/
+ void OptionLogical::Get(bool* pvalue){
+ 
+ 	/*We should first check that the size is one*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -18,7 +18,7 @@
+ #include "../../include/include.h"
+ /*}}}*/
+ 
+-/*FUNCTION ColumnWiseDimsFromIndex{{{1*/
++/*FUNCTION ColumnWiseDimsFromIndex{{{*/
+ int ColumnWiseDimsFromIndex(int* dims,int index,int* size,int ndims){
+ 
+ 	int   i;
+@@ -37,7 +37,7 @@
+ 
+ 	return(0);
+ }/*}}}*/
+-/*FUNCTION IndexFromColumnWiseDims{{{1*/
++/*FUNCTION IndexFromColumnWiseDims{{{*/
+ int IndexFromColumnWiseDims(int* dims, int* size, int ndims) {
+ 
+ 	int   i;
+@@ -56,7 +56,7 @@
+ 
+ 	return(index);
+ }/*}}}*/
+-/*FUNCTION RowWiseDimsFromIndex{{{1*/
++/*FUNCTION RowWiseDimsFromIndex{{{*/
+ int RowWiseDimsFromIndex(int* dims, int index, int* size, int ndims) {
+ 
+ 	int   i;
+@@ -75,7 +75,7 @@
+ 
+ 	return(0);
+ }/*}}}*/
+-/*FUNCTION IndexFromRowWiseDims{{{1*/
++/*FUNCTION IndexFromRowWiseDims{{{*/
+ int IndexFromRowWiseDims(int* dims, int* size, int ndims) {
+ 
+ 	int   i;
+@@ -94,7 +94,7 @@
+ 
+ 	return(index);
+ }/*}}}*/
+-/*FUNCTION StringFromDims{{{1*/
++/*FUNCTION StringFromDims{{{*/
+ int StringFromDims(char* cstr, int* dims, int ndims) {
+ 
+ 	sprintf(&cstr[0],"[");
+@@ -103,7 +103,7 @@
+ 
+ 	return(0);
+ }/*}}}*/
+-/*FUNCTION StringFromSize{{{1*/
++/*FUNCTION StringFromSize{{{*/
+ int StringFromSize(char* cstr, int* size, int ndims) {
+ 
+ 	sprintf(&cstr[0],"[");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION OptionChar::OptionChar(){{{1*/
++/*FUNCTION OptionChar::OptionChar(){{{*/
+ OptionChar::OptionChar(){
+ 
+ 	values    =NULL;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION OptionChar::~OptionChar(){{{1*/
++/*FUNCTION OptionChar::~OptionChar(){{{*/
+ OptionChar::~OptionChar(){
+ 
+ 	if (values) xfree((void**)&values);
+@@ -36,7 +36,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION OptionChar::Echo {{{1*/
++/*FUNCTION OptionChar::Echo {{{*/
+ void  OptionChar::Echo(){
+ 
+ 	char  cstr[81];
+@@ -59,7 +59,7 @@
+ 	else _printf_(flag,"        values: [empty]\n" );
+ }
+ /*}}}*/
+-/*FUNCTION OptionChar::DeepEcho() {{{1*/
++/*FUNCTION OptionChar::DeepEcho() {{{*/
+ void  OptionChar::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -69,7 +69,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION OptionChar::DeepEcho(char* indent) {{{1*/
++/*FUNCTION OptionChar::DeepEcho(char* indent) {{{*/
+ void  OptionChar::DeepEcho(char* indent){
+ 
+ 	int   i,nstr,ipt=0;
+@@ -105,31 +105,31 @@
+ 	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+ }
+ /*}}}*/
+-/*FUNCTION OptionChar::Name {{{1*/
++/*FUNCTION OptionChar::Name {{{*/
+ char* OptionChar::Name(){
+ 
+ 	return(Option::Name());
+ }
+ /*}}}*/
+-/*FUNCTION OptionChar::NumEl {{{1*/
++/*FUNCTION OptionChar::NumEl {{{*/
+ int   OptionChar::NumEl(){
+ 
+ 	return(Option::NumEl());
+ }
+ /*}}}*/
+-/*FUNCTION OptionChar::NDims {{{1*/
++/*FUNCTION OptionChar::NDims {{{*/
+ int   OptionChar::NDims(){
+ 
+ 	return(Option::NDims());
+ }
+ /*}}}*/
+-/*FUNCTION OptionChar::Size {{{1*/
++/*FUNCTION OptionChar::Size {{{*/
+ int*  OptionChar::Size(){
+ 
+ 	return(Option::Size());
+ }
+ /*}}}*/
+-/*FUNCTION OptionChar::Get(char** pvalue) {{{1*/
++/*FUNCTION OptionChar::Get(char** pvalue) {{{*/
+ void OptionChar::Get(char** pvalue){
+ 
+ 	char* outstring=NULL;
+@@ -143,7 +143,7 @@
+ 	*pvalue=outstring;
+ }
+ /*}}}*/
+-/*FUNCTION OptionChar::Get(char*** ppvalue,int *pnumel) {{{1*/
++/*FUNCTION OptionChar::Get(char*** ppvalue,int *pnumel) {{{*/
+ void OptionChar::Get(char*** ppvalue,int *pnumel){
+ 
+ 	char* outstring=NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION Option::Option(){{{1*/
++/*FUNCTION Option::Option(){{{*/
+ Option::Option(){
+ 
+ 	name  =NULL;
+@@ -30,7 +30,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Option::~Option(){{{1*/
++/*FUNCTION Option::~Option(){{{*/
+ Option::~Option(){
+ 
+ 	if(size) xfree((void**)&size);
+@@ -40,7 +40,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION Option::Echo {{{1*/
++/*FUNCTION Option::Echo {{{*/
+ void  Option::Echo(){
+ 
+ 	char  cstr[81];
+@@ -56,7 +56,7 @@
+ 	else _printf_(flag,"          size: [empty]\n" );
+ }
+ /*}}}*/
+-/*FUNCTION Option::DeepEcho() {{{1*/
++/*FUNCTION Option::DeepEcho() {{{*/
+ void  Option::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -66,7 +66,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Option::DeepEcho(char* indent) {{{1*/
++/*FUNCTION Option::DeepEcho(char* indent) {{{*/
+ void  Option::DeepEcho(char* indent){
+ 
+ 	char  cstr[81];
+@@ -82,31 +82,31 @@
+ 	else _printf_(flag,"%s          size: [empty]\n" ,indent);
+ }
+ /*}}}*/
+-/*FUNCTION Option::Name {{{1*/
++/*FUNCTION Option::Name {{{*/
+ char* Option::Name(){
+ 
+ 	return(name);
+ }
+ /*}}}*/
+-/*FUNCTION Option::NumEl {{{1*/
++/*FUNCTION Option::NumEl {{{*/
+ int   Option::NumEl(){
+ 
+ 	return(numel);
+ }
+ /*}}}*/
+-/*FUNCTION Option::NDims {{{1*/
++/*FUNCTION Option::NDims {{{*/
+ int   Option::NDims(){
+ 
+ 	return(ndims);
+ }
+ /*}}}*/
+-/*FUNCTION Option::Size {{{1*/
++/*FUNCTION Option::Size {{{*/
+ int*  Option::Size(){
+ 
+ 	return(size);
+ }
+ /*}}}*/
+-/*FUNCTION Option::Get {{{1*/
++/*FUNCTION Option::Get {{{*/
+ //void* Option::Get(){
+ 
+ //	;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION OptionCell::OptionCell(){{{1*/
++/*FUNCTION OptionCell::OptionCell(){{{*/
+ OptionCell::OptionCell(){
+ 
+ 	values    =NULL;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION OptionCell::~OptionCell(){{{1*/
++/*FUNCTION OptionCell::~OptionCell(){{{*/
+ OptionCell::~OptionCell(){
+ 
+ 	if (values){
+@@ -39,7 +39,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION OptionCell::Echo {{{1*/
++/*FUNCTION OptionCell::Echo {{{*/
+ void  OptionCell::Echo(){
+ 
+ 	char cstr[81];
+@@ -55,7 +55,7 @@
+ 	else _printf_(flag,"        values: [empty]\n" );
+ }
+ /*}}}*/
+-/*FUNCTION OptionCell::DeepEcho() {{{1*/
++/*FUNCTION OptionCell::DeepEcho() {{{*/
+ void  OptionCell::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -65,7 +65,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION OptionCell::DeepEcho(char* indent) {{{1*/
++/*FUNCTION OptionCell::DeepEcho(char* indent) {{{*/
+ void  OptionCell::DeepEcho(char* indent){
+ 
+ 	int   i;
+@@ -94,31 +94,31 @@
+ 	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+ }
+ /*}}}*/
+-/*FUNCTION OptionCell::Name {{{1*/
++/*FUNCTION OptionCell::Name {{{*/
+ char* OptionCell::Name(){
+ 
+ 	return(Option::Name());
+ }
+ /*}}}*/
+-/*FUNCTION OptionCell::NumEl {{{1*/
++/*FUNCTION OptionCell::NumEl {{{*/
+ int   OptionCell::NumEl(){
+ 
+ 	return(Option::NumEl());
+ }
+ /*}}}*/
+-/*FUNCTION OptionCell::NDims {{{1*/
++/*FUNCTION OptionCell::NDims {{{*/
+ int   OptionCell::NDims(){
+ 
+ 	return(Option::NDims());
+ }
+ /*}}}*/
+-/*FUNCTION OptionCell::Size {{{1*/
++/*FUNCTION OptionCell::Size {{{*/
+ int*  OptionCell::Size(){
+ 
+ 	return(Option::Size());
+ }
+ /*}}}*/
+-/*FUNCTION OptionCell::Get(Options** pvalue) {{{1*/
++/*FUNCTION OptionCell::Get(Options** pvalue) {{{*/
+ void OptionCell::Get(Options** pvalue){
+ 
+ 	/*Assign output pointer*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #ifndef _OPTIONDOUBLE_H_
+ #define _OPTIONDOUBLE_H_
+ 
+-/*Headers:{{{1*/
++/*Headers:{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -19,11 +19,11 @@
+ 
+ 		double* values;
+ 
+-		/*OptionDouble constructors, destructors {{{1*/
++		/*OptionDouble constructors, destructors {{{*/
+ 		OptionDouble();
+ 		~OptionDouble();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #ifndef _OPTIONLOGICAL_H_
+ #define _OPTIONLOGICAL_H_
+ 
+-/*Headers:{{{1*/
++/*Headers:{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -19,11 +19,11 @@
+ 
+ 		bool* values;
+ 
+-		/*OptionLogical constructors, destructors {{{1*/
++		/*OptionLogical constructors, destructors {{{*/
+ 		OptionLogical();
+ 		~OptionLogical();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #ifndef _OPTIONUTILITIES_H_
+ #define _OPTIONUTILITIES_H_
+ 
+-/*Headers:{{{1*/
++/*Headers:{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #ifndef _OPTIONCHAR_H_
+ #define _OPTIONCHAR_H_
+ 
+-/*Headers:{{{1*/
++/*Headers:{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -19,11 +19,11 @@
+ 
+ 		char* values;
+ 
+-		/*OptionChar constructors, destructors {{{1*/
++		/*OptionChar constructors, destructors {{{*/
+ 		OptionChar();
+ 		~OptionChar();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #ifndef _OPTIONOBJECT_H_
+ #define _OPTIONOBJECT_H_
+ 
+-/*Headers:{{{1*/
++/*Headers:{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -22,11 +22,11 @@
+ 		int   ndims;
+ 		int*  size;
+ 
+-		/*Option constructors, destructors {{{1*/
++		/*Option constructors, destructors {{{*/
+ 		Option();
+ 		~Option();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		virtual void  Echo();
+ 		virtual void  DeepEcho();
+ 		virtual void  DeepEcho(char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #ifndef _OPTIONCELL_H_
+ #define _OPTIONCELL_H_
+ 
+-/*Headers:{{{1*/
++/*Headers:{{{*/
+ #include "../../include/include.h"
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+@@ -19,11 +19,11 @@
+ 
+ 		Options* values;
+ 
+-		/*OptionCell constructors, destructors {{{1*/
++		/*OptionCell constructors, destructors {{{*/
+ 		OptionCell();
+ 		~OptionCell();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(char* indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION OptionStruct::OptionStruct(){{{1*/
++/*FUNCTION OptionStruct::OptionStruct(){{{*/
+ OptionStruct::OptionStruct(){
+ 
+ 	values    =NULL;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION OptionStruct::~OptionStruct(){{{1*/
++/*FUNCTION OptionStruct::~OptionStruct(){{{*/
+ OptionStruct::~OptionStruct(){
+ 
+ 	int   i;
+@@ -44,7 +44,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION OptionStruct::Echo {{{1*/
++/*FUNCTION OptionStruct::Echo {{{*/
+ void  OptionStruct::Echo(){
+ 
+ 	char  cstr[81];
+@@ -60,7 +60,7 @@
+ 	else _printf_(flag,"        values: [empty]\n" );
+ }
+ /*}}}*/
+-/*FUNCTION OptionStruct::DeepEcho() {{{1*/
++/*FUNCTION OptionStruct::DeepEcho() {{{*/
+ void  OptionStruct::DeepEcho(){
+ 
+ 	char  indent[81]="";
+@@ -70,7 +70,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION OptionStruct::DeepEcho(char* indent) {{{1*/
++/*FUNCTION OptionStruct::DeepEcho(char* indent) {{{*/
+ void  OptionStruct::DeepEcho(char* indent){
+ 
+ 	int   i,j;
+@@ -102,31 +102,31 @@
+ 	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+ }
+ /*}}}*/
+-/*FUNCTION OptionStruct::Name {{{1*/
++/*FUNCTION OptionStruct::Name {{{*/
+ char* OptionStruct::Name(){
+ 
+ 	return(Option::Name());
+ }
+ /*}}}*/
+-/*FUNCTION OptionStruct::NumEl {{{1*/
++/*FUNCTION OptionStruct::NumEl {{{*/
+ int   OptionStruct::NumEl(){
+ 
+ 	return(Option::NumEl());
+ }
+ /*}}}*/
+-/*FUNCTION OptionStruct::NDims {{{1*/
++/*FUNCTION OptionStruct::NDims {{{*/
+ int   OptionStruct::NDims(){
+ 
+ 	return(Option::NDims());
+ }
+ /*}}}*/
+-/*FUNCTION OptionStruct::Size {{{1*/
++/*FUNCTION OptionStruct::Size {{{*/
+ int*  OptionStruct::Size(){
+ 
+ 	return(Option::Size());
+ }
+ /*}}}*/
+-/*FUNCTION OptionStruct::Get(Options** pvalue) {{{1*/
++/*FUNCTION OptionStruct::Get(Options** pvalue) {{{*/
+ void OptionStruct::Get(Options** pvalue){
+ 
+ 	/*We should first check that the size is one*/
+@@ -138,7 +138,7 @@
+ 	*pvalue=this->values[0];
+ }
+ /*}}}*/
+-/*FUNCTION OptionStruct::Get(Options*** ppvalue,int* numel) {{{1*/
++/*FUNCTION OptionStruct::Get(Options*** ppvalue,int* numel) {{{*/
+ void OptionStruct::Get(Options*** ppvalue,int* numel){
+ 
+ 	/*We should first check that the size is at least one*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.cpp	(revision 12365)
+@@ -2,7 +2,7 @@
+  * \brief: implementation of the Vertex object
+  */
+ 
+-/*Include files: {{{1*/
++/*Include files: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -17,17 +17,17 @@
+ /*}}}*/
+ 
+ /*Vertex constructors and destructor:*/
+-/*FUNCTION Vertex::Vertex() {{{1*/
++/*FUNCTION Vertex::Vertex() {{{*/
+ Vertex::Vertex(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Vertex::Vertex(int vertex_id, IssmDouble vertex_x, IssmDouble vertex_y, IssmDouble vertex_z, IssmDouble vertex_sigma){{{1*/
++/*FUNCTION Vertex::Vertex(int vertex_id, IssmDouble vertex_x, IssmDouble vertex_y, IssmDouble vertex_z, IssmDouble vertex_sigma){{{*/
+ Vertex::Vertex(int vertex_id, int vertex_sid,IssmDouble vertex_x, IssmDouble vertex_y, IssmDouble vertex_z, IssmDouble vertex_sigma,int vertex_connectivity){
+ 	this->Init(vertex_id, vertex_sid,vertex_x, vertex_y, vertex_z, vertex_sigma,vertex_connectivity);
+ }
+ /*}}}*/
+-/*FUNCTION Vertex::Vertex(int vertex_id, int vertex_sid,int i, IoModel* iomodel) {{{1*/
++/*FUNCTION Vertex::Vertex(int vertex_id, int vertex_sid,int i, IoModel* iomodel) {{{*/
+ Vertex::Vertex(int vertex_id, int vertex_sid,int i, IoModel* iomodel){
+ 
+ 	_assert_(iomodel->Data(MeshXEnum) && iomodel->Data(MeshYEnum) && iomodel->Data(MeshZEnum));
+@@ -37,12 +37,12 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vertex::~Vertex() {{{1*/
++/*FUNCTION Vertex::~Vertex() {{{*/
+ Vertex::~Vertex(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Vertex::Init{{{1*/
++/*FUNCTION Vertex::Init{{{*/
+ void Vertex::Init(int vertex_id, int vertex_sid,IssmDouble vertex_x, IssmDouble vertex_y, IssmDouble vertex_z, IssmDouble vertex_sigma,int vertex_connectivity){
+ 
+ 	/*all the initialization has been done by the initializer, just fill in the id: */
+@@ -60,7 +60,7 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION Vertex::Echo{{{1*/
++/*FUNCTION Vertex::Echo{{{*/
+ void Vertex::Echo(void){
+ 
+ 	printf("Vertex:\n");
+@@ -77,28 +77,28 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Vertex::DeepEcho{{{1*/
++/*FUNCTION Vertex::DeepEcho{{{*/
+ void Vertex::DeepEcho(void){
+ 	this->Echo();
+ }
+ /*}}}*/
+-/*FUNCTION Vertex::Id{{{1*/
++/*FUNCTION Vertex::Id{{{*/
+ int    Vertex::Id(void){ return id; }
+ /*}}}*/
+-/*FUNCTION Vertex::MyRank {{{1*/
++/*FUNCTION Vertex::MyRank {{{*/
+ int    Vertex::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION Vertex::ObjectEnum{{{1*/
++/*FUNCTION Vertex::ObjectEnum{{{*/
+ int Vertex::ObjectEnum(void){
+ 
+ 	return VertexEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vertex::copy {{{1*/
++/*FUNCTION Vertex::copy {{{*/
+ Object* Vertex::copy() {
+ 
+ 	return new Vertex(*this); 
+@@ -107,7 +107,7 @@
+ /*}}}*/
+ 
+ /* DofObject routines: */
+-/*FUNCTION Vertex::DistributeDofs{{{1*/
++/*FUNCTION Vertex::DistributeDofs{{{*/
+ void  Vertex::DistributeDofs(int* pdofcount){
+ 
+ 	int i;
+@@ -130,7 +130,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vertex::OffsetDofs{{{1*/
++/*FUNCTION Vertex::OffsetDofs{{{*/
+ void  Vertex::OffsetDofs(int dofcount){
+ 	
+ 	int i;
+@@ -145,7 +145,7 @@
+ 	this->dof+=dofcount;
+ }
+ /*}}}*/
+-/*FUNCTION Vertex::ShowTrueDofs{{{1*/
++/*FUNCTION Vertex::ShowTrueDofs{{{*/
+ void  Vertex::ShowTrueDofs(int* truedofs){
+ 
+ 	int j;
+@@ -159,7 +159,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Vertex::UpdateCloneDofs{{{1*/
++/*FUNCTION Vertex::UpdateCloneDofs{{{*/
+ void  Vertex::UpdateCloneDofs(int* alltruedofs){
+ 
+ 	int j;
+@@ -173,7 +173,7 @@
+ 	this->dof=alltruedofs[id-1];
+ }
+ /*}}}*/
+-/*FUNCTION Vertex::SetClone {{{1*/
++/*FUNCTION Vertex::SetClone {{{*/
+ void  Vertex::SetClone(int* minranks){
+ 
+ 	extern int my_rank;
+@@ -191,13 +191,13 @@
+ /*}}}*/
+ 
+ /*Vertex management: */
+-/*FUNCTION Vertex::Connectivity{{{1*/
++/*FUNCTION Vertex::Connectivity{{{*/
+ int    Vertex::Connectivity(void){return connectivity;}
+ /*}}}*/
+-/*FUNCTION Vertex::Sid{{{1*/
++/*FUNCTION Vertex::Sid{{{*/
+ int    Vertex::Sid(void){ return sid; }
+ /*}}}*/
+-/*FUNCTION Vertex::UpdateVertexPosition {{{1*/
++/*FUNCTION Vertex::UpdateVertexPosition {{{*/
+ void  Vertex::UpdatePosition(Vector* vz,Parameters* parameters,IssmDouble* thickness,IssmDouble* bed){
+ 
+ 	IssmDouble oldz,newz;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _ICEFRONT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Load.h"
+ class Hook;
+ class Inputs;
+@@ -38,12 +38,12 @@
+ 		Inputs* inputs;
+ 		Parameters* parameters;
+ 
+-		/*Icefront constructors, destructors: {{{1*/
++		/*Icefront constructors, destructors: {{{*/
+ 		Icefront();
+ 		Icefront(int icefront_id,int i, IoModel* iomodel,int in_icefront_type, int analysis_type);
+ 		~Icefront();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -51,7 +51,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Update virtual functions definitions: {{{1*/
++		/*Update virtual functions definitions: {{{*/
+ 		void  InputUpdateFromVector(double* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+ 		void  InputUpdateFromVector(bool* vector, int name, int type);
+@@ -65,7 +65,7 @@
+ 		void  InputUpdateFromSolution(double* solution);
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
+ 		/*}}}*/
+-		/*Load virtual functions definitions: {{{1*/
++		/*Load virtual functions definitions: {{{*/
+ 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
+@@ -76,7 +76,7 @@
+ 		void  PenaltyCreateJacobianMatrix(Matrix* Jff,double kmax);
+ 		bool  InAnalysis(int analysis_type);
+ 		/*}}}*/
+-		/*Load management: {{{1*/
++		/*Load management: {{{*/
+ 		void GetDofList(int** pdoflist,int approximation_enum,int setenum);
+ 		void GetSegmentNormal(double* normal,double xyz_list[2][3]);
+ 		void GetQuadNormal(double* normal,double xyz_list[4][3]);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #else
+@@ -23,7 +23,7 @@
+ #define NUMVERTICES_BOUNDARY 2
+ 
+ /*Numericalflux constructors and destructor*/
+-/*FUNCTION Numericalflux::Numericalflux(){{{1*/
++/*FUNCTION Numericalflux::Numericalflux(){{{*/
+ Numericalflux::Numericalflux(){
+ 	this->inputs=NULL;
+ 	this->parameters=NULL;
+@@ -33,7 +33,7 @@
+ 	this->nodes=NULL;
+ }
+ /*}}}*/
+-/*}}}*//*FUNCTION Numericalflux::Numericalflux(int id, int i, IoModel* iomodel, int analysis_type) {{{1*/
++/*}}}*//*FUNCTION Numericalflux::Numericalflux(int id, int i, IoModel* iomodel, int analysis_type) {{{*/
+ Numericalflux::Numericalflux(int numericalflux_id,int i, IoModel* iomodel, int in_analysis_type){
+ 
+ 	/* Intermediary */
+@@ -138,7 +138,7 @@
+ 	this->nodes=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::~Numericalflux(){{{1*/
++/*FUNCTION Numericalflux::~Numericalflux(){{{*/
+ Numericalflux::~Numericalflux(){
+ 	delete inputs;
+ 	this->parameters=NULL;
+@@ -148,7 +148,7 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION Numericalflux::Echo {{{1*/
++/*FUNCTION Numericalflux::Echo {{{*/
+ void Numericalflux::Echo(void){
+ 	printf("Numericalflux:\n");
+ 	printf("   id: %i\n",id);
+@@ -159,7 +159,7 @@
+ 	printf("   inputs: %p\n",inputs);
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::DeepEcho {{{1*/
++/*FUNCTION Numericalflux::DeepEcho {{{*/
+ void Numericalflux::DeepEcho(void){
+ 
+ 	printf("Numericalflux:\n");
+@@ -177,25 +177,25 @@
+ 	
+ }		
+ /*}}}*/
+-/*FUNCTION Numericalflux::Id {{{1*/
++/*FUNCTION Numericalflux::Id {{{*/
+ int    Numericalflux::Id(void){
+ 	return id;
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::MyRank {{{1*/
++/*FUNCTION Numericalflux::MyRank {{{*/
+ int    Numericalflux::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::ObjectEnum{{{1*/
++/*FUNCTION Numericalflux::ObjectEnum{{{*/
+ int Numericalflux::ObjectEnum(void){
+ 
+ 	return NumericalfluxEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::copy {{{1*/
++/*FUNCTION Numericalflux::copy {{{*/
+ Object* Numericalflux::copy() {
+ 	
+ 	Numericalflux* numericalflux=NULL;
+@@ -227,7 +227,7 @@
+ /*}}}*/
+ 
+ /*Load virtual functions definitions:*/
+-/*FUNCTION Numericalflux::Configure {{{1*/
++/*FUNCTION Numericalflux::Configure {{{*/
+ void  Numericalflux::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+ 
+ 	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+@@ -244,12 +244,12 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::SetCurrentConfiguration {{{1*/
++/*FUNCTION Numericalflux::SetCurrentConfiguration {{{*/
+ void  Numericalflux::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreateKMatrix {{{1*/
++/*FUNCTION Numericalflux::CreateKMatrix {{{*/
+ void  Numericalflux::CreateKMatrix(Matrix* Kff, Matrix* Kfs){
+ 
+ 	/*recover some parameters*/
+@@ -280,7 +280,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreatePVector {{{1*/
++/*FUNCTION Numericalflux::CreatePVector {{{*/
+ void  Numericalflux::CreatePVector(Vector* pf){
+ 
+ 	/*recover some parameters*/
+@@ -310,7 +310,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::PenaltyCreateKMatrix {{{1*/
++/*FUNCTION Numericalflux::PenaltyCreateKMatrix {{{*/
+ void  Numericalflux::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs,double kmax){
+ 
+ 	/*No stiffness loads applied, do nothing: */
+@@ -318,7 +318,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::PenaltyCreatePVector{{{1*/
++/*FUNCTION Numericalflux::PenaltyCreatePVector{{{*/
+ void  Numericalflux::PenaltyCreatePVector(Vector* pf,double kmax){
+ 
+ 	/*No penalty loads applied, do nothing: */
+@@ -326,7 +326,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::InAnalysis{{{1*/
++/*FUNCTION Numericalflux::InAnalysis{{{*/
+ bool Numericalflux::InAnalysis(int in_analysis_type){
+ 	if (in_analysis_type==this->analysis_type) return true;
+ 	else return false;
+@@ -334,7 +334,7 @@
+ /*}}}*/
+ 
+ /*Numericalflux management*/
+-/*FUNCTION Numericalflux::CreateKMatrixPrognostic{{{1*/
++/*FUNCTION Numericalflux::CreateKMatrixPrognostic{{{*/
+ ElementMatrix* Numericalflux::CreateKMatrixPrognostic(void){
+ 
+ 	int type;
+@@ -350,7 +350,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreateKMatrixPrognosticInternal {{{1*/
++/*FUNCTION Numericalflux::CreateKMatrixPrognosticInternal {{{*/
+ ElementMatrix* Numericalflux::CreateKMatrixPrognosticInternal(void){
+ 
+ 	/* constants*/
+@@ -415,7 +415,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreateKMatrixPrognosticBoundary {{{1*/
++/*FUNCTION Numericalflux::CreateKMatrixPrognosticBoundary {{{*/
+ ElementMatrix* Numericalflux::CreateKMatrixPrognosticBoundary(void){
+ 
+ 	/* constants*/
+@@ -487,7 +487,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreateKMatrixBalancethickness{{{1*/
++/*FUNCTION Numericalflux::CreateKMatrixBalancethickness{{{*/
+ ElementMatrix* Numericalflux::CreateKMatrixBalancethickness(void){
+ 
+ 	int type;
+@@ -503,7 +503,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreateKMatrixBalancethicknessInternal {{{1*/
++/*FUNCTION Numericalflux::CreateKMatrixBalancethicknessInternal {{{*/
+ ElementMatrix* Numericalflux::CreateKMatrixBalancethicknessInternal(void){
+ 
+ 	/* constants*/
+@@ -567,7 +567,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreateKMatrixBalancethicknessBoundary {{{1*/
++/*FUNCTION Numericalflux::CreateKMatrixBalancethicknessBoundary {{{*/
+ ElementMatrix* Numericalflux::CreateKMatrixBalancethicknessBoundary(void){
+ 
+ 	/* constants*/
+@@ -638,7 +638,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreateKMatrixAdjointBalancethickness{{{1*/
++/*FUNCTION Numericalflux::CreateKMatrixAdjointBalancethickness{{{*/
+ ElementMatrix* Numericalflux::CreateKMatrixAdjointBalancethickness(void){
+ 
+ 	int type;
+@@ -654,7 +654,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreateKMatrixAdjointBalancethicknessInternal {{{1*/
++/*FUNCTION Numericalflux::CreateKMatrixAdjointBalancethicknessInternal {{{*/
+ ElementMatrix* Numericalflux::CreateKMatrixAdjointBalancethicknessInternal(void){
+ 
+ 	ElementMatrix* Ke=CreateKMatrixBalancethicknessInternal();
+@@ -662,7 +662,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreateKMatrixAdjointBalancethicknessBoundary {{{1*/
++/*FUNCTION Numericalflux::CreateKMatrixAdjointBalancethicknessBoundary {{{*/
+ ElementMatrix* Numericalflux::CreateKMatrixAdjointBalancethicknessBoundary(void){
+ 
+ 	ElementMatrix* Ke=CreateKMatrixBalancethicknessBoundary();
+@@ -670,7 +670,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreatePVectorPrognostic{{{1*/
++/*FUNCTION Numericalflux::CreatePVectorPrognostic{{{*/
+ ElementVector* Numericalflux::CreatePVectorPrognostic(void){
+ 
+ 	int type;
+@@ -686,7 +686,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreatePVectorPrognosticInternal{{{1*/
++/*FUNCTION Numericalflux::CreatePVectorPrognosticInternal{{{*/
+ ElementVector* Numericalflux::CreatePVectorPrognosticInternal(void){
+ 
+ 	/*Nothing added to PVector*/
+@@ -694,7 +694,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreatePVectorPrognosticBoundary{{{1*/
++/*FUNCTION Numericalflux::CreatePVectorPrognosticBoundary{{{*/
+ ElementVector* Numericalflux::CreatePVectorPrognosticBoundary(void){
+ 
+ 	/* constants*/
+@@ -764,7 +764,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreatePVectorBalancethickness{{{1*/
++/*FUNCTION Numericalflux::CreatePVectorBalancethickness{{{*/
+ ElementVector* Numericalflux::CreatePVectorBalancethickness(void){
+ 
+ 	int type;
+@@ -780,7 +780,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreatePVectorBalancethicknessInternal{{{1*/
++/*FUNCTION Numericalflux::CreatePVectorBalancethicknessInternal{{{*/
+ ElementVector* Numericalflux::CreatePVectorBalancethicknessInternal(void){
+ 
+ 	/*Nothing added to PVector*/
+@@ -788,7 +788,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreatePVectorBalancethicknessBoundary{{{1*/
++/*FUNCTION Numericalflux::CreatePVectorBalancethicknessBoundary{{{*/
+ ElementVector* Numericalflux::CreatePVectorBalancethicknessBoundary(void){
+ 
+ 	/* constants*/
+@@ -855,14 +855,14 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::CreatePVectorAdjointBalancethickness{{{1*/
++/*FUNCTION Numericalflux::CreatePVectorAdjointBalancethickness{{{*/
+ ElementVector* Numericalflux::CreatePVectorAdjointBalancethickness(void){
+ 
+ 	/*No PVector for the Adjoint*/
+ 	return NULL;
+ }
+ /*}}}*/
+-/*FUNCTION Numericalflux::GetNormal {{{1*/
++/*FUNCTION Numericalflux::GetNormal {{{*/
+ void Numericalflux:: GetNormal(double* normal,double xyz_list[4][3]){
+ 
+ 	/*Build unit outward pointing vector*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #else
+@@ -22,7 +22,7 @@
+ #define NUMVERTICES 2
+ 
+ /*Penpair constructors and destructor*/
+-/*FUNCTION Penpair::constructor {{{1*/
++/*FUNCTION Penpair::constructor {{{*/
+ Penpair::Penpair(){
+ 
+ 	this->hnodes=NULL;
+@@ -30,8 +30,8 @@
+ 	this->parameters=NULL;
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::creation {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::creation {{{*/
+ Penpair::Penpair(int penpair_id, int* penpair_node_ids,int in_analysis_type){
+ 	
+ 	this->id=penpair_id;
+@@ -42,16 +42,16 @@
+ 	
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::destructor {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::destructor {{{*/
+ Penpair::~Penpair(){
+ 	delete hnodes;
+ 	return;
+ }
+-/*}}}1*/
++/*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION Penpair::Echo {{{1*/
++/*FUNCTION Penpair::Echo {{{*/
+ void Penpair::Echo(void){
+ 
+ 	int i;
+@@ -63,8 +63,8 @@
+ 	
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::DeepEcho {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::DeepEcho {{{*/
+ void Penpair::DeepEcho(void){
+ 
+ 	printf("Penpair:\n");
+@@ -74,23 +74,23 @@
+ 
+ 	return;
+ }		
+-/*}}}1*/
+-/*FUNCTION Penpair::Id {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::Id {{{*/
+ int    Penpair::Id(void){ return id; }
+-/*}}}1*/
+-/*FUNCTION Penpair::MyRank {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::MyRank {{{*/
+ int    Penpair::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::ObjectEnum{{{1*/
++/*}}}*/
++/*FUNCTION Penpair::ObjectEnum{{{*/
+ int Penpair::ObjectEnum(void){
+ 
+ 	return PenpairEnum;
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::copy {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::copy {{{*/
+ Object* Penpair::copy() {
+ 	
+ 	Penpair* penpair=NULL;
+@@ -114,7 +114,7 @@
+ /*}}}*/
+ 		
+ /*Load virtual functions definitions:*/
+-/*FUNCTION Penpair::Configure {{{1*/
++/*FUNCTION Penpair::Configure {{{*/
+ void  Penpair::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+ 
+ 	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+@@ -128,34 +128,34 @@
+ 	this->parameters=parametersin;
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::SetCurrentConfiguration {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::SetCurrentConfiguration {{{*/
+ void  Penpair::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::CreateKMatrix {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::CreateKMatrix {{{*/
+ void  Penpair::CreateKMatrix(Matrix* Kff, Matrix* Kfs){
+ 	/*If you code this piece, don't forget that a penalty will be inactive if it is dealing with clone nodes*/
+ 	/*No loads applied, do nothing: */
+ 	return;
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::CreatePVector {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::CreatePVector {{{*/
+ void  Penpair::CreatePVector(Vector* pf){
+ 
+ 	/*No loads applied, do nothing: */
+ 	return;
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::CreateJacobianMatrix{{{1*/
++/*}}}*/
++/*FUNCTION Penpair::CreateJacobianMatrix{{{*/
+ void  Penpair::CreateJacobianMatrix(Matrix* Jff){
+ 	this->CreateKMatrix(Jff,NULL);
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::PenaltyCreateKMatrix {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::PenaltyCreateKMatrix {{{*/
+ void  Penpair::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs,double kmax){
+ 
+ 	/*Retrieve parameters: */
+@@ -180,19 +180,19 @@
+ 		delete Ke;
+ 	}
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::PenaltyCreatePVector {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::PenaltyCreatePVector {{{*/
+ void  Penpair::PenaltyCreatePVector(Vector* pf,double kmax){
+ 	/*No loads applied, do nothing: */
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::PenaltyCreateJacobianMatrix{{{1*/
++/*}}}*/
++/*FUNCTION Penpair::PenaltyCreateJacobianMatrix{{{*/
+ void  Penpair::PenaltyCreateJacobianMatrix(Matrix* Jff,double kmax){
+ 	this->PenaltyCreateKMatrix(Jff,NULL,kmax);
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::InAnalysis{{{1*/
++/*}}}*/
++/*FUNCTION Penpair::InAnalysis{{{*/
+ bool Penpair::InAnalysis(int in_analysis_type){
+ 	if (in_analysis_type==this->analysis_type)return true;
+ 	else return false;
+@@ -200,39 +200,39 @@
+ /*}}}*/
+ 
+ /*Update virtual functions definitions:*/
+-/*FUNCTION Penpair::InputUpdateFromConstant(double constant, int name) {{{1*/
++/*FUNCTION Penpair::InputUpdateFromConstant(double constant, int name) {{{*/
+ void  Penpair::InputUpdateFromConstant(double constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Penpair::InputUpdateFromConstant(int constant, int name) {{{1*/
++/*FUNCTION Penpair::InputUpdateFromConstant(int constant, int name) {{{*/
+ void  Penpair::InputUpdateFromConstant(int constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Penpair::InputUpdateFromConstant(bool constant, int name) {{{1*/
++/*FUNCTION Penpair::InputUpdateFromConstant(bool constant, int name) {{{*/
+ void  Penpair::InputUpdateFromConstant(bool constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Penpair::InputUpdateFromVector(double* vector, int name, int type) {{{1*/
++/*FUNCTION Penpair::InputUpdateFromVector(double* vector, int name, int type) {{{*/
+ void  Penpair::InputUpdateFromVector(double* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Penpair::InputUpdateFromVector(int* vector, int name, int type) {{{1*/
++/*FUNCTION Penpair::InputUpdateFromVector(int* vector, int name, int type) {{{*/
+ void  Penpair::InputUpdateFromVector(int* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Penpair::InputUpdateFromVector(bool* vector, int name, int type) {{{1*/
++/*FUNCTION Penpair::InputUpdateFromVector(bool* vector, int name, int type) {{{*/
+ void  Penpair::InputUpdateFromVector(bool* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+ 
+ /*Penpair management:*/
+-/*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticHoriz{{{1*/
++/*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticHoriz{{{*/
+ ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticHoriz(double kmax){
+ 
+ 	int    approximation0=nodes[0]->GetApproximation();
+@@ -266,8 +266,8 @@
+ 		default: _error_("not supported yet");
+ 	}
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticMacAyealPattyn {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticMacAyealPattyn {{{*/
+ ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticMacAyealPattyn(double kmax){
+ 	
+ 	const int numdof=NUMVERTICES*NDOF2;
+@@ -293,8 +293,8 @@
+ 	/*Clean up and return*/
+ 	return Ke;
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticStokes {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticStokes {{{*/
+ ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticStokes(double kmax){
+ 	
+ 	const int numdof=NUMVERTICES*NDOF4;
+@@ -330,8 +330,8 @@
+ 	/*Clean up and return*/
+ 	return Ke;
+ }
+-/*}}}1*/
+-/*FUNCTION Penpair::PenaltyCreateKMatrixPrognostic {{{1*/
++/*}}}*/
++/*FUNCTION Penpair::PenaltyCreateKMatrixPrognostic {{{*/
+ ElementMatrix* Penpair::PenaltyCreateKMatrixPrognostic(double kmax){
+ 
+ 	const int numdof=NUMVERTICES*NDOF1;
+@@ -352,4 +352,4 @@
+ 	/*Clean up and return*/
+ 	return Ke;
+ }
+-/*}}}1*/
++/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _FRICTION_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ class Inputs;
+ class Matpar;
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _RIFTFRONT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Load.h"
+ class Hook;
+ class Parameters;
+@@ -46,12 +46,12 @@
+ 		Inputs*  inputs;
+ 
+ 
+-		/*Riftfrontconstructors,destructors: {{{1*/
++		/*Riftfrontconstructors,destructors: {{{*/
+ 		Riftfront();
+ 		Riftfront(int riftfront_id,int i, IoModel* iomodel,int analysis_type);
+ 		~Riftfront();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -59,7 +59,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Update virtual functions resolution: {{{1*/
++		/*Update virtual functions resolution: {{{*/
+ 		void    InputUpdateFromVector(double* vector, int name, int type);
+ 		void    InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
+ 		void    InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
+@@ -73,7 +73,7 @@
+ 		void    InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");}
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
+ 		/*}}}*/
+-		/*Load virtual functions definitions: {{{1*/
++		/*Load virtual functions definitions: {{{*/
+ 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
+@@ -84,7 +84,7 @@
+ 		void  PenaltyCreatePVector(Vector* pf, double kmax);
+ 		bool  InAnalysis(int analysis_type);
+ 		/*}}}*/
+-		/*Riftfront specific routines: {{{1*/
++		/*Riftfront specific routines: {{{*/
+ 		bool  PreStable();
+ 		ElementMatrix* PenaltyCreateKMatrixDiagnosticHoriz(double kmax);
+ 		ElementVector* PenaltyCreatePVectorDiagnosticHoriz(double kmax);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _NUMERICALFLUX_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Load.h"
+ class Hook;
+ class Parameters;
+@@ -34,12 +34,12 @@
+ 		Inputs     *inputs;
+ 
+ 
+-		/*Numericalflux constructors,destructors {{{1*/
++		/*Numericalflux constructors,destructors {{{*/
+ 		Numericalflux();
+ 		Numericalflux(int numericalflux_id,int i, IoModel* iomodel,int analysis_type);
+ 		~Numericalflux();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -47,7 +47,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Update virtual functions resolution: {{{1*/
++		/*Update virtual functions resolution: {{{*/
+ 		void    InputUpdateFromVector(double* vector, int name, int type){/*Do nothing*/}
+ 		void    InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
+ 		void    InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
+@@ -61,7 +61,7 @@
+ 		void    InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");}
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
+ 		/*}}}*/
+-		/*Load virtual functions definitions: {{{1*/
++		/*Load virtual functions definitions: {{{*/
+ 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
+@@ -72,7 +72,7 @@
+ 		void  PenaltyCreatePVector(Vector* pf, double kmax);
+ 		bool  InAnalysis(int analysis_type);
+ 		/*}}}*/
+-		/*Numericalflux management:{{{1*/
++		/*Numericalflux management:{{{*/
+ 		void  GetNormal(double* normal,double xyz_list[4][3]);
+ 		ElementMatrix* CreateKMatrixPrognostic(void);
+ 		ElementMatrix* CreateKMatrixPrognosticInternal(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #define _PENPAIR_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Load.h"
+ #include "../Node.h"
+ #include "../Elements/Element.h"
+@@ -26,12 +26,12 @@
+ 
+ 	public:
+ 
+-		/*Penpair constructors, destructors: {{{1*/
++		/*Penpair constructors, destructors: {{{*/
+ 		Penpair();
+ 		Penpair(int penpair_id,int* penpair_node_ids,int analysis_type);
+ 		~Penpair();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -39,7 +39,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Update virtual functions resolution: {{{1*/
++		/*Update virtual functions resolution: {{{*/
+ 		void  InputUpdateFromVector(double* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+ 		void  InputUpdateFromVector(bool* vector, int name, int type);
+@@ -53,7 +53,7 @@
+ 		void  InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");}
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
+ 		/*}}}*/
+-			/*Load virtual functions definitions: {{{1*/
++			/*Load virtual functions definitions: {{{*/
+ 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
+@@ -64,7 +64,7 @@
+ 		void  PenaltyCreateJacobianMatrix(Matrix* Jff,double kmax);
+ 		bool  InAnalysis(int analysis_type);
+ 		/*}}}*/
+-			/*Penpair management: {{{1*/
++			/*Penpair management: {{{*/
+ 		ElementMatrix* PenaltyCreateKMatrixDiagnosticHoriz(double kmax);
+ 		ElementMatrix* PenaltyCreateKMatrixDiagnosticMacAyealPattyn(double kmax);
+ 		ElementMatrix* PenaltyCreateKMatrixDiagnosticStokes(double kmax);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Load.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Load.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Load.h	(revision 12365)
+@@ -9,7 +9,7 @@
+ #define _LOAD_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ class Object;
+ class Matrix;
+ class Vector;
+@@ -25,7 +25,7 @@
+ 
+ 		virtual       ~Load(){};
+ 		
+-		/*Virtual functions: {{{1*/
++		/*Virtual functions: {{{*/
+ 		virtual void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters)=0;
+ 		virtual void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters)=0;
+ 		virtual void  CreateKMatrix(Matrix* Kff, Matrix* Kfs)=0;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -23,7 +23,7 @@
+ #define NUMVERTICES   1
+ 
+ /*Pengrid constructors and destructor*/
+-/*FUNCTION Pengrid::Pengrid(){{{1*/
++/*FUNCTION Pengrid::Pengrid(){{{*/
+ Pengrid::Pengrid(){
+ 	this->inputs=NULL;
+ 	this->parameters=NULL;
+@@ -39,8 +39,8 @@
+ 	zigzag_counter=0;
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::Pengrid(int index, int id, IoModel* iomodel,int analysis_type){{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::Pengrid(int index, int id, IoModel* iomodel,int analysis_type){{{*/
+ Pengrid::Pengrid(int id, int index, IoModel* iomodel, int in_analysis_type){ //i is the element index
+ 
+ 	int i,j;
+@@ -89,7 +89,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::~Pengrid(){{{1*/
++/*FUNCTION Pengrid::~Pengrid(){{{*/
+ Pengrid::~Pengrid(){
+ 	delete inputs;
+ 	delete hnode;
+@@ -97,15 +97,15 @@
+ 	delete hmatpar;
+ 	return;
+ }
+-/*}}}1*/
++/*}}}*/
+ 			
+ /*Object virtual functions definitions:*/
+-/*FUNCTION Pengrid::Echo {{{1*/
++/*FUNCTION Pengrid::Echo {{{*/
+ void Pengrid::Echo(void){
+ 	this->DeepEcho();
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::DeepEcho{{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::DeepEcho{{{*/
+ void Pengrid::DeepEcho(void){
+ 
+ 	printf("Pengrid:\n");
+@@ -122,22 +122,22 @@
+ 	inputs->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::Id {{{1*/
++/*FUNCTION Pengrid::Id {{{*/
+ int    Pengrid::Id(void){ return id; }
+-/*}}}1*/
+-/*FUNCTION Pengrid::MyRank {{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::MyRank {{{*/
+ int    Pengrid::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::ObjectEnum{{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::ObjectEnum{{{*/
+ int Pengrid::ObjectEnum(void){
+ 
+ 	return PengridEnum;
+ }
+-/*}}}1*/
+-/*FUNCTION Icefront::copy {{{1*/
++/*}}}*/
++/*FUNCTION Icefront::copy {{{*/
+ Object* Pengrid::copy() {
+ 	
+ 	Pengrid* pengrid=NULL;
+@@ -176,7 +176,7 @@
+ /*}}}*/
+ 
+ /*Load virtual functions definitions:*/
+-/*FUNCTION Pengrid::Configure {{{1*/
++/*FUNCTION Pengrid::Configure {{{*/
+ void  Pengrid::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+ 
+ 	/*Take care of hooking up all objects for this load, ie links the objects in the hooks to their respective 
+@@ -193,29 +193,29 @@
+ 	/*point parameters to real dataset: */
+ 	this->parameters=parametersin;
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::SetCurrentConfiguration {{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::SetCurrentConfiguration {{{*/
+ void  Pengrid::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::CreateKMatrix {{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::CreateKMatrix {{{*/
+ void  Pengrid::CreateKMatrix(Matrix* Kff, Matrix* Kfs){
+ 
+ 	/*No loads applied, do nothing: */
+ 	return;
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::CreatePVector {{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::CreatePVector {{{*/
+ void  Pengrid::CreatePVector(Vector* pf){
+ 
+ 	/*No loads applied, do nothing: */
+ 	return;
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::PenaltyCreateMatrix {{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::PenaltyCreateMatrix {{{*/
+ void  Pengrid::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs,double kmax){
+ 
+ 	/*Retrieve parameters: */
+@@ -247,8 +247,8 @@
+ 		delete Ke;
+ 	}
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::PenaltyCreatePVector {{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::PenaltyCreatePVector {{{*/
+ void  Pengrid::PenaltyCreatePVector(Vector* pf,double kmax){
+ 
+ 	/*Retrieve parameters: */
+@@ -279,8 +279,8 @@
+ 		delete pe;
+ 	}
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::InAnalysis{{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::InAnalysis{{{*/
+ bool Pengrid::InAnalysis(int in_analysis_type){
+ 	if (in_analysis_type==this->analysis_type)return true;
+ 	else return false;
+@@ -288,42 +288,42 @@
+ /*}}}*/
+ 
+ /*Update virtual functions definitions:*/
+-/*FUNCTION Pengrid::InputUpdateFromVector(double* vector, int name, int type) {{{1*/
++/*FUNCTION Pengrid::InputUpdateFromVector(double* vector, int name, int type) {{{*/
+ void  Pengrid::InputUpdateFromVector(double* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::InputUpdateFromVector(int* vector, int name, int type) {{{1*/
++/*FUNCTION Pengrid::InputUpdateFromVector(int* vector, int name, int type) {{{*/
+ void  Pengrid::InputUpdateFromVector(int* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::InputUpdateFromVector(bool* vector, int name, int type) {{{1*/
++/*FUNCTION Pengrid::InputUpdateFromVector(bool* vector, int name, int type) {{{*/
+ void  Pengrid::InputUpdateFromVector(bool* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::InputUpdateFromMatrixDakota(double* vector, int nrows, int ncols, int name, int type) {{{1*/
++/*FUNCTION Pengrid::InputUpdateFromMatrixDakota(double* vector, int nrows, int ncols, int name, int type) {{{*/
+ void  Pengrid::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::InputUpdateFromVectorDakota(double* vector, int name, int type) {{{1*/
++/*FUNCTION Pengrid::InputUpdateFromVectorDakota(double* vector, int name, int type) {{{*/
+ void  Pengrid::InputUpdateFromVectorDakota(double* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::InputUpdateFromVectorDakota(int* vector, int name, int type) {{{1*/
++/*FUNCTION Pengrid::InputUpdateFromVectorDakota(int* vector, int name, int type) {{{*/
+ void  Pengrid::InputUpdateFromVectorDakota(int* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::InputUpdateFromVectorDakota(bool* vector, int name, int type) {{{1*/
++/*FUNCTION Pengrid::InputUpdateFromVectorDakota(bool* vector, int name, int type) {{{*/
+ void  Pengrid::InputUpdateFromVectorDakota(bool* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::InputUpdateFromConstant(double constant, int name) {{{1*/
++/*FUNCTION Pengrid::InputUpdateFromConstant(double constant, int name) {{{*/
+ void  Pengrid::InputUpdateFromConstant(double constant, int name){
+ 	switch(name){
+ 
+@@ -334,12 +334,12 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::InputUpdateFromConstant(int constant, int name) {{{1*/
++/*FUNCTION Pengrid::InputUpdateFromConstant(int constant, int name) {{{*/
+ void  Pengrid::InputUpdateFromConstant(int constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::InputUpdateFromConstant(bool constant, int name) {{{1*/
++/*FUNCTION Pengrid::InputUpdateFromConstant(bool constant, int name) {{{*/
+ void  Pengrid::InputUpdateFromConstant(bool constant, int name){
+ 
+ 	switch(name){
+@@ -351,14 +351,14 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::InputUpdateFromSolution{{{1*/
++/*FUNCTION Pengrid::InputUpdateFromSolution{{{*/
+ void  Pengrid::InputUpdateFromSolution(double* solution){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/		
+ 
+ /*Pengrid management:*/
+-/*FUNCTION Pengrid::ConstraintActivate {{{1*/
++/*FUNCTION Pengrid::ConstraintActivate {{{*/
+ void  Pengrid::ConstraintActivate(int* punstable){
+ 
+ 	int analysis_type;
+@@ -382,8 +382,8 @@
+ 	}
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::ConstraintActivateThermal {{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::ConstraintActivateThermal {{{*/
+ void  Pengrid::ConstraintActivateThermal(int* punstable){
+ 
+ 	//   The penalty is stable if it doesn't change during to successive iterations.   
+@@ -451,9 +451,9 @@
+ 	//*Assign output pointers:*/
+ 	*punstable=unstable;
+ }
+-/*}}}1*/
++/*}}}*/
+ #ifdef _HAVE_DIAGNOSTIC_
+-/*FUNCTION Pengrid::PenaltyCreateKMatrixDiagnosticStokes {{{1*/
++/*FUNCTION Pengrid::PenaltyCreateKMatrixDiagnosticStokes {{{*/
+ ElementMatrix* Pengrid::PenaltyCreateKMatrixDiagnosticStokes(double kmax){
+ 	
+ 	const int numdof = NUMVERTICES *NDOF4;
+@@ -484,10 +484,10 @@
+ 	/*Clean up and return*/
+ 	return Ke;
+ }
+-/*}}}1*/
++/*}}}*/
+ #endif
+ #ifdef _HAVE_THERMAL_
+-/*FUNCTION Pengrid::PenaltyCreateKMatrixMelting {{{1*/
++/*FUNCTION Pengrid::PenaltyCreateKMatrixMelting {{{*/
+ ElementMatrix* Pengrid::PenaltyCreateKMatrixMelting(double kmax){
+ 
+ 	const int numdof=NUMVERTICES*NDOF1;
+@@ -516,8 +516,8 @@
+ 	/*Clean up and return*/
+ 	return Ke;
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::PenaltyCreateKMatrixThermal {{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::PenaltyCreateKMatrixThermal {{{*/
+ ElementMatrix* Pengrid::PenaltyCreateKMatrixThermal(double kmax){
+ 
+ 	const int numdof=NUMVERTICES*NDOF1;
+@@ -535,8 +535,8 @@
+ 	/*Clean up and return*/
+ 	return Ke;
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::PenaltyCreatePVectorMelting {{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::PenaltyCreatePVectorMelting {{{*/
+ ElementVector* Pengrid::PenaltyCreatePVectorMelting(double kmax){
+ 	
+ 	const int numdof=NUMVERTICES*NDOF1;
+@@ -578,8 +578,8 @@
+ 	/*Clean up and return*/
+ 	return pe;
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::PenaltyCreatePVectorThermal {{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::PenaltyCreatePVectorThermal {{{*/
+ ElementVector* Pengrid::PenaltyCreatePVectorThermal(double kmax){
+ 
+ 	const int numdof=NUMVERTICES*NDOF1;
+@@ -605,16 +605,16 @@
+ 	/*Clean up and return*/
+ 	return pe;
+ }
+-/*}}}1*/
++/*}}}*/
+ #endif
+-/*FUNCTION Pengrid::ResetConstraint {{{1*/
++/*FUNCTION Pengrid::ResetConstraint {{{*/
+ void  Pengrid::ResetConstraint(void){
+ 	active=0;
+ 	zigzag_counter=0;
+ }
+-/*}}}1*/
+-/*FUNCTION Pengrid::UpdateInputs {{{1*/
++/*}}}*/
++/*FUNCTION Pengrid::UpdateInputs {{{*/
+ void  Pengrid::UpdateInputs(double* solution){
+ 	_error_("not supported yet!");
+ }
+-/*}}}1*/
++/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -23,7 +23,7 @@
+ #define NUMVERTICESQUA 4
+ 
+ /*Icefront constructors and destructor*/
+-/*FUNCTION Icefront::Icefront() {{{1*/
++/*FUNCTION Icefront::Icefront() {{{*/
+ Icefront::Icefront(){
+ 
+ 	this->inputs=NULL;
+@@ -37,7 +37,7 @@
+ 	this->matpar= NULL;
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::Icefront(int id, int i, IoModel* iomodel,int analysis_type) {{{1*/
++/*FUNCTION Icefront::Icefront(int id, int i, IoModel* iomodel,int analysis_type) {{{*/
+ Icefront::Icefront(int icefront_id,int i, IoModel* iomodel,int in_icefront_type, int in_analysis_type){
+ 
+ 	int segment_width;
+@@ -113,7 +113,7 @@
+ 
+ 
+ /*}}}*/
+-/*FUNCTION Icefront::~Icefront() {{{1*/
++/*FUNCTION Icefront::~Icefront() {{{*/
+ Icefront::~Icefront(){
+ 	delete inputs;
+ 	this->parameters=NULL;
+@@ -124,7 +124,7 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION Icefront::Echo {{{1*/
++/*FUNCTION Icefront::Echo {{{*/
+ void Icefront::Echo(void){
+ 	printf("Icefront:\n");
+ 	printf("   id: %i\n",id);
+@@ -138,7 +138,7 @@
+ 	if(inputs)inputs->Echo();
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::DeepEcho{{{1*/
++/*FUNCTION Icefront::DeepEcho{{{*/
+ void Icefront::DeepEcho(void){
+ 
+ 	printf("Icefront:\n");
+@@ -153,23 +153,23 @@
+ 	if(inputs)inputs->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::Id {{{1*/
++/*FUNCTION Icefront::Id {{{*/
+ int    Icefront::Id(void){ return id; }
+ /*}}}*/
+-/*FUNCTION Icefront::MyRank {{{1*/
++/*FUNCTION Icefront::MyRank {{{*/
+ int    Icefront::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::ObjectEnum{{{1*/
++/*FUNCTION Icefront::ObjectEnum{{{*/
+ int Icefront::ObjectEnum(void){
+ 
+ 	return IcefrontEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::copy {{{1*/
++/*FUNCTION Icefront::copy {{{*/
+ Object* Icefront::copy() {
+ 	
+ 	Icefront* icefront=NULL;
+@@ -204,7 +204,7 @@
+ /*}}}*/
+ 
+ /*Load virtual functions definitions:*/
+-/*FUNCTION Icefront::Configure {{{1*/
++/*FUNCTION Icefront::Configure {{{*/
+ void  Icefront::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+ 
+ 	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+@@ -222,11 +222,11 @@
+ 	this->parameters=parametersin;
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::SetCurrentConfiguration {{{1*/
++/*FUNCTION Icefront::SetCurrentConfiguration {{{*/
+ void  Icefront::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::CreateKMatrix {{{1*/
++/*FUNCTION Icefront::CreateKMatrix {{{*/
+ void  Icefront::CreateKMatrix(Matrix* Kff, Matrix* Kfs){
+ 
+ 	/*No stiffness loads applied, do nothing: */
+@@ -234,11 +234,11 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::CreatePVector {{{1*/
++/*FUNCTION Icefront::CreatePVector {{{*/
+ void  Icefront::CreatePVector(Vector* pf){
+ 
+ 	/*Checks in debugging mode*/
+-	/*{{{2*/
++	/*{{{*/
+ 	_assert_(nodes);
+ 	_assert_(element);
+ 	_assert_(matpar);
+@@ -272,29 +272,29 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::CreateJacobianMatrix{{{1*/
++/*FUNCTION Icefront::CreateJacobianMatrix{{{*/
+ void  Icefront::CreateJacobianMatrix(Matrix* Jff){
+ 	this->CreateKMatrix(Jff,NULL);
+ }
+-/*}}}1*/
+-/*FUNCTION Icefront::PenaltyCreateKMatrix {{{1*/
++/*}}}*/
++/*FUNCTION Icefront::PenaltyCreateKMatrix {{{*/
+ void  Icefront::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs, double kmax){
+ 	/*do nothing: */
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::PenaltyCreatePVector{{{1*/
++/*FUNCTION Icefront::PenaltyCreatePVector{{{*/
+ void  Icefront::PenaltyCreatePVector(Vector* pf,double kmax){
+ 	/*do nothing: */
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::PenaltyCreateJacobianMatrix{{{1*/
++/*FUNCTION Icefront::PenaltyCreateJacobianMatrix{{{*/
+ void  Icefront::PenaltyCreateJacobianMatrix(Matrix* Jff,double kmax){
+ 	this->PenaltyCreateKMatrix(Jff,NULL,kmax);
+ }
+-/*}}}1*/
+-/*FUNCTION Icefront::InAnalysis{{{1*/
++/*}}}*/
++/*FUNCTION Icefront::InAnalysis{{{*/
+ bool Icefront::InAnalysis(int in_analysis_type){
+ 	if (in_analysis_type==this->analysis_type)return true;
+ 	else return false;
+@@ -302,57 +302,57 @@
+ /*}}}*/
+ 
+ /*Update virtual functions definitions:*/
+-/*FUNCTION Icefront::InputUpdateFromVector(double* vector, int name, int type) {{{1*/
++/*FUNCTION Icefront::InputUpdateFromVector(double* vector, int name, int type) {{{*/
+ void  Icefront::InputUpdateFromVector(double* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::InputUpdateFromVector(int* vector, int name, int type) {{{1*/
++/*FUNCTION Icefront::InputUpdateFromVector(int* vector, int name, int type) {{{*/
+ void  Icefront::InputUpdateFromVector(int* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::InputUpdateFromVector(bool* vector, int name, int type) {{{1*/
++/*FUNCTION Icefront::InputUpdateFromVector(bool* vector, int name, int type) {{{*/
+ void  Icefront::InputUpdateFromVector(bool* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type) {{{1*/
++/*FUNCTION Icefront::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type) {{{*/
+ void  Icefront::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::InputUpdateFromVectorDakota(double* vector, int name, int type) {{{1*/
++/*FUNCTION Icefront::InputUpdateFromVectorDakota(double* vector, int name, int type) {{{*/
+ void  Icefront::InputUpdateFromVectorDakota(double* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::InputUpdateFromVectorDakota(int* vector, int name, int type) {{{1*/
++/*FUNCTION Icefront::InputUpdateFromVectorDakota(int* vector, int name, int type) {{{*/
+ void  Icefront::InputUpdateFromVectorDakota(int* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::InputUpdateFromVectorDakota(bool* vector, int name, int type) {{{1*/
++/*FUNCTION Icefront::InputUpdateFromVectorDakota(bool* vector, int name, int type) {{{*/
+ void  Icefront::InputUpdateFromVectorDakota(bool* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::InputUpdateFromConstant(double constant, int name) {{{1*/
++/*FUNCTION Icefront::InputUpdateFromConstant(double constant, int name) {{{*/
+ void  Icefront::InputUpdateFromConstant(double constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::InputUpdateFromConstant(int constant, int name) {{{1*/
++/*FUNCTION Icefront::InputUpdateFromConstant(int constant, int name) {{{*/
+ void  Icefront::InputUpdateFromConstant(int constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::InputUpdateFromConstant(bool constant, int name) {{{1*/
++/*FUNCTION Icefront::InputUpdateFromConstant(bool constant, int name) {{{*/
+ void  Icefront::InputUpdateFromConstant(bool constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::InputUpdateFromSolution{{{1*/
++/*FUNCTION Icefront::InputUpdateFromSolution{{{*/
+ void  Icefront::InputUpdateFromSolution(double* solution){
+ 	/*Nothing updated yet*/
+ }
+@@ -360,7 +360,7 @@
+ 
+ /*Icefront numerics: */
+ #ifdef _HAVE_DIAGNOSTIC_
+-/*FUNCTION Icefront::CreatePVectorDiagnosticHoriz {{{1*/
++/*FUNCTION Icefront::CreatePVectorDiagnosticHoriz {{{*/
+ ElementVector* Icefront::CreatePVectorDiagnosticHoriz(void){
+ 
+ 	int type;
+@@ -382,7 +382,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::CreatePVectorDiagnosticMacAyeal2d{{{1*/
++/*FUNCTION Icefront::CreatePVectorDiagnosticMacAyeal2d{{{*/
+ ElementVector* Icefront::CreatePVectorDiagnosticMacAyeal2d(void){
+ 
+ 	/*Constants*/
+@@ -466,7 +466,7 @@
+ #endif
+ 
+ #ifdef _HAVE_CONTROL_
+-/*FUNCTION Icefront::CreatePVectorAdjointHoriz {{{1*/
++/*FUNCTION Icefront::CreatePVectorAdjointHoriz {{{*/
+ ElementVector* Icefront::CreatePVectorAdjointHoriz(void){
+ 
+ 	/*No load vector applied to the adjoint*/
+@@ -475,7 +475,7 @@
+ /*}}}*/
+ #endif
+ #ifdef _HAVE_3D_
+-/*FUNCTION Icefront::CreatePVectorDiagnosticMacAyeal3d{{{1*/
++/*FUNCTION Icefront::CreatePVectorDiagnosticMacAyeal3d{{{*/
+ ElementVector* Icefront::CreatePVectorDiagnosticMacAyeal3d(void){
+ 
+ 	Icefront* icefront=NULL;
+@@ -503,7 +503,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::CreatePVectorDiagnosticPattyn{{{1*/
++/*FUNCTION Icefront::CreatePVectorDiagnosticPattyn{{{*/
+ ElementVector* Icefront::CreatePVectorDiagnosticPattyn(void){
+ 
+ 	/*Constants*/
+@@ -580,7 +580,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::CreatePVectorDiagnosticStokes{{{1*/
++/*FUNCTION Icefront::CreatePVectorDiagnosticStokes{{{*/
+ ElementVector* Icefront::CreatePVectorDiagnosticStokes(void){
+ 
+ 	/*Constants*/
+@@ -659,7 +659,7 @@
+ }
+ /*}}}*/
+ #endif
+-/*FUNCTION Icefront::GetDofList {{{1*/
++/*FUNCTION Icefront::GetDofList {{{*/
+ void  Icefront::GetDofList(int** pdoflist,int approximation_enum,int setenum){
+ 
+ 	int i,j;
+@@ -703,7 +703,7 @@
+ 	*pdoflist=doflist;
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::GetSegmentNormal {{{1*/
++/*FUNCTION Icefront::GetSegmentNormal {{{*/
+ void Icefront:: GetSegmentNormal(double* normal,double xyz_list[4][3]){
+ 
+ 	/*Build unit outward pointing vector*/
+@@ -720,7 +720,7 @@
+ 	normal[1]= - vector[0]/norm;
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::GetQuadNormal {{{1*/
++/*FUNCTION Icefront::GetQuadNormal {{{*/
+ void Icefront:: GetQuadNormal(double* normal,double xyz_list[4][3]){
+ 
+ 	/*Build unit outward pointing vector*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/	
+ 
+ /*Constructors/destructors*/
+-/*FUNCTION Friction::Friction() {{{1*/
++/*FUNCTION Friction::Friction() {{{*/
+ Friction::Friction(){
+ 	this->element_type=NULL;
+ 	this->inputs=NULL;
+ 	this->matpar=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION Friction::Friction(const char* element_type, Inputs* inputs,Matpar* matpar,int analysis_type){{{1*/
++/*FUNCTION Friction::Friction(const char* element_type, Inputs* inputs,Matpar* matpar,int analysis_type){{{*/
+ Friction::Friction(const char* element_type_in,Inputs* inputs_in,Matpar* matpar_in, int in_analysis_type){
+ 
+ 	this->analysis_type=in_analysis_type;
+@@ -38,14 +38,14 @@
+ 	this->matpar=matpar_in;
+ }
+ /*}}}*/
+-/*FUNCTION Friction::~Friction() {{{1*/
++/*FUNCTION Friction::~Friction() {{{*/
+ Friction::~Friction(){
+ 	xfree((void**)&element_type);
+ }
+ /*}}}*/
+ 
+ /*methods: */
+-/*FUNCTION Friction::Echo {{{1*/
++/*FUNCTION Friction::Echo {{{*/
+ void Friction::Echo(void){
+ 	printf("Friction:\n");
+ 	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
+@@ -54,7 +54,7 @@
+ 	matpar->Echo();
+ }
+ /*}}}*/
+-/*FUNCTION Friction::GetAlpha2(double* palpha2, GaussTria* gauss,int vxenum,int vyenum,int vzenum){{{1*/
++/*FUNCTION Friction::GetAlpha2(double* palpha2, GaussTria* gauss,int vxenum,int vyenum,int vzenum){{{*/
+ void Friction::GetAlpha2(double* palpha2, GaussTria* gauss,int vxenum,int vyenum,int vzenum){
+ 
+ 	/*This routine calculates the basal friction coefficient 
+@@ -118,7 +118,7 @@
+ 	*palpha2=alpha2;
+ }
+ /*}}}*/
+-/*FUNCTION Friction::GetAlpha2(double* palpha2, GaussPenta* gauss,int vxenum,int vyenum,int vzenum){{{1*/
++/*FUNCTION Friction::GetAlpha2(double* palpha2, GaussPenta* gauss,int vxenum,int vyenum,int vzenum){{{*/
+ void Friction::GetAlpha2(double* palpha2, GaussPenta* gauss,int vxenum,int vyenum,int vzenum){
+ 
+ 	/*This routine calculates the basal friction coefficient 
+@@ -182,7 +182,7 @@
+ 	*palpha2=alpha2;
+ }
+ /*}}}*/
+-/*FUNCTION Friction::GetAlphaComplement(double* palpha_complement, GaussTria* gauss,int vxenum,int vyenum,int vzenum) {{{1*/
++/*FUNCTION Friction::GetAlphaComplement(double* palpha_complement, GaussTria* gauss,int vxenum,int vyenum,int vzenum) {{{*/
+ void Friction::GetAlphaComplement(double* palpha_complement, GaussTria* gauss,int vxenum,int vyenum,int vzenum){
+ 
+ 	/* FrictionGetAlpha2 computes alpha2= drag^2 * Neff ^r * vel ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p. 
+@@ -248,7 +248,7 @@
+ 	*palpha_complement=alpha_complement;
+ }
+ /*}}}*/
+-/*FUNCTION Friction::GetAlphaComplement(double* palpha_complement, GaussPenta* gauss,int vxenum,int vyenum,int vzenum) {{{1*/
++/*FUNCTION Friction::GetAlphaComplement(double* palpha_complement, GaussPenta* gauss,int vxenum,int vyenum,int vzenum) {{{*/
+ void Friction::GetAlphaComplement(double* palpha_complement, GaussPenta* gauss,int vxenum,int vyenum,int vzenum){
+ 
+ 	/* FrictionGetAlpha2 computes alpha2= drag^2 * Neff ^r * vel ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p. 
+@@ -314,7 +314,7 @@
+ 	*palpha_complement=alpha_complement;
+ }
+ /*}}}*/
+-/*FUNCTION Friction::GetInputValue{{{1*/
++/*FUNCTION Friction::GetInputValue{{{*/
+ void Friction::GetInputValue(double* pvalue,GaussTria* gauss,int enum_type){
+ 
+ 	Input* input=inputs->GetInput(enum_type);
+@@ -323,7 +323,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Friction::GetInputValue{{{1*/
++/*FUNCTION Friction::GetInputValue{{{*/
+ void Friction::GetInputValue(double* pvalue,GaussPenta* gauss,int enum_type){
+ 
+ 	Input* input=inputs->GetInput(enum_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.h	(revision 12365)
+@@ -5,7 +5,7 @@
+ #define _PENGRID_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Load.h"
+ class Hook;
+ class Inputs;
+@@ -39,12 +39,12 @@
+ 
+ 	public:
+ 
+-		/*Pengrid constructors, destructors {{{1*/
++		/*Pengrid constructors, destructors {{{*/
+ 		Pengrid();
+ 		Pengrid(int index, int id, IoModel* iomodel,int analysis_type);
+ 		~Pengrid();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -52,7 +52,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Update virtual functions resolution: {{{1*/
++		/*Update virtual functions resolution: {{{*/
+ 		void  InputUpdateFromVector(double* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+ 		void  InputUpdateFromVector(bool* vector, int name, int type);
+@@ -66,7 +66,7 @@
+ 		void  InputUpdateFromSolution(double* solution);
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
+ 		/*}}}*/
+-		/*Load virtual functions definitions: {{{1*/
++		/*Load virtual functions definitions: {{{*/
+ 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
+@@ -77,7 +77,7 @@
+ 		void  PenaltyCreatePVector(Vector* pf, double kmax);
+ 		bool  InAnalysis(int analysis_type);
+ 		/*}}}*/
+-		/*Pengrid management {{{1*/
++		/*Pengrid management {{{*/
+ 		#ifdef _HAVE_DIAGNOSTIC_
+ 		ElementMatrix* PenaltyCreateKMatrixDiagnosticStokes(double kmax);
+ 		#endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -23,7 +23,7 @@
+ #define NUMVERTICES 2
+ 
+ /*Riftfront constructors and destructor*/
+-/*FUNCTION Riftfront::Riftfront(){{{1*/
++/*FUNCTION Riftfront::Riftfront(){{{*/
+ Riftfront::Riftfront(){
+ 	this->inputs=NULL;
+ 	this->parameters=NULL;
+@@ -35,7 +35,7 @@
+ 	this->matpar=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION Riftfront::Riftfront(int id, int i, IoModel* iomodel,int analysis_type){{{1*/
++/*FUNCTION Riftfront::Riftfront(int id, int i, IoModel* iomodel,int analysis_type){{{*/
+ Riftfront::Riftfront(int riftfront_id,int i, IoModel* iomodel,int riftfront_analysis_type){
+ 
+ 	/*data: */
+@@ -116,8 +116,8 @@
+ 	this->matpar= NULL;
+ 		
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::~Riftfront(){{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::~Riftfront(){{{*/
+ Riftfront::~Riftfront(){
+ 	delete inputs;
+ 	this->parameters=NULL;
+@@ -129,7 +129,7 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION Riftfront::Echo {{{1*/
++/*FUNCTION Riftfront::Echo {{{*/
+ void Riftfront::Echo(void){
+ 
+ 	Input* input=NULL;
+@@ -166,8 +166,8 @@
+ 	printf("   frozen: %s\n",frozen ? "true":"false");
+ 		
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::DeepEcho{{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::DeepEcho{{{*/
+ void Riftfront::DeepEcho(void){
+ 
+ 	printf("Riftfront:\n");
+@@ -182,23 +182,23 @@
+ 	if(inputs)inputs->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION Riftfront::Id {{{1*/
++/*FUNCTION Riftfront::Id {{{*/
+ int    Riftfront::Id(void){ return id; }
+-/*}}}1*/
+-/*FUNCTION Riftfront::MyRank {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::MyRank {{{*/
+ int    Riftfront::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::ObjectEnum{{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::ObjectEnum{{{*/
+ int Riftfront::ObjectEnum(void){
+ 
+ 	return RiftfrontEnum;
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::copy {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::copy {{{*/
+ Object* Riftfront::copy() {
+ 	
+ 	Riftfront* riftfront=NULL;
+@@ -246,7 +246,7 @@
+ /*}}}*/
+ 		
+ /*Update virtual functions definitions:*/
+-/*FUNCTION Riftfront::InputUpdateFromConstant(bool constant,int name) {{{1*/
++/*FUNCTION Riftfront::InputUpdateFromConstant(bool constant,int name) {{{*/
+ void  Riftfront::InputUpdateFromConstant(bool constant,int name){
+ 
+ 	/*Check that name is a Riftfront input*/
+@@ -257,7 +257,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Riftfront::InputUpdateFromConstant(double constant,int name) {{{1*/
++/*FUNCTION Riftfront::InputUpdateFromConstant(double constant,int name) {{{*/
+ void  Riftfront::InputUpdateFromConstant(double constant,int name){
+ 
+ 	/*Check that name is a Riftfront input*/
+@@ -268,7 +268,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Riftfront::InputUpdateFromConstant(double* constant,int name) {{{1*/
++/*FUNCTION Riftfront::InputUpdateFromConstant(double* constant,int name) {{{*/
+ void    Riftfront::InputUpdateFromVector(double* vector, int name, int type){
+ 
+ 	/*Check that name is a Riftfront input*/
+@@ -283,7 +283,7 @@
+ 
+ 
+ /*Load virtual functions definitions:*/
+-/*FUNCTION Riftfront::Configure {{{1*/
++/*FUNCTION Riftfront::Configure {{{*/
+ void  Riftfront::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+ 
+ 	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+@@ -302,12 +302,12 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Riftfront::SetCurrentConfiguration {{{1*/
++/*FUNCTION Riftfront::SetCurrentConfiguration {{{*/
+ void  Riftfront::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Riftfront::PenaltyCreateKMatrix {{{1*/
++/*FUNCTION Riftfront::PenaltyCreateKMatrix {{{*/
+ void  Riftfront::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs,double kmax){
+ 
+ 	/*Retrieve parameters: */
+@@ -332,8 +332,8 @@
+ 		delete Ke;
+ 	}
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::PenaltyCreatePVector {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::PenaltyCreatePVector {{{*/
+ void  Riftfront::PenaltyCreatePVector(Vector* pf,double kmax){
+ 
+ 	/*Retrieve parameters: */
+@@ -358,20 +358,20 @@
+ 		delete pe;
+ 	}
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::CreateKMatrix {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::CreateKMatrix {{{*/
+ void  Riftfront::CreateKMatrix(Matrix* Kff, Matrix* Kfs){
+ 	/*do nothing: */
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::CreatePVector {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::CreatePVector {{{*/
+ void  Riftfront::CreatePVector(Vector* pf){
+ 	/*do nothing: */
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::InAnalysis{{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::InAnalysis{{{*/
+ bool Riftfront::InAnalysis(int in_analysis_type){
+ 	if (in_analysis_type==this->analysis_type) return true;
+ 	else return false;
+@@ -379,7 +379,7 @@
+ /*}}}*/
+ 
+ /*Riftfront numerics*/
+-/*FUNCTION Riftfront::PenaltyCreateKMatrixDiagnosticHoriz {{{1*/
++/*FUNCTION Riftfront::PenaltyCreateKMatrixDiagnosticHoriz {{{*/
+ ElementMatrix* Riftfront::PenaltyCreateKMatrixDiagnosticHoriz(double kmax){
+ 
+ 	const int   numdof = NDOF2*NUMVERTICES;
+@@ -461,8 +461,8 @@
+ 	/*Clean up and return*/
+ 	return Ke;
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::PenaltyCreatePVectorDiagnosticHoriz {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::PenaltyCreatePVectorDiagnosticHoriz {{{*/
+ ElementVector* Riftfront::PenaltyCreatePVectorDiagnosticHoriz(double kmax){
+ 
+ 	const int   numdof = NDOF2*NUMVERTICES;
+@@ -561,8 +561,8 @@
+ 	/*Clean up and return*/
+ 	return pe;
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::Constrain {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::Constrain {{{*/
+ #define _ZIGZAGCOUNTER_
+ 
+ int Riftfront::Constrain(int* punstable){
+@@ -653,24 +653,24 @@
+ 	*punstable=unstable;
+ 	return 1;
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::FreezeConstraints{{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::FreezeConstraints{{{*/
+ void   Riftfront::FreezeConstraints(void){
+ 
+ 	/*Just set frozen flag to 1: */
+ 	this->frozen=1;
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::IsFrozen{{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::IsFrozen{{{*/
+ bool   Riftfront::IsFrozen(void){
+ 
+ 	/*Just set frozen flag to 1: */
+ 	if(this->frozen)return 1;
+ 	else return 0;
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::IsMaterialStable {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::IsMaterialStable {{{*/
+ int   Riftfront::IsMaterialStable(void){
+ 
+ 	int found=0;
+@@ -687,8 +687,8 @@
+ 
+ 	return this->material_converged;
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::MaxPenetration {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::MaxPenetration {{{*/
+ int   Riftfront::MaxPenetration(double* ppenetration){
+ 
+ 	const int     numnodes=2;
+@@ -733,8 +733,8 @@
+ 	*ppenetration=penetration;
+ 	return 1;
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::Penetration {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::Penetration {{{*/
+ int   Riftfront::Penetration(double* ppenetration){
+ 
+ 	double    vx1;
+@@ -772,8 +772,8 @@
+ 	*ppenetration=penetration;
+ 	return 1;
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::PotentialUnstableConstraint {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::PotentialUnstableConstraint {{{*/
+ int   Riftfront::PotentialUnstableConstraint(int* punstable){
+ 
+ 
+@@ -825,8 +825,8 @@
+ 	*punstable=unstable;
+ 	return 1;
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::PreConstrain {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::PreConstrain {{{*/
+ int   Riftfront::PreConstrain(int* punstable){
+ 
+ 	const int   numnodes    = 2;
+@@ -890,18 +890,18 @@
+ 	*punstable=unstable;
+ 	return 1;
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::PreStable {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::PreStable {{{*/
+ bool  Riftfront::PreStable(){
+ 	return prestable;
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::SetPreStable {{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::SetPreStable {{{*/
+ void Riftfront::SetPreStable(){
+ 	prestable=1;
+ }
+-/*}}}1*/
+-/*FUNCTION Riftfront::IsInput{{{1*/
++/*}}}*/
++/*FUNCTION Riftfront::IsInput{{{*/
+ bool Riftfront::IsInput(int name){
+ 	if (
+ 				name==ConvergedEnum ||
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*DoubleMatExternalResult constructors and destructor*/
+-/*FUNCTION DoubleMatExternalResult::DoubleMatExternalResult(){{{1*/
++/*FUNCTION DoubleMatExternalResult::DoubleMatExternalResult(){{{*/
+ DoubleMatExternalResult::DoubleMatExternalResult(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatExternalResult::DoubleMatExternalResult(int in_id, int enum_type,IssmDoubleMat values,int M,int N,int in_step,double in_time){{{1*/
++/*FUNCTION DoubleMatExternalResult::DoubleMatExternalResult(int in_id, int enum_type,IssmDoubleMat values,int M,int N,int in_step,double in_time){{{*/
+ DoubleMatExternalResult::DoubleMatExternalResult(int in_id, int in_enum_type,double* in_values, int in_M,int in_N,int in_step,double in_time){
+ 
+ 	id=in_id;
+@@ -44,7 +44,7 @@
+ 	time=in_time;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatExternalResult::~DoubleMatExternalResult(){{{1*/
++/*FUNCTION DoubleMatExternalResult::~DoubleMatExternalResult(){{{*/
+ DoubleMatExternalResult::~DoubleMatExternalResult(){
+ 
+ 	xfree((void**)&this->values);
+@@ -53,7 +53,7 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION DoubleMatExternalResult::Echo {{{1*/
++/*FUNCTION DoubleMatExternalResult::Echo {{{*/
+ void DoubleMatExternalResult::Echo(void){
+ 
+ 	printf("DoubleMatExternalResult:\n");
+@@ -64,7 +64,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatExternalResult::DeepEcho{{{1*/
++/*FUNCTION DoubleMatExternalResult::DeepEcho{{{*/
+ void DoubleMatExternalResult::DeepEcho(void){
+ 
+ 	int i,j;
+@@ -86,23 +86,23 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatExternalResult::Id{{{1*/
++/*FUNCTION DoubleMatExternalResult::Id{{{*/
+ int    DoubleMatExternalResult::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION DoubleMatExternalResult::MyRank{{{1*/
++/*FUNCTION DoubleMatExternalResult::MyRank{{{*/
+ int    DoubleMatExternalResult::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatExternalResult::ObjectEnum{{{1*/
++/*FUNCTION DoubleMatExternalResult::ObjectEnum{{{*/
+ int DoubleMatExternalResult::ObjectEnum(void){
+ 
+ 	return DoubleMatExternalResultEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatExternalResult::copy{{{1*/
++/*FUNCTION DoubleMatExternalResult::copy{{{*/
+ Object* DoubleMatExternalResult::copy() {
+ 	
+ 	return new DoubleMatExternalResult(this->id,this->enum_type,this->values,this->M,this->N,this->step,this->time);
+@@ -111,7 +111,7 @@
+ /*}}}*/
+ 
+ /*DoubleMatExternalResult management: */
+-/*FUNCTION DoubleMatExternalResult::WriteData{{{1*/
++/*FUNCTION DoubleMatExternalResult::WriteData{{{*/
+ void   DoubleMatExternalResult::WriteData(FILE* fid,bool io_gather){
+ 
+ 	int     length;
+@@ -146,13 +146,13 @@
+ 	fwrite(this->values,cols*rows*sizeof(double),1,fid);
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION DoubleMatExternalResult::GetResultName{{{1*/
++/*}}}*/
++/*FUNCTION DoubleMatExternalResult::GetResultName{{{*/
+ void DoubleMatExternalResult::GetResultName(char** pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatExternalResult::GetStep{{{1*/
++/*FUNCTION DoubleMatExternalResult::GetStep{{{*/
+ int DoubleMatExternalResult::GetStep(void){
+ 
+ 	return this->step;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*PetscVecExternalResult constructors and destructor*/
+-/*FUNCTION PetscVecExternalResult::PetscVecExternalResult(){{{1*/
++/*FUNCTION PetscVecExternalResult::PetscVecExternalResult(){{{*/
+ PetscVecExternalResult::PetscVecExternalResult(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION PetscVecExternalResult::PetscVecExternalResult(int enum_type,IssmPetscVec value){{{1*/
++/*FUNCTION PetscVecExternalResult::PetscVecExternalResult(int enum_type,IssmPetscVec value){{{*/
+ PetscVecExternalResult::PetscVecExternalResult(int in_id, int in_enum_type,Vector* in_value,int in_step, double in_time){
+ 
+ 	id=in_id;
+@@ -43,14 +43,14 @@
+ 	time=in_time;
+ }
+ /*}}}*/
+-/*FUNCTION PetscVecExternalResult::~PetscVecExternalResult(){{{1*/
++/*FUNCTION PetscVecExternalResult::~PetscVecExternalResult(){{{*/
+ PetscVecExternalResult::~PetscVecExternalResult(){
+ 	VecFree(&value);
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION PetscVecExternalResult::Echo {{{1*/
++/*FUNCTION PetscVecExternalResult::Echo {{{*/
+ void PetscVecExternalResult::Echo(void){
+ 
+ 	printf("PetscVecExternalResult:\n");
+@@ -58,7 +58,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PetscVecExternalResult::DeepEcho{{{1*/
++/*FUNCTION PetscVecExternalResult::DeepEcho{{{*/
+ void PetscVecExternalResult::DeepEcho(void){
+ 
+ 	int i;
+@@ -70,23 +70,23 @@
+ 	VecView(value,PETSC_VIEWER_STDOUT_WORLD);
+ }
+ /*}}}*/
+-/*FUNCTION PetscVecExternalResult::Id{{{1*/
++/*FUNCTION PetscVecExternalResult::Id{{{*/
+ int    PetscVecExternalResult::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION PetscVecExternalResult::MyRank{{{1*/
++/*FUNCTION PetscVecExternalResult::MyRank{{{*/
+ int    PetscVecExternalResult::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION PetscVecExternalResult::ObjectEnum{{{1*/
++/*FUNCTION PetscVecExternalResult::ObjectEnum{{{*/
+ int PetscVecExternalResult::ObjectEnum(void){
+ 
+ 	return PetscVecExternalResultEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PetscVecExternalResult::copy{{{1*/
++/*FUNCTION PetscVecExternalResult::copy{{{*/
+ Object* PetscVecExternalResult::copy() {
+ 	
+ 	return new PetscVecExternalResult(this->id,this->enum_type,this->value,this->step,this->time);
+@@ -95,7 +95,7 @@
+ /*}}}*/
+ 
+ /*PetscVecExternalResult management: */
+-/*FUNCTION PetscVecExternalResult::WriteData{{{1*/
++/*FUNCTION PetscVecExternalResult::WriteData{{{*/
+ void   PetscVecExternalResult::WriteData(FILE* fid,bool io_gather){
+ 
+ 	int     length;
+@@ -133,13 +133,13 @@
+ 	/*Free ressources:*/
+ 	xfree((void**)&serialvec);
+ }
+-/*}}}1*/
+-/*FUNCTION PetscVecExternalResult::GetResultName{{{1*/
++/*}}}*/
++/*FUNCTION PetscVecExternalResult::GetResultName{{{*/
+ void PetscVecExternalResult::GetResultName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION PetscVecExternalResult::GetStep{{{1*/
++/*FUNCTION PetscVecExternalResult::GetStep{{{*/
+ int PetscVecExternalResult::GetStep(void){
+ 
+ 	return this->step;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _DOUBLEVECEXTERNALRESULT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ 
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+@@ -32,12 +32,12 @@
+ 		double time;
+ 
+ 	public:
+-		/*DoubleVecExternalResult constructors, destructors: {{{1*/
++		/*DoubleVecExternalResult constructors, destructors: {{{*/
+ 		DoubleVecExternalResult();
+ 		DoubleVecExternalResult(int id,int enum_type,double* values,int M,int step, double time);
+ 		~DoubleVecExternalResult();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -45,7 +45,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*ExternalResult management: {{{1*/
++		/*ExternalResult management: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _DOUBLEEXTERNALRESULT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ 
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+@@ -33,12 +33,12 @@
+ 		double time;
+ 
+ 
+-		/*DoubleExternalResult constructors, destructors: {{{1*/
++		/*DoubleExternalResult constructors, destructors: {{{*/
+ 		DoubleExternalResult();
+ 		DoubleExternalResult(int id,int enum_type,double value,int step,double time);
+ 		~DoubleExternalResult();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -46,7 +46,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*ExternalResult management: {{{1*/
++		/*ExternalResult management: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _INTEXTERNALRESULT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ 
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+@@ -30,13 +30,13 @@
+ 		double time;
+ 
+ 
+-		/*IntExternalResult constructors, destructors: {{{1*/
++		/*IntExternalResult constructors, destructors: {{{*/
+ 		IntExternalResult();
+ 		IntExternalResult(int id,int enum_type,int value,int step,double time);
+ 		~IntExternalResult();
+ 
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -44,7 +44,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*ExternalResult managemnet: {{{1*/
++		/*ExternalResult managemnet: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _BOOLEXTERNALRESULT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ 
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+@@ -31,12 +31,12 @@
+ 		int    step;
+ 		double time;
+ 
+-		/*BoolExternalResult constructors, destructors: {{{1*/
++		/*BoolExternalResult constructors, destructors: {{{*/
+ 		BoolExternalResult();
+ 		BoolExternalResult(int id, int enum_type,bool value,int step,double time);
+ 		~BoolExternalResult();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -44,7 +44,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*ExternalResult management: {{{1*/
++		/*ExternalResult management: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _DOUBLEMATEXTERNALRESULT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ 
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+@@ -33,12 +33,12 @@
+ 		double time;
+ 
+ 	public:
+-		/*DoubleMatExternalResult constructors, destructors: {{{1*/
++		/*DoubleMatExternalResult constructors, destructors: {{{*/
+ 		DoubleMatExternalResult();
+ 		DoubleMatExternalResult(int id,int enum_type,double* values,int M,int N,int step, double time);
+ 		~DoubleMatExternalResult();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -46,7 +46,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*ExternalResult managemnet: {{{1*/
++		/*ExternalResult managemnet: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _PETSCVECEXTERNALRESULT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ 
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+@@ -32,12 +32,12 @@
+ 		double time;
+ 
+ 	public:
+-		/*PetscVecExternalResult constructors, destructors: {{{1*/
++		/*PetscVecExternalResult constructors, destructors: {{{*/
+ 		PetscVecExternalResult();
+ 		PetscVecExternalResult(int id,int enum_type,Vector* value, int step, double time);
+ 		~PetscVecExternalResult();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -45,7 +45,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*ExternalResult management: {{{1*/
++		/*ExternalResult management: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/ExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/ExternalResult.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/ExternalResult.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _EXTERNALRESULT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ 
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+@@ -24,7 +24,7 @@
+ 	public: 
+ 		
+ 		virtual        ~ExternalResult(){};
+-		/*Virtual functions:{{{1*/
++		/*Virtual functions:{{{*/
+ 		virtual int   InstanceEnum()=0;
+ 		virtual void  WriteData(FILE* fid,bool io_gather)=0;
+ 		virtual void  GetResultName(char**)=0;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*StringExternalResult constructors and destructor*/
+-/*FUNCTION StringExternalResult::StringExternalResult(){{{1*/
++/*FUNCTION StringExternalResult::StringExternalResult(){{{*/
+ StringExternalResult::StringExternalResult(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION StringExternalResult::StringExternalResult(int enum_type,IssmString value){{{1*/
++/*FUNCTION StringExternalResult::StringExternalResult(int enum_type,IssmString value){{{*/
+ StringExternalResult::StringExternalResult(int in_id, int in_enum_type,char* in_value,int in_step, double in_time){
+ 
+ 	id=in_id;
+@@ -38,19 +38,19 @@
+ 	
+ }
+ /*}}}*/
+-/*FUNCTION StringExternalResult::~StringExternalResult(){{{1*/
++/*FUNCTION StringExternalResult::~StringExternalResult(){{{*/
+ StringExternalResult::~StringExternalResult(){
+ 	xfree((void**)&value);
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION StringExternalResult::Echo {{{1*/
++/*FUNCTION StringExternalResult::Echo {{{*/
+ void StringExternalResult::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION StringExternalResult::DeepEcho{{{1*/
++/*FUNCTION StringExternalResult::DeepEcho{{{*/
+ void StringExternalResult::DeepEcho(void){
+ 
+ 	printf("StringExternalResult:\n");
+@@ -61,23 +61,23 @@
+ 	printf("   time: %g\n",this->time);
+ }
+ /*}}}*/
+-/*FUNCTION StringExternalResult::Id{{{1*/
++/*FUNCTION StringExternalResult::Id{{{*/
+ int    StringExternalResult::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION StringExternalResult::MyRank{{{1*/
++/*FUNCTION StringExternalResult::MyRank{{{*/
+ int    StringExternalResult::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION StringExternalResult::ObjectEnum{{{1*/
++/*FUNCTION StringExternalResult::ObjectEnum{{{*/
+ int StringExternalResult::ObjectEnum(void){
+ 
+ 	return StringExternalResultEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION StringExternalResult::copy{{{1*/
++/*FUNCTION StringExternalResult::copy{{{*/
+ Object* StringExternalResult::copy() {
+ 	
+ 	return new StringExternalResult(this->id,this->enum_type,this->value,this->step,this->time);
+@@ -86,7 +86,7 @@
+ /*}}}*/
+ 
+ /*StringExternalResult management: */
+-/*FUNCTION StringExternalResult::WriteData{{{1*/
++/*FUNCTION StringExternalResult::WriteData{{{*/
+ void   StringExternalResult::WriteData(FILE* fid,bool io_gather){
+ 
+ 	int     length;
+@@ -117,13 +117,13 @@
+ 	fwrite(this->value,length,1,fid);
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION StringExternalResult::GetResultName{{{1*/
++/*}}}*/
++/*FUNCTION StringExternalResult::GetResultName{{{*/
+ void StringExternalResult::GetResultName(char**pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION StringExternalResult::GetStep{{{1*/
++/*FUNCTION StringExternalResult::GetStep{{{*/
+ int StringExternalResult::GetStep(void){
+ 
+ 	return this->step;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*DoubleVecExternalResult constructors and destructor*/
+-/*FUNCTION DoubleVecExternalResult::DoubleVecExternalResult(){{{1*/
++/*FUNCTION DoubleVecExternalResult::DoubleVecExternalResult(){{{*/
+ DoubleVecExternalResult::DoubleVecExternalResult(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecExternalResult::DoubleVecExternalResult(int enum_type,IssmDoubleVec values,int M,int in_step,double in_time){{{1*/
++/*FUNCTION DoubleVecExternalResult::DoubleVecExternalResult(int enum_type,IssmDoubleVec values,int M,int in_step,double in_time){{{*/
+ DoubleVecExternalResult::DoubleVecExternalResult(int in_id, int in_enum_type,double* in_values, int in_M,int in_step,double in_time){
+ 
+ 	id=in_id;
+@@ -42,7 +42,7 @@
+ 	time=in_time;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecExternalResult::~DoubleVecExternalResult(){{{1*/
++/*FUNCTION DoubleVecExternalResult::~DoubleVecExternalResult(){{{*/
+ DoubleVecExternalResult::~DoubleVecExternalResult(){
+ 	xfree((void**)&values);
+ 	return;
+@@ -50,7 +50,7 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION DoubleVecExternalResult::Echo {{{1*/
++/*FUNCTION DoubleVecExternalResult::Echo {{{*/
+ void DoubleVecExternalResult::Echo(void){
+ 
+ 	printf("DoubleVecExternalResult:\n");
+@@ -61,7 +61,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecExternalResult::DeepEcho{{{1*/
++/*FUNCTION DoubleVecExternalResult::DeepEcho{{{*/
+ void DoubleVecExternalResult::DeepEcho(void){
+ 
+ 	int i;
+@@ -77,23 +77,23 @@
+ 	printf("   time: %g\n",this->time);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecExternalResult::Id{{{1*/
++/*FUNCTION DoubleVecExternalResult::Id{{{*/
+ int    DoubleVecExternalResult::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION DoubleVecExternalResult::MyRank{{{1*/
++/*FUNCTION DoubleVecExternalResult::MyRank{{{*/
+ int    DoubleVecExternalResult::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecExternalResult::ObjectEnum{{{1*/
++/*FUNCTION DoubleVecExternalResult::ObjectEnum{{{*/
+ int DoubleVecExternalResult::ObjectEnum(void){
+ 
+ 	return DoubleVecExternalResultEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecExternalResult::copy{{{1*/
++/*FUNCTION DoubleVecExternalResult::copy{{{*/
+ Object* DoubleVecExternalResult::copy() {
+ 	
+ 	return new DoubleVecExternalResult(this->id,this->enum_type,this->values,this->M,this->step,this->time);
+@@ -102,7 +102,7 @@
+ /*}}}*/
+ 
+ /*DoubleVecExternalResult management: */
+-/*FUNCTION DoubleVecExternalResult::WriteData{{{1*/
++/*FUNCTION DoubleVecExternalResult::WriteData{{{*/
+ void   DoubleVecExternalResult::WriteData(FILE* fid,bool io_gather){
+ 
+ 	int     length;
+@@ -133,13 +133,13 @@
+ 	fwrite(this->values,size*sizeof(double),1,fid);
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION DoubleVecExternalResult::GetResultName{{{1*/
++/*}}}*/
++/*FUNCTION DoubleVecExternalResult::GetResultName{{{*/
+ void DoubleVecExternalResult::GetResultName(char** pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecExternalResult::GetStep{{{1*/
++/*FUNCTION DoubleVecExternalResult::GetStep{{{*/
+ int DoubleVecExternalResult::GetStep(void){
+ 
+ 	return this->step;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*DoubleExternalResult constructors and destructor*/
+-/*FUNCTION DoubleExternalResult::DoubleExternalResult(){{{1*/
++/*FUNCTION DoubleExternalResult::DoubleExternalResult(){{{*/
+ DoubleExternalResult::DoubleExternalResult(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleExternalResult::DoubleExternalResult(int enum_type,double value){{{1*/
++/*FUNCTION DoubleExternalResult::DoubleExternalResult(int enum_type,double value){{{*/
+ DoubleExternalResult::DoubleExternalResult(int in_id, int in_enum_type,double in_value,int in_step, double in_time){
+ 
+ 	id=in_id;
+@@ -35,19 +35,19 @@
+ 	time=in_time;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleExternalResult::~DoubleExternalResult(){{{1*/
++/*FUNCTION DoubleExternalResult::~DoubleExternalResult(){{{*/
+ DoubleExternalResult::~DoubleExternalResult(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION DoubleExternalResult::Echo {{{1*/
++/*FUNCTION DoubleExternalResult::Echo {{{*/
+ void DoubleExternalResult::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION DoubleExternalResult::DeepEcho{{{1*/
++/*FUNCTION DoubleExternalResult::DeepEcho{{{*/
+ void DoubleExternalResult::DeepEcho(void){
+ 
+ 	printf("DoubleExternalResult:\n");
+@@ -58,23 +58,23 @@
+ 	printf("   time: %g\n",this->time);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleExternalResult::Id{{{1*/
++/*FUNCTION DoubleExternalResult::Id{{{*/
+ int    DoubleExternalResult::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION DoubleExternalResult::MyRank{{{1*/
++/*FUNCTION DoubleExternalResult::MyRank{{{*/
+ int    DoubleExternalResult::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleExternalResult::ObjectEnum{{{1*/
++/*FUNCTION DoubleExternalResult::ObjectEnum{{{*/
+ int DoubleExternalResult::ObjectEnum(void){
+ 
+ 	return DoubleExternalResultEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleExternalResult::copy{{{1*/
++/*FUNCTION DoubleExternalResult::copy{{{*/
+ Object* DoubleExternalResult::copy() {
+ 	
+ 	return new DoubleExternalResult(this->id,this->enum_type,this->value,this->step,this->time);
+@@ -83,7 +83,7 @@
+ /*}}}*/
+ 
+ /*DoubleExternalResult management: */
+-/*FUNCTION DoubleExternalResult::WriteData{{{1*/
++/*FUNCTION DoubleExternalResult::WriteData{{{*/
+ void   DoubleExternalResult::WriteData(FILE* fid,bool io_gather){
+ 
+ 	int     length;
+@@ -114,13 +114,13 @@
+ 	fwrite(&this->value,size*sizeof(double),1,fid);
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION DoubleExternalResult::GetResultName{{{1*/
++/*}}}*/
++/*FUNCTION DoubleExternalResult::GetResultName{{{*/
+ void DoubleExternalResult::GetResultName(char** pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleExternalResult::GetStep{{{1*/
++/*FUNCTION DoubleExternalResult::GetStep{{{*/
+ int DoubleExternalResult::GetStep(void){
+ 
+ 	return this->step;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*IntExternalResult constructors and destructor*/
+-/*FUNCTION IntExternalResult::IntExternalResult(){{{1*/
++/*FUNCTION IntExternalResult::IntExternalResult(){{{*/
+ IntExternalResult::IntExternalResult(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION IntExternalResult::IntExternalResult(int in_id, int in_enum_type,int in_value,int in_step, double in_time){{{1*/
++/*FUNCTION IntExternalResult::IntExternalResult(int in_id, int in_enum_type,int in_value,int in_step, double in_time){{{*/
+ IntExternalResult::IntExternalResult(int in_id, int in_enum_type,int in_value,int in_step, double in_time){
+ 
+ 	id=in_id;
+@@ -35,19 +35,19 @@
+ 	time=in_time;
+ }
+ /*}}}*/
+-/*FUNCTION IntExternalResult::~IntExternalResult(){{{1*/
++/*FUNCTION IntExternalResult::~IntExternalResult(){{{*/
+ IntExternalResult::~IntExternalResult(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION IntExternalResult::Echo {{{1*/
++/*FUNCTION IntExternalResult::Echo {{{*/
+ void IntExternalResult::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION IntExternalResult::DeepEcho{{{1*/
++/*FUNCTION IntExternalResult::DeepEcho{{{*/
+ void IntExternalResult::DeepEcho(void){
+ 
+ 	printf("IntExternalResult:\n");
+@@ -58,23 +58,23 @@
+ 	printf("   time: %g\n",this->time);
+ }
+ /*}}}*/
+-/*FUNCTION IntExternalResult::Id{{{1*/
++/*FUNCTION IntExternalResult::Id{{{*/
+ int    IntExternalResult::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION IntExternalResult::MyRank{{{1*/
++/*FUNCTION IntExternalResult::MyRank{{{*/
+ int    IntExternalResult::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION IntExternalResult::ObjectEnum{{{1*/
++/*FUNCTION IntExternalResult::ObjectEnum{{{*/
+ int IntExternalResult::ObjectEnum(void){
+ 
+ 	return IntExternalResultEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IntExternalResult::copy{{{1*/
++/*FUNCTION IntExternalResult::copy{{{*/
+ Object* IntExternalResult::copy() {
+ 	
+ 	return new IntExternalResult(this->id,this->enum_type,this->value,this->step,this->time);
+@@ -83,7 +83,7 @@
+ /*}}}*/
+ 
+ /*IntExternalResult management: */
+-/*FUNCTION IntExternalResult::WriteData{{{1*/
++/*FUNCTION IntExternalResult::WriteData{{{*/
+ void   IntExternalResult::WriteData(FILE* fid,bool io_gather){
+ 
+ 	int     length;
+@@ -118,13 +118,13 @@
+ 	fwrite(&integer,size*sizeof(double),1,fid);
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION IntExternalResult::GetResultName{{{1*/
++/*}}}*/
++/*FUNCTION IntExternalResult::GetResultName{{{*/
+ void IntExternalResult::GetResultName(char** pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION IntExternalResult::GetStep{{{1*/
++/*FUNCTION IntExternalResult::GetStep{{{*/
+ int IntExternalResult::GetStep(void){
+ 
+ 	return this->step;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*header files: */
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,12 +20,12 @@
+ /*}}}*/
+ 
+ /*BoolExternalResult constructors and destructor*/
+-/*FUNCTION BoolExternalResult::BoolExternalResult(){{{1*/
++/*FUNCTION BoolExternalResult::BoolExternalResult(){{{*/
+ BoolExternalResult::BoolExternalResult(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION BoolExternalResult::BoolExternalResult(int enum_type,bool value){{{1*/
++/*FUNCTION BoolExternalResult::BoolExternalResult(int enum_type,bool value){{{*/
+ BoolExternalResult::BoolExternalResult(int in_id, int in_enum_type,bool in_value,int in_step, double in_time){
+ 
+ 	id=in_id;
+@@ -35,19 +35,19 @@
+ 	time=in_time;
+ }
+ /*}}}*/
+-/*FUNCTION BoolExternalResult::~BoolExternalResult(){{{1*/
++/*FUNCTION BoolExternalResult::~BoolExternalResult(){{{*/
+ BoolExternalResult::~BoolExternalResult(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION BoolExternalResult::Echo {{{1*/
++/*FUNCTION BoolExternalResult::Echo {{{*/
+ void BoolExternalResult::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION BoolExternalResult::DeepEcho{{{1*/
++/*FUNCTION BoolExternalResult::DeepEcho{{{*/
+ void BoolExternalResult::DeepEcho(void){
+ 
+ 	printf("BoolExternalResult:\n");
+@@ -58,23 +58,23 @@
+ 	printf("   time: %g\n",this->time);
+ }
+ /*}}}*/
+-/*FUNCTION BoolExternalResult::Id{{{1*/
++/*FUNCTION BoolExternalResult::Id{{{*/
+ int    BoolExternalResult::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION BoolExternalResult::MyRank{{{1*/
++/*FUNCTION BoolExternalResult::MyRank{{{*/
+ int    BoolExternalResult::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION BoolExternalResult::ObjectEnum{{{1*/
++/*FUNCTION BoolExternalResult::ObjectEnum{{{*/
+ int BoolExternalResult::ObjectEnum(void){
+ 
+ 	return BoolExternalResultEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolExternalResult::copy{{{1*/
++/*FUNCTION BoolExternalResult::copy{{{*/
+ Object* BoolExternalResult::copy() {
+ 	
+ 	return new BoolExternalResult(this->id,this->enum_type,this->value,this->step,this->time);
+@@ -83,7 +83,7 @@
+ /*}}}*/
+ 
+ /*BoolExternalResult management: */
+-/*FUNCTION BoolExternalResult::WriteData{{{1*/
++/*FUNCTION BoolExternalResult::WriteData{{{*/
+ void   BoolExternalResult::WriteData(FILE* fid,bool io_gather){
+ 
+ 	int     length;
+@@ -118,13 +118,13 @@
+ 	fwrite(&boolean,size*sizeof(double),1,fid);
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION BoolExternalResult::GetResultName{{{1*/
++/*}}}*/
++/*FUNCTION BoolExternalResult::GetResultName{{{*/
+ void BoolExternalResult::GetResultName(char** pname){
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION BoolExternalResult::GetStep{{{1*/
++/*FUNCTION BoolExternalResult::GetStep{{{*/
+ int BoolExternalResult::GetStep(void){
+ 
+ 	return this->step;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _STRINGEXTERNALRESULT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ 
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+@@ -32,12 +32,12 @@
+ 		double time;
+ 
+ 	public:
+-		/*StringExternalResult constructors, destructors: {{{1*/
++		/*StringExternalResult constructors, destructors: {{{*/
+ 		StringExternalResult();
+ 		StringExternalResult(int id,int enum_type,char* value,int step, double time);
+ 		~StringExternalResult();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -45,7 +45,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*ExternalResult management: {{{1*/
++		/*ExternalResult management: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp	(revision 12365)
+@@ -8,13 +8,13 @@
+ namespace bamg {
+ 
+ 	/*Constructors Destructors*/
+-	/*FUNCTION ListofIntersectionTriangles::ListofIntersectionTriangles{{{1*/
++	/*FUNCTION ListofIntersectionTriangles::ListofIntersectionTriangles{{{*/
+ 	ListofIntersectionTriangles::ListofIntersectionTriangles(int n,int m)
+ 	  : MaxSize(n), Size(0), len(-1),state(-1),lIntTria(new IntersectionTriangles[n]) ,
+ 	  NbSeg(0), MaxNbSeg(m), lSegsI(new SegInterpolation[m]){
+ 	  }
+ 	/*}}}*/
+-	/*FUNCTION ListofIntersectionTriangles::~ListofIntersectionTriangles{{{1*/
++	/*FUNCTION ListofIntersectionTriangles::~ListofIntersectionTriangles{{{*/
+ 	ListofIntersectionTriangles::~ListofIntersectionTriangles(){
+ 		if (lIntTria) delete [] lIntTria,lIntTria=0;
+ 		if (lSegsI) delete [] lSegsI,lSegsI=0;
+@@ -22,14 +22,14 @@
+ 	/*}}}*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION ListofIntersectionTriangles::Init{{{1*/
++	/*FUNCTION ListofIntersectionTriangles::Init{{{*/
+ 	void ListofIntersectionTriangles::Init(void){
+ 		state=0;
+ 		len=0;
+ 		Size=0;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION ListofIntersectionTriangles::Length{{{1*/
++	/*FUNCTION ListofIntersectionTriangles::Length{{{*/
+ 	double  ListofIntersectionTriangles::Length(){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Length)*/
+ 
+@@ -76,8 +76,8 @@
+ 
+ 		return s;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION ListofIntersectionTriangles::NewItem(Triangle * tt,double d0,double d1,double d2) {{{1*/
++	/*}}}*/
++	/*FUNCTION ListofIntersectionTriangles::NewItem(Triangle * tt,double d0,double d1,double d2) {{{*/
+ 	int  ListofIntersectionTriangles::NewItem(Triangle * tt,double d0,double d1,double d2) { 
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/NewItem)*/
+ 
+@@ -104,8 +104,8 @@
+ 		else n=Size-1;
+ 		return n;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION ListofIntersectionTriangles::NewItem(R2 A,const Metric & mm){{{1*/
++	/*}}}*/
++	/*FUNCTION ListofIntersectionTriangles::NewItem(R2 A,const Metric & mm){{{*/
+ 	int ListofIntersectionTriangles::NewItem(R2 A,const Metric & mm) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/NewItem)*/
+ 
+@@ -120,8 +120,8 @@
+ 		else  n=Size-1;
+ 		return  n; 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION ListofIntersectionTriangles::NewPoints{{{1*/
++	/*}}}*/
++	/*FUNCTION ListofIntersectionTriangles::NewPoints{{{*/
+ 	long ListofIntersectionTriangles::NewPoints(BamgVertex* vertices,long &nbv,long maxnbv){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/NewPoints)*/
+ 
+@@ -177,8 +177,8 @@
+ 		  }
+ 		return nbv-nbvold;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION ListofIntersectionTriangles::NewSubSeg{{{1*/
++	/*}}}*/
++	/*FUNCTION ListofIntersectionTriangles::NewSubSeg{{{*/
+ 	void  ListofIntersectionTriangles::NewSubSeg(GeomEdge *e,double s0,double s1){ 
+ 		long int verbosity=0;
+ 		if (NbSeg>=MaxNbSeg) {
+@@ -200,7 +200,7 @@
+ 		NbSeg++;           
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION ListofIntersectionTriangles::ReShape{{{1*/
++	/*FUNCTION ListofIntersectionTriangles::ReShape{{{*/
+ 	void ListofIntersectionTriangles::ReShape(){ 
+ 
+ 		register int newsize = MaxSize*2;
+@@ -216,7 +216,7 @@
+ 		lIntTria = nw; // copy pointer
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION ListofIntersectionTriangles::SplitEdge{{{1*/
++	/*FUNCTION ListofIntersectionTriangles::SplitEdge{{{*/
+ 	void ListofIntersectionTriangles::SplitEdge(const Mesh & Bh, const R2 &A,const R2  &B,int nbegin) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ListofIntersectionTriangles)*/
+ 
+@@ -420,6 +420,6 @@
+ 				}// we  go outside of omega 
+ 		} // for(;;)
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Triangle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Triangle.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Triangle.cpp	(revision 12365)
+@@ -8,12 +8,12 @@
+ namespace bamg {
+ 
+ 	/*Constructors/Destructors*/
+-	/*FUNCTION Triangle(){{{1*/
++	/*FUNCTION Triangle(){{{*/
+ 	Triangle::Triangle(void){
+ 
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Triangle(Mesh *Th,long i,long j,long k) {{{1*/
++	/*FUNCTION Triangle(Mesh *Th,long i,long j,long k) {{{*/
+ 	Triangle::Triangle(Mesh *Th,long i,long j,long k) {
+ 		BamgVertex *v=Th->vertices;
+ 		long nbv = Th->nbv;
+@@ -31,7 +31,7 @@
+ 		det=0;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Triangle(BamgVertex *v0,BamgVertex *v1,BamgVertex *v2) {{{1*/
++	/*FUNCTION Triangle(BamgVertex *v0,BamgVertex *v1,BamgVertex *v2) {{{*/
+ 	Triangle::Triangle(BamgVertex *v0,BamgVertex *v1,BamgVertex *v2){
+ 		vertices[0]=v0;
+ 		vertices[1]=v1;
+@@ -46,11 +46,11 @@
+ 	/*}}}*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION Triangle::Adj{{{1*/
++	/*FUNCTION Triangle::Adj{{{*/
+ 	AdjacentTriangle Triangle::Adj(int i)  const {
+ 		return AdjacentTriangle(adj[i],AdjEdgeIndex[i]&3);
+ 	};/*}}}*/
+-	/*FUNCTION Triangle::Anisotropy{{{1*/
++	/*FUNCTION Triangle::Anisotropy{{{*/
+ 	double Triangle::Anisotropy() const{
+ 
+ 		double lmin,lmax;
+@@ -79,7 +79,7 @@
+ 
+ 		return lmax/lmin;
+ 	};/*}}}*/
+-	/*FUNCTION Triangle::Length{{{1*/
++	/*FUNCTION Triangle::Length{{{*/
+ 	double Triangle::Length() const{
+ 
+ 		double l;
+@@ -101,7 +101,7 @@
+ 
+ 		return l;
+ 	};/*}}}*/
+-	/*FUNCTION Triangle::Echo {{{1*/
++	/*FUNCTION Triangle::Echo {{{*/
+ 	void Triangle::Echo(void){
+ 
+ 		int i;
+@@ -132,7 +132,7 @@
+ 		return;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Triangle::FindBoundaryEdge{{{1*/
++	/*FUNCTION Triangle::FindBoundaryEdge{{{*/
+ 	AdjacentTriangle Triangle::FindBoundaryEdge(int i) const{
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/FindBoundaryEdge)*/
+ 
+@@ -178,25 +178,25 @@
+ 		//not found, return empty triangle
+ 		return AdjacentTriangle(NULL,0);
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Triangle::GetAllflag{{{1*/
++	/*}}}*/
++	/*FUNCTION Triangle::GetAllflag{{{*/
+ 	int    Triangle::GetAllflag(int a){
+ 		return AdjEdgeIndex[a] & 1020;
+ 	}/*}}}*/
+-	/*FUNCTION Triangle::Hidden{{{1*/
++	/*FUNCTION Triangle::Hidden{{{*/
+ 	int    Triangle::Hidden(int a)const {
+ 		return AdjEdgeIndex[a]&16;
+ 	} /*}}}*/
+-	/*FUNCTION Triangle::Locked{{{1*/
++	/*FUNCTION Triangle::Locked{{{*/
+ 	int    Triangle::Locked(int a)const {
+ 		return AdjEdgeIndex[a]&4;
+ 	} /*}}}*/
+-	/*FUNCTION Triangle::NuEdgeTriangleAdj{{{1*/
++	/*FUNCTION Triangle::NuEdgeTriangleAdj{{{*/
+ 	short  Triangle::NuEdgeTriangleAdj(int i) const {
+ 		/*Number of the  adjacent edge in adj tria (make sure it is between 0 and 2*/
+ 		return AdjEdgeIndex[i&3]&3;
+ 	}/*}}}*/
+-	/*FUNCTION Triangle::Optim{{{1*/
++	/*FUNCTION Triangle::Optim{{{*/
+ 	long  Triangle::Optim(short i,int koption) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Optim)*/
+ 
+@@ -228,8 +228,8 @@
+ 		} while( t != this);
+ 		return NbSwap;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Triangle::Quadrangle {{{1*/
++	/*}}}*/
++	/*FUNCTION Triangle::Quadrangle {{{*/
+ 	Triangle* Triangle::Quadrangle(BamgVertex * & v0,BamgVertex * & v1,BamgVertex * & v2,BamgVertex * & v3) const{
+ 		// return the other triangle of the quad if a quad or 0 if not a quat
+ 		Triangle * t =0;
+@@ -250,7 +250,7 @@
+ 		return t;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Triangle::QualityQuad {{{1*/
++	/*FUNCTION Triangle::QualityQuad {{{*/
+ 	double   Triangle::QualityQuad(int a,int option) const{
+ 		double q;
+ 		if (!link || AdjEdgeIndex[a] &4)
+@@ -273,7 +273,7 @@
+ 		return  q;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Triangle::Renumbering(Triangle *tb,Triangle *te, long *renu){{{1*/
++	/*FUNCTION Triangle::Renumbering(Triangle *tb,Triangle *te, long *renu){{{*/
+ 	void  Triangle::Renumbering(Triangle *tb,Triangle *te, long *renu){
+ 
+ 		if (link  >=tb && link  <te) link  = tb + renu[link -tb];
+@@ -281,13 +281,13 @@
+ 		if (adj[1] >=tb && adj[1] <te) adj[1] = tb + renu[adj[1]-tb];
+ 		if (adj[2] >=tb && adj[2] <te) adj[2] = tb + renu[adj[2]-tb];    
+ 	}/*}}}*/
+-	/*FUNCTION Triangle::Renumbering(BamgVertex *vb,BamgVertex *ve, long *renu){{{1*/
++	/*FUNCTION Triangle::Renumbering(BamgVertex *vb,BamgVertex *ve, long *renu){{{*/
+ 	void Triangle::Renumbering(BamgVertex *vb,BamgVertex *ve, long *renu){
+ 		if (vertices[0] >=vb && vertices[0] <ve) vertices[0] = vb + renu[vertices[0]-vb];
+ 		if (vertices[1] >=vb && vertices[1] <ve) vertices[1] = vb + renu[vertices[1]-vb];
+ 		if (vertices[2] >=vb && vertices[2] <ve) vertices[2] = vb + renu[vertices[2]-vb];    
+ 	}/*}}}*/
+-	/*FUNCTION Triangle::Set {{{1*/
++	/*FUNCTION Triangle::Set {{{*/
+ 	void Triangle::Set(const Triangle & rec,const Mesh & Th ,Mesh & ThNew){ 
+ 		*this = rec;
+ 		if ( vertices[0] ) vertices[0] = ThNew.vertices +  Th.GetId(vertices[0]);
+@@ -300,7 +300,7 @@
+ 		 link = ThNew.triangles + Th.GetId(link);
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Triangle::SetAdjAdj{{{1*/
++	/*FUNCTION Triangle::SetAdjAdj{{{*/
+ 	void Triangle::SetAdjAdj(short a){
+ 		// Copy all the mark 
+ 		a &= 3;
+@@ -312,7 +312,7 @@
+ 			tt->AdjEdgeIndex[aatt]=a + (AdjEdgeIndex[a] & 60 ) ;
+ 		}
+ 	}/*}}}*/
+-	/*FUNCTION Triangle::SetAdj2{{{1*/
++	/*FUNCTION Triangle::SetAdj2{{{*/
+ 	void Triangle::SetAdj2(short a,Triangle *t,short aat){
+ 		/*For current triangle:
+ 		 * - a is the index of the edge were the adjency is set (in [0 2])
+@@ -325,16 +325,16 @@
+ 			t->AdjEdgeIndex[aat]=a;
+ 		}
+ 	}/*}}}*/
+-	/*FUNCTION Triangle::SetAllFlag{{{1*/
++	/*FUNCTION Triangle::SetAllFlag{{{*/
+ 	void   Triangle::SetAllFlag(int a,int f){
+ 		AdjEdgeIndex[a] = (AdjEdgeIndex[a] &3) + (1020 & f);
+ 	}/*}}}*/
+-	/*FUNCTION Triangle::SetDet{{{1*/
++	/*FUNCTION Triangle::SetDet{{{*/
+ 	void Triangle::SetDet() {
+ 		if(vertices[0] && vertices[1] && vertices[2])    det = bamg::det(*vertices[0],*vertices[1],*vertices[2]);
+ 		else det = -1; 
+ 	}/*}}}*/
+-	/*FUNCTION Triangle::SetHidden{{{1*/
++	/*FUNCTION Triangle::SetHidden{{{*/
+ 	void Triangle::SetHidden(int a){
+ 		//Get Adjacent Triangle number a
+ 		register Triangle* t = adj[a];
+@@ -343,32 +343,32 @@
+ 		if(t) t->AdjEdgeIndex[AdjEdgeIndex[a] & 3] |=16;
+ 		AdjEdgeIndex[a] |= 16;
+ 	}/*}}}*/
+-	/*FUNCTION Triangle::SetLocked{{{1*/
++	/*FUNCTION Triangle::SetLocked{{{*/
+ 	void Triangle::SetLocked(int a){
+ 		//mark the edge as on Boundary
+ 		register Triangle * t = adj[a];
+ 		t->AdjEdgeIndex[AdjEdgeIndex[a] & 3] |=4;
+ 		AdjEdgeIndex[a] |= 4;
+ 	}/*}}}*/
+-	/*FUNCTION Triangle::SetMarkUnSwap{{{1*/
++	/*FUNCTION Triangle::SetMarkUnSwap{{{*/
+ 	void Triangle::SetMarkUnSwap(int a){
+ 		register Triangle * t = adj[a];
+ 		t->AdjEdgeIndex[AdjEdgeIndex[a] & 3] |=8;
+ 		AdjEdgeIndex[a] |=8 ;
+ 	}/*}}}*/
+-	/*FUNCTION Triangle::SetSingleVertexToTriangleConnectivity{{{1*/
++	/*FUNCTION Triangle::SetSingleVertexToTriangleConnectivity{{{*/
+ 	void Triangle::SetSingleVertexToTriangleConnectivity() { 
+ 		if (vertices[0]) (vertices[0]->t=this,vertices[0]->IndexInTriangle=0);
+ 		if (vertices[1]) (vertices[1]->t=this,vertices[1]->IndexInTriangle=1);
+ 		if (vertices[2]) (vertices[2]->t=this,vertices[2]->IndexInTriangle=2);
+ 	}/*}}}*/
+-	/*FUNCTION Triangle::SetUnMarkUnSwap{{{1*/
++	/*FUNCTION Triangle::SetUnMarkUnSwap{{{*/
+ 	void Triangle::SetUnMarkUnSwap(int a){ 
+ 		register Triangle * t = adj[a];
+ 		t->AdjEdgeIndex[AdjEdgeIndex[a] & 3] &=55; // 23 + 32 
+ 		AdjEdgeIndex[a] &=55 ;
+ 	}/*}}}*/
+-	/*FUNCTION Triangle::swap{{{1*/
++	/*FUNCTION Triangle::swap{{{*/
+ 	int Triangle::swap(short a,int koption){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/swap)*/
+ 
+@@ -482,8 +482,8 @@
+ 		}
+ 		return OnSwap;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Triangle::TriangleAdj{{{1*/
++	/*}}}*/
++	/*FUNCTION Triangle::TriangleAdj{{{*/
+ 	Triangle* Triangle::TriangleAdj(int i) const {
+ 		return adj[i&3];
+ 	}/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/VertexOnVertex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/VertexOnVertex.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/VertexOnVertex.cpp	(revision 12365)
+@@ -9,24 +9,24 @@
+ namespace bamg {
+ 
+ 	/*Constructors/Destructors*/
+-	/*FUNCTION VertexOnVertex::VertexOnVertex(){{{1*/
++	/*FUNCTION VertexOnVertex::VertexOnVertex(){{{*/
+ 	VertexOnVertex::VertexOnVertex() {
+ 		v=NULL;
+ 		bv=NULL;
+ 	};/*}}}*/
+-	/*FUNCTION VertexOnVertex::VertexOnVertex(BamgVertex * w,BamgVertex *bw){{{1*/
++	/*FUNCTION VertexOnVertex::VertexOnVertex(BamgVertex * w,BamgVertex *bw){{{*/
+ 	VertexOnVertex::VertexOnVertex(BamgVertex * w,BamgVertex *bw) :v(w),bv(bw){
+ 	
+ 	}/*}}}*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION VertexOnVertex::Set{{{1*/
++	/*FUNCTION VertexOnVertex::Set{{{*/
+ 	void VertexOnVertex::Set(const Mesh &Th ,long i,Mesh &ThNew) { 
+ 		*this = Th.VertexOnBThVertex[i];  
+ 		v     = ThNew.vertices + Th.GetId(v);
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION VertexOnVertex::SetOnBTh{{{1*/
++	/*FUNCTION VertexOnVertex::SetOnBTh{{{*/
+ 	void VertexOnVertex::SetOnBTh(){
+ 		v->BackgroundVertexHook=bv;v->IndexInTriangle=IsVertexOnVertex;
+ 	}/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp	(revision 12365)
+@@ -5,7 +5,7 @@
+ #include "../../io/io.h"
+ 
+ /*Constructors/Destructors*/
+-/*FUNCTION BamgOpts::BamgOpts() {{{1*/
++/*FUNCTION BamgOpts::BamgOpts() {{{*/
+ BamgOpts::BamgOpts(){
+ 
+ 	this->anisomax=0;
+@@ -40,7 +40,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BamgOpts::~BamgOpts() {{{1*/
++/*FUNCTION BamgOpts::~BamgOpts() {{{*/
+ BamgOpts::~BamgOpts(){
+ 
+ 	xfree((void**)&this->hminVertices);
+@@ -54,7 +54,7 @@
+ /*}}}*/
+ 
+ /*Methods*/
+-/*FUNCTION BamgOpts::Check{{{1*/
++/*FUNCTION BamgOpts::Check{{{*/
+ void BamgOpts::Check(void){
+ 
+ 	int i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgGeom.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgGeom.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgGeom.cpp	(revision 12365)
+@@ -4,7 +4,7 @@
+ #include "../../shared/shared.h"
+ 
+ /*Constructors/Destructors*/
+-/*FUNCTION BamgGeom::BamgGeom(){{{1*/
++/*FUNCTION BamgGeom::BamgGeom(){{{*/
+ BamgGeom::BamgGeom(){
+ 
+ 	this->VerticesSize[0]=0,          this->VerticesSize[1]=0;          this->Vertices=NULL;
+@@ -18,7 +18,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BamgGeom::~BamgGeom(){{{1*/
++/*FUNCTION BamgGeom::~BamgGeom(){{{*/
+ BamgGeom::~BamgGeom(){
+ 
+ 	xfree((void**)&this->Vertices);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/CrackedEdge.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/CrackedEdge.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/CrackedEdge.cpp	(revision 12365)
+@@ -8,7 +8,7 @@
+ namespace bamg {
+ 
+ 	/*Constructors/Destructors*/
+-	/*FUNCTION CrackedEdge() {{{1*/
++	/*FUNCTION CrackedEdge() {{{*/
+ 	CrackedEdge::CrackedEdge() {
+ 		a=NULL;
+ 		b=NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/SubDomain.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/SubDomain.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/SubDomain.cpp	(revision 12365)
+@@ -11,7 +11,7 @@
+ 	/*Constructors/Destructors*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION SubDomain::Set {{{1*/
++	/*FUNCTION SubDomain::Set {{{*/
+ 	void SubDomain::Set(const Mesh & Th ,long i,Mesh & ThNew){
+ 		*this = Th.subdomains[i];
+ 		if ( head-Th.triangles<0 || head-Th.triangles>=Th.nbt){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Metric.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Metric.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Metric.cpp	(revision 12365)
+@@ -13,16 +13,15 @@
+ 	SaveMetricInterpole  LastMetricInterpole;
+ 
+ 	/*Constructor/Destructor*/
+-	/*FUNCTION Metric::Metric(){{{1*/
+-	/*FUNCTION Metric::Metric(double a){{{1*/
++	/*FUNCTION Metric::Metric(double a){{{*/
+ 	Metric::Metric(double a): a11(1/(a*a)),a21(0),a22(1/(a*a)){
+ 	
+ 	}/*}}}*/
+-	/*FUNCTION Metric::Metric(double a,double b,double c){{{1*/
++	/*FUNCTION Metric::Metric(double a,double b,double c){{{*/
+ 	Metric::Metric(double a,double b,double c) :a11(a),a21(b),a22(c){
+ 	
+ 	}/*}}}*/
+-	/*FUNCTION Metric::Metric(const double  a[3],const  Metric& m0, const  Metric& m1,const  Metric&  m2 ){{{1*/ 
++	/*FUNCTION Metric::Metric(const double  a[3],const  Metric& m0, const  Metric& m1,const  Metric&  m2 ){{{*/ 
+ 	Metric::Metric(const double  a[3],const  Metric& m0, const  Metric& m1,const  Metric& m2 ){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/Metric)*/
+ 
+@@ -42,8 +41,8 @@
+ 		vab.lambda2 =  1 / (h2*h2);
+ 		*this = vab;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Metric::Metric(double  a,const  Metric& ma, double  b,const  Metric& mb){{{1*/
++	/*}}}*/
++	/*FUNCTION Metric::Metric(double  a,const  Metric& ma, double  b,const  Metric& mb){{{*/
+ 	Metric::Metric(double  a,const  Metric& ma, double  b,const  Metric& mb) { 
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/EigenMetric)*/
+ 
+@@ -62,14 +61,14 @@
+ 		vab.lambda2 =  1/(h2*h2);
+ 		*this=vab;
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION Metric::det{{{1*/
++	/*FUNCTION Metric::det{{{*/
+ 	double Metric::det() const {
+ 		return a11*a22-a21*a21;
+ 	}  /*}}}*/
+-	/*FUNCTION Metric::Echo {{{1*/
++	/*FUNCTION Metric::Echo {{{*/
+ 	void Metric::Echo(void){
+ 
+ 		printf("Metric:\n");
+@@ -78,7 +77,7 @@
+ 		return;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Metric::IntersectWith{{{1*/
++	/*FUNCTION Metric::IntersectWith{{{*/
+ 	int Metric::IntersectWith(const Metric& M2) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/IntersectWith)*/
+ 
+@@ -130,14 +129,14 @@
+ 		}
+ 		return change;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Metric::mul{{{1*/
++	/*}}}*/
++	/*FUNCTION Metric::mul{{{*/
+ 	R2     Metric::mul(const R2 x)const {
+ 		return R2(a11*x.x+a21*x.y,a21*x.x+a22*x.y);
+ 	}/*}}}*/
+ 
+ 	/*Intermediary*/
+-	/*FUNCTION LengthInterpole{{{1*/
++	/*FUNCTION LengthInterpole{{{*/
+ 	double LengthInterpole(const Metric& Ma,const  Metric& Mb, R2 AB) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/LengthInterpole)*/
+ 
+@@ -204,8 +203,8 @@
+ 		if (i>200 && kkk++<10) printf("WARNING: LengthInterpole: ( i=%i l=%i sss=%g ) %g\n",i,l,sss,sstop); 
+ 		return l;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION SimultaneousMatrixReduction{{{1*/
++	/*}}}*/
++	/*FUNCTION SimultaneousMatrixReduction{{{*/
+ 	void SimultaneousMatrixReduction( Metric M1,  Metric M2, D2xD2 &V) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/ReductionSimultanee)*/
+ 
+@@ -307,8 +306,8 @@
+ 			V=D2xD2(vp[0][0],vp[0][1],vp[1][0],vp[1][1]);
+ 		}
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION abscisseInterpole{{{1*/
++	/*}}}*/
++	/*FUNCTION abscisseInterpole{{{*/
+ 	double abscisseInterpole(const Metric& Ma,const  Metric& Mb, R2 AB,double s,int optim) { 
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/abscisseInterpole)*/
+ 
+@@ -349,6 +348,6 @@
+ 		}
+ 		return r ;
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp	(revision 12365)
+@@ -4,7 +4,7 @@
+ #include "../../shared/shared.h"
+ 
+ /*Constructors/Destructors*/
+-/*FUNCTION BamgMesh::BamgMesh(){{{1*/
++/*FUNCTION BamgMesh::BamgMesh(){{{*/
+ BamgMesh::BamgMesh(){
+ 
+ 	this->VerticesSize[0]=0,                  this->VerticesSize[1]=0;                 this->Vertices=NULL;
+@@ -29,7 +29,7 @@
+ 	this->NodalElementConnectivitySize[0]=0,  this->NodalElementConnectivitySize[1]=0; this->NodalElementConnectivity=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION BamgMesh::~BamgMesh(){{{1*/
++/*FUNCTION BamgMesh::~BamgMesh(){{{*/
+ BamgMesh::~BamgMesh(){
+ 
+ 	xfree((void**)&this->Vertices);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Curve.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Curve.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Curve.cpp	(revision 12365)
+@@ -9,7 +9,7 @@
+ namespace bamg {
+ 
+ 	/*Constructors/Destructors*/
+-	/*FUNCTION Curve::Curve(){{{1*/
++	/*FUNCTION Curve::Curve(){{{*/
+ 	Curve::Curve(){
+ 		FirstEdge=NULL;
+ 		LastEdge=NULL;
+@@ -19,14 +19,14 @@
+ 	/*}}}*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION Curve::Reverse {{{1*/
++	/*FUNCTION Curve::Reverse {{{*/
+ 	void Curve::Reverse() {
+ 		/*reverse the direction of the curve */
+ 		Exchange(FirstEdge,LastEdge);
+ 		Exchange(FirstVertexIndex,LastVertexIndex);
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Curve::Set {{{1*/
++	/*FUNCTION Curve::Set {{{*/
+ 	void Curve::Set(const Curve & rec,const Geometry & Gh ,Geometry & GhNew){
+ 		*this = rec;
+ 		FirstEdge = GhNew.edges + Gh.GetId(FirstEdge);    
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/GeomVertex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/GeomVertex.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/GeomVertex.cpp	(revision 12365)
+@@ -13,23 +13,23 @@
+ 	//See header file
+ 
+ 	/*Methods*/
+-	/*FUNCTION GeomVertex::Corner {{{1*/
++	/*FUNCTION GeomVertex::Corner {{{*/
+ 	int  GeomVertex::Corner() const {
+ 		return type & 4;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION GeomVertex::Required {{{1*/
++	/*FUNCTION GeomVertex::Required {{{*/
+ 	int  GeomVertex::Required()const {
+ 		// a corner is required
+ 		return type & 6;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION GeomVertex::SetCorner {{{1*/
++	/*FUNCTION GeomVertex::SetCorner {{{*/
+ 	void GeomVertex::SetCorner(){
+ 		type |= 4;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION GeomVertex::SetRequired {{{1*/
++	/*FUNCTION GeomVertex::SetRequired {{{*/
+ 	void GeomVertex::SetRequired(){
+ 		type |= 2;
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/GeomSubDomain.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/GeomSubDomain.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/GeomSubDomain.cpp	(revision 12365)
+@@ -11,7 +11,7 @@
+ 	/*Constructors/Destructors*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION GeomSubDomain::Set {{{1*/
++	/*FUNCTION GeomSubDomain::Set {{{*/
+ 	void GeomSubDomain::Set(const GeomSubDomain & rec,const Geometry & Gh ,const Geometry & GhNew){
+ 		*this = rec;
+ 		edge = Gh.GetId(edge) + GhNew.edges;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp	(revision 12365)
+@@ -12,19 +12,19 @@
+ 	static const  Direction NoDirOfSearch=Direction();
+ 
+ 	/*Constructors/Destructors*/
+-	/*FUNCTION Geometry::Geometry(){{{1*/
++	/*FUNCTION Geometry::Geometry(){{{*/
+ 	Geometry::Geometry(){
+ 		Init();
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Geometry::Geometry(BamgGeom* bamggeom, BamgOpts* bamgopts){{{1*/
++	/*FUNCTION Geometry::Geometry(BamgGeom* bamggeom, BamgOpts* bamgopts){{{*/
+ 	Geometry::Geometry(BamgGeom* bamggeom, BamgOpts* bamgopts){
+ 		Init();
+ 		ReadGeometry(bamggeom,bamgopts);
+ 		PostRead();
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Geometry::Geometry(const Geometry & Gh) (COPY operator){{{1*/
++	/*FUNCTION Geometry::Geometry(const Geometry & Gh) (COPY operator){{{*/
+ 	Geometry::Geometry(const Geometry & Gh) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/Geometry)*/
+ 
+@@ -43,8 +43,8 @@
+ 		for (i=0;i<nbsubdomains;i++)
+ 		 subdomains[i].Set(Gh.subdomains[i],Gh,*this);
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Geometry::~Geometry(){{{1*/
++	/*}}}*/
++	/*FUNCTION Geometry::~Geometry(){{{*/
+ 	Geometry::~Geometry() {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/~Geometry)*/
+ 		if(NbRef>0){   printf("Trying to delete geometry and NbRef>0, probably due to an error"); return;}
+@@ -55,10 +55,10 @@
+ 		if(subdomains) delete [] subdomains;subdomains=0;
+ 		Init();
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ 	/*IO*/
+-	/*FUNCTION Geometry::ReadGeometry{{{1*/
++	/*FUNCTION Geometry::ReadGeometry{{{*/
+ 	void Geometry::ReadGeometry(BamgGeom* bamggeom,BamgOpts* bamgopts){
+ 
+ 		int verbose;
+@@ -278,8 +278,8 @@
+ 			}
+ 		}
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Geometry::WriteGeometry{{{1*/
++	/*}}}*/
++	/*FUNCTION Geometry::WriteGeometry{{{*/
+ 	void Geometry::WriteGeometry(BamgGeom* bamggeom, BamgOpts* bamgopts){
+ 
+ 		int verbose;
+@@ -396,10 +396,10 @@
+ 			}
+ 		}
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION Geometry::Echo {{{1*/
++	/*FUNCTION Geometry::Echo {{{*/
+ 	void Geometry::Echo(void){
+ 
+ 		printf("Geometry:\n");
+@@ -420,7 +420,7 @@
+ 		return;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Geometry::Init{{{1*/
++	/*FUNCTION Geometry::Init{{{*/
+ 	void Geometry::Init(void){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/EmptyGeometry)*/
+ 
+@@ -436,39 +436,39 @@
+ 		subdomains=NULL;
+ 		MaxCornerAngle = 10*Pi/180; //default is 10 degres
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Geometry::MinimalHmin{{{1*/
++	/*}}}*/
++	/*FUNCTION Geometry::MinimalHmin{{{*/
+ 	double Geometry::MinimalHmin() {
+ 		/* coeffIcoor = (2^30-1)/D
+ 		 * We cannot go beyond hmin = D/2^30 because of the quadtree
+ 		 * hmin is therefore approximately 2/coeffIcoor */
+ 		return 2.0/coefIcoor;
+ 	}/*}}}*/
+-	/*FUNCTION Geometry::MaximalHmax{{{1*/
++	/*FUNCTION Geometry::MaximalHmax{{{*/
+ 	double Geometry::MaximalHmax() {
+ 		return Max(pmax.x-pmin.x,pmax.y-pmin.y);
+ 	}/*}}}*/
+-	/*FUNCTION Geometry::GetId(const GeomVertex &t){{{1*/
++	/*FUNCTION Geometry::GetId(const GeomVertex &t){{{*/
+ 	long Geometry::GetId(const GeomVertex & t) const  {
+ 		return &t - vertices;
+ 	}/*}}}*/
+-	/*FUNCTION Geometry::GetId(const GeomVertex * t){{{1*/
++	/*FUNCTION Geometry::GetId(const GeomVertex * t){{{*/
+ 	long Geometry::GetId(const GeomVertex * t) const  {
+ 		return t - vertices;
+ 	}/*}}}*/
+-	/*FUNCTION Geometry::GetId(const GeomEdge & t){{{1*/
++	/*FUNCTION Geometry::GetId(const GeomEdge & t){{{*/
+ 	long Geometry::GetId(const GeomEdge & t) const  {
+ 		return &t - edges;
+ 	}/*}}}*/
+-	/*FUNCTION Geometry::GetId(const GeomEdge * t){{{1*/
++	/*FUNCTION Geometry::GetId(const GeomEdge * t){{{*/
+ 	long Geometry::GetId(const GeomEdge * t) const  {
+ 		return t - edges;
+ 	}/*}}}*/
+-	/*FUNCTION Geometry::GetId(const Curve * c){{{1*/
++	/*FUNCTION Geometry::GetId(const Curve * c){{{*/
+ 	long Geometry::GetId(const Curve * c) const  {
+ 		return c - curves;
+ 	}/*}}}*/
+-	/*FUNCTION Geometry::Containing{{{1*/
++	/*FUNCTION Geometry::Containing{{{*/
+ 	GeomEdge* Geometry::Containing(const R2 P,  GeomEdge * start) const {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/Contening)*/
+ 
+@@ -493,8 +493,8 @@
+ 		}
+ 		return on;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Geometry::PostRead{{{1*/
++	/*}}}*/
++	/*FUNCTION Geometry::PostRead{{{*/
+ 	void Geometry::PostRead(){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/AfterRead)*/
+ 
+@@ -816,8 +816,8 @@
+ 		delete [] eangle;
+ 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Geometry::ProjectOnCurve {{{1*/
++	/*}}}*/
++	/*FUNCTION Geometry::ProjectOnCurve {{{*/
+ 	GeomEdge* Geometry::ProjectOnCurve(const Edge &e,double s,BamgVertex &V,VertexOnGeom &GV) const {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/ProjectOnCurve)*/
+ 		/*Add a vertex on an existing geometrical edge according to the metrics of the two vertices constituting the edge*/
+@@ -950,8 +950,8 @@
+ 		GV=VertexOnGeom(V,*on,sg);
+ 		return on;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Geometry::R2ToI2{{{1*/
++	/*}}}*/
++	/*FUNCTION Geometry::R2ToI2{{{*/
+ 	I2 Geometry::R2ToI2(const R2 & P) const {
+ 		/*coefIcoor is the coefficient used for integer coordinates:
+ 		 *                       (x-pmin.x)
+@@ -964,7 +964,7 @@
+ 		 */
+ 		return  I2( (Icoor1) (coefIcoor*(P.x-pmin.x)) ,(Icoor1) (coefIcoor*(P.y-pmin.y)) );
+ 	}/*}}}*/
+-	/*FUNCTION Geometry::UnMarkEdges{{{1*/
++	/*FUNCTION Geometry::UnMarkEdges{{{*/
+ 	void Geometry::UnMarkEdges() {
+ 		for (int i=0;i<nbe;i++) edges[i].SetUnMark();
+ 	}/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/VertexOnEdge.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/VertexOnEdge.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/VertexOnEdge.cpp	(revision 12365)
+@@ -9,13 +9,13 @@
+ namespace bamg {
+ 
+ 	/*Methods*/
+-	/*FUNCTION VertexOnEdge::Set {{{1*/
++	/*FUNCTION VertexOnEdge::Set {{{*/
+ 	void VertexOnEdge::Set(const Mesh & Th ,long i,Mesh & ThNew){
+ 		*this = Th.VertexOnBThEdge[i];  
+ 		v = ThNew.vertices + Th.GetId(v);
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION VertexOnEdge::SetOnBTh{{{1*/
++	/*FUNCTION VertexOnEdge::SetOnBTh{{{*/
+ 	void VertexOnEdge::SetOnBTh(){
+ 		v->BackgroundEdgeHook=this;
+ 		v->IndexInTriangle=IsVertexOnEdge;  
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/AdjacentTriangle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/AdjacentTriangle.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/AdjacentTriangle.cpp	(revision 12365)
+@@ -13,53 +13,53 @@
+ 	//See header file
+ 
+ 	/*Methods*/
+-	/*FUNCTION AdjacentTriangle::Locked {{{1*/
++	/*FUNCTION AdjacentTriangle::Locked {{{*/
+ 	int  AdjacentTriangle::Locked() const {
+ 		return t->AdjEdgeIndex[a] & 4;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION AdjacentTriangle::MarkUnSwap {{{1*/
++	/*FUNCTION AdjacentTriangle::MarkUnSwap {{{*/
+ 	int  AdjacentTriangle::MarkUnSwap() const {
+ 		return t->AdjEdgeIndex[a] & 8;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION AdjacentTriangle::GetAllFlag_UnSwap {{{1*/
++	/*FUNCTION AdjacentTriangle::GetAllFlag_UnSwap {{{*/
+ 	int  AdjacentTriangle::GetAllFlag_UnSwap() const {
+ 		// take all flag except MarkUnSwap
+ 		return t->AdjEdgeIndex[a] & 1012;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION AdjacentTriangle::SetLock {{{1*/
++	/*FUNCTION AdjacentTriangle::SetLock {{{*/
+ 	void AdjacentTriangle::SetLock(){
+ 		t->SetLocked(a);
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION AdjacentTriangle::Adj {{{1*/
++	/*FUNCTION AdjacentTriangle::Adj {{{*/
+ 	AdjacentTriangle AdjacentTriangle::Adj() const {
+ 		return  t->Adj(a);
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION AdjacentTriangle::EdgeVertex {{{1*/
++	/*FUNCTION AdjacentTriangle::EdgeVertex {{{*/
+ 	BamgVertex* AdjacentTriangle::EdgeVertex(const int & i) const {
+ 		return t->vertices[VerticesOfTriangularEdge[a][i]];
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION AdjacentTriangle::OppositeVertex {{{1*/
++	/*FUNCTION AdjacentTriangle::OppositeVertex {{{*/
+ 	BamgVertex* AdjacentTriangle::OppositeVertex() const {
+ 		return t->vertices[bamg::OppositeVertex[a]]; 
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION AdjacentTriangle::det {{{1*/
++	/*FUNCTION AdjacentTriangle::det {{{*/
+ 	Icoor2 & AdjacentTriangle::det() const {
+ 		return t->det;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION AdjacentTriangle::swap {{{1*/
++	/*FUNCTION AdjacentTriangle::swap {{{*/
+ 	int AdjacentTriangle::swap(){
+ 		return  t->swap(a);
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION AdjacentTriangle::SetAdj2 {{{1*/
++	/*FUNCTION AdjacentTriangle::SetAdj2 {{{*/
+ 	void AdjacentTriangle::SetAdj2(const AdjacentTriangle & ta, int l  ){
+ 		//set Adjacent Triangle of a triangle
+ 		if(t) {
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgQuadtree.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgQuadtree.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgQuadtree.cpp	(revision 12365)
+@@ -6,7 +6,7 @@
+ 
+ namespace bamg {
+ 
+-	/*MACROS {{{1*/
++	/*MACROS {{{*/
+ 	/* 
+ 	 * 
+ 	 *    J    j
+@@ -47,7 +47,7 @@
+ 	//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
++	/*DOCUMENTATION What is a BamgQuadtree? {{{
+ 	 * 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
+@@ -93,10 +93,10 @@
+ 	 *  \--   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*/
++	/*FUNCTION BamgQuadtree::BamgQuadtree(){{{*/
+ 	BamgQuadtree::BamgQuadtree(){
+ 
+ 		/*Number of boxes and vertices*/
+@@ -110,8 +110,8 @@
+ 		root=NewBamgQuadtreeBox();
+ 
+ 		}
+-	/*}}}1*/
+-	/*FUNCTION BamgQuadtree::BamgQuadtree(Mesh * t,long nbv){{{1*/
++	/*}}}*/
++	/*FUNCTION BamgQuadtree::BamgQuadtree(Mesh * t,long nbv){{{*/
+ 	BamgQuadtree::BamgQuadtree(Mesh * t,long nbv){ 
+ 
+ 		/*Number of boxes and vertices*/
+@@ -132,16 +132,16 @@
+ 		for (int i=0;i<nbv;i++) Add(t->vertices[i]);
+ 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION BamgQuadtree::~BamgQuadtree(){{{1*/
++	/*}}}*/
++	/*FUNCTION BamgQuadtree::~BamgQuadtree(){{{*/
+ 	BamgQuadtree::~BamgQuadtree() {
+ 		delete boxcontainer;
+ 		root=NULL;
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION BamgQuadtree::Add{{{1*/
++	/*FUNCTION BamgQuadtree::Add{{{*/
+ 	void  BamgQuadtree::Add(BamgVertex &w){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, BamgQuadtree.cpp/Add)*/
+ 		BamgQuadtreeBox** pb=NULL;
+@@ -229,8 +229,8 @@
+ 		//Increase NbVertices by one (we have one new vertex)
+ 		NbVertices++;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION BamgQuadtree::NearestVertex{{{1*/
++	/*}}}*/
++	/*FUNCTION BamgQuadtree::NearestVertex{{{*/
+ 	BamgVertex*  BamgQuadtree::NearestVertex(Icoor1 i,Icoor1 j) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, BamgQuadtree.cpp/NearestVertex)*/
+ 
+@@ -388,8 +388,8 @@
+ 		return nearest_v;
+ 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION BamgQuadtree::NearestVertexWithNormal{{{1*/
++	/*}}}*/
++	/*FUNCTION BamgQuadtree::NearestVertexWithNormal{{{*/
+ 	BamgVertex*  BamgQuadtree::NearestVertexWithNormal(Icoor1 i,Icoor1 j) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, BamgQuadtree.cpp/NearestVertexWithNormal)*/
+ 
+@@ -496,8 +496,8 @@
+ 
+ 		return vn;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION BamgQuadtree::NewBamgQuadtreeBox {{{1*/
++	/*}}}*/
++	/*FUNCTION BamgQuadtree::NewBamgQuadtreeBox {{{*/
+ 	BamgQuadtree::BamgQuadtreeBox* BamgQuadtree::NewBamgQuadtreeBox(void){
+ 
+ 		/*Output*/
+@@ -520,7 +520,7 @@
+ 		/*currentbox now points toward next quadtree box*/
+ 		return newbox;
+ 	}/*}}}*/
+-	/*FUNCTION BamgQuadtree::ToClose {{{1*/
++	/*FUNCTION BamgQuadtree::ToClose {{{*/
+ 	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)*/
+ 
+@@ -594,5 +594,5 @@
+ 
+ 		return 0;
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp	(revision 12365)
+@@ -8,7 +8,7 @@
+ namespace bamg {
+ 
+ 	/*Methods*/
+-	/*FUNCTION BamgVertex::Echo {{{1*/
++	/*FUNCTION BamgVertex::Echo {{{*/
+ 
+ 	void BamgVertex::Echo(void){
+ 
+@@ -21,12 +21,12 @@
+ 		return;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION BamgVertex::GetReferenceNumber{{{1*/
++	/*FUNCTION BamgVertex::GetReferenceNumber{{{*/
+ 	int  BamgVertex::GetReferenceNumber() const { 
+ 		return ReferenceNumber;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION BamgVertex::MetricFromHessian{{{1*/
++	/*FUNCTION BamgVertex::MetricFromHessian{{{*/
+ 	void BamgVertex::MetricFromHessian(const double Hxx,const double Hyx, const double Hyy,const double smin,const double smax,const double s,double err,BamgOpts* bamgopts){
+ 		/*Compute Metric from Hessian*/
+ 
+@@ -104,8 +104,8 @@
+ 		m.IntersectWith(MVp);
+ 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION BamgVertex::Optim {{{1*/
++	/*}}}*/
++	/*FUNCTION BamgVertex::Optim {{{*/
+ 	long BamgVertex::Optim(int i,int koption){ 
+ 		long ret=0;
+ 		if ( t && (IndexInTriangle >= 0 ) && (IndexInTriangle <3) ){
+@@ -118,7 +118,7 @@
+ 		return ret;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION BamgVertex::Smoothing{{{1*/
++	/*FUNCTION BamgVertex::Smoothing{{{*/
+ 	double  BamgVertex::Smoothing(Mesh &Th,const Mesh &BTh,Triangle* &tstart ,double omega){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Smoothing)*/
+ 
+@@ -221,10 +221,10 @@
+ 		}
+ 		return delta;
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ 	/*Intermediary*/
+-	/*FUNCTION QuadQuality{{{1*/
++	/*FUNCTION QuadQuality{{{*/
+ 	double QuadQuality(const BamgVertex & a,const BamgVertex &b,const BamgVertex &c,const BamgVertex &d) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshQuad.cpp/QuadQuality)*/
+ 
+@@ -251,6 +251,6 @@
+ 		if (sinmin<=0) return sinmin;
+ 		return 1.0-Max(Max(Abs(cosDAB),Abs(cosABC)),Max(Abs(cosBCD),Abs(cosCDA)));
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ } 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Edge.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Edge.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Edge.cpp	(revision 12365)
+@@ -12,7 +12,7 @@
+ 	/*Constructors/Destructors*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION Edge::Set {{{1*/
++	/*FUNCTION Edge::Set {{{*/
+ 	void Edge::Set(const Mesh & Th ,long i,Mesh & ThNew){ 
+ 		*this = Th.edges[i];
+ 		v[0] = ThNew.vertices + Th.GetId(v[0]);    
+@@ -23,7 +23,7 @@
+ 		if (adj[1]) adj[1] =   ThNew.edges +   Th.GetId(adj[1]);
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Edge::Echo {{{1*/
++	/*FUNCTION Edge::Echo {{{*/
+ 	void Edge::Echo(void){ 
+ 		printf("Edge:\n");
+ 		printf("   pointers towards two vertices: %p %p\n",v[0],v[1]);
+@@ -32,7 +32,7 @@
+ 		printf("   two adjacent edges on the same curve: %p %p\n",adj[0],adj[1]);
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Edge::Renumbering{{{1*/
++	/*FUNCTION Edge::Renumbering{{{*/
+ 	void Edge::Renumbering(BamgVertex *vb,BamgVertex *ve, long *renu){
+ 
+ 		if (v[0] >=vb && v[0] <ve) v[0] = vb + renu[v[0]-vb];
+@@ -40,7 +40,7 @@
+ 
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Edge::Intersection{{{1*/
++	/*FUNCTION Edge::Intersection{{{*/
+ 	int Edge::Intersection(const  Edge & e){ 
+ 
+ 		/*some shecks*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/SetOfE4.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/SetOfE4.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/SetOfE4.cpp	(revision 12365)
+@@ -4,7 +4,7 @@
+ namespace bamg {
+ 
+ 	/*Constructor*/
+-	/*FUNCTION  SetOfEdges4::SetOfEdges4(long mmx,long nnx){{{1*/
++	/*FUNCTION  SetOfEdges4::SetOfEdges4(long mmx,long nnx){{{*/
+ 	SetOfEdges4::SetOfEdges4(long mmx,long nnx){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, SetOfEdges4.cpp/SetOfEdges4)*/
+ 
+@@ -22,10 +22,10 @@
+ 		i=nx;
+ 		while(i--) head[i]=-1;
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ 	/*Methods*/ 
+-	/*FUNCTION  SetOfEdges4::add{{{1*/
++	/*FUNCTION  SetOfEdges4::add{{{*/
+ 	long SetOfEdges4::add(long ii,long jj) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, SetOfEdges4.cpp/add)*/
+ 
+@@ -59,8 +59,8 @@
+ 		head[h] = NbOfEdges;
+ 		return NbOfEdges ++;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION  SetOfEdges4::find {{{1*/
++	/*}}}*/
++	/*FUNCTION  SetOfEdges4::find {{{*/
+ 	long SetOfEdges4::find(long ii,long jj) { 
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, SetOfEdges4.cpp/find)*/
+ 
+@@ -86,35 +86,35 @@
+ 		//if we reach this point, the edge does not exist return -1
+ 		return -1;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION  SetOfEdges4::i{{{1*/
++	/*}}}*/
++	/*FUNCTION  SetOfEdges4::i{{{*/
+ 	long SetOfEdges4::i(long k){
+ 		return Edges[k].i;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION  SetOfEdges4::j{{{1*/
++	/*}}}*/
++	/*FUNCTION  SetOfEdges4::j{{{*/
+ 	long SetOfEdges4::j(long k){
+ 		return Edges[k].j;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION  SetOfEdges4::nb{{{1*/
++	/*}}}*/
++	/*FUNCTION  SetOfEdges4::nb{{{*/
+ 	long SetOfEdges4::nb(){
+ 		return NbOfEdges;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION  SetOfEdges4::newarete{{{1*/
++	/*}}}*/
++	/*FUNCTION  SetOfEdges4::newarete{{{*/
+ 	long SetOfEdges4::newarete(long k){
+ 		return NbOfEdges == k+1;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION  SetOfEdges4::SortAndAdd{{{1*/
++	/*}}}*/
++	/*FUNCTION  SetOfEdges4::SortAndAdd{{{*/
+ 	long SetOfEdges4::SortAndAdd (long ii,long jj) {
+ 		return ii <=jj ? add (ii,jj)  : add (jj,ii) ;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION  SetOfEdges4::SortAndFind{{{1*/
++	/*}}}*/
++	/*FUNCTION  SetOfEdges4::SortAndFind{{{*/
+ 	long SetOfEdges4::SortAndFind (long ii,long jj) {
+ 		return ii <=jj ? find (ii,jj)  : find (jj,ii) ;
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/GeomEdge.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/GeomEdge.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/GeomEdge.cpp	(revision 12365)
+@@ -15,11 +15,11 @@
+ 	/*Constructor/Destructor*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION GeomEdge::Cracked{{{1*/
++	/*FUNCTION GeomEdge::Cracked{{{*/
+ 	int    GeomEdge::Cracked() const  {
+ 		return type &1;  
+ 	}/*}}}*/
+-	/*FUNCTION GeomEdge::F{{{1*/
++	/*FUNCTION GeomEdge::F{{{*/
+ 	R2 GeomEdge::F(double theta) const{
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/F)*/
+ 		// parametrization of the curve edge
+@@ -61,12 +61,12 @@
+ 		}
+ 		return A*ca + B*cb + tg[0]*cta + tg[1]*ctb;
+ 	  }
+-	/*}}}1*/
+-	/*FUNCTION GeomEdge::Mark{{{1*/
++	/*}}}*/
++	/*FUNCTION GeomEdge::Mark{{{*/
+ 	int    GeomEdge::Mark()    const  {
+ 		return type &16; 
+ 	}/*}}}*/
+-	/*FUNCTION GeomEdge::R1tg{{{1*/
++	/*FUNCTION GeomEdge::R1tg{{{*/
+ 	double GeomEdge::R1tg(double theta,R2 & t) const{
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/R1tg)*/
+ 		// 1/R of radius of cuvature
+@@ -137,12 +137,12 @@
+ 		}
+ 		else return 0;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION GeomEdge::Required{{{1*/
++	/*}}}*/
++	/*FUNCTION GeomEdge::Required{{{*/
+ 	int    GeomEdge::Required()       {
+ 		return type &64; 
+ 	}/*}}}*/
+-	/*FUNCTION GeomEdge::Set {{{1*/
++	/*FUNCTION GeomEdge::Set {{{*/
+ 	void GeomEdge::Set(const GeomEdge & rec,const Geometry & Gh ,Geometry & GhNew){ 
+ 		*this = rec;
+ 		v[0] = GhNew.vertices + Gh.GetId(v[0]);    
+@@ -151,39 +151,39 @@
+ 		if (Adj[1]) Adj[1] =  GhNew.edges + Gh.GetId(Adj[1]);     
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION GeomEdge::SetCracked{{{1*/
++	/*FUNCTION GeomEdge::SetCracked{{{*/
+ 	void   GeomEdge::SetCracked()     { 
+ 		type |= 1;/*=>1st digit to 1*/
+ 	}/*}}}*/
+-	/*FUNCTION GeomEdge::SetTgA{{{1*/
++	/*FUNCTION GeomEdge::SetTgA{{{*/
+ 	void   GeomEdge::SetTgA()         { 
+ 		type |=4; /*=>2d digit to 1*/
+ 	}/*}}}*/
+-	/*FUNCTION GeomEdge::SetTgB{{{1*/
++	/*FUNCTION GeomEdge::SetTgB{{{*/
+ 	void   GeomEdge::SetTgB()         { 
+ 		type |=8; /*=> 3d digit to 1*/
+ 	}/*}}}*/
+-	/*FUNCTION GeomEdge::SetMark{{{1*/
++	/*FUNCTION GeomEdge::SetMark{{{*/
+ 	void   GeomEdge::SetMark()        { 
+ 		type |=16;/*=> 4th digiy to 1*/
+ 	}/*}}}*/
+-	/*FUNCTION GeomEdge::SetUnMark{{{1*/
++	/*FUNCTION GeomEdge::SetUnMark{{{*/
+ 	void   GeomEdge::SetUnMark()      { 
+ 		type &= 1007 /* 1023-16 = 000111110111 => 4th digit to 0*/;
+ 	}/*}}}*/
+-	/*FUNCTION GeomEdge::SetRequired{{{1*/
++	/*FUNCTION GeomEdge::SetRequired{{{*/
+ 	void   GeomEdge::SetRequired()    { 
+ 		type |= 64;/*=>6th digit to 1*/ 
+ 	}/*}}}*/
+-	  /*FUNCTION GeomEdge::Tg{{{1*/
++	  /*FUNCTION GeomEdge::Tg{{{*/
+ 	int    GeomEdge::Tg(int i) const  {
+ 		return i==0 ? TgA() : TgB();
+ 	}/*}}}*/
+-	/*FUNCTION GeomEdge::TgA{{{1*/
++	/*FUNCTION GeomEdge::TgA{{{*/
+ 	int    GeomEdge::TgA()     const  {
+ 		return type &4;  
+ 	}/*}}}*/
+-	/*FUNCTION GeomEdge::TgB{{{1*/
++	/*FUNCTION GeomEdge::TgB{{{*/
+ 	int    GeomEdge::TgB()     const  {
+ 		return type &8;  
+ 	}/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Direction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Direction.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Direction.cpp	(revision 12365)
+@@ -8,12 +8,12 @@
+ namespace bamg {
+ 
+ 	/*Constructors/Destructors*/
+-	/*FUNCTION Direction() {{{1*/
++	/*FUNCTION Direction() {{{*/
+ 	Direction::Direction():
+ 		dir(MaxICoor){
+ 
+ 	}/*}}}*/
+-	/*FUNCTION Direction(Icoor1 i,Icoor1 j) {{{1*/
++	/*FUNCTION Direction(Icoor1 i,Icoor1 j) {{{*/
+ 	Direction::Direction(Icoor1 i,Icoor1 j) {
+ 		Icoor2 n2 = 2*(Abs(i)+Abs(j));  
+ 		Icoor2 r  = MaxICoor* (Icoor2) i;
+@@ -22,7 +22,7 @@
+ 	}/*}}}*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION Direction::direction{{{1*/
++	/*FUNCTION Direction::direction{{{*/
+ 	int Direction::direction(Icoor1 i,Icoor1 j) {
+ 		int r =1; 
+ 		if (dir!= MaxICoor) {
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/VertexOnGeom.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/VertexOnGeom.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/VertexOnGeom.cpp	(revision 12365)
+@@ -10,21 +10,21 @@
+ namespace bamg {
+ 
+ 	/*Constructors/Destructors*/
+-	/*FUNCTION VertexOnGeom::VertexOnGeom(){{{1*/
++	/*FUNCTION VertexOnGeom::VertexOnGeom(){{{*/
+ 	VertexOnGeom::VertexOnGeom(){
+ 		meshvertex=NULL;
+ 		curvilincoord=0;
+ 		gv=0;
+ 	} 
+ 	/*}}}*/
+-	/*FUNCTION VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomVertex &g){{{1*/
++	/*FUNCTION VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomVertex &g){{{*/
+ 	VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomVertex &g){
+ 		meshvertex=&m;
+ 		curvilincoord=-1;
+ 		gv=&g;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomEdge &g,double s){{{1*/
++	/*FUNCTION VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomEdge &g,double s){{{*/
+ 	VertexOnGeom::VertexOnGeom(BamgVertex & m,GeomEdge &g,double s){
+ 		meshvertex=&m;
+ 		curvilincoord=s;
+@@ -33,7 +33,7 @@
+ 	/*}}}*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION VertexOnGeom::Set {{{1*/
++	/*FUNCTION VertexOnGeom::Set {{{*/
+ 	void VertexOnGeom::Set(const VertexOnGeom & rec,const Mesh & Th ,Mesh & ThNew){
+ 		*this = rec;  
+ 		meshvertex = ThNew.vertices + Th.GetId(meshvertex);
+@@ -45,22 +45,22 @@
+ 
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION VertexOnGeom::OnGeomVertex{{{1*/
++	/*FUNCTION VertexOnGeom::OnGeomVertex{{{*/
+ 	int VertexOnGeom::OnGeomVertex()const{
+ 		return this? curvilincoord <0 :0;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION VertexOnGeom::OnGeomEdge{{{1*/
++	/*FUNCTION VertexOnGeom::OnGeomEdge{{{*/
+ 	int VertexOnGeom::OnGeomEdge() const{
+ 		return this? curvilincoord >=0 :0;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION VertexOnGeom::IsRequiredVertex{{{1*/
++	/*FUNCTION VertexOnGeom::IsRequiredVertex{{{*/
+ 	int VertexOnGeom::IsRequiredVertex() {
+ 		return this? ((curvilincoord<0 ? (gv?gv->Required():0):0 )) : 0;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION VertexOnGeom::SetOn{{{1*/
++	/*FUNCTION VertexOnGeom::SetOn{{{*/
+ 	void VertexOnGeom::SetOn(){
+ 		meshvertex->GeomEdgeHook=this;
+ 		meshvertex->IndexInTriangle=IsVertexOnGeom;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/EigenMetric.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/EigenMetric.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/EigenMetric.cpp	(revision 12365)
+@@ -8,7 +8,7 @@
+ namespace bamg {
+ 
+ 	/*Constructor*/
+-	/*FUNCTION EigenMetric::EigenMetric(const Metric M){{{1*/
++	/*FUNCTION EigenMetric::EigenMetric(const Metric M){{{*/
+ 	EigenMetric::EigenMetric(const Metric& M){
+ 		/*From a metric (a11,a21,a22), get eigen values lambda1 and lambda2 and one eigen vector v*/
+ 
+@@ -87,30 +87,30 @@
+ 		}
+ 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION EigenMetric::EigenMetric(double r1,double r2,const D2 vp1){{{1*/
++	/*}}}*/
++	/*FUNCTION EigenMetric::EigenMetric(double r1,double r2,const D2 vp1){{{*/
+ 	EigenMetric::EigenMetric(double r1,double r2,const D2& vp1): lambda1(r1),lambda2(r2),v(vp1){
+ 
+ 	}/*}}}*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION EigenMetric::Abs{{{1*/
++	/*FUNCTION EigenMetric::Abs{{{*/
+ 	void   EigenMetric::Abs(){
+ 		lambda1=bamg::Abs(lambda1),lambda2=bamg::Abs(lambda2);
+ 	}/*}}}*/
+-	/*FUNCTION EigenMetric::Aniso{{{1*/
++	/*FUNCTION EigenMetric::Aniso{{{*/
+ 	double EigenMetric::Aniso() const  { 
+ 		return sqrt( Aniso2());
+ 	}/*}}}*/
+-	/*FUNCTION EigenMetric::Aniso2{{{1*/
++	/*FUNCTION EigenMetric::Aniso2{{{*/
+ 	double EigenMetric::Aniso2() const  { 
+ 		return lmax()/lmin();
+ 	}/*}}}*/
+-	/*FUNCTION EigenMetric::BoundAniso{{{1*/
++	/*FUNCTION EigenMetric::BoundAniso{{{*/
+ 	void   EigenMetric::BoundAniso(const double c){ 
+ 		BoundAniso2(1/(c*c));
+ 	}/*}}}*/
+-	/*FUNCTION EigenMetric::Echo {{{1*/
++	/*FUNCTION EigenMetric::Echo {{{*/
+ 	void EigenMetric::Echo(void){
+ 
+ 		printf("EigenMetric:\n");
+@@ -122,45 +122,45 @@
+ 		return;
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION EigenMetric::hmin{{{1*/
++	/*FUNCTION EigenMetric::hmin{{{*/
+ 	double EigenMetric::hmin() const {
+ 		return sqrt(1/bamg::Max3(lambda1,lambda2,1e-30));
+ 	}/*}}}*/
+-	/*FUNCTION EigenMetric::hmax{{{1*/
++	/*FUNCTION EigenMetric::hmax{{{*/
+ 	double EigenMetric::hmax() const {
+ 		return sqrt(1/bamg::Max(bamg::Min(lambda1,lambda2),1e-30));
+ 	}/*}}}*/
+-	/*FUNCTION EigenMetric::Isotrope{{{1*/
++	/*FUNCTION EigenMetric::Isotrope{{{*/
+ 	void   EigenMetric::Isotrope() {
+ 		lambda1=lambda2=bamg::Max(lambda1,lambda2);
+ 	}/*}}}*/
+-	/*FUNCTION EigenMetric::lmax{{{1*/
++	/*FUNCTION EigenMetric::lmax{{{*/
+ 	double EigenMetric::lmax() const {
+ 		return bamg::Max3(lambda1,lambda2,1e-30);
+ 	}/*}}}*/
+-	/*FUNCTION EigenMetric::lmin{{{1*/
++	/*FUNCTION EigenMetric::lmin{{{*/
+ 	double EigenMetric::lmin() const {
+ 		return bamg::Max(bamg::Min(lambda1,lambda2),1e-30);
+ 	}/*}}}*/
+-	/*FUNCTION EigenMetric::Min{{{1*/
++	/*FUNCTION EigenMetric::Min{{{*/
+ 	void   EigenMetric::Min(double a) { 
+ 		lambda1=bamg::Min(a,lambda1); lambda2=bamg::Min(a,lambda2) ;
+ 	}/*}}}*/
+-	/*FUNCTION EigenMetric::Max{{{1*/
++	/*FUNCTION EigenMetric::Max{{{*/
+ 	void   EigenMetric::Max(double a) { 
+ 		//change eigen values
+ 		lambda1=bamg::Max(a,lambda1); lambda2=bamg::Max(a,lambda2) ;
+ 	}/*}}}*/
+-	/*FUNCTION EigenMetric::Minh{{{1*/
++	/*FUNCTION EigenMetric::Minh{{{*/
+ 	void   EigenMetric::Minh(double h) {
+ 		Min(1.0/(h*h));
+ 	}/*}}}*/
+-	/*FUNCTION EigenMetric::Maxh{{{1*/
++	/*FUNCTION EigenMetric::Maxh{{{*/
+ 	void   EigenMetric::Maxh(double h) {
+ 		//Call Max function
+ 		Max(1.0/(h*h));
+ 	}/*}}}*/
+-	/*FUNCTION EigenMetric::pow{{{1*/
++	/*FUNCTION EigenMetric::pow{{{*/
+ 	void   EigenMetric::pow(double p){
+ 		lambda1=::pow(lambda1,p);lambda2=::pow(lambda2,p);
+ 	}/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12365)
+@@ -10,7 +10,7 @@
+ 	static const  Direction NoDirOfSearch=Direction();
+ 
+ 	/*Constructors/Destructors*/
+-	/*FUNCTION Mesh::Mesh(BamgGeom* bamggeom,BamgMesh* bamgmesh, BamgOpts* bamgopts){{{1*/
++	/*FUNCTION Mesh::Mesh(BamgGeom* bamggeom,BamgMesh* bamgmesh, BamgOpts* bamgopts){{{*/
+ 	Mesh::Mesh(BamgGeom* bamggeom,BamgMesh* bamgmesh, BamgOpts* bamgopts):Gh(*(new Geometry())),BTh(*this){ 
+ 
+ 		/*Initialize fields*/
+@@ -39,8 +39,8 @@
+ 		/*Fill holes and generate mesh properties*/
+ 		ReconstructExistingMesh();
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::Mesh(double* index,double* x,double* y,int nods,int nels){{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::Mesh(double* index,double* x,double* y,int nods,int nels){{{*/
+ 	Mesh::Mesh(double* index,double* x,double* y,int nods,int nels):Gh(*(new Geometry())),BTh(*this){
+ 
+ 		Init(0);
+@@ -48,13 +48,13 @@
+ 		SetIntCoor();
+ 		ReconstructExistingMesh();
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::Mesh(double* x,double* y,int nods){{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::Mesh(double* x,double* y,int nods){{{*/
+ 	Mesh::Mesh(double* x,double* y,int nods):Gh(*(new Geometry())),BTh(*this){
+ 		Triangulate(x,y,nods);
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::Mesh(const Mesh & Tho,const int *flag ,const int *bb){{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::Mesh(const Mesh & Tho,const int *flag ,const int *bb){{{*/
+ 	Mesh::Mesh(const Mesh & Tho,const int *flag ,const int *bb,BamgOpts* bamgopts) : Gh(*(new Geometry())), BTh(*this) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Triangles)*/
+ 
+@@ -159,8 +159,8 @@
+ 		  }
+ 
+ 	  }
+-	/*}}}1*/
+-	/*FUNCTION Mesh::Mesh(Mesh & Th,Geometry * pGh,Mesh * pBth,long maxnbv_in) COPY{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::Mesh(Mesh & Th,Geometry * pGh,Mesh * pBth,long maxnbv_in) COPY{{{*/
+ 	Mesh::Mesh(Mesh & Th,Geometry * pGh,Mesh * pBth,long maxnbv_in)
+ 	  : Gh(*(pGh?pGh:&Th.Gh)), BTh(*(pBth?pBth:this)) {
+ 		  /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Triangles)*/
+@@ -223,20 +223,20 @@
+ 		  quadtree=0;
+ 
+ 	  }
+-	/*}}}1*/
+-	/*FUNCTION Mesh::Mesh(long maxnbv,Mesh & BT,BamgOpts* bamgopts,int keepBackVertices){{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::Mesh(long maxnbv,Mesh & BT,BamgOpts* bamgopts,int keepBackVertices){{{*/
+ 	Mesh::Mesh(long imaxnbv,Mesh & BT,BamgOpts* bamgopts,int keepBackVertices) :Gh(BT.Gh),BTh(BT) {
+ 		this->Init(imaxnbv);
+ 		TriangulateFromGeom1(bamgopts,keepBackVertices);
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::Mesh(long maxnbv,Geometry & G,BamgOpts* bamgopts){{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::Mesh(long maxnbv,Geometry & G,BamgOpts* bamgopts){{{*/
+ 	Mesh::Mesh(long imaxnbv,Geometry & G,BamgOpts* bamgopts):Gh(G),BTh(*this){
+ 		Init(imaxnbv);
+ 		TriangulateFromGeom0(bamgopts);
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::~Mesh(){{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::~Mesh(){{{*/
+ 	Mesh::~Mesh() {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Triangles)*/
+ 
+@@ -261,10 +261,10 @@
+ 		}
+ 		Init(0); // set all to zero 
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ 	/*IO*/
+-	/*FUNCTION Mesh::ReadMesh(double* index,double* x,double* y,int nods,int nels){{{1*/
++	/*FUNCTION Mesh::ReadMesh(double* index,double* x,double* y,int nods,int nels){{{*/
+ 	void Mesh::ReadMesh(double* index,double* x,double* y,int nods,int nels){
+ 
+ 		double Hmin = HUGE_VAL;// the infinie value 
+@@ -327,8 +327,8 @@
+ 		/*Clean up*/
+ 		xfree((void**)&nodeflags);
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::ReadMesh(BamgMesh* bamgmesh, BamgOpts* bamgopts){{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::ReadMesh(BamgMesh* bamgmesh, BamgOpts* bamgopts){{{*/
+ 	void Mesh::ReadMesh(BamgMesh* bamgmesh, BamgOpts* bamgopts){
+ 
+ 		int    verbose;
+@@ -528,8 +528,8 @@
+ 		}
+ 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::WriteMesh {{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::WriteMesh {{{*/
+ 	void Mesh::WriteMesh(BamgMesh* bamgmesh,BamgOpts* bamgopts){
+ 
+ 		/*Intermediary*/
+@@ -953,8 +953,8 @@
+ 		delete [] reft;
+ 		delete [] numt;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::ReadMetric{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::ReadMetric{{{*/
+ 	void Mesh::ReadMetric(const BamgOpts* bamgopts) {
+ 
+ 		/*Intermediary*/
+@@ -991,8 +991,8 @@
+ 			}
+ 		}
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::WriteMetric{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::WriteMetric{{{*/
+ 	void Mesh::WriteMetric(BamgOpts* bamgopts) {
+ 		int i;
+ 		xfree((void**)&bamgopts->metric);
+@@ -1003,8 +1003,8 @@
+ 			bamgopts->metric[i*3+2]=vertices[i].m.a22;
+ 		}
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::WriteIndex{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::WriteIndex{{{*/
+ 	void Mesh::WriteIndex(int** pindex,int* pnels){
+ 
+ 		/*Intermediary*/
+@@ -1041,10 +1041,10 @@
+ 		*pindex=index;
+ 		*pnels=num;
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ 	/*Methods*/
+-	/*FUNCTION Mesh::AddGeometryMetric{{{1*/
++	/*FUNCTION Mesh::AddGeometryMetric{{{*/
+ 	void Mesh::AddGeometryMetric(BamgOpts* bamgopts){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/IntersectGeomMetric)*/
+ 
+@@ -1098,8 +1098,8 @@
+ 		}
+ 		// the problem is for the vertex on vertex 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::AddMetric{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::AddMetric{{{*/
+ 	void Mesh::AddMetric(BamgOpts* bamgopts){
+ 		//  Hessiantype = 0 =>  H is computed using double P2 projection
+ 		//  Hessiantype = 1 =>  H is computed with green formula
+@@ -1117,8 +1117,8 @@
+ 			_error_("Hessiantype %i not supported yet (1->use Green formula, 0-> double P2 projection)",Hessiantype);
+ 		}
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::AddVertex{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::AddVertex{{{*/
+ 	void Mesh::AddVertex( BamgVertex &s,Triangle* t, Icoor2* det3) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Add)*/
+ 		// -------------------------------
+@@ -1254,8 +1254,8 @@
+ 			}
+ 		}
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::BoundAnisotropy{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::BoundAnisotropy{{{*/
+ 	void  Mesh::BoundAnisotropy(double anisomax,double hminaniso) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/BoundAnisotropy)*/
+ 
+@@ -1294,8 +1294,8 @@
+ 			printf("      output: Hmin = %g, Hmax = %g, factor of anisotropy max  = %g\n",pow(hn2,-0.5),pow(hn1,-0.5),pow(rnx,0.5));
+ 		}
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::BuildGeometryFromMesh{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::BuildGeometryFromMesh{{{*/
+ 	void Mesh::BuildGeometryFromMesh(BamgOpts* bamgopts){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/ConsGeometry)*/
+ 
+@@ -1747,8 +1747,8 @@
+ 		}
+ 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::BuildMetric0 (double P2 projection){{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::BuildMetric0 (double P2 projection){{{*/
+ 	void Mesh::BuildMetric0(BamgOpts* bamgopts){
+ 
+ 		/*Options*/
+@@ -1952,8 +1952,8 @@
+ 		delete [] dxdy_vertex;
+ 		delete [] dydy_vertex;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::BuildMetric1 (Green formula){{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::BuildMetric1 (Green formula){{{*/
+ 	void Mesh::BuildMetric1(BamgOpts* bamgopts){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/IntersectConsMetric)*/
+ 
+@@ -2243,8 +2243,8 @@
+ 		delete []  OnBoundary;
+ 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::CrackMesh{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::CrackMesh{{{*/
+ 	void Mesh::CrackMesh(BamgOpts* bamgopts) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/CrackMesh)*/
+ 
+@@ -2391,8 +2391,8 @@
+ 		SetVertexFieldOn();
+ 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::Echo{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::Echo{{{*/
+ 	void Mesh::Echo(void) {
+ 
+ 		int i;
+@@ -2415,8 +2415,8 @@
+ 		}
+ 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::ForceBoundary{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::ForceBoundary{{{*/
+ 		void Mesh::ForceBoundary() {
+ 			/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ForceBoundary)*/
+ 
+@@ -2458,8 +2458,8 @@
+ 			}
+ 			if (verbose > 3) printf("      number of inforced edge = %i, number of swap= %i\n",nbfe,Nbswap); 
+ 		}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::FindSubDomain{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::FindSubDomain{{{*/
+ 	void Mesh::FindSubDomain(int OutSide) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/FindSubDomain)*/
+ 
+@@ -2706,38 +2706,38 @@
+ 			for (it=0;it<nbt;it++) 
+ 			 if(!triangles[it].link)  nbtout++;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::GetId(const Triangle & t) const{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::GetId(const Triangle & t) const{{{*/
+ 	long Mesh::GetId(const Triangle & t) const  { 
+ 		return &t - triangles;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::GetId(const Triangle * t) const{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::GetId(const Triangle * t) const{{{*/
+ 	long Mesh::GetId(const Triangle * t) const  { 
+ 		return t - triangles;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::GetId(const BamgVertex & t) const{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::GetId(const BamgVertex & t) const{{{*/
+ 	long Mesh::GetId(const BamgVertex & t) const  { 
+ 		return &t - vertices;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::GetId(const BamgVertex * t) const{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::GetId(const BamgVertex * t) const{{{*/
+ 	long Mesh::GetId(const BamgVertex * t) const  { 
+ 		return t - vertices;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::GetId(const Edge & t) const{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::GetId(const Edge & t) const{{{*/
+ 	long Mesh::GetId(const Edge & t) const  { 
+ 		return &t - edges;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::GetId(const Edge * t) const{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::GetId(const Edge * t) const{{{*/
+ 	long Mesh::GetId(const Edge * t) const  { 
+ 		return t - edges;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::Init{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::Init{{{*/
+ 	void Mesh::Init(long maxnbv_in) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/PreInit)*/
+ 
+@@ -2785,8 +2785,8 @@
+ 			maxnbt=0;
+ 		} 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::Insert{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::Insert{{{*/
+ 	void Mesh::Insert() {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/Insert)*/
+ 
+@@ -2937,8 +2937,8 @@
+ 		// because we break the TriangleContainingTheVertex
+ #endif
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::InsertNewPoints{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::InsertNewPoints{{{*/
+ 	long Mesh::InsertNewPoints(long nbvold,long & NbTSwap) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/InsertNewPoints)*/
+ 
+@@ -3014,13 +3014,13 @@
+ 		NbTSwap +=  NbSwap ;
+ 		return nbv-nbvold;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::isCracked{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::isCracked{{{*/
+ 	int Mesh::isCracked() const {
+ 		return NbCrackedVertices != 0;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::MakeGeomEdgeToEdge{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::MakeGeomEdgeToEdge{{{*/
+ 	Edge** Mesh::MakeGeomEdgeToEdge() {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/MakeGeomEdgeToEdge)*/
+ 
+@@ -3062,8 +3062,8 @@
+ 
+ 		return e;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::MakeQuadrangles{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::MakeQuadrangles{{{*/
+ 	void Mesh::MakeQuadrangles(double costheta){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/MakeQuadrangles)*/
+ 
+@@ -3105,8 +3105,8 @@
+ 			}
+ 			delete [] qq;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::MakeBamgQuadtree{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::MakeBamgQuadtree{{{*/
+ 	void Mesh::MakeBamgQuadtree() {  
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/MakeBamgQuadtree)*/
+ 
+@@ -3114,13 +3114,13 @@
+ 		if (  !quadtree )  quadtree = new BamgQuadtree(this);
+ 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::MaxinalHmax{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::MaxinalHmax{{{*/
+ 	double Mesh::MaximalHmax() {
+ 		return Max(pmax.x-pmin.x,pmax.y-pmin.y);
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::MaxSubDivision{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::MaxSubDivision{{{*/
+ 	void  Mesh::MaxSubDivision(double maxsubdiv) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/MaxSubDivision)*/
+ 
+@@ -3173,8 +3173,8 @@
+ 			printf("      number of metric changes = %i, maximum number of subdivision of a edges before change = %g\n",nbchange,pow(lmax,0.5));
+ 		}
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::MetricAt{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::MetricAt{{{*/
+ 	Metric Mesh::MetricAt(const R2 & A) const { 
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/MetricAt)*/
+ 
+@@ -3194,19 +3194,19 @@
+ 			return Metric(aa,(*t)[0],(*t)[1],(*t)[2]);
+ 		}
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::MininalHmin{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::MininalHmin{{{*/
+ 	double Mesh::MinimalHmin() {
+ 		return 2.0/coefIcoor;
+ 	}
+-	/*}}}1*/
+-/*FUNCTION Mesh::NearestVertex{{{1*/
++	/*}}}*/
++/*FUNCTION Mesh::NearestVertex{{{*/
+ BamgVertex* Mesh::NearestVertex(Icoor1 i,Icoor1 j) {
+ 	/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/NearestVertex)*/
+ 	return  quadtree->NearestVertex(i,j); 
+ } 
+-/*}}}1*/
+-	/*FUNCTION Mesh::NewPoints{{{1*/
++/*}}}*/
++	/*FUNCTION Mesh::NewPoints{{{*/
+ 	void  Mesh::NewPoints(Mesh & Bh,BamgOpts* bamgopts,int KeepVertices){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/NewPoints)*/
+ 
+@@ -3325,8 +3325,8 @@
+ 		 NbSwapf += vertices[i].Optim(0);
+ 		NbTSwap +=  NbSwapf ;
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::ProjectOnCurve{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::ProjectOnCurve{{{*/
+ 	GeomEdge*   Mesh::ProjectOnCurve( Edge & BhAB, BamgVertex &  vA, BamgVertex & vB,
+ 				double theta,BamgVertex & R,VertexOnEdge &  BR,VertexOnGeom & GR) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshQuad.cpp/ProjectOnCurve)*/
+@@ -3454,8 +3454,8 @@
+ 		_error_("Big bug...");
+ 		return 0; // just for the compiler 
+ 	}                  
+-	/*}}}1*/
+-/*FUNCTION Mesh::ReconstructExistingMesh{{{1*/
++	/*}}}*/
++/*FUNCTION Mesh::ReconstructExistingMesh{{{*/
+ void Mesh::ReconstructExistingMesh(){
+ 	/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/FillHoleInMesh)*/
+ 
+@@ -3761,8 +3761,8 @@
+ 		}
+ 	}
+ }
+-/*}}}1*/
+-	/*FUNCTION Mesh::TrianglesRenumberBySubDomain{{{1*/
++/*}}}*/
++	/*FUNCTION Mesh::TrianglesRenumberBySubDomain{{{*/
+ 	void Mesh::TrianglesRenumberBySubDomain(bool justcompress){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ReNumberingTheTriangleBySubDomain)*/
+ 
+@@ -3830,8 +3830,8 @@
+ 		delete [] renu;
+ 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::VerticesRenumber{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::VerticesRenumber{{{*/
+ 	void Mesh::VerticesRenumber(long * renu) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ReNumberingVertex)*/
+ 
+@@ -3904,8 +3904,8 @@
+ 
+ 		for ( it=0;it<nbv;it++) renu[i]= -renu[i]-1;
+ 	}
+-	/*}}}1*/
+-/*FUNCTION Mesh::SetIntCoor{{{1*/
++	/*}}}*/
++/*FUNCTION Mesh::SetIntCoor{{{*/
+ void Mesh::SetIntCoor(const char * strfrom) {
+ 	/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/SetIntCoor)*/
+ 
+@@ -3966,8 +3966,8 @@
+ 
+ 	if (number_of_errors) _error_("Fatal error: some triangles have negative areas, see above");
+ }
+-/*}}}1*/
+-/*FUNCTION Mesh::ShowRegulaty{{{1*/
++/*}}}*/
++/*FUNCTION Mesh::ShowRegulaty{{{*/
+ void  Mesh::ShowRegulaty() const {
+ 	/*Original code from Frederic Hecht <hecht@ann.jussieu.fr>*/
+ 
+@@ -4030,8 +4030,8 @@
+ 	printf("      infinite-regularity(?): min = %g, max = %g\n",gammamn,gammamx);
+ 	printf("      anisomax = %g, beta max = %g, min = %g\n",pow(alpha2,0.5),1./pow(beta/aireKh,0.5), 1./pow(beta0/aireKh,0.5));
+ }
+-/*}}}1*/
+-/*FUNCTION Mesh::ShowHistogram{{{1*/
++/*}}}*/
++/*FUNCTION Mesh::ShowHistogram{{{*/
+ void  Mesh::ShowHistogram() const {
+ 	/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ShowHistogram)*/
+ 
+@@ -4075,8 +4075,8 @@
+ 	}
+ 	printf("      --------------------+-------------+-------------\n"); 
+ }
+-/*}}}1*/
+-/*FUNCTION Mesh::SmoothingVertex{{{1*/
++/*}}}*/
++/*FUNCTION Mesh::SmoothingVertex{{{*/
+ void Mesh::SmoothingVertex(int nbiter,double omega ) { 
+ 	/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/SmoothingVertex)*/
+ 
+@@ -4117,8 +4117,8 @@
+ 	delete [] tstart;
+ 	if (quadtree) quadtree= new BamgQuadtree(this);
+ }
+-/*}}}1*/
+-/*FUNCTION Mesh::SmoothMetric{{{1*/
++/*}}}*/
++/*FUNCTION Mesh::SmoothMetric{{{*/
+ void Mesh::SmoothMetric(double raisonmax) { 
+ 	/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Metric.cpp/SmoothMetric)*/
+ 
+@@ -4195,8 +4195,8 @@
+ 	delete [] first_np_or_next_t0;
+ 	delete [] first_np_or_next_t1;
+ }
+-/*}}}1*/
+-	/*FUNCTION Mesh::SplitElement{{{1*/
++/*}}}*/
++	/*FUNCTION Mesh::SplitElement{{{*/
+ 	int  Mesh::SplitElement(int choice){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshQuad.cpp/SplitElement)*/
+ 
+@@ -4705,8 +4705,8 @@
+ 
+ 		return ret; // ok 
+ 	}
+-	/*}}}1*/
+-/*FUNCTION Mesh::SplitInternalEdgeWithBorderVertices{{{1*/
++	/*}}}*/
++/*FUNCTION Mesh::SplitInternalEdgeWithBorderVertices{{{*/
+ long  Mesh::SplitInternalEdgeWithBorderVertices(){
+ 	/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/SplitInternalEdgeWithBorderVertices)*/
+ 
+@@ -4776,18 +4776,18 @@
+ 
+ return  NbSplitEdge;
+ }
+-/*}}}1*/
+-/*FUNCTION Mesh::ToI2{{{1*/
++/*}}}*/
++/*FUNCTION Mesh::ToI2{{{*/
+ I2 Mesh::R2ToI2(const R2 & P) const {
+ 	return  I2( (Icoor1) (coefIcoor*(P.x-pmin.x)),(Icoor1) (coefIcoor*(P.y-pmin.y)) );
+ }
+-/*}}}1*/
+-/*FUNCTION Mesh::ToR2{{{1*/
++/*}}}*/
++/*FUNCTION Mesh::ToR2{{{*/
+ R2 Mesh::I2ToR2(const I2 & P) const {
+ 	return  R2( (double) P.x/coefIcoor+pmin.x, (double) P.y/coefIcoor+pmin.y);
+ }
+-/*}}}1*/
+-/*FUNCTION Mesh::TriangleFindFromCoord{{{1*/
++/*}}}*/
++/*FUNCTION Mesh::TriangleFindFromCoord{{{*/
+ Triangle * Mesh::TriangleFindFromCoord(const I2 & B,Icoor2 det3[3], Triangle *tstart) const {
+ 	/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/FindTriangleContening)*/
+ 
+@@ -4878,8 +4878,8 @@
+ 	 det3[0]=det3[1]=det3[2]=-1,det3[OppositeVertex[jj]]=detop;
+ 	return t;
+ }
+-/*}}}1*/
+-/*FUNCTION Mesh::TriangleIntNumbering{{{1*/
++/*}}}*/
++/*FUNCTION Mesh::TriangleIntNumbering{{{*/
+ void Mesh::TriangleIntNumbering(long* renumbering){
+ 
+ 	long num=0;
+@@ -4889,8 +4889,8 @@
+ 	}
+ 	return;   
+ }
+-/*}}}1*/
+-/*FUNCTION Mesh::TriangleReferenceList{{{1*/
++/*}}}*/
++/*FUNCTION Mesh::TriangleReferenceList{{{*/
+ long  Mesh::TriangleReferenceList(long* reft) const {
+ 	/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ConsRefTriangle)*/
+ 
+@@ -4929,8 +4929,8 @@
+ 	}
+ 	return k;   
+ }
+-/*}}}1*/
+-/*FUNCTION Mesh::Triangulate{{{1*/
++/*}}}*/
++/*FUNCTION Mesh::Triangulate{{{*/
+ void Mesh::Triangulate(double* x,double* y,int nods){
+ 
+ 	int verbose=0;
+@@ -4956,8 +4956,8 @@
+ 	/*Insert Vertices*/
+ 	Insert();
+ }
+-/*}}}1*/
+-	/*FUNCTION Mesh::TriangulateFromGeom0{{{1*/
++/*}}}*/
++	/*FUNCTION Mesh::TriangulateFromGeom0{{{*/
+ 	void Mesh::TriangulateFromGeom0(BamgOpts* bamgopts){
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/GeomToTriangles0)*/
+ 		/*Generate mesh from geometry*/
+@@ -5271,8 +5271,8 @@
+ 		NewPoints(*this,bamgopts,0) ;
+ 		if (verbose>4) printf("      -- current number of vertices = %i\n",nbv);
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION Mesh::TriangulateFromGeom1{{{1*/
++	/*}}}*/
++	/*FUNCTION Mesh::TriangulateFromGeom1{{{*/
+ 	void Mesh::TriangulateFromGeom1(BamgOpts* bamgopts,int KeepVertices){ 
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/GeomToTriangles1)*/
+ 
+@@ -5601,10 +5601,10 @@
+ 		NewPoints(BTh,bamgopts,KeepVertices) ;
+ 		if (verbose>4) printf("      -- current number of vertices = %i\n",nbv);
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ 	/*Intermediary*/
+-	/*FUNCTION CloseBoundaryEdge{{{1*/
++	/*FUNCTION CloseBoundaryEdge{{{*/
+ 	AdjacentTriangle CloseBoundaryEdge(I2 A,Triangle *t, double &a,double &b) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/CloseBoundaryEdge)*/
+ 
+@@ -5643,8 +5643,8 @@
+ 							return edge;
+ 		  } 
+ 	}
+-	/*}}}1*/
+-	/*FUNCTION CloseBoundaryEdgeV2{{{1*/
++	/*}}}*/
++	/*FUNCTION CloseBoundaryEdgeV2{{{*/
+ 	AdjacentTriangle CloseBoundaryEdgeV2(I2 C,Triangle *t, double &a,double &b) { 
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/CloseBoundaryEdgeV2)*/
+ 		// walk around the vertex 
+@@ -5792,8 +5792,8 @@
+ 		  }
+ 		return er;
+ 	} 
+-	/*}}}1*/
+-/*FUNCTION ForceEdge{{{1*/
++	/*}}}*/
++/*FUNCTION ForceEdge{{{*/
+ int ForceEdge(BamgVertex &a, BamgVertex & b,AdjacentTriangle & taret)  { 
+ 	/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/ForceEdge)*/
+ 
+@@ -5868,8 +5868,8 @@
+ 	b.Optim(1,0);
+ 	return NbSwap; 
+ }
+-/*}}}1*/
+-/*FUNCTION swap{{{1*/
++/*}}}*/
++/*FUNCTION swap{{{*/
+ void  swap(Triangle *t1,short a1, Triangle *t2,short a2, BamgVertex *s1,BamgVertex *s2,Icoor2 det1,Icoor2 det2){ 
+ 	/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/swap)*/
+ 	// --------------------------------------------------------------
+@@ -5913,8 +5913,8 @@
+ 	t1->SetSingleVertexToTriangleConnectivity();
+ 	t2->SetSingleVertexToTriangleConnectivity();
+ } // end swap 
+-/*}}}1*/
+-	/*FUNCTION SwapForForcingEdge{{{1*/
++/*}}}*/
++	/*FUNCTION SwapForForcingEdge{{{*/
+ 	int SwapForForcingEdge(BamgVertex   *  & pva ,BamgVertex  * &   pvb ,AdjacentTriangle & tt1,Icoor2 & dets1, Icoor2 & detsa,Icoor2 & detsb, int & NbSwap) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/SwapForForcingEdge)*/
+ 		// l'arete ta coupe l'arete pva pvb
+@@ -6001,6 +6001,6 @@
+ 		}
+ 		return ret;
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Update.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Update.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Update.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define  _UPDATE_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../shared/shared.h"
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp	(revision 12365)
+@@ -19,7 +19,7 @@
+ #include "../modules/modules.h"
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION FemModel::constructor {{{1*/
++/*FUNCTION FemModel::constructor {{{*/
+ FemModel::FemModel(char* inputfilename, char* outputfilename, const int in_solution_type,const int* analyses,const int nummodels){
+ 
+ 	/*intermediary*/
+@@ -76,8 +76,8 @@
+ 
+ }
+ 
+-/*}}}1*/
+-/*FUNCTION FemModel::destructor {{{1*/
++/*}}}*/
++/*FUNCTION FemModel::destructor {{{*/
+ FemModel::~FemModel(){
+ 
+ 	/*Intermediary*/
+@@ -95,10 +95,10 @@
+ 	delete results;
+ 
+ }
+-/*}}}1*/
++/*}}}*/
+ 
+ /*Object management*/
+-/*FUNCTION FemModel::Echo {{{1*/
++/*FUNCTION FemModel::Echo {{{*/
+ void FemModel::Echo(void){
+ 
+ 	printf("FemModel echo: \n");
+@@ -112,7 +112,7 @@
+ /*}}}*/
+ 
+ /*Numerics: */
+-/*FUNCTION FemModel::SetCurrentConfiguration(int configuration_type,int analysis_type){{{1*/
++/*FUNCTION FemModel::SetCurrentConfiguration(int configuration_type,int analysis_type){{{*/
+ void FemModel::SetCurrentConfiguration(int configuration_type,int analysis_type){
+ 
+ 	/*Use configuration_type to setup the analysis counter, the configurations of objects etc ... but use 
+@@ -149,11 +149,11 @@
+ 	#endif
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION FemModel::SetCurrentConfiguration(int configuration_type){{{1*/
++/*}}}*/
++/*FUNCTION FemModel::SetCurrentConfiguration(int configuration_type){{{*/
+ void FemModel::SetCurrentConfiguration(int configuration_type){
+ 
+ 	/*overload: analysis_type = configuration_type: */
+ 	this->SetCurrentConfiguration(configuration_type,configuration_type);
+ }
+-/*}}}1*/
++/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp	(revision 12365)
+@@ -14,7 +14,7 @@
+ #include "../io/io.h"
+ 
+ /*Contour constructors and destructors:*/
+-/*FUNCTION Contour::Contour() default constructor {{{1*/
++/*FUNCTION Contour::Contour() default constructor {{{*/
+ Contour::Contour(){
+ 	this->id=0;
+ 	this->nods=0;
+@@ -23,7 +23,7 @@
+ 	this->closed=false;
+ }
+ /*}}}*/
+-/*FUNCTION Contour::Contour(int pid, int nods, IssmDouble* x, IssmDouble* y,bool closed) {{{1*/
++/*FUNCTION Contour::Contour(int pid, int nods, IssmDouble* x, IssmDouble* y,bool closed) {{{*/
+ Contour::Contour(int pid,int pnods, IssmDouble* px, IssmDouble* py,bool pclosed){
+ 	
+ 	this->id=pid;
+@@ -37,7 +37,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Contour::Contour() default constructor {{{1*/
++/*FUNCTION Contour::Contour() default constructor {{{*/
+ Contour::~Contour(){
+ 	xDelete<IssmDouble>(this->x);
+ 	xDelete<IssmDouble>(this->y);
+@@ -46,7 +46,7 @@
+ 
+ 
+ /*Object virtual function resolutoin: */
+-/*FUNCTION Contour::Echo(){{{1*/
++/*FUNCTION Contour::Echo(){{{*/
+ void Contour::Echo(void){
+ 
+ 	int i;
+@@ -62,31 +62,31 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Contour::DeepEcho(){{{1*/
++/*FUNCTION Contour::DeepEcho(){{{*/
+ void Contour::DeepEcho(void){
+ 	this->Echo();
+ }
+ /*}}}*/
+-/*FUNCTION Contour::Id(){{{1*/
++/*FUNCTION Contour::Id(){{{*/
+ int Contour::Id(void){
+ 	return id;
+ }
+ /*}}}*/
+-/*FUNCTION Contour::MyRank{{{1*/
++/*FUNCTION Contour::MyRank{{{*/
+ int    Contour::MyRank(void){ 
+ 	extern int my_rank;
+ 
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION Contour::ObjectEnum{{{1*/
++/*FUNCTION Contour::ObjectEnum{{{*/
+ int Contour::ObjectEnum(void){
+ 
+ 	return ContourEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Contour::copy {{{1*/
++/*FUNCTION Contour::copy {{{*/
+ Object* Contour::copy() {
+ 
+ 	return new Contour(*this); 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _TRIAP1ELEMENTRESULT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../Inputs/Input.h"
+ #include "../../include/include.h"
+ /*}}}*/
+@@ -22,12 +22,12 @@
+ 
+ 	public:
+ 
+-		/*TriaP1ElementResult constructors, destructors: {{{1*/
++		/*TriaP1ElementResult constructors, destructors: {{{*/
+ 		TriaP1ElementResult();
+ 		TriaP1ElementResult(int enum_type,double* values,int step,double time);
+ 		~TriaP1ElementResult();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -35,7 +35,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*ElementResult virtual functions definitions: {{{1*/
++		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+ 		double  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+@@ -43,7 +43,7 @@
+ 		int     NumberOfNodalValues(void);
+ 		void    PatchFill(int row, Patch* patch);
+ 		/*}}}*/
+-		/*TriaP1ElementResult management: {{{1*/
++		/*TriaP1ElementResult management: {{{*/
+ 		int   InstanceEnum();
+ 		void GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs);
+ 		void GetElementVectorFromResults(Vector* vector,int dof);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12365)
+@@ -18,12 +18,12 @@
+ #include "../../include/include.h"
+ 
+ /*PentaP1ElementResult constructors and destructor*/
+-/*FUNCTION PentaP1ElementResult::PentaP1ElementResult(){{{1*/
++/*FUNCTION PentaP1ElementResult::PentaP1ElementResult(){{{*/
+ PentaP1ElementResult::PentaP1ElementResult(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1ElementResult::PentaP1ElementResult(int in_enum_type,double* in_values,int in_step, double in_time){{{1*/
++/*FUNCTION PentaP1ElementResult::PentaP1ElementResult(int in_enum_type,double* in_values,int in_step, double in_time){{{*/
+ PentaP1ElementResult::PentaP1ElementResult(int in_enum_type,double* in_values,int in_step, double in_time){
+ 
+ 	int i;
+@@ -34,19 +34,19 @@
+ 	time=in_time;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1ElementResult::~PentaP1ElementResult(){{{1*/
++/*FUNCTION PentaP1ElementResult::~PentaP1ElementResult(){{{*/
+ PentaP1ElementResult::~PentaP1ElementResult(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION PentaP1ElementResult::Echo {{{1*/
++/*FUNCTION PentaP1ElementResult::Echo {{{*/
+ void PentaP1ElementResult::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1ElementResult::DeepEcho{{{1*/
++/*FUNCTION PentaP1ElementResult::DeepEcho{{{*/
+ void PentaP1ElementResult::DeepEcho(void){
+ 
+ 	printf("PentaP1ElementResult:\n");
+@@ -57,23 +57,23 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1ElementResult::Id{{{1*/
++/*FUNCTION PentaP1ElementResult::Id{{{*/
+ int    PentaP1ElementResult::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION PentaP1ElementResult::MyRank{{{1*/
++/*FUNCTION PentaP1ElementResult::MyRank{{{*/
+ int    PentaP1ElementResult::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1ElementResult::ObjectEnum{{{1*/
++/*FUNCTION PentaP1ElementResult::ObjectEnum{{{*/
+ int PentaP1ElementResult::ObjectEnum(void){
+ 
+ 	return PentaP1ElementResultEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1ElementResult::copy{{{1*/
++/*FUNCTION PentaP1ElementResult::copy{{{*/
+ Object* PentaP1ElementResult::copy() {
+ 	
+ 	return new PentaP1ElementResult(this->enum_type,this->values,this->step,this->time);
+@@ -82,14 +82,14 @@
+ /*}}}*/
+ 
+ /*ElementResult management*/
+-/*FUNCTION PentaP1ElementResult::InstanceEnum{{{1*/
++/*FUNCTION PentaP1ElementResult::InstanceEnum{{{*/
+ int PentaP1ElementResult::InstanceEnum(void){
+ 
+ 	return this->enum_type;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1ElementResult::SpawnTriaElementResult{{{1*/
++/*FUNCTION PentaP1ElementResult::SpawnTriaElementResult{{{*/
+ ElementResult* PentaP1ElementResult::SpawnTriaElementResult(int* indices){
+ 
+ 	/*output*/
+@@ -114,19 +114,19 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1ElementResult::ProcessUnits{{{1*/
++/*FUNCTION PentaP1ElementResult::ProcessUnits{{{*/
+ void PentaP1ElementResult::ProcessUnits(Parameters* parameters){
+ 	
+ 	UnitConversion(this->values,6,IuToExtEnum,this->enum_type);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1ElementResult::NumberOfNodalValues{{{1*/
++/*FUNCTION PentaP1ElementResult::NumberOfNodalValues{{{*/
+ int PentaP1ElementResult::NumberOfNodalValues(void){
+ 	return 6;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1ElementResult::PatchFill{{{1*/
++/*FUNCTION PentaP1ElementResult::PatchFill{{{*/
+ void PentaP1ElementResult::PatchFill(int row, Patch* patch){
+ 	
+ 	 /*Here, we fill the result information into the patch object. First, let's remember what is in a row 
+@@ -136,7 +136,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1ElementResult::GetVectorFromResults{{{1*/
++/*FUNCTION PentaP1ElementResult::GetVectorFromResults{{{*/
+ void PentaP1ElementResult::GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){
+ 
+ 	double data[6];
+@@ -146,7 +146,7 @@
+ 	vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
+ 
+ } /*}}}*/
+-/*FUNCTION PentaP1ElementResult::GetElementVectorFromResults{{{1*/
++/*FUNCTION PentaP1ElementResult::GetElementVectorFromResults{{{*/
+ void PentaP1ElementResult::GetElementVectorFromResults(Vector* vector,int dof){
+ 
+ 	_error_("Result %s is a PentaP1ElementResult and should not write vector of size numberofelemenrs",EnumToStringx(enum_type));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp	(revision 12365)
+@@ -18,12 +18,12 @@
+ #include "../../include/include.h"
+ 
+ /*DoubleElementResult constructors and destructor*/
+-/*FUNCTION DoubleElementResult::DoubleElementResult(){{{1*/
++/*FUNCTION DoubleElementResult::DoubleElementResult(){{{*/
+ DoubleElementResult::DoubleElementResult(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleElementResult::DoubleElementResult(int in_enum_type,IssmDouble in_value,int in_step, double in_time){{{1*/
++/*FUNCTION DoubleElementResult::DoubleElementResult(int in_enum_type,IssmDouble in_value,int in_step, double in_time){{{*/
+ DoubleElementResult::DoubleElementResult(int in_enum_type,IssmDouble in_value,int in_step, double in_time){
+ 
+ 	enum_type=in_enum_type;
+@@ -32,19 +32,19 @@
+ 	time=in_time;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleElementResult::~DoubleElementResult(){{{1*/
++/*FUNCTION DoubleElementResult::~DoubleElementResult(){{{*/
+ DoubleElementResult::~DoubleElementResult(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION DoubleElementResult::Echo {{{1*/
++/*FUNCTION DoubleElementResult::Echo {{{*/
+ void DoubleElementResult::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION DoubleElementResult::DeepEcho{{{1*/
++/*FUNCTION DoubleElementResult::DeepEcho{{{*/
+ void DoubleElementResult::DeepEcho(void){
+ 
+ 	printf("DoubleElementResult:\n");
+@@ -54,23 +54,23 @@
+ 	printf("   time: %g\n",this->time);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleElementResult::Id{{{1*/
++/*FUNCTION DoubleElementResult::Id{{{*/
+ int    DoubleElementResult::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION DoubleElementResult::MyRank{{{1*/
++/*FUNCTION DoubleElementResult::MyRank{{{*/
+ int    DoubleElementResult::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleElementResult::ObjectEnum{{{1*/
++/*FUNCTION DoubleElementResult::ObjectEnum{{{*/
+ int DoubleElementResult::ObjectEnum(void){
+ 
+ 	return DoubleElementResultEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleElementResult::copy{{{1*/
++/*FUNCTION DoubleElementResult::copy{{{*/
+ Object* DoubleElementResult::copy() {
+ 
+ 	return new DoubleElementResult(this->enum_type,this->value,this->step,this->time);
+@@ -79,14 +79,14 @@
+ /*}}}*/
+ 
+ /*ElementResult management*/
+-/*FUNCTION DoubleElementResult::InstanceEnum{{{1*/
++/*FUNCTION DoubleElementResult::InstanceEnum{{{*/
+ int DoubleElementResult::InstanceEnum(void){
+ 
+ 	return this->enum_type;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleElementResult::SpawnTriaElementResult{{{1*/
++/*FUNCTION DoubleElementResult::SpawnTriaElementResult{{{*/
+ ElementResult* DoubleElementResult::SpawnTriaElementResult(int* indices){
+ 
+ 	/*output*/
+@@ -103,19 +103,19 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleElementResult::ProcessUnits{{{1*/
++/*FUNCTION DoubleElementResult::ProcessUnits{{{*/
+ void DoubleElementResult::ProcessUnits(Parameters* parameters){
+ 	
+ 	this->value=UnitConversion(this->value,IuToExtEnum,this->enum_type);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleElementResult::NumberOfNodalValues{{{1*/
++/*FUNCTION DoubleElementResult::NumberOfNodalValues{{{*/
+ int DoubleElementResult::NumberOfNodalValues(void){
+ 	return 1;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleElementResult::PatchFill{{{1*/
++/*FUNCTION DoubleElementResult::PatchFill{{{*/
+ void DoubleElementResult::PatchFill(int row, Patch* patch){
+ 	
+ 	 /*Here, we fill the result information into the patch object. First, let's remember what is in a row 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 12365)
+@@ -18,12 +18,12 @@
+ #include "../../include/include.h"
+ 
+ /*BoolElementResult constructors and destructor*/
+-/*FUNCTION BoolElementResult::BoolElementResult(){{{1*/
++/*FUNCTION BoolElementResult::BoolElementResult(){{{*/
+ BoolElementResult::BoolElementResult(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION BoolElementResult::BoolElementResult(int in_enum_type,IssmDouble in_value,int in_step, double in_time){{{1*/
++/*FUNCTION BoolElementResult::BoolElementResult(int in_enum_type,IssmDouble in_value,int in_step, double in_time){{{*/
+ BoolElementResult::BoolElementResult(int in_enum_type,bool in_value,int in_step, double in_time){
+ 
+ 	enum_type=in_enum_type;
+@@ -32,19 +32,19 @@
+ 	time=in_time;
+ }
+ /*}}}*/
+-/*FUNCTION BoolElementResult::~BoolElementResult(){{{1*/
++/*FUNCTION BoolElementResult::~BoolElementResult(){{{*/
+ BoolElementResult::~BoolElementResult(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION BoolElementResult::Echo {{{1*/
++/*FUNCTION BoolElementResult::Echo {{{*/
+ void BoolElementResult::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION BoolElementResult::DeepEcho{{{1*/
++/*FUNCTION BoolElementResult::DeepEcho{{{*/
+ void BoolElementResult::DeepEcho(void){
+ 
+ 	printf("BoolElementResult:\n");
+@@ -54,23 +54,23 @@
+ 	printf("   time: %g\n",this->time);
+ }
+ /*}}}*/
+-/*FUNCTION BoolElementResult::Id{{{1*/
++/*FUNCTION BoolElementResult::Id{{{*/
+ int    BoolElementResult::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION BoolElementResult::MyRank{{{1*/
++/*FUNCTION BoolElementResult::MyRank{{{*/
+ int    BoolElementResult::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION BoolElementResult::ObjectEnum{{{1*/
++/*FUNCTION BoolElementResult::ObjectEnum{{{*/
+ int BoolElementResult::ObjectEnum(void){
+ 
+ 	return BoolElementResultEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolElementResult::copy{{{1*/
++/*FUNCTION BoolElementResult::copy{{{*/
+ Object* BoolElementResult::copy() {
+ 
+ 	return new BoolElementResult(this->enum_type,this->value,this->step,this->time);
+@@ -79,14 +79,14 @@
+ /*}}}*/
+ 
+ /*ElementResult management*/
+-/*FUNCTION BoolElementResult::InstanceEnum{{{1*/
++/*FUNCTION BoolElementResult::InstanceEnum{{{*/
+ int BoolElementResult::InstanceEnum(void){
+ 
+ 	return this->enum_type;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolElementResult::SpawnTriaElementResult{{{1*/
++/*FUNCTION BoolElementResult::SpawnTriaElementResult{{{*/
+ ElementResult* BoolElementResult::SpawnTriaElementResult(int* indices){
+ 
+ 	/*output*/
+@@ -103,19 +103,19 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolElementResult::ProcessUnits{{{1*/
++/*FUNCTION BoolElementResult::ProcessUnits{{{*/
+ void BoolElementResult::ProcessUnits(Parameters* parameters){
+ 	
+ 	this->value=UnitConversion(this->value,IuToExtEnum,this->enum_type);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolElementResult::NumberOfNodalValues{{{1*/
++/*FUNCTION BoolElementResult::NumberOfNodalValues{{{*/
+ int BoolElementResult::NumberOfNodalValues(void){
+ 	return 1;
+ }
+ /*}}}*/
+-/*FUNCTION BoolElementResult::PatchFill{{{1*/
++/*FUNCTION BoolElementResult::PatchFill{{{*/
+ void BoolElementResult::PatchFill(int row, Patch* patch){
+ 	
+ 	 /*Here, we fill the result information into the patch object. First, let's remember what is in a row 
+@@ -126,12 +126,12 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolElementResult::GetVectorFromResults{{{1*/
++/*FUNCTION BoolElementResult::GetVectorFromResults{{{*/
+ void BoolElementResult::GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){
+ 
+ 	_error_("cannot return vector on vertices");
+ } /*}}}*/
+-/*FUNCTION BoolElementResult::GetElementVectorFromResults{{{1*/
++/*FUNCTION BoolElementResult::GetElementVectorFromResults{{{*/
+ void BoolElementResult::GetElementVectorFromResults(Vector* vector,int dof){
+ 
+ 	vector->SetValue(dof,value,INS_VAL);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h	(revision 12365)
+@@ -8,7 +8,7 @@
+ #define _PENTAP1ELEMENTRESULT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../Inputs/Input.h"
+ #include "../../include/include.h"
+ /*}}}*/
+@@ -23,12 +23,12 @@
+ 
+ 	public:
+ 
+-		/*PentaP1ElementResult constructors, destructors: {{{1*/
++		/*PentaP1ElementResult constructors, destructors: {{{*/
+ 		PentaP1ElementResult();
+ 		PentaP1ElementResult(int enum_type,double* values,int step, double time);
+ 		~PentaP1ElementResult();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -36,7 +36,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*ElementResult virtual functions definitions: {{{1*/
++		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+ 		double  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+@@ -44,7 +44,7 @@
+ 		int     NumberOfNodalValues(void);
+ 		void    PatchFill(int row, Patch* patch);
+ 		/*}}}*/
+-		/*PentaP1ElementResult management: {{{1*/
++		/*PentaP1ElementResult management: {{{*/
+ 		int   InstanceEnum();
+ 		void GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs);
+ 		void GetElementVectorFromResults(Vector* vector,int dof);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 12365)
+@@ -8,7 +8,7 @@
+ #define _DOUBLEELEMENTRESULT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../Inputs/Input.h"
+ #include "../../include/include.h"
+ class Parameters;
+@@ -24,12 +24,12 @@
+ 
+ 	public:
+ 
+-		/*DoubleElementResult constructors, destructors: {{{1*/
++		/*DoubleElementResult constructors, destructors: {{{*/
+ 		DoubleElementResult();
+ 		DoubleElementResult(int enum_type,double value,int step,double time);
+ 		~DoubleElementResult();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -37,7 +37,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*ElementResult virtual functions definitions: {{{1*/
++		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+ 		double  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+@@ -45,7 +45,7 @@
+ 		int     NumberOfNodalValues(void);
+ 		void    PatchFill(int row, Patch* patch);
+ 		/*}}}*/
+-		/*DoubleElementResult management: {{{1*/
++		/*DoubleElementResult management: {{{*/
+ 		int   InstanceEnum();
+ 		void GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){_error_("not implemented");};
+ 		void GetElementVectorFromResults(Vector* vector,int dof){_error_("not implemented");};
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 12365)
+@@ -8,7 +8,7 @@
+ #define _BOOLELEMENTRESULT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../Inputs/Input.h"
+ #include "../../include/include.h"
+ class Parameters;
+@@ -24,12 +24,12 @@
+ 
+ 	public:
+ 
+-		/*BoolElementResult constructors, destructors: {{{1*/
++		/*BoolElementResult constructors, destructors: {{{*/
+ 		BoolElementResult();
+ 		BoolElementResult(int enum_type,bool value,int step,double time);
+ 		~BoolElementResult();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -37,7 +37,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*ElementResult virtual functions definitions: {{{1*/
++		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+ 		double  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+@@ -45,7 +45,7 @@
+ 		int     NumberOfNodalValues(void);
+ 		void    PatchFill(int row, Patch* patch);
+ 		/*}}}*/
+-		/*BoolElementResult management: {{{1*/
++		/*BoolElementResult management: {{{*/
+ 		int   InstanceEnum();
+ 		void GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs);
+ 		void GetElementVectorFromResults(Vector* vector,int dof);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12365)
+@@ -18,12 +18,12 @@
+ #include "../../include/include.h"
+ 
+ /*TriaP1ElementResult constructors and destructor*/
+-/*FUNCTION TriaP1ElementResult::TriaP1ElementResult(){{{1*/
++/*FUNCTION TriaP1ElementResult::TriaP1ElementResult(){{{*/
+ TriaP1ElementResult::TriaP1ElementResult(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1ElementResult::TriaP1ElementResult(int in_enum_type,double* in_values,int in_step, double in_time){{{1*/
++/*FUNCTION TriaP1ElementResult::TriaP1ElementResult(int in_enum_type,double* in_values,int in_step, double in_time){{{*/
+ TriaP1ElementResult::TriaP1ElementResult(int in_enum_type,double* in_values,int in_step, double in_time){
+ 
+ 	enum_type=in_enum_type;
+@@ -34,19 +34,19 @@
+ 	time=in_time;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1ElementResult::~TriaP1ElementResult(){{{1*/
++/*FUNCTION TriaP1ElementResult::~TriaP1ElementResult(){{{*/
+ TriaP1ElementResult::~TriaP1ElementResult(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION TriaP1ElementResult::Echo {{{1*/
++/*FUNCTION TriaP1ElementResult::Echo {{{*/
+ void TriaP1ElementResult::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1ElementResult::DeepEcho{{{1*/
++/*FUNCTION TriaP1ElementResult::DeepEcho{{{*/
+ void TriaP1ElementResult::DeepEcho(void){
+ 		
+ 	printf("TriaP1ElementResult:\n");
+@@ -56,23 +56,23 @@
+ 	printf("   time: %g\n",this->time);
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1ElementResult::Id{{{1*/
++/*FUNCTION TriaP1ElementResult::Id{{{*/
+ int    TriaP1ElementResult::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION TriaP1ElementResult::MyRank{{{1*/
++/*FUNCTION TriaP1ElementResult::MyRank{{{*/
+ int    TriaP1ElementResult::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1ElementResult::ObjectEnum{{{1*/
++/*FUNCTION TriaP1ElementResult::ObjectEnum{{{*/
+ int TriaP1ElementResult::ObjectEnum(void){
+ 
+ 	return TriaP1ElementResultEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1ElementResult::copy{{{1*/
++/*FUNCTION TriaP1ElementResult::copy{{{*/
+ Object* TriaP1ElementResult::copy() {
+ 	
+ 	return new TriaP1ElementResult(this->enum_type,this->values,this->step,this->time);
+@@ -81,14 +81,14 @@
+ /*}}}*/
+ 
+ /*ElementResult management*/
+-/*FUNCTION TriaP1ElementResult::InstanceEnum{{{1*/
++/*FUNCTION TriaP1ElementResult::InstanceEnum{{{*/
+ int TriaP1ElementResult::InstanceEnum(void){
+ 
+ 	return this->enum_type;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1ElementResult::SpawnTriaElementResult{{{1*/
++/*FUNCTION TriaP1ElementResult::SpawnTriaElementResult{{{*/
+ ElementResult* TriaP1ElementResult::SpawnTriaElementResult(int* indices){
+ 
+ 	/*output*/
+@@ -102,19 +102,19 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1ElementResult::ProcessUnits{{{1*/
++/*FUNCTION TriaP1ElementResult::ProcessUnits{{{*/
+ void TriaP1ElementResult::ProcessUnits(Parameters* parameters){
+ 	
+ 	UnitConversion(this->values,3,IuToExtEnum,this->enum_type);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1ElementResult::NumberOfNodalValues{{{1*/
++/*FUNCTION TriaP1ElementResult::NumberOfNodalValues{{{*/
+ int TriaP1ElementResult::NumberOfNodalValues(void){
+ 	return 3;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1ElementResult::PatchFill{{{1*/
++/*FUNCTION TriaP1ElementResult::PatchFill{{{*/
+ void TriaP1ElementResult::PatchFill(int row, Patch* patch){
+ 	
+ 	 /*Here, we fill the result information into the patch object. First, let's remember what is in a row 
+@@ -124,7 +124,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1ElementResult::GetVectorFromResults{{{1*/
++/*FUNCTION TriaP1ElementResult::GetVectorFromResults{{{*/
+ void TriaP1ElementResult::GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){
+ 
+ 	double data[3];
+@@ -134,7 +134,7 @@
+ 	vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
+ 
+ } /*}}}*/
+-/*FUNCTION TriaP1ElementResult::GetElementVectorFromResults{{{1*/
++/*FUNCTION TriaP1ElementResult::GetElementVectorFromResults{{{*/
+ void TriaP1ElementResult::GetElementVectorFromResults(Vector* vector,int dof){
+ 	_error_("Result %s is a TriaP1ElementResult and should not write vector of size numberofelemenrs",EnumToStringx(enum_type));
+ } /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/ElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _ELEMENTRESULT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../Object.h"
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _NODE_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Object.h"
+ #include "../shared/shared.h"
+ class  Inputs;
+@@ -33,12 +33,12 @@
+ 		int            analysis_type;
+ 		IssmDouble         coord_system[3][3];
+ 
+-		/*Node constructors, destructors {{{1*/
++		/*Node constructors, destructors {{{*/
+ 		Node();
+ 		Node(int node_id,int node_sid, int vertex_id,int io_index, IoModel* iomodel,int analysis_type);
+ 		~Node();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -46,7 +46,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy(){_error_("Not implemented yet (similar to Elements)");};
+ 		/*}}}*/
+-		/*Update virtual functions definitions: {{{1*/
++		/*Update virtual functions definitions: {{{*/
+ 		
+ 		void  InputUpdateFromVector(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+@@ -61,7 +61,7 @@
+ 		void  InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("Not implemented yet!");}
+ 		/*}}}*/
+-		/*Node numerical routines {{{1*/
++		/*Node numerical routines {{{*/
+ 		void   Configure(DataSet* nodes,Vertices* vertices);
+ 		void   CreateNodalConstraints(Vector* ys);
+ 		void   SetCurrentConfiguration(DataSet* nodes,Vertices* vertices);
+@@ -101,7 +101,7 @@
+ 		void   VecReduce(Vector* vector, IssmDouble* ug_serial,int setnum);
+ 		
+ 		/*}}}*/
+-		/*Dof Object routines {{{1*/
++		/*Dof Object routines {{{*/
+ 		void  DistributeDofs(int* pdofcount,int setenum);
+ 		void  OffsetDofs(int dofcount,int setenum);
+ 		void  ShowTrueDofs(int* truerows,int ncols,int setenum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Element.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Element.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Element.h	(revision 12365)
+@@ -9,7 +9,7 @@
+ #define _ELEMENT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../Object.h"
+ 
+ class DataSet;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -22,7 +22,7 @@
+ #define NUMVERTICES 3
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION Tria::Tria(){{{1*/
++/*FUNCTION Tria::Tria(){{{*/
+ Tria::Tria(){
+ 
+ 	int i;
+@@ -37,7 +37,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::Tria(int id, int sid,int index, IoModel* iomodel,int nummodels){{{1*/
++/*FUNCTION Tria::Tria(int id, int sid,int index, IoModel* iomodel,int nummodels){{{*/
+ Tria::Tria(int tria_id, int tria_sid, int index, IoModel* iomodel,int nummodels)
+ 	:TriaRef(nummodels)
+ 	,TriaHook(nummodels,index+1,iomodel){
+@@ -65,14 +65,14 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::~Tria(){{{1*/
++/*FUNCTION Tria::~Tria(){{{*/
+ Tria::~Tria(){
+ 	delete inputs;
+ 	delete results;
+ 	this->parameters=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::copy {{{1*/
++/*FUNCTION Tria::copy {{{*/
+ Object* Tria::copy() {
+ 
+ 	int i;
+@@ -123,7 +123,7 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION Tria::AverageOntoPartition {{{1*/
++/*FUNCTION Tria::AverageOntoPartition {{{*/
+ void  Tria::AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,double* vertex_response,double* qmu_part){
+ 
+ 	bool      already=false;
+@@ -163,7 +163,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrix {{{1*/
++/*FUNCTION Tria::CreateKMatrix {{{*/
+ void  Tria::CreateKMatrix(Matrix* Kff, Matrix* Kfs,Vector* df){
+ 
+ 	/*retreive parameters: */
+@@ -171,7 +171,7 @@
+ 	int analysis_type;
+ 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
+ 
+-	/*Checks in debugging mode{{{2*/
++	/*Checks in debugging mode{{{*/
+ 	_assert_(this->nodes && this->matice && this->matpar && this->parameters && this->inputs);
+ 	/*}}}*/
+ 	
+@@ -223,7 +223,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrixMelting {{{1*/
++/*FUNCTION Tria::CreateKMatrixMelting {{{*/
+ ElementMatrix* Tria::CreateKMatrixMelting(void){
+ 
+ 	/*Constants*/
+@@ -267,7 +267,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrixPrognostic {{{1*/
++/*FUNCTION Tria::CreateKMatrixPrognostic {{{*/
+ ElementMatrix* Tria::CreateKMatrixPrognostic(void){
+ 
+ 	switch(GetElementType()){
+@@ -281,7 +281,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrixPrognostic_CG {{{1*/
++/*FUNCTION Tria::CreateKMatrixPrognostic_CG {{{*/
+ ElementMatrix* Tria::CreateKMatrixPrognostic_CG(void){
+ 
+ 	/*Constants*/
+@@ -401,7 +401,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrixPrognostic_DG {{{1*/
++/*FUNCTION Tria::CreateKMatrixPrognostic_DG {{{*/
+ ElementMatrix* Tria::CreateKMatrixPrognostic_DG(void){
+ 
+ 	/*Constants*/
+@@ -476,7 +476,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrixSlope {{{1*/
++/*FUNCTION Tria::CreateKMatrixSlope {{{*/
+ ElementMatrix* Tria::CreateKMatrixSlope(void){
+ 
+ 	/*constants: */
+@@ -516,7 +516,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVector {{{1*/
++/*FUNCTION Tria::CreatePVector {{{*/
+ void  Tria::CreatePVector(Vector* pf){
+ 
+ 	/*retrive parameters: */
+@@ -577,7 +577,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVectorPrognostic{{{1*/
++/*FUNCTION Tria::CreatePVectorPrognostic{{{*/
+ ElementVector* Tria::CreatePVectorPrognostic(void){
+ 
+ 	switch(GetElementType()){
+@@ -590,7 +590,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVectorPrognostic_CG {{{1*/
++/*FUNCTION Tria::CreatePVectorPrognostic_CG {{{*/
+ ElementVector* Tria::CreatePVectorPrognostic_CG(void){
+ 
+ 	/*Constants*/
+@@ -641,7 +641,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVectorPrognostic_DG {{{1*/
++/*FUNCTION Tria::CreatePVectorPrognostic_DG {{{*/
+ ElementVector* Tria::CreatePVectorPrognostic_DG(void){
+ 
+ 	/*Constants*/
+@@ -686,7 +686,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVectorSlope {{{1*/
++/*FUNCTION Tria::CreatePVectorSlope {{{*/
+ ElementVector* Tria::CreatePVectorSlope(void){
+ 
+ 	/*Constants*/
+@@ -739,7 +739,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateJacobianMatrix{{{1*/
++/*FUNCTION Tria::CreateJacobianMatrix{{{*/
+ void  Tria::CreateJacobianMatrix(Matrix* Jff){
+ 
+ 	/*retrieve parameters: */
+@@ -747,7 +747,7 @@
+ 	int analysis_type;
+ 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
+ 
+-	/*Checks in debugging {{{2*/
++	/*Checks in debugging {{{*/
+ 	_assert_(this->nodes && this->matice && this->matpar && this->parameters && this->inputs);
+ 	/*}}}*/
+ 
+@@ -772,17 +772,17 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Tria::ComputeBasalStress {{{1*/
++/*FUNCTION Tria::ComputeBasalStress {{{*/
+ void  Tria::ComputeBasalStress(Vector* eps){
+ 	_error_("Not Implemented yet");
+ }
+ /*}}}*/
+-/*FUNCTION Tria::ComputeStrainRate {{{1*/
++/*FUNCTION Tria::ComputeStrainRate {{{*/
+ void  Tria::ComputeStrainRate(Vector* eps){
+ 	_error_("Not Implemented yet");
+ }
+ /*}}}*/
+-/*FUNCTION Tria::ComputeStressTensor {{{1*/
++/*FUNCTION Tria::ComputeStressTensor {{{*/
+ void  Tria::ComputeStressTensor(){
+ 
+ 	int         iv;
+@@ -833,7 +833,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::Configure {{{1*/
++/*FUNCTION Tria::Configure {{{*/
+ void  Tria::Configure(Elements* elementsin, Loads* loadsin, DataSet* nodesin, Materials* materialsin, Parameters* parametersin){
+ 	
+ 	/*go into parameters and get the analysis_counter: */
+@@ -863,7 +863,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::DeepEcho{{{1*/
++/*FUNCTION Tria::DeepEcho{{{*/
+ void Tria::DeepEcho(void){
+ 
+ 	printf("Tria:\n");
+@@ -898,7 +898,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::DeleteResults {{{1*/
++/*FUNCTION Tria::DeleteResults {{{*/
+ void  Tria::DeleteResults(void){
+ 
+ 	/*Delete and reinitialize results*/
+@@ -907,7 +907,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::Echo{{{1*/
++/*FUNCTION Tria::Echo{{{*/
+ void Tria::Echo(void){
+ 	printf("Tria:\n");
+ 	printf("   id: %i\n",id);
+@@ -939,14 +939,14 @@
+ 	printf(" %i %i %i\n",horizontalneighborsids[0],horizontalneighborsids[1],horizontalneighborsids[2]);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::ObjectEnum{{{1*/
++/*FUNCTION Tria::ObjectEnum{{{*/
+ int Tria::ObjectEnum(void){
+ 
+ 	return TriaEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetArea {{{1*/
++/*FUNCTION Tria::GetArea {{{*/
+ double Tria::GetArea(void){
+ 
+ 	double area=0;
+@@ -963,7 +963,7 @@
+ 	return (x2*y3 - y2*x3 + x1*y2 - y1*x2 + x3*y1 - y3*x1)/2;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetDofList {{{1*/
++/*FUNCTION Tria::GetDofList {{{*/
+ void  Tria::GetDofList(int** pdoflist, int approximation_enum,int setenum){
+ 
+ 	int i,j;
+@@ -986,7 +986,7 @@
+ 	*pdoflist=doflist;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetDofList1 {{{1*/
++/*FUNCTION Tria::GetDofList1 {{{*/
+ void  Tria::GetDofList1(int* doflist){
+ 
+ 	int i;
+@@ -994,7 +994,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetElementType {{{1*/
++/*FUNCTION Tria::GetElementType {{{*/
+ int Tria::GetElementType(){
+ 
+ 	/*return TriaRef field*/
+@@ -1002,7 +1002,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetHorizontalNeighboorSids {{{1*/
++/*FUNCTION Tria::GetHorizontalNeighboorSids {{{*/
+ int* Tria::GetHorizontalNeighboorSids(){
+ 
+ 	/*return TriaRef field*/
+@@ -1010,7 +1010,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetNodeIndex {{{1*/
++/*FUNCTION Tria::GetNodeIndex {{{*/
+ int Tria::GetNodeIndex(Node* node){
+ 
+ 	_assert_(nodes);
+@@ -1021,7 +1021,7 @@
+ 	_error_("Node provided not found among element nodes");
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetInputListOnVertices(double* pvalue,int enumtype) {{{1*/
++/*FUNCTION Tria::GetInputListOnVertices(double* pvalue,int enumtype) {{{*/
+ void Tria::GetInputListOnVertices(double* pvalue,int enumtype){
+ 
+ 	/*Intermediaries*/
+@@ -1046,7 +1046,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue) {{{1*/
++/*FUNCTION Tria::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue) {{{*/
+ void Tria::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue){
+ 
+ 	double     value[NUMVERTICES];
+@@ -1072,7 +1072,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue,int index) TO BE REMOVED{{{1*/
++/*FUNCTION Tria::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue,int index) TO BE REMOVED{{{*/
+ void Tria::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue,int index){
+ 
+ 	double     value[NUMVERTICES];
+@@ -1098,7 +1098,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetInputValue(double* pvalue,Node* node,int enumtype) {{{1*/
++/*FUNCTION Tria::GetInputValue(double* pvalue,Node* node,int enumtype) {{{*/
+ void Tria::GetInputValue(double* pvalue,Node* node,int enumtype){
+ 
+ 	Input* input=inputs->GetInput(enumtype);
+@@ -1111,17 +1111,17 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetSidList {{{1*/
++/*FUNCTION Tria::GetSidList {{{*/
+ void  Tria::GetSidList(int* sidlist){
+ 	for(int i=0;i<NUMVERTICES;i++) sidlist[i]=nodes[i]->GetSidList();
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetConnectivityList {{{1*/
++/*FUNCTION Tria::GetConnectivityList {{{*/
+ void  Tria::GetConnectivityList(int* connectivity){
+ 	for(int i=0;i<NUMVERTICES;i++) connectivity[i]=nodes[i]->GetConnectivity();
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetSolutionFromInputs{{{1*/
++/*FUNCTION Tria::GetSolutionFromInputs{{{*/
+ void  Tria::GetSolutionFromInputs(Vector* solution){
+ 
+ 	/*retrive parameters: */
+@@ -1149,7 +1149,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetStrainRate2d(double* epsilon,double* xyz_list, GaussTria* gauss, Input* vx_input, Input* vy_input){{{1*/
++/*FUNCTION Tria::GetStrainRate2d(double* epsilon,double* xyz_list, GaussTria* gauss, Input* vx_input, Input* vy_input){{{*/
+ void Tria::GetStrainRate2d(double* epsilon,double* xyz_list, GaussTria* gauss, Input* vx_input, Input* vy_input){
+ 	/*Compute the 2d Strain Rate (3 components):
+ 	 * epsilon=[exx eyy exy] */
+@@ -1171,7 +1171,7 @@
+ 	for(i=0;i<3;i++) epsilon[i]=epsilonvx[i]+epsilonvy[i];
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetVectorFromInputs{{{1*/
++/*FUNCTION Tria::GetVectorFromInputs{{{*/
+ void  Tria::GetVectorFromInputs(Vector* vector,int input_enum){
+ 
+ 	int doflist1[NUMVERTICES];
+@@ -1190,7 +1190,7 @@
+ 	input->GetVectorFromInputs(vector,&doflist1[0]);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetVectorFromResults{{{1*/
++/*FUNCTION Tria::GetVectorFromResults{{{*/
+ void  Tria::GetVectorFromResults(Vector* vector,int offset,int interp){
+ 
+ 	/*Get result*/
+@@ -1210,21 +1210,21 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Tria::Id {{{1*/
++/*FUNCTION Tria::Id {{{*/
+ int    Tria::Id(){
+ 	
+ 	return id;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::Sid {{{1*/
++/*FUNCTION Tria::Sid {{{*/
+ int    Tria::Sid(){
+ 	
+ 	return sid;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputArtificialNoise{{{1*/
++/*FUNCTION Tria::InputArtificialNoise{{{*/
+ void  Tria::InputArtificialNoise(int enum_type,double min,double max){
+ 
+ 	Input* input=NULL;
+@@ -1237,7 +1237,7 @@
+ 	input->ArtificialNoise(min,max);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputConvergence{{{1*/
++/*FUNCTION Tria::InputConvergence{{{*/
+ bool Tria::InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){
+ 
+ 	bool    converged=true;
+@@ -1267,7 +1267,7 @@
+ 	return converged;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputDepthAverageAtBase {{{1*/
++/*FUNCTION Tria::InputDepthAverageAtBase {{{*/
+ void  Tria::InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum){
+ 
+ 	/*New input*/
+@@ -1296,7 +1296,7 @@
+ 	 _error_("object %s not supported yet",EnumToStringx(object_enum));
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputDuplicate{{{1*/
++/*FUNCTION Tria::InputDuplicate{{{*/
+ void  Tria::InputDuplicate(int original_enum,int new_enum){
+ 
+ 	/*Call inputs method*/
+@@ -1304,7 +1304,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputScale{{{1*/
++/*FUNCTION Tria::InputScale{{{*/
+ void  Tria::InputScale(int enum_type,double scale_factor){
+ 
+ 	Input* input=NULL;
+@@ -1317,7 +1317,7 @@
+ 	input->Scale(scale_factor);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputToResult{{{1*/
++/*FUNCTION Tria::InputToResult{{{*/
+ void  Tria::InputToResult(int enum_type,int step,double time){
+ 
+ 	int    i;
+@@ -1340,7 +1340,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromConstant(int value, int name);{{{1*/
++/*FUNCTION Tria::InputUpdateFromConstant(int value, int name);{{{*/
+ void  Tria::InputUpdateFromConstant(int constant, int name){
+ 	/*Check that name is an element input*/
+ 	if (!IsInput(name)) return;
+@@ -1349,7 +1349,7 @@
+ 	this->inputs->AddInput(new IntInput(name,constant));
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromConstant(double value, int name);{{{1*/
++/*FUNCTION Tria::InputUpdateFromConstant(double value, int name);{{{*/
+ void  Tria::InputUpdateFromConstant(double constant, int name){
+ 	/*Check that name is an element input*/
+ 	if (!IsInput(name)) return;
+@@ -1358,7 +1358,7 @@
+ 	this->inputs->AddInput(new DoubleInput(name,constant));
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromConstant(bool value, int name);{{{1*/
++/*FUNCTION Tria::InputUpdateFromConstant(bool value, int name);{{{*/
+ void  Tria::InputUpdateFromConstant(bool constant, int name){
+ 	/*Check that name is an element input*/
+ 	if (!IsInput(name)) return;
+@@ -1367,7 +1367,7 @@
+ 	this->inputs->AddInput(new BoolInput(name,constant));
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromIoModel{{{1*/
++/*FUNCTION Tria::InputUpdateFromIoModel{{{*/
+ void Tria::InputUpdateFromIoModel(int index, IoModel* iomodel){ //i is the element index
+ 
+ 	/*Intermediaries*/
+@@ -1453,7 +1453,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromSolution {{{1*/
++/*FUNCTION Tria::InputUpdateFromSolution {{{*/
+ void  Tria::InputUpdateFromSolution(double* solution){
+ 
+ 	/*retrive parameters: */
+@@ -1508,7 +1508,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromSolutionOneDof{{{1*/
++/*FUNCTION Tria::InputUpdateFromSolutionOneDof{{{*/
+ void  Tria::InputUpdateFromSolutionOneDof(double* solution,int enum_type){
+ 
+ 	const int numdof          = NDOF1*NUMVERTICES;
+@@ -1532,7 +1532,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromSolutionPrognostic{{{1*/
++/*FUNCTION Tria::InputUpdateFromSolutionPrognostic{{{*/
+ void  Tria::InputUpdateFromSolutionPrognostic(double* solution){
+ 
+ 	/*Intermediaries*/
+@@ -1599,7 +1599,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromVector(double* vector, int name, int type);{{{1*/
++/*FUNCTION Tria::InputUpdateFromVector(double* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVector(double* vector, int name, int type){
+ 
+ 	/*Check that name is an element input*/
+@@ -1631,17 +1631,17 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromVector(int* vector, int name, int type);{{{1*/
++/*FUNCTION Tria::InputUpdateFromVector(int* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVector(int* vector, int name, int type){
+ 	_error_(" not supported yet!");
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromVector(bool* vector, int name, int type);{{{1*/
++/*FUNCTION Tria::InputUpdateFromVector(bool* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVector(bool* vector, int name, int type){
+ 	_error_(" not supported yet!");
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputCreate(double scalar,int enum,int code);{{{1*/
++/*FUNCTION Tria::InputCreate(double scalar,int enum,int code);{{{*/
+ void Tria::InputCreate(double scalar,int name,int code){
+ 
+ 	/*Check that name is an element input*/
+@@ -1660,7 +1660,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputCreate(double* vector,int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){{{1*/
++/*FUNCTION Tria::InputCreate(double* vector,int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){{{*/
+ void Tria::InputCreate(double* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){//index into elements
+ 
+ 	/*Intermediaries*/
+@@ -1750,7 +1750,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::IsInput{{{1*/
++/*FUNCTION Tria::IsInput{{{*/
+ bool Tria::IsInput(int name){
+ 	if (
+ 				name==ThicknessEnum ||
+@@ -1784,7 +1784,7 @@
+ 	else return false;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::IsOnBed {{{1*/
++/*FUNCTION Tria::IsOnBed {{{*/
+ bool Tria::IsOnBed(){
+ 	
+ 	bool onbed;
+@@ -1792,7 +1792,7 @@
+ 	return onbed;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::IsFloating {{{1*/
++/*FUNCTION Tria::IsFloating {{{*/
+ bool   Tria::IsFloating(){
+ 
+ 	bool shelf;
+@@ -1800,7 +1800,7 @@
+ 	return shelf;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::IsNodeOnShelf {{{1*/
++/*FUNCTION Tria::IsNodeOnShelf {{{*/
+ bool   Tria::IsNodeOnShelf(){
+ 
+ 	int  i;
+@@ -1815,7 +1815,7 @@
+ 	return shelf;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::IsNodeOnShelfFromFlags {{{1*/
++/*FUNCTION Tria::IsNodeOnShelfFromFlags {{{*/
+ bool   Tria::IsNodeOnShelfFromFlags(double* flags){
+ 
+ 	int  i;
+@@ -1830,7 +1830,7 @@
+ 	return shelf;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::IsOnWater {{{1*/
++/*FUNCTION Tria::IsOnWater {{{*/
+ bool   Tria::IsOnWater(){
+ 
+ 	bool water;
+@@ -1889,7 +1889,7 @@
+ 	*in_resultssteps=resultssteps;
+ 
+ }/*}}}*/
+-/*FUNCTION Tria::MigrateGroundingLine{{{1*/
++/*FUNCTION Tria::MigrateGroundingLine{{{*/
+ void  Tria::MigrateGroundingLine(double* old_floating_ice,double* sheet_ungrounding){
+ 
+ 	int     i,migration_style,unground;
+@@ -1965,13 +1965,13 @@
+ 	this->inputs->AddInput(new TriaP1Input(BedEnum,&b[0]));
+ }
+ /*}}}*/
+-/*FUNCTION Tria::MyRank {{{1*/
++/*FUNCTION Tria::MyRank {{{*/
+ int    Tria::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::NodalValue {{{1*/
++/*FUNCTION Tria::NodalValue {{{*/
+ int    Tria::NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units){
+ 
+ 	int i;
+@@ -2002,7 +2002,7 @@
+ 	return found;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::PatchFill{{{1*/
++/*FUNCTION Tria::PatchFill{{{*/
+ void  Tria::PatchFill(int* prow, Patch* patch){
+ 
+ 	int i,row;
+@@ -2029,7 +2029,7 @@
+ 	*prow=row;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::PatchSize{{{1*/
++/*FUNCTION Tria::PatchSize{{{*/
+ void  Tria::PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes){
+ 
+ 	int     i;
+@@ -2053,7 +2053,7 @@
+ 	*pnumnodes=numnodes;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::PotentialSheetUngrounding{{{1*/
++/*FUNCTION Tria::PotentialSheetUngrounding{{{*/
+ void  Tria::PotentialSheetUngrounding(Vector* potential_sheet_ungrounding){
+ 
+ 	int     i;
+@@ -2082,7 +2082,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Tria::PositiveDegreeDay{{{1*/
++/*FUNCTION Tria::PositiveDegreeDay{{{*/
+ void  Tria::PositiveDegreeDay(double* pdds,double* pds,double signorm){
+ 
+    int    i,iqj,imonth;
+@@ -2317,7 +2317,7 @@
+    }       //end of the for loop over the vertices
+ }
+ /*}}}*/
+-/*FUNCTION Tria::ProcessResultsUnits{{{1*/
++/*FUNCTION Tria::ProcessResultsUnits{{{*/
+ void  Tria::ProcessResultsUnits(void){
+ 
+ 	int i;
+@@ -2328,7 +2328,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Tria::RequestedOutput{{{1*/
++/*FUNCTION Tria::RequestedOutput{{{*/
+ void Tria::RequestedOutput(int output_enum,int step,double time){
+ 
+ 	if(IsInput(output_enum)){
+@@ -2356,19 +2356,19 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::SetClone {{{1*/
++/*FUNCTION Tria::SetClone {{{*/
+ void  Tria::SetClone(int* minranks){
+ 
+ 	_error_("not implemented yet");
+ }
+-/*}}}1*/
+-/*FUNCTION Tria::SmearFunction {{{1*/
++/*}}}*/
++/*FUNCTION Tria::SmearFunction {{{*/
+ void  Tria::SmearFunction(Vector*  smearedvector,double (*WeightFunction)(double distance,double radius),double radius){
+ 	_error_("not implemented yet");
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Tria::SetCurrentConfiguration {{{1*/
++/*}}}*/
++/*FUNCTION Tria::SetCurrentConfiguration {{{*/
+ void  Tria::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, DataSet* nodesin, Materials* materialsin, Parameters* parametersin){
+ 	
+ 	/*go into parameters and get the analysis_counter: */
+@@ -2384,7 +2384,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::SurfaceArea {{{1*/
++/*FUNCTION Tria::SurfaceArea {{{*/
+ double Tria::SurfaceArea(void){
+ 
+ 	int    i;
+@@ -2413,7 +2413,7 @@
+ 	return S;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::SurfaceNormal{{{1*/
++/*FUNCTION Tria::SurfaceNormal{{{*/
+ void Tria::SurfaceNormal(double* surface_normal, double xyz_list[3][3]){
+ 
+ 	int i;
+@@ -2437,7 +2437,7 @@
+ 	*(surface_normal+2)=normal[2]/normal_norm;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::TimeAdapt{{{1*/
++/*FUNCTION Tria::TimeAdapt{{{*/
+ double  Tria::TimeAdapt(void){
+ 
+ 	/*intermediary: */
+@@ -2483,7 +2483,7 @@
+ 	return dt;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type){{{1*/
++/*FUNCTION Tria::Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type){{{*/
+ void Tria::Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type){ //i is the element index
+ 
+ 	/*Intermediaries*/
+@@ -2497,7 +2497,7 @@
+ 	bool   dakota_analysis;
+ 
+ 	/*Checks if debuging*/
+-	/*{{{2*/
++	/*{{{*/
+ 	_assert_(iomodel->Data(MeshElementsEnum));
+ 	/*}}}*/
+ 
+@@ -2583,7 +2583,7 @@
+ 	this->parameters=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::UpdatePotentialSheetUngrounding{{{1*/
++/*FUNCTION Tria::UpdatePotentialSheetUngrounding{{{*/
+ int Tria::UpdatePotentialSheetUngrounding(double* vertices_potentially_ungrounding,Vector* vec_nodes_on_iceshelf,double* nodes_on_iceshelf){
+ 
+ 	int i;
+@@ -2605,7 +2605,7 @@
+ /*}}}*/
+ 
+ #ifdef _HAVE_RESPONSES_
+-/*FUNCTION Tria::IceVolume {{{1*/
++/*FUNCTION Tria::IceVolume {{{*/
+ double Tria::IceVolume(void){
+ 
+ 	/*The volume of a troncated prism is base * 1/3 sum(length of edges)*/
+@@ -2631,7 +2631,7 @@
+ 	return base*(surface-bed);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::MassFlux {{{1*/
++/*FUNCTION Tria::MassFlux {{{*/
+ double Tria::MassFlux( double* segment,bool process_units){
+ 
+ 	const int    numdofs=2;
+@@ -2703,7 +2703,7 @@
+ 	return mass_flux;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::MaxAbsVx{{{1*/
++/*FUNCTION Tria::MaxAbsVx{{{*/
+ void  Tria::MaxAbsVx(double* pmaxabsvx, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -2716,7 +2716,7 @@
+ 	*pmaxabsvx=maxabsvx;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::MaxAbsVy{{{1*/
++/*FUNCTION Tria::MaxAbsVy{{{*/
+ void  Tria::MaxAbsVy(double* pmaxabsvy, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -2729,7 +2729,7 @@
+ 	*pmaxabsvy=maxabsvy;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::MaxAbsVz{{{1*/
++/*FUNCTION Tria::MaxAbsVz{{{*/
+ void  Tria::MaxAbsVz(double* pmaxabsvz, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -2742,7 +2742,7 @@
+ 	*pmaxabsvz=maxabsvz;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::MaxVel{{{1*/
++/*FUNCTION Tria::MaxVel{{{*/
+ void  Tria::MaxVel(double* pmaxvel, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -2755,7 +2755,7 @@
+ 	*pmaxvel=maxvel;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::MaxVx{{{1*/
++/*FUNCTION Tria::MaxVx{{{*/
+ void  Tria::MaxVx(double* pmaxvx, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -2768,7 +2768,7 @@
+ 	*pmaxvx=maxvx;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::MaxVy{{{1*/
++/*FUNCTION Tria::MaxVy{{{*/
+ void  Tria::MaxVy(double* pmaxvy, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -2782,7 +2782,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::MaxVz{{{1*/
++/*FUNCTION Tria::MaxVz{{{*/
+ void  Tria::MaxVz(double* pmaxvz, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -2795,7 +2795,7 @@
+ 	*pmaxvz=maxvz;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::MinVel{{{1*/
++/*FUNCTION Tria::MinVel{{{*/
+ void  Tria::MinVel(double* pminvel, bool process_units){
+ 
+ 	/*Get minimum:*/
+@@ -2808,7 +2808,7 @@
+ 	*pminvel=minvel;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::MinVx{{{1*/
++/*FUNCTION Tria::MinVx{{{*/
+ void  Tria::MinVx(double* pminvx, bool process_units){
+ 
+ 	/*Get minimum:*/
+@@ -2821,7 +2821,7 @@
+ 	*pminvx=minvx;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::MinVy{{{1*/
++/*FUNCTION Tria::MinVy{{{*/
+ void  Tria::MinVy(double* pminvy, bool process_units){
+ 
+ 	/*Get minimum:*/
+@@ -2834,7 +2834,7 @@
+ 	*pminvy=minvy;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::MinVz{{{1*/
++/*FUNCTION Tria::MinVz{{{*/
+ void  Tria::MinVz(double* pminvz, bool process_units){
+ 
+ 	/*Get minimum:*/
+@@ -2847,7 +2847,7 @@
+ 	*pminvz=minvz;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::ElementResponse{{{1*/
++/*FUNCTION Tria::ElementResponse{{{*/
+ void Tria::ElementResponse(double* presponse,int response_enum,bool process_units){
+ 
+ 	switch(response_enum){
+@@ -2877,7 +2877,7 @@
+ #endif
+ 
+ #ifdef _HAVE_DIAGNOSTIC_
+-/*FUNCTION Tria::CreateKMatrixDiagnosticMacAyeal {{{1*/
++/*FUNCTION Tria::CreateKMatrixDiagnosticMacAyeal {{{*/
+ ElementMatrix* Tria::CreateKMatrixDiagnosticMacAyeal(void){
+ 
+ 	/*compute all stiffness matrices for this element*/
+@@ -2891,7 +2891,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrixDiagnosticMacAyealViscous{{{1*/
++/*FUNCTION Tria::CreateKMatrixDiagnosticMacAyealViscous{{{*/
+ ElementMatrix* Tria::CreateKMatrixDiagnosticMacAyealViscous(void){
+ 
+ 	/*Constants*/
+@@ -2955,7 +2955,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrixDiagnosticMacAyealFriction {{{1*/
++/*FUNCTION Tria::CreateKMatrixDiagnosticMacAyealFriction {{{*/
+ ElementMatrix* Tria::CreateKMatrixDiagnosticMacAyealFriction(void){
+ 
+ 	/*Constants*/
+@@ -3024,7 +3024,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrixDiagnosticHutter{{{1*/
++/*FUNCTION Tria::CreateKMatrixDiagnosticHutter{{{*/
+ ElementMatrix* Tria::CreateKMatrixDiagnosticHutter(void){
+ 
+ 	/*Intermediaries*/
+@@ -3045,7 +3045,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVectorDiagnosticMacAyeal {{{1*/
++/*FUNCTION Tria::CreatePVectorDiagnosticMacAyeal {{{*/
+ ElementVector* Tria::CreatePVectorDiagnosticMacAyeal(){
+ 
+ 	/*Constants*/
+@@ -3099,7 +3099,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVectorDiagnosticHutter{{{1*/
++/*FUNCTION Tria::CreatePVectorDiagnosticHutter{{{*/
+ ElementVector* Tria::CreatePVectorDiagnosticHutter(void){
+ 
+ 	/*Intermediaries */
+@@ -3149,7 +3149,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateJacobianDiagnosticMacayeal{{{1*/
++/*FUNCTION Tria::CreateJacobianDiagnosticMacayeal{{{*/
+ ElementMatrix* Tria::CreateJacobianDiagnosticMacayeal(void){
+ 
+ 	/*Constants*/
+@@ -3215,7 +3215,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetSolutionFromInputsDiagnosticHoriz{{{1*/
++/*FUNCTION Tria::GetSolutionFromInputsDiagnosticHoriz{{{*/
+ void  Tria::GetSolutionFromInputsDiagnosticHoriz(Vector* solution){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+@@ -3254,7 +3254,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetSolutionFromInputsDiagnosticHutter{{{1*/
++/*FUNCTION Tria::GetSolutionFromInputsDiagnosticHutter{{{*/
+ void  Tria::GetSolutionFromInputsDiagnosticHutter(Vector* solution){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+@@ -3293,7 +3293,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromSolutionDiagnosticHoriz {{{1*/
++/*FUNCTION Tria::InputUpdateFromSolutionDiagnosticHoriz {{{*/
+ void  Tria::InputUpdateFromSolutionDiagnosticHoriz(double* solution){
+ 	
+ 	const int numdof=NDOF2*NUMVERTICES;
+@@ -3356,7 +3356,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromSolutionDiagnosticHutter {{{1*/
++/*FUNCTION Tria::InputUpdateFromSolutionDiagnosticHutter {{{*/
+ void  Tria::InputUpdateFromSolutionDiagnosticHutter(double* solution){
+ 	
+ 	const int numdof=NDOF2*NUMVERTICES;
+@@ -3418,7 +3418,7 @@
+ #endif
+ 
+ #ifdef _HAVE_CONTROL_
+-/*FUNCTION Tria::InputControlUpdate{{{1*/
++/*FUNCTION Tria::InputControlUpdate{{{*/
+ void  Tria::InputControlUpdate(double scalar,bool save_parameter){
+ 
+ 	/*Intermediary*/
+@@ -3453,7 +3453,7 @@
+ 	xfree((void**)&control_type);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::ControlInputGetGradient{{{1*/
++/*FUNCTION Tria::ControlInputGetGradient{{{*/
+ void Tria::ControlInputGetGradient(Vector* gradient,int enum_type,int control_index){
+ 
+ 	int doflist1[NUMVERTICES];
+@@ -3472,7 +3472,7 @@
+ 	((ControlInput*)input)->GetGradient(gradient,&doflist1[0]);
+ 
+ }/*}}}*/
+-/*FUNCTION Tria::ControlInputScaleGradient{{{1*/
++/*FUNCTION Tria::ControlInputScaleGradient{{{*/
+ void Tria::ControlInputScaleGradient(int enum_type,double scale){
+ 
+ 	Input* input=NULL;
+@@ -3488,7 +3488,7 @@
+ 
+ 	((ControlInput*)input)->ScaleGradient(scale);
+ }/*}}}*/
+-/*FUNCTION Tria::ControlInputSetGradient{{{1*/
++/*FUNCTION Tria::ControlInputSetGradient{{{*/
+ void Tria::ControlInputSetGradient(double* gradient,int enum_type,int control_index){
+ 
+ 	int    doflist1[NUMVERTICES];
+@@ -3512,7 +3512,7 @@
+ 	((ControlInput*)input)->SetGradient(grad_input);
+ 
+ }/*}}}*/
+-/*FUNCTION Tria::Gradj {{{1*/
++/*FUNCTION Tria::Gradj {{{*/
+ void  Tria::Gradj(Vector* gradient,int control_type,int control_index){
+ 	/*dJ/dalpha = ∂L/∂alpha = ∂J/∂alpha + ∂/∂alpha(KU-F)*/
+ 
+@@ -3571,7 +3571,7 @@
+ 	xfree((void**)&responses);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GradjBGradient{{{1*/
++/*FUNCTION Tria::GradjBGradient{{{*/
+ void  Tria::GradjBGradient(Vector* gradient,int weight_index,int control_index){
+ 
+ 	int        i,ig;
+@@ -3611,7 +3611,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GradjBMacAyeal{{{1*/
++/*FUNCTION Tria::GradjBMacAyeal{{{*/
+ void  Tria::GradjBMacAyeal(Vector* gradient,int control_index){
+ 
+ 	/*Intermediaries*/
+@@ -3668,7 +3668,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GradjDragMacAyeal {{{1*/
++/*FUNCTION Tria::GradjDragMacAyeal {{{*/
+ void  Tria::GradjDragMacAyeal(Vector* gradient,int control_index){
+ 
+ 	int        i,ig;
+@@ -3756,7 +3756,7 @@
+ 	delete friction;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GradjDragGradient{{{1*/
++/*FUNCTION Tria::GradjDragGradient{{{*/
+ void  Tria::GradjDragGradient(Vector* gradient, int weight_index,int control_index){
+ 
+ 	int        i,ig;
+@@ -3800,7 +3800,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GradjDhDtBalancedthickness{{{1*/
++/*FUNCTION Tria::GradjDhDtBalancedthickness{{{*/
+ void  Tria::GradjDhDtBalancedthickness(Vector* gradient,int control_index){
+ 
+ 	/*Intermediaries*/
+@@ -3816,7 +3816,7 @@
+ 	gradient->SetValues(NUMVERTICES,doflist1,gradient_g,INS_VAL);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GradjVxBalancedthickness{{{1*/
++/*FUNCTION Tria::GradjVxBalancedthickness{{{*/
+ void  Tria::GradjVxBalancedthickness(Vector* gradient,int control_index){
+ 
+ 	/*Intermediaries*/
+@@ -3859,7 +3859,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GradjVyBalancedthickness{{{1*/
++/*FUNCTION Tria::GradjVyBalancedthickness{{{*/
+ void  Tria::GradjVyBalancedthickness(Vector* gradient,int control_index){
+ 
+ 	/*Intermediaries*/
+@@ -3901,7 +3901,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GradientIndexing{{{1*/
++/*FUNCTION Tria::GradientIndexing{{{*/
+ void  Tria::GradientIndexing(int* indexing,int control_index){
+ 
+ 	/*Get some parameters*/
+@@ -3915,7 +3915,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::RheologyBbarAbsGradient{{{1*/
++/*FUNCTION Tria::RheologyBbarAbsGradient{{{*/
+ double Tria::RheologyBbarAbsGradient(bool process_units,int weight_index){
+ 
+ 	/* Intermediaries */
+@@ -3959,7 +3959,7 @@
+ 	return Jelem;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::SurfaceAverageVelMisfit {{{1*/
++/*FUNCTION Tria::SurfaceAverageVelMisfit {{{*/
+ double Tria::SurfaceAverageVelMisfit(bool process_units,int weight_index){
+ 
+ 	const int    numdof=2*NUMVERTICES;
+@@ -4020,7 +4020,7 @@
+ 	return Jelem;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::SurfaceLogVelMisfit {{{1*/
++/*FUNCTION Tria::SurfaceLogVelMisfit {{{*/
+ double Tria::SurfaceLogVelMisfit(bool process_units,int weight_index){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+@@ -4085,7 +4085,7 @@
+ 	return Jelem;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::SurfaceLogVxVyMisfit {{{1*/
++/*FUNCTION Tria::SurfaceLogVxVyMisfit {{{*/
+ double Tria::SurfaceLogVxVyMisfit(bool process_units,int weight_index){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+@@ -4151,7 +4151,7 @@
+ 	return Jelem;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::SurfaceAbsVelMisfit {{{1*/
++/*FUNCTION Tria::SurfaceAbsVelMisfit {{{*/
+ double Tria::SurfaceAbsVelMisfit(bool process_units,int weight_index){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+@@ -4212,7 +4212,7 @@
+ 	return Jelem;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::SurfaceRelVelMisfit {{{1*/
++/*FUNCTION Tria::SurfaceRelVelMisfit {{{*/
+ double Tria::SurfaceRelVelMisfit(bool process_units,int weight_index){
+ 	const int  numdof=2*NUMVERTICES;
+ 
+@@ -4276,7 +4276,7 @@
+ 	return Jelem;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::ThicknessAbsGradient{{{1*/
++/*FUNCTION Tria::ThicknessAbsGradient{{{*/
+ double Tria::ThicknessAbsGradient(bool process_units,int weight_index){
+ 
+ 	/* Intermediaries */
+@@ -4320,7 +4320,7 @@
+ 	return Jelem;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::ThicknessAbsMisfit {{{1*/
++/*FUNCTION Tria::ThicknessAbsMisfit {{{*/
+ double Tria::ThicknessAbsMisfit(bool process_units,int weight_index){
+ 
+ 	/*Intermediaries*/
+@@ -4365,7 +4365,7 @@
+ 	return Jelem;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVectorAdjointBalancethickness{{{1*/
++/*FUNCTION Tria::CreatePVectorAdjointBalancethickness{{{*/
+ ElementVector* Tria::CreatePVectorAdjointBalancethickness(void){
+ 
+ 	/*Constants*/
+@@ -4431,7 +4431,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVectorAdjointHoriz{{{1*/
++/*FUNCTION Tria::CreatePVectorAdjointHoriz{{{*/
+ ElementVector* Tria::CreatePVectorAdjointHoriz(void){
+ 
+ 	/*Constants*/
+@@ -4610,7 +4610,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVectorAdjointStokes{{{1*/
++/*FUNCTION Tria::CreatePVectorAdjointStokes{{{*/
+ ElementVector* Tria::CreatePVectorAdjointStokes(void){
+ 
+ 	/*Intermediaries */
+@@ -4787,7 +4787,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::DragCoefficientAbsGradient{{{1*/
++/*FUNCTION Tria::DragCoefficientAbsGradient{{{*/
+ double Tria::DragCoefficientAbsGradient(bool process_units,int weight_index){
+ 
+ 	/* Intermediaries */
+@@ -4831,7 +4831,7 @@
+ 	return Jelem;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrixAdjointBalancethickness {{{1*/
++/*FUNCTION Tria::CreateKMatrixAdjointBalancethickness {{{*/
+ ElementMatrix* Tria::CreateKMatrixAdjointBalancethickness(void){
+ 
+ 	ElementMatrix* Ke=NULL;
+@@ -4853,7 +4853,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrixAdjointMacAyeal{{{1*/
++/*FUNCTION Tria::CreateKMatrixAdjointMacAyeal{{{*/
+ ElementMatrix* Tria::CreateKMatrixAdjointMacAyeal(void){
+ 
+ 	/*Constants*/
+@@ -4923,7 +4923,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromSolutionAdjointHoriz {{{1*/
++/*FUNCTION Tria::InputUpdateFromSolutionAdjointHoriz {{{*/
+ void  Tria::InputUpdateFromSolutionAdjointHoriz(double* solution){
+ 
+ 	const int numdof=NDOF2*NUMVERTICES;
+@@ -4959,7 +4959,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION Tria::InputUpdateFromSolutionAdjointBalancethickness {{{1*/
++/*FUNCTION Tria::InputUpdateFromSolutionAdjointBalancethickness {{{*/
+ void  Tria::InputUpdateFromSolutionAdjointBalancethickness(double* solution){
+ 
+ 	const int numdof=NDOF1*NUMVERTICES;
+@@ -4988,7 +4988,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetVectorFromControlInputs{{{1*/
++/*FUNCTION Tria::GetVectorFromControlInputs{{{*/
+ void  Tria::GetVectorFromControlInputs(Vector* vector,int control_enum,int control_index,const char* data){
+ 
+ 	int doflist1[NUMVERTICES];
+@@ -5016,7 +5016,7 @@
+ 	((ControlInput*)input)->GetVectorFromInputs(vector,&doflist1[0],data);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::SetControlInputsFromVector{{{1*/
++/*FUNCTION Tria::SetControlInputsFromVector{{{*/
+ void  Tria::SetControlInputsFromVector(double* vector,int control_enum,int control_index){
+ 
+ 	double  values[NUMVERTICES];
+@@ -5053,7 +5053,7 @@
+ #endif
+ 
+ #ifdef _HAVE_HYDROLOGY_
+-/*FUNCTION Tria::CreateHydrologyWaterVelocityInput {{{1*/
++/*FUNCTION Tria::CreateHydrologyWaterVelocityInput {{{*/
+ void Tria::CreateHydrologyWaterVelocityInput(void){
+ 
+ 	/*material parameters: */
+@@ -5108,7 +5108,7 @@
+ 	this->inputs->AddInput(new TriaP1Input(HydrologyWaterVyEnum,vy));
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrixHydrology{{{1*/
++/*FUNCTION Tria::CreateKMatrixHydrology{{{*/
+ ElementMatrix* Tria::CreateKMatrixHydrology(void){
+ 
+ 	/*Constants*/
+@@ -5213,7 +5213,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVectorHydrology {{{1*/
++/*FUNCTION Tria::CreatePVectorHydrology {{{*/
+ ElementVector* Tria::CreatePVectorHydrology(void){
+ 
+ 	/*Constants*/
+@@ -5262,7 +5262,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetSolutionFromInputsHydrology{{{1*/
++/*FUNCTION Tria::GetSolutionFromInputsHydrology{{{*/
+ void  Tria::GetSolutionFromInputsHydrology(Vector* solution){
+ 
+ 	const int    numdof=NDOF1*NUMVERTICES;
+@@ -5298,7 +5298,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromSolutionHydrology{{{1*/
++/*FUNCTION Tria::InputUpdateFromSolutionHydrology{{{*/
+ void  Tria::InputUpdateFromSolutionHydrology(double* solution){
+ 
+ 	/*Intermediaries*/
+@@ -5329,7 +5329,7 @@
+ #endif
+ 
+ #ifdef _HAVE_DAKOTA_
+-/*FUNCTION Tria::InputUpdateFromVectorDakota(double* vector, int name, int type);{{{1*/
++/*FUNCTION Tria::InputUpdateFromVectorDakota(double* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVectorDakota(double* vector, int name, int type){
+ 	
+ 	int i,j;
+@@ -5352,7 +5352,7 @@
+ 			/*Branch on the specified type of update: */
+ 			switch(name){
+ 				case ThicknessEnum:
+-					/*Update thickness + surface: assume bed is constant. On ice shelves, takes hydrostatic equilibrium {{{2*/
++					/*Update thickness + surface: assume bed is constant. On ice shelves, takes hydrostatic equilibrium {{{*/
+ 					double  thickness[3];
+ 					double  thickness_init[3];
+ 					double  hydrostatic_ratio[3];
+@@ -5431,17 +5431,17 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{1*/
++/*FUNCTION Tria::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVectorDakota(int* vector, int name, int type){
+ 	_error_(" not supported yet!");
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{1*/
++/*FUNCTION Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type){
+ 	_error_(" not supported yet!");
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type);{{{1*/
++/*FUNCTION Tria::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type);{{{*/
+ void  Tria::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
+ 	
+ 	int i,j,t;
+@@ -5488,7 +5488,7 @@
+ #endif
+ 
+ #ifdef _HAVE_BALANCED_
+-/*FUNCTION Tria::CreateKMatrixBalancethickness {{{1*/
++/*FUNCTION Tria::CreateKMatrixBalancethickness {{{*/
+ ElementMatrix* Tria::CreateKMatrixBalancethickness(void){
+ 
+ 	switch(GetElementType()){
+@@ -5502,7 +5502,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrixBalancethickness_CG {{{1*/
++/*FUNCTION Tria::CreateKMatrixBalancethickness_CG {{{*/
+ ElementMatrix* Tria::CreateKMatrixBalancethickness_CG(void){
+ 
+ 	/*Constants*/
+@@ -5612,7 +5612,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreateKMatrixBalancethickness_DG {{{1*/
++/*FUNCTION Tria::CreateKMatrixBalancethickness_DG {{{*/
+ ElementMatrix* Tria::CreateKMatrixBalancethickness_DG(void){
+ 
+ 	/*Constants*/
+@@ -5666,7 +5666,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVectorBalancethickness{{{1*/
++/*FUNCTION Tria::CreatePVectorBalancethickness{{{*/
+ ElementVector* Tria::CreatePVectorBalancethickness(void){
+ 
+ 	switch(GetElementType()){
+@@ -5680,7 +5680,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVectorBalancethickness_CG{{{1*/
++/*FUNCTION Tria::CreatePVectorBalancethickness_CG{{{*/
+ ElementVector* Tria::CreatePVectorBalancethickness_CG(void){
+ 
+ 	/*Constants*/
+@@ -5723,7 +5723,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::CreatePVectorBalancethickness_DG {{{1*/
++/*FUNCTION Tria::CreatePVectorBalancethickness_DG {{{*/
+ ElementVector* Tria::CreatePVectorBalancethickness_DG(void){
+ 
+ 	/*Constants*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaHook.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaHook.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaHook.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION TriaHook::TriaHook(){{{1*/
++/*FUNCTION TriaHook::TriaHook(){{{*/
+ TriaHook::TriaHook(){
+ 	numanalyses=UNDEF;
+ 	this->hnodes=NULL;
+@@ -28,7 +28,7 @@
+ 	this->hmatpar=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION TriaHook::~TriaHook(){{{1*/
++/*FUNCTION TriaHook::~TriaHook(){{{*/
+ TriaHook::~TriaHook(){
+ 	int i;
+ 
+@@ -41,7 +41,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaHook::TriaHook(int in_numanalyses,int matice_id, int matpar_id){{{1*/
++/*FUNCTION TriaHook::TriaHook(int in_numanalyses,int matice_id, int matpar_id){{{*/
+ TriaHook::TriaHook(int in_numanalyses,int matice_id, IoModel* iomodel){
+ 
+ 	/*intermediary: */
+@@ -63,7 +63,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION TriaHook::SetHookNodes{{{1*/
++/*FUNCTION TriaHook::SetHookNodes{{{*/
+ void TriaHook::SetHookNodes(int* node_ids,int analysis_counter){
+ 
+ 	/*initialize hook*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -25,12 +25,12 @@
+ #define NUMNODESMINI  7
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION PentaRef::PentaRef(){{{1*/
++/*FUNCTION PentaRef::PentaRef(){{{*/
+ PentaRef::PentaRef(){
+ 	this->element_type_list=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::PentaRef(int* types,int nummodels){{{1*/
++/*FUNCTION PentaRef::PentaRef(int* types,int nummodels){{{*/
+ PentaRef::PentaRef(const int nummodels){
+ 
+ 	/*Only allocate pointer*/
+@@ -38,14 +38,14 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::~PentaRef(){{{1*/
++/*FUNCTION PentaRef::~PentaRef(){{{*/
+ PentaRef::~PentaRef(){
+ 	xfree((void**)&element_type_list);
+ }
+ /*}}}*/
+ 
+ /*Management*/
+-/*FUNCTION PentaRef::SetElementType{{{1*/
++/*FUNCTION PentaRef::SetElementType{{{*/
+ void PentaRef::SetElementType(int type,int type_counter){
+ 
+ 	_assert_(type==P1Enum || type==P1DGEnum);
+@@ -56,7 +56,7 @@
+ /*}}}*/
+ 
+ /*Reference Element numerics*/
+-/*FUNCTION PentaRef::GetBMacAyealPattyn {{{1*/
++/*FUNCTION PentaRef::GetBMacAyealPattyn {{{*/
+ void PentaRef::GetBMacAyealPattyn(double* B, double* xyz_list, GaussPenta* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+@@ -87,7 +87,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetBMacAyealStokes{{{1*/
++/*FUNCTION PentaRef::GetBMacAyealStokes{{{*/
+ void PentaRef::GetBMacAyealStokes(double* B, double* xyz_list, GaussPenta* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+@@ -133,7 +133,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetBPattyn {{{1*/
++/*FUNCTION PentaRef::GetBPattyn {{{*/
+ void PentaRef::GetBPattyn(double* B, double* xyz_list, GaussPenta* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+@@ -173,7 +173,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetBprimePattyn {{{1*/
++/*FUNCTION PentaRef::GetBprimePattyn {{{*/
+ void PentaRef::GetBprimePattyn(double* B, double* xyz_list, GaussPenta* gauss_coord){
+ 	/*Compute B  prime matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+@@ -211,7 +211,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetBprimeMacAyealStokes{{{1*/
++/*FUNCTION PentaRef::GetBprimeMacAyealStokes{{{*/
+ void PentaRef::GetBprimeMacAyealStokes(double* Bprime, double* xyz_list, GaussPenta* gauss){
+ 	/*Compute Bprime  matrix. Bprime=[Bprime1 Bprime2 Bprime3 Bprime4 Bprime5 Bprime6] where Bprimei is of size 5*NDOF2. 
+ 	 * For node i, Bprimei can be expressed in the actual coordinate system
+@@ -251,7 +251,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetBStokes {{{1*/
++/*FUNCTION PentaRef::GetBStokes {{{*/
+ void PentaRef::GetBStokes(double* B, double* xyz_list, GaussPenta* gauss){
+ 
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 3*NDOF4. 
+@@ -318,7 +318,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetBprimeStokes {{{1*/
++/*FUNCTION PentaRef::GetBprimeStokes {{{*/
+ void PentaRef::GetBprimeStokes(double* B_prime, double* xyz_list, GaussPenta* gauss){
+ 	/*	Compute B'  matrix. B'=[B1' B2' B3' B4' B5' B6' Bb'] where Bi' is of size 3*NDOF2. 
+ 	 *	For node i, Bi' can be expressed in the actual coordinate system
+@@ -385,7 +385,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetBAdvec{{{1*/
++/*FUNCTION PentaRef::GetBAdvec{{{*/
+ void PentaRef::GetBAdvec(double* B_advec, double* xyz_list, GaussPenta* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1. 
+ 	 * For node i, Bi' can be expressed in the actual coordinate system
+@@ -412,7 +412,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetBConduct{{{1*/
++/*FUNCTION PentaRef::GetBConduct{{{*/
+ void PentaRef::GetBConduct(double* B_conduct, double* xyz_list, GaussPenta* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1. 
+ 	 * For node i, Bi' can be expressed in the actual coordinate system
+@@ -439,7 +439,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetBVert{{{1*/
++/*FUNCTION PentaRef::GetBVert{{{*/
+ void PentaRef::GetBVert(double* B, double* xyz_list, GaussPenta* gauss){
+ 	/*	Compute B  matrix. B=[dh1/dz dh2/dz dh3/dz dh4/dz dh5/dz dh6/dz];
+ 		where hi is the interpolation function for node i.*/
+@@ -457,7 +457,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetBprimeAdvec{{{1*/
++/*FUNCTION PentaRef::GetBprimeAdvec{{{*/
+ void PentaRef::GetBprimeAdvec(double* Bprime_advec, double* xyz_list, GaussPenta* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1. 
+ 	 * For node i, Bi' can be expressed in the actual coordinate system
+@@ -484,7 +484,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetBprimeVert{{{1*/
++/*FUNCTION PentaRef::GetBprimeVert{{{*/
+ void PentaRef::GetBprimeVert(double* B, double* xyz_list, GaussPenta* gauss){
+ 	/* Compute Bprime  matrix. Bprime=[L1 L2 L3 L4 L5 L6] where Li is the nodal function for node i*/
+ 
+@@ -492,7 +492,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetL{{{1*/
++/*FUNCTION PentaRef::GetL{{{*/
+ void PentaRef::GetL(double* L, GaussPenta* gauss, int numdof){
+ 	/*Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof. 
+ 	 ** For node i, Li can be expressed in the actual coordinate system
+@@ -529,7 +529,7 @@
+ 	}
+ } 
+ /*}}}*/
+-/*FUNCTION PentaRef::GetLStokes{{{1*/
++/*FUNCTION PentaRef::GetLStokes{{{*/
+ void PentaRef::GetLStokes(double* LStokes, GaussPenta* gauss){
+ 	/*
+ 	 * Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof. 
+@@ -564,7 +564,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetLprimeStokes {{{1*/
++/*FUNCTION PentaRef::GetLprimeStokes {{{*/
+ void PentaRef::GetLprimeStokes(double* LprimeStokes, double* xyz_list, GaussPenta* gauss){
+ 
+ 	/*
+@@ -676,7 +676,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetLMacAyealStokes {{{1*/
++/*FUNCTION PentaRef::GetLMacAyealStokes {{{*/
+ void PentaRef::GetLMacAyealStokes(double* LStokes, GaussPenta* gauss){
+ 	/*
+ 	 * Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof. 
+@@ -726,7 +726,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetLprimeMacAyealStokes {{{1*/
++/*FUNCTION PentaRef::GetLprimeMacAyealStokes {{{*/
+ void PentaRef::GetLprimeMacAyealStokes(double* LprimeStokes, double* xyz_list, GaussPenta* gauss){
+ 
+ 	/*
+@@ -793,7 +793,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetLStokesMacAyeal {{{1*/
++/*FUNCTION PentaRef::GetLStokesMacAyeal {{{*/
+ void PentaRef::GetLStokesMacAyeal(double* LStokes, GaussPenta* gauss){
+ 	/*
+ 	 * Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof. 
+@@ -839,7 +839,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetLprimeStokesMacAyeal {{{1*/
++/*FUNCTION PentaRef::GetLprimeStokesMacAyeal {{{*/
+ void PentaRef::GetLprimeStokesMacAyeal(double* LprimeStokes, double* xyz_list, GaussPenta* gauss){
+ 
+ 	/*
+@@ -878,7 +878,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetJacobian {{{1*/
++/*FUNCTION PentaRef::GetJacobian {{{*/
+ void PentaRef::GetJacobian(double* J, double* xyz_list,GaussPenta* gauss){
+ 
+ 	int i,j;
+@@ -937,7 +937,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetJacobianDeterminant {{{1*/
++/*FUNCTION PentaRef::GetJacobianDeterminant {{{*/
+ void PentaRef::GetJacobianDeterminant(double*  Jdet, double* xyz_list,GaussPenta* gauss){
+ 	/*On a penta, Jacobian varies according to coordinates. We need to get the Jacobian, and take 
+ 	 * the determinant of it: */
+@@ -952,7 +952,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetTriaJacobianDeterminant{{{1*/
++/*FUNCTION PentaRef::GetTriaJacobianDeterminant{{{*/
+ void PentaRef::GetTriaJacobianDeterminant(double*  Jdet, double* xyz_list,GaussPenta* gauss){
+ 	/*The Jacobian determinant is constant over the element, discard the gaussian points. 
+ 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
+@@ -974,7 +974,7 @@
+ 	if(*Jdet<0) _error_("negative jacobian determinant!");
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetSegmentJacobianDeterminant{{{1*/
++/*FUNCTION PentaRef::GetSegmentJacobianDeterminant{{{*/
+ void PentaRef::GetSegmentJacobianDeterminant(double*  Jdet, double* xyz_list,GaussPenta* gauss){
+ 	/*The Jacobian determinant is constant over the element, discard the gaussian points. 
+ 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
+@@ -993,7 +993,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetJacobianInvert {{{1*/
++/*FUNCTION PentaRef::GetJacobianInvert {{{*/
+ void PentaRef::GetJacobianInvert(double* Jinv, double* xyz_list,GaussPenta* gauss){
+ 
+ 	/*Jacobian*/
+@@ -1006,7 +1006,7 @@
+ 	Matrix3x3Invert(Jinv,&J[0][0]);
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetNodalFunctionsMINI{{{1*/
++/*FUNCTION PentaRef::GetNodalFunctionsMINI{{{*/
+ void PentaRef::GetNodalFunctionsMINI(double* l1l7, GaussPenta* gauss){
+ 	/*This routine returns the values of the nodal functions  at the gaussian point.*/
+ 
+@@ -1020,7 +1020,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetNodalFunctionsMINIDerivatives{{{1*/
++/*FUNCTION PentaRef::GetNodalFunctionsMINIDerivatives{{{*/
+ void PentaRef::GetNodalFunctionsMINIDerivatives(double* dh1dh7,double* xyz_list, GaussPenta* gauss){
+ 
+ 	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+@@ -1051,7 +1051,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetNodalFunctionsMINIDerivativesReference{{{1*/
++/*FUNCTION PentaRef::GetNodalFunctionsMINIDerivativesReference{{{*/
+ void PentaRef::GetNodalFunctionsMINIDerivativesReference(double* dl1dl7,GaussPenta* gauss){
+ 
+ 	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+@@ -1097,7 +1097,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetNodalFunctionsP1 {{{1*/
++/*FUNCTION PentaRef::GetNodalFunctionsP1 {{{*/
+ void PentaRef::GetNodalFunctionsP1(double* l1l6, GaussPenta* gauss){
+ 	/*This routine returns the values of the nodal functions  at the gaussian point.*/
+ 
+@@ -1110,7 +1110,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetNodalFunctionsP1Derivatives {{{1*/
++/*FUNCTION PentaRef::GetNodalFunctionsP1Derivatives {{{*/
+ void PentaRef::GetNodalFunctionsP1Derivatives(double* dh1dh6,double* xyz_list, GaussPenta* gauss){
+ 
+ 	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+@@ -1139,7 +1139,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetNodalFunctionsP1DerivativesReference {{{1*/
++/*FUNCTION PentaRef::GetNodalFunctionsP1DerivativesReference {{{*/
+ void PentaRef::GetNodalFunctionsP1DerivativesReference(double* dl1dl6,GaussPenta* gauss){
+ 
+ 	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+@@ -1183,7 +1183,7 @@
+ 	*(dl1dl6+NUMNODESP1*2+5)=0.5*A3;
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetQuadNodalFunctions {{{1*/
++/*FUNCTION PentaRef::GetQuadNodalFunctions {{{*/
+ void PentaRef::GetQuadNodalFunctions(double* l1l4,GaussPenta* gauss,int index1,int index2,int index3,int index4){
+ 	/*This routine returns the values of the nodal functions  at the gaussian point.*/
+ 
+@@ -1203,7 +1203,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetQuadJacobianDeterminant{{{1*/
++/*FUNCTION PentaRef::GetQuadJacobianDeterminant{{{*/
+ void PentaRef::GetQuadJacobianDeterminant(double* Jdet,double xyz_list[4][3],GaussPenta* gauss){
+ 	/*This routine returns the values of the nodal functions  at the gaussian point.*/
+ 
+@@ -1229,7 +1229,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetInputValue{{{1*/
++/*FUNCTION PentaRef::GetInputValue{{{*/
+ void PentaRef::GetInputValue(double* pvalue,double* plist,GaussPenta* gauss){
+ 	/*P1 interpolation on Gauss point*/
+ 
+@@ -1244,7 +1244,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaRef::GetInputDerivativeValue{{{1*/
++/*FUNCTION PentaRef::GetInputDerivativeValue{{{*/
+ void PentaRef::GetInputDerivativeValue(double* p, double* plist,double* xyz_list, GaussPenta* gauss){
+ 	/*From node values of parameter p (p_list[0], p_list[1], p_list[2], p_list[3], p_list[4] and p_list[4]), return parameter derivative value at gaussian point specified by gauss_coord:
+ 	 *   dp/dx=p_list[0]*dh1/dx+p_list[1]*dh2/dx+p_list[2]*dh3/dx+p_list[3]*dh4/dx+p_list[4]*dh5/dx+p_list[5]*dh6/dx;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _TRIA_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Element.h"
+ #include "./TriaHook.h"
+ #include "./TriaRef.h"
+@@ -40,12 +40,12 @@
+ 		Inputs     *inputs;
+ 		Results    *results;
+ 
+-		/*Tria constructors, destructors {{{1*/
++		/*Tria constructors, destructors {{{*/
+ 		Tria();
+ 		Tria(int tria_id,int tria_sid,int i, IoModel* iomodel,int nummodels);
+ 		~Tria();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -53,7 +53,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Update virtual functions resolution: {{{1*/
++		/*Update virtual functions resolution: {{{*/
+ 		void  InputUpdateFromSolution(double* solutiong);
+ 		void  InputUpdateFromVector(double* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+@@ -69,7 +69,7 @@
+ 		void  InputUpdateFromConstant(bool constant, int name);
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel);
+ 		/*}}}*/
+-		/*Element virtual functions definitions: {{{1*/
++		/*Element virtual functions definitions: {{{*/
+ 		void   AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,double* vertex_response,double* qmu_part);
+ 		void   ComputeBasalStress(Vector* sigma_b);
+ 		void   ComputeStrainRate(Vector* eps);
+@@ -163,7 +163,7 @@
+ 		#endif
+ 
+ 		/*}}}*/
+-		/*Tria specific routines:{{{1*/
++		/*Tria specific routines:{{{*/
+ 		ElementMatrix* CreateKMatrixBalancethickness(void);
+ 		ElementMatrix* CreateKMatrixBalancethickness_DG(void);
+ 		ElementMatrix* CreateKMatrixBalancethickness_CG(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaHook.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaHook.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaHook.h	(revision 12365)
+@@ -17,7 +17,7 @@
+ 		Hook*  hmatpar; // 1 material parameter
+ 
+ 
+-		/*FUNCTION constructors, destructors {{{1*/
++		/*FUNCTION constructors, destructors {{{*/
+ 		TriaHook();
+ 		TriaHook(int in_numanalyses,int matice_id, IoModel* iomodel);
+ 		~TriaHook();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #else
+@@ -23,7 +23,7 @@
+ #define NUMVERTICES2D 3
+ 
+ /*Constructors/destructor/copy*/
+-/*FUNCTION Penta::Penta(){{{1*/
++/*FUNCTION Penta::Penta(){{{*/
+ Penta::Penta(){
+ 
+ 	int i;
+@@ -38,14 +38,14 @@
+ 	for(i=0;i<3;i++)this->horizontalneighborsids[i]=UNDEF;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::~Penta(){{{1*/
++/*FUNCTION Penta::~Penta(){{{*/
+ Penta::~Penta(){
+ 	delete inputs;
+ 	delete results;
+ 	this->parameters=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::Penta(int id, int index, IoModel* iomodel,int nummodels) {{{1*/
++/*FUNCTION Penta::Penta(int id, int index, IoModel* iomodel,int nummodels) {{{*/
+ Penta::Penta(int penta_id, int penta_sid, int index, IoModel* iomodel,int nummodels)
+ 	:PentaRef(nummodels)
+ 	,PentaHook(nummodels,index+1,iomodel) //index+1: matice id, iomodel->numberofelements+1: matpar id
+@@ -55,7 +55,7 @@
+ 	int penta_elements_ids[2];
+ 
+ 	/*Checks in debugging mode*/
+-	/*{{{2*/
++	/*{{{*/
+ 	_assert_(iomodel->Data(MeshUpperelementsEnum));
+ 	_assert_(iomodel->Data(MeshLowerelementsEnum));
+ 	/*}}}*/
+@@ -89,7 +89,7 @@
+ 	this->verticalneighbors=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::copy {{{1*/
++/*FUNCTION Penta::copy {{{*/
+ Object* Penta::copy() {
+ 
+ 	int i;
+@@ -143,12 +143,12 @@
+ /*}}}*/
+ 
+ /*Other*/
+-/*FUNCTION Penta::AverageOntoPartition {{{1*/
++/*FUNCTION Penta::AverageOntoPartition {{{*/
+ void  Penta::AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,double* vertex_response,double* qmu_part){
+ 	_error_("Not supported yet!");
+ }
+ /*}}}*/
+-/*FUNCTION Penta::BedNormal {{{1*/
++/*FUNCTION Penta::BedNormal {{{*/
+ void Penta::BedNormal(double* bed_normal, double xyz_list[3][3]){
+ 
+ 	int i;
+@@ -172,7 +172,7 @@
+ 	*(bed_normal+2)=-normal[2]/normal_norm;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::BasalFrictionCreateInput {{{1*/
++/*FUNCTION Penta::BasalFrictionCreateInput {{{*/
+ void Penta::BasalFrictionCreateInput(void){
+ 
+ 	/*Constants*/
+@@ -224,7 +224,7 @@
+ 	delete friction;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::ComputeBasalStress {{{1*/
++/*FUNCTION Penta::ComputeBasalStress {{{*/
+ void  Penta::ComputeBasalStress(Vector* sigma_b){
+ 
+ 	int         i,j,ig;
+@@ -314,14 +314,14 @@
+ 	sigma_b->SetValue(id-1,value,INS_VAL);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::ComputeStrainRate {{{1*/
++/*FUNCTION Penta::ComputeStrainRate {{{*/
+ void  Penta::ComputeStrainRate(Vector* eps){
+ 
+ 	_error_("Not implemented yet");
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::ComputeStressTensor {{{1*/
++/*FUNCTION Penta::ComputeStressTensor {{{*/
+ void  Penta::ComputeStressTensor(){
+ 
+ 	int         iv;
+@@ -376,7 +376,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-		/*FUNCTION Penta::Configure {{{1*/
++		/*FUNCTION Penta::Configure {{{*/
+ void  Penta::Configure(Elements* elementsin, Loads* loadsin, DataSet* nodesin, Materials* materialsin, Parameters* parametersin){
+ 
+ 	int analysis_counter;
+@@ -408,7 +408,7 @@
+ 	this->inputs->Configure(parameters);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrix {{{1*/
++/*FUNCTION Penta::CreateKMatrix {{{*/
+ void  Penta::CreateKMatrix(Matrix* Kff, Matrix* Kfs,Vector* df){
+ 
+ 	/*retrieve parameters: */
+@@ -417,7 +417,7 @@
+ 	int analysis_type;
+ 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
+ 
+-	/*Checks in debugging {{{2*/
++	/*Checks in debugging {{{*/
+ 	_assert_(this->nodes && this->matice && this->matpar && this->verticalneighbors && this->parameters && this->inputs);
+ 	/*}}}*/
+ 	
+@@ -478,7 +478,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixPrognostic {{{1*/
++/*FUNCTION Penta::CreateKMatrixPrognostic {{{*/
+ ElementMatrix* Penta::CreateKMatrixPrognostic(void){
+ 
+ 	if (!IsOnBed()) return NULL;
+@@ -499,7 +499,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixSlope {{{1*/
++/*FUNCTION Penta::CreateKMatrixSlope {{{*/
+ ElementMatrix* Penta::CreateKMatrixSlope(void){
+ 
+ 	if (!IsOnBed()) return NULL;
+@@ -512,7 +512,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVector {{{1*/
++/*FUNCTION Penta::CreatePVector {{{*/
+ void  Penta::CreatePVector(Vector* pf){
+ 
+ 	/*retrive parameters: */
+@@ -520,7 +520,7 @@
+ 	int analysis_type;
+ 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
+ 
+-	/*if debugging mode, check that all pointers exist {{{2*/
++	/*if debugging mode, check that all pointers exist {{{*/
+ 	_assert_(this->nodes && this->matice && this->matpar && this->verticalneighbors && this->parameters && this->inputs);
+ 	/*}}}*/
+ 
+@@ -578,7 +578,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorPrognostic {{{1*/
++/*FUNCTION Penta::CreatePVectorPrognostic {{{*/
+ ElementVector* Penta::CreatePVectorPrognostic(void){
+ 
+ 	if (!IsOnBed()) return NULL;
+@@ -600,7 +600,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorSlope {{{1*/
++/*FUNCTION Penta::CreatePVectorSlope {{{*/
+ ElementVector* Penta::CreatePVectorSlope(void){
+ 
+ 	if (!IsOnBed()) return NULL;
+@@ -614,7 +614,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateJacobianMatrix{{{1*/
++/*FUNCTION Penta::CreateJacobianMatrix{{{*/
+ void  Penta::CreateJacobianMatrix(Matrix* Jff){
+ 
+ 	/*retrieve parameters: */
+@@ -622,7 +622,7 @@
+ 	int analysis_type;
+ 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
+ 
+-	/*Checks in debugging {{{2*/
++	/*Checks in debugging {{{*/
+ 	_assert_(this->nodes && this->matice && this->matpar && this->verticalneighbors && this->parameters && this->inputs);
+ 	/*}}}*/
+ 
+@@ -647,7 +647,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::DeepEcho{{{1*/
++/*FUNCTION Penta::DeepEcho{{{*/
+ void Penta::DeepEcho(void){
+ 
+ 	int i;
+@@ -675,7 +675,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::DeleteResults {{{1*/
++/*FUNCTION Penta::DeleteResults {{{*/
+ void  Penta::DeleteResults(void){
+ 
+ 	/*Delete and reinitialize results*/
+@@ -684,20 +684,20 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::Echo{{{1*/
++/*FUNCTION Penta::Echo{{{*/
+ 
+ void Penta::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION Penta::ObjectEnum{{{1*/
++/*FUNCTION Penta::ObjectEnum{{{*/
+ int Penta::ObjectEnum(void){
+ 
+ 	return PentaEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetBasalElement{{{1*/
++/*FUNCTION Penta::GetBasalElement{{{*/
+ Penta* Penta::GetBasalElement(void){
+ 
+ 	/*Output*/
+@@ -718,7 +718,7 @@
+ 	return penta;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetDofList {{{1*/
++/*FUNCTION Penta::GetDofList {{{*/
+ void  Penta::GetDofList(int** pdoflist,int approximation_enum,int setenum){
+ 
+ 	int  i,j,count=0;
+@@ -742,7 +742,7 @@
+ 	*pdoflist=doflist;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetDofList1 {{{1*/
++/*FUNCTION Penta::GetDofList1 {{{*/
+ void  Penta::GetDofList1(int* doflist){
+ 
+ 	int i;
+@@ -750,19 +750,19 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetConnectivityList {{{1*/
++/*FUNCTION Penta::GetConnectivityList {{{*/
+ void  Penta::GetConnectivityList(int* connectivity){
+ 	for(int i=0;i<NUMVERTICES;i++) connectivity[i]=nodes[i]->GetConnectivity();
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetElementType {{{1*/
++/*FUNCTION Penta::GetElementType {{{*/
+ int Penta::GetElementType(){
+ 
+ 	/*return PentaRef field*/
+ 	return this->element_type;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetElementSizes{{{1*/
++/*FUNCTION Penta::GetElementSizes{{{*/
+ void Penta::GetElementSizes(double* hx,double* hy,double* hz){
+ 
+ 	double xyz_list[NUMVERTICES][3];
+@@ -789,7 +789,7 @@
+ 	*hz=zmax-zmin;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetHorizontalNeighboorSids {{{1*/
++/*FUNCTION Penta::GetHorizontalNeighboorSids {{{*/
+ int* Penta::GetHorizontalNeighboorSids(){
+ 
+ 	/*return PentaRef field*/
+@@ -797,7 +797,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetLowerElement{{{1*/
++/*FUNCTION Penta::GetLowerElement{{{*/
+ Penta* Penta::GetLowerElement(void){
+ 
+ 	Penta* upper_penta=NULL;
+@@ -807,7 +807,7 @@
+ 	return upper_penta;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetNodeIndex {{{1*/
++/*FUNCTION Penta::GetNodeIndex {{{*/
+ int Penta::GetNodeIndex(Node* node){
+ 
+ 	_assert_(nodes);
+@@ -819,7 +819,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetInputListOnVertices(double* pvalue,int enumtype) {{{1*/
++/*FUNCTION Penta::GetInputListOnVertices(double* pvalue,int enumtype) {{{*/
+ void Penta::GetInputListOnVertices(double* pvalue,int enumtype){
+ 
+ 	/*Intermediaries*/
+@@ -844,7 +844,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue) {{{1*/
++/*FUNCTION Penta::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue) {{{*/
+ void Penta::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue){
+ 
+ 	/*Intermediaries*/
+@@ -873,7 +873,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetInputValue(double* pvalue,Node* node,int enumtype) {{{1*/
++/*FUNCTION Penta::GetInputValue(double* pvalue,Node* node,int enumtype) {{{*/
+ void Penta::GetInputValue(double* pvalue,Node* node,int enumtype){
+ 
+ 	Input* input=inputs->GetInput(enumtype);
+@@ -886,7 +886,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetPhi {{{1*/
++/*FUNCTION Penta::GetPhi {{{*/
+ void Penta::GetPhi(double* phi, double*  epsilon, double viscosity){
+ 	/*Compute deformational heating from epsilon and viscosity */
+ 
+@@ -924,7 +924,7 @@
+ 	*phi=4*pow(epsilon_eff,2.0)*viscosity;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetSidList{{{1*/
++/*FUNCTION Penta::GetSidList{{{*/
+ void  Penta::GetSidList(int* sidlist){
+ 
+ 	int i;
+@@ -932,7 +932,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetSolutionFromInputs{{{1*/
++/*FUNCTION Penta::GetSolutionFromInputs{{{*/
+ void  Penta::GetSolutionFromInputs(Vector* solution){
+ 
+ 	int analysis_type;
+@@ -976,7 +976,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetStabilizationParameter {{{1*/
++/*FUNCTION Penta::GetStabilizationParameter {{{*/
+ double Penta::GetStabilizationParameter(double u, double v, double w, double diameter, double kappa){
+ 	/*Compute stabilization parameter*/
+ 	/*kappa=thermalconductivity/(rho_ice*hearcapacity) for thermal model*/
+@@ -994,7 +994,7 @@
+ 	return tau_parameter;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetStrainRate3dPattyn{{{1*/
++/*FUNCTION Penta::GetStrainRate3dPattyn{{{*/
+ void Penta::GetStrainRate3dPattyn(double* epsilon,double* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input){
+ 	/*Compute the 3d Blatter/PattynStrain Rate (5 components):
+ 	 *
+@@ -1023,7 +1023,7 @@
+ 	for(i=0;i<5;i++) epsilon[i]=epsilonvx[i]+epsilonvy[i];
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetStrainRate3d{{{1*/
++/*FUNCTION Penta::GetStrainRate3d{{{*/
+ void Penta::GetStrainRate3d(double* epsilon,double* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input, Input* vz_input){
+ 	/*Compute the 3d Strain Rate (6 components):
+ 	 *
+@@ -1049,7 +1049,7 @@
+ 	for(i=0;i<6;i++) epsilon[i]=epsilonvx[i]+epsilonvy[i]+epsilonvz[i];
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetUpperElement{{{1*/
++/*FUNCTION Penta::GetUpperElement{{{*/
+ Penta* Penta::GetUpperElement(void){
+ 
+ 	Penta* upper_penta=NULL;
+@@ -1059,7 +1059,7 @@
+ 	return upper_penta;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetVectorFromInputs{{{1*/
++/*FUNCTION Penta::GetVectorFromInputs{{{*/
+ void  Penta::GetVectorFromInputs(Vector* vector,int input_enum){
+ 
+ 	int doflist1[NUMVERTICES];
+@@ -1078,7 +1078,7 @@
+ 	input->GetVectorFromInputs(vector,&doflist1[0]);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetVectorFromResults{{{1*/
++/*FUNCTION Penta::GetVectorFromResults{{{*/
+ void  Penta::GetVectorFromResults(Vector* vector,int offset,int interp){
+ 
+ 	/*Get result*/
+@@ -1098,7 +1098,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetZcoord {{{1*/
++/*FUNCTION Penta::GetZcoord {{{*/
+ double Penta::GetZcoord(GaussPenta* gauss){
+ 
+ 	int    i;
+@@ -1113,19 +1113,19 @@
+ 	return z;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::Sid {{{1*/
++/*FUNCTION Penta::Sid {{{*/
+ int    Penta::Sid(){
+ 	
+ 	return sid;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::Id {{{1*/
++/*FUNCTION Penta::Id {{{*/
+ int    Penta::Id(void){
+ 	return id; 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputArtificialNoise{{{1*/
++/*FUNCTION Penta::InputArtificialNoise{{{*/
+ void  Penta::InputArtificialNoise(int enum_type,double min,double max){
+ 
+ 	Input* input=NULL;
+@@ -1138,7 +1138,7 @@
+ 	input->ArtificialNoise(min,max);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputConvergence{{{1*/
++/*FUNCTION Penta::InputConvergence{{{*/
+ bool Penta::InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){
+ 
+ 	int i;
+@@ -1170,7 +1170,7 @@
+ 	return converged;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputCreate(double scalar,int enum,int code);{{{1*/
++/*FUNCTION Penta::InputCreate(double scalar,int enum,int code);{{{*/
+ void Penta::InputCreate(double scalar,int name,int code){
+ 
+ 	/*Check that name is an element input*/
+@@ -1189,7 +1189,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputCreate(double* vector,int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){{{1*/
++/*FUNCTION Penta::InputCreate(double* vector,int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){{{*/
+ void Penta::InputCreate(double* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){//index into elements
+ 
+ 	/*Intermediaries*/
+@@ -1279,7 +1279,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputDepthAverageAtBase{{{1*/
++/*FUNCTION Penta::InputDepthAverageAtBase{{{*/
+ void  Penta::InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum){
+ 
+ 	int  step,i;
+@@ -1376,7 +1376,7 @@
+ 	 _error_("object %s not supported yet",EnumToStringx(object_enum));
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputDuplicate{{{1*/
++/*FUNCTION Penta::InputDuplicate{{{*/
+ void  Penta::InputDuplicate(int original_enum,int new_enum){
+ 
+ 	/*Call inputs method*/
+@@ -1384,7 +1384,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputExtrude {{{1*/
++/*FUNCTION Penta::InputExtrude {{{*/
+ void  Penta::InputExtrude(int enum_type,int object_type){
+ 
+ 	int     i,num_inputs;
+@@ -1456,7 +1456,7 @@
+ 	xfree((void**)&base_inputs);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputScale{{{1*/
++/*FUNCTION Penta::InputScale{{{*/
+ void  Penta::InputScale(int enum_type,double scale_factor){
+ 
+ 	Input* input=NULL;
+@@ -1469,7 +1469,7 @@
+ 	input->Scale(scale_factor);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputToResult{{{1*/
++/*FUNCTION Penta::InputToResult{{{*/
+ void  Penta::InputToResult(int enum_type,int step,double time){
+ 
+ 	int    i;
+@@ -1494,7 +1494,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromConstant(bool value, int name);{{{1*/
++/*FUNCTION Penta::InputUpdateFromConstant(bool value, int name);{{{*/
+ void  Penta::InputUpdateFromConstant(bool constant, int name){
+ 
+ 	/*Check that name is an element input*/
+@@ -1504,7 +1504,7 @@
+ 	this->inputs->AddInput(new BoolInput(name,constant));
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromConstant(double value, int name);{{{1*/
++/*FUNCTION Penta::InputUpdateFromConstant(double value, int name);{{{*/
+ void  Penta::InputUpdateFromConstant(double constant, int name){
+ 	/*Check that name is an element input*/
+ 	if (!IsInput(name)) return;
+@@ -1513,7 +1513,7 @@
+ 	this->inputs->AddInput(new DoubleInput(name,constant));
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromConstant(int value, int name);{{{1*/
++/*FUNCTION Penta::InputUpdateFromConstant(int value, int name);{{{*/
+ void  Penta::InputUpdateFromConstant(int constant, int name){
+ 	/*Check that name is an element input*/
+ 	if (!IsInput(name)) return;
+@@ -1522,7 +1522,7 @@
+ 	this->inputs->AddInput(new IntInput(name,constant));
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromIoModel {{{1*/
++/*FUNCTION Penta::InputUpdateFromIoModel {{{*/
+ void Penta::InputUpdateFromIoModel(int index,IoModel* iomodel){ 
+ 
+ 	/*Intermediaries*/
+@@ -1544,7 +1544,7 @@
+ 	if(control_analysis) iomodel->Constant(&num_cm_responses,InversionNumCostFunctionsEnum);
+ 
+ 	/*Checks if debuging*/
+-	/*{{{2*/
++	/*{{{*/
+ 	_assert_(iomodel->Data(MeshElementsEnum));
+ 	/*}}}*/
+ 
+@@ -1645,7 +1645,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolution {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolution {{{*/
+ void  Penta::InputUpdateFromSolution(double* solution){
+ 
+ 	int analysis_type;
+@@ -1714,7 +1714,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionPrognostic{{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionPrognostic{{{*/
+ void  Penta::InputUpdateFromSolutionPrognostic(double* solution){
+ 
+ 	const int  numdof   = NDOF1*NUMVERTICES;
+@@ -1797,7 +1797,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionOneDof{{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionOneDof{{{*/
+ void  Penta::InputUpdateFromSolutionOneDof(double* solution,int enum_type){
+ 
+ 	const int numdof = NDOF1*NUMVERTICES;
+@@ -1821,7 +1821,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionOneDofCollpased{{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionOneDofCollpased{{{*/
+ void  Penta::InputUpdateFromSolutionOneDofCollapsed(double* solution,int enum_type){
+ 
+ 	const int  numdof   = NDOF1*NUMVERTICES;
+@@ -1861,7 +1861,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromVector(double* vector, int name, int type);{{{1*/
++/*FUNCTION Penta::InputUpdateFromVector(double* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVector(double* vector, int name, int type){
+ 
+ 	/*Check that name is an element input*/
+@@ -1891,17 +1891,17 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromVector(int* vector, int name, int type);{{{1*/
++/*FUNCTION Penta::InputUpdateFromVector(int* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVector(int* vector, int name, int type){
+ 	_error_(" not supported yet!");
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromVector(bool* vector, int name, int type);{{{1*/
++/*FUNCTION Penta::InputUpdateFromVector(bool* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVector(bool* vector, int name, int type){
+ 	_error_(" not supported yet!");
+ }
+ /*}}}*/
+-/*FUNCTION Penta::IsOnBed{{{1*/
++/*FUNCTION Penta::IsOnBed{{{*/
+ bool Penta::IsOnBed(void){
+ 
+ 	bool onbed;
+@@ -1909,7 +1909,7 @@
+ 	return onbed;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::IsInput{{{1*/
++/*FUNCTION Penta::IsInput{{{*/
+ bool Penta::IsInput(int name){
+ 	if (
+ 				name==ThicknessEnum ||
+@@ -1953,7 +1953,7 @@
+ 	else return false;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::IsFloating{{{1*/
++/*FUNCTION Penta::IsFloating{{{*/
+ bool   Penta::IsFloating(){
+ 
+ 	bool onshelf;
+@@ -1961,7 +1961,7 @@
+ 	return onshelf;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::IsNodeOnShelf {{{1*/
++/*FUNCTION Penta::IsNodeOnShelf {{{*/
+ bool   Penta::IsNodeOnShelf(){
+ 
+ 	int  i;
+@@ -1976,7 +1976,7 @@
+ 	return shelf;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::IsNodeOnShelfFromFlags {{{1*/
++/*FUNCTION Penta::IsNodeOnShelfFromFlags {{{*/
+ bool   Penta::IsNodeOnShelfFromFlags(double* flags){
+ 
+ 	int  i;
+@@ -1991,7 +1991,7 @@
+ 	return shelf;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::IsOnSurface{{{1*/
++/*FUNCTION Penta::IsOnSurface{{{*/
+ bool Penta::IsOnSurface(void){
+ 
+ 	bool onsurface;
+@@ -1999,7 +1999,7 @@
+ 	return onsurface;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::IsOnWater {{{1*/
++/*FUNCTION Penta::IsOnWater {{{*/
+ bool   Penta::IsOnWater(){
+ 
+ 	bool onwater;
+@@ -2058,7 +2058,7 @@
+ 	*in_resultssteps=resultssteps;
+ 
+ }/*}}}*/
+-/*FUNCTION Penta::MigrateGroundingLine{{{1*/
++/*FUNCTION Penta::MigrateGroundingLine{{{*/
+ void  Penta::MigrateGroundingLine(double* old_floating_ice,double* sheet_ungrounding){
+ 
+ 	int     i,migration_style,unground;
+@@ -2141,7 +2141,7 @@
+ 	this->InputExtrude(MaskVertexongroundediceEnum,NodeEnum);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MinEdgeLength{{{1*/
++/*FUNCTION Penta::MinEdgeLength{{{*/
+ double Penta::MinEdgeLength(double xyz_list[6][3]){
+ 	/*Return the minimum lenght of the nine egdes of the penta*/
+ 
+@@ -2163,13 +2163,13 @@
+ 	return minlength;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MyRank {{{1*/
++/*FUNCTION Penta::MyRank {{{*/
+ int    Penta::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::NodalValue {{{1*/
++/*FUNCTION Penta::NodalValue {{{*/
+ int    Penta::NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units){
+ 
+ 	int i;
+@@ -2200,7 +2200,7 @@
+ 	return found;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::PatchFill{{{1*/
++/*FUNCTION Penta::PatchFill{{{*/
+ void  Penta::PatchFill(int* pcount, Patch* patch){
+ 
+ 	int i,count;
+@@ -2227,7 +2227,7 @@
+ 	/*Assign output pointers:*/
+ 	*pcount=count;
+ }/*}}}*/
+-/*FUNCTION Penta::PatchSize{{{1*/
++/*FUNCTION Penta::PatchSize{{{*/
+ void  Penta::PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes){
+ 
+ 	int     i;
+@@ -2251,7 +2251,7 @@
+ 	*pnumnodes=numnodes;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::PositiveDegreeDay{{{1*/
++/*FUNCTION Penta::PositiveDegreeDay{{{*/
+ void  Penta::PositiveDegreeDay(double* pdds,double* pds,double signorm){
+ 
+ 
+@@ -2476,7 +2476,7 @@
+    }       //end of the for loop over the vertices
+ }
+ /*}}}*/
+-/*FUNCTION Penta::PotentialSheetUngrounding{{{1*/
++/*FUNCTION Penta::PotentialSheetUngrounding{{{*/
+ void  Penta::PotentialSheetUngrounding(Vector* potential_sheet_ungrounding){
+ 
+ 	int     i;
+@@ -2505,7 +2505,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::ProcessResultsUnits{{{1*/
++/*FUNCTION Penta::ProcessResultsUnits{{{*/
+ void  Penta::ProcessResultsUnits(void){
+ 
+ 	int i;
+@@ -2516,7 +2516,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::ReduceMatrixStokes {{{1*/
++/*FUNCTION Penta::ReduceMatrixStokes {{{*/
+ void Penta::ReduceMatrixStokes(double* Ke_reduced, double* Ke_temp){
+ 
+ 	int    i,j;
+@@ -2558,7 +2558,7 @@
+ 	for(i=0;i<24;i++) for(j=0;j<24;j++) *(Ke_reduced+24*i+j)=Kii[i][j]-Kright[i][j];
+ }
+ /*}}}*/
+-/*FUNCTION Penta::ReduceVectorStokes {{{1*/
++/*FUNCTION Penta::ReduceVectorStokes {{{*/
+ void Penta::ReduceVectorStokes(double* Pe_reduced, double* Ke_temp, double* Pe_temp){
+ 
+ 	int    i,j;
+@@ -2593,7 +2593,7 @@
+ 	for(i=0;i<24;i++) *(Pe_reduced+i)=Pi[i]-Pright[i];
+ }
+ /*}}}*/
+-/*FUNCTION Penta::RequestedOutput{{{1*/
++/*FUNCTION Penta::RequestedOutput{{{*/
+ void Penta::RequestedOutput(int output_enum,int step,double time){
+ 			
+ 	if(IsInput(output_enum)){
+@@ -2644,7 +2644,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::ResetCoordinateSystem{{{1*/
++/*FUNCTION Penta::ResetCoordinateSystem{{{*/
+ void  Penta::ResetCoordinateSystem(void){
+ 
+ 	int    approximation;
+@@ -2672,13 +2672,13 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::SetClone {{{1*/
++/*FUNCTION Penta::SetClone {{{*/
+ void  Penta::SetClone(int* minranks){
+ 
+ 	_error_("not implemented yet");
+ }
+-/*}}}1*/
+-/*FUNCTION Penta::SetCurrentConfiguration {{{1*/
++/*}}}*/
++/*FUNCTION Penta::SetCurrentConfiguration {{{*/
+ void  Penta::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, DataSet* nodesin, Materials* materialsin, Parameters* parametersin){
+ 
+ 	int analysis_counter;
+@@ -2694,7 +2694,7 @@
+ 	else this->nodes=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::SpawnTria {{{1*/
++/*FUNCTION Penta::SpawnTria {{{*/
+ Tria*  Penta::SpawnTria(int g0, int g1, int g2){
+ 
+ 	int   i,analysis_counter;
+@@ -2737,7 +2737,7 @@
+ 	return tria;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::SurfaceArea {{{1*/
++/*FUNCTION Penta::SurfaceArea {{{*/
+ double Penta::SurfaceArea(void){
+ 
+ 	int    approximation;
+@@ -2774,7 +2774,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::SurfaceNormal {{{1*/
++/*FUNCTION Penta::SurfaceNormal {{{*/
+ void Penta::SurfaceNormal(double* surface_normal, double xyz_list[3][3]){
+ 
+ 	int    i;
+@@ -2798,7 +2798,7 @@
+ 	*(surface_normal+2)=normal[2]/normal_norm;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::TimeAdapt{{{1*/
++/*FUNCTION Penta::TimeAdapt{{{*/
+ double  Penta::TimeAdapt(void){
+ 
+ 	int    i;
+@@ -2842,7 +2842,7 @@
+ 
+ 	return dt;
+ }
+-/*FUNCTION Penta::Update(int index,IoModel* iomodel,int analysis_counter,int analysis_type) {{{1*/
++/*FUNCTION Penta::Update(int index,IoModel* iomodel,int analysis_counter,int analysis_type) {{{*/
+ void Penta::Update(int index,IoModel* iomodel,int analysis_counter,int analysis_type){ 
+ 
+ 	/*Intermediaries*/
+@@ -2869,7 +2869,7 @@
+ 	iomodel->Constant(&latentheat,MaterialsLatentheatEnum);
+ 
+ 	/*Checks if debuging*/
+-	/*{{{2*/
++	/*{{{*/
+ 	_assert_(iomodel->Data(MeshElementsEnum));
+ 	/*}}}*/
+ 
+@@ -2996,7 +2996,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::UpdatePotentialSheetUngrounding{{{1*/
++/*FUNCTION Penta::UpdatePotentialSheetUngrounding{{{*/
+ int Penta::UpdatePotentialSheetUngrounding(double* vertices_potentially_ungrounding,Vector* vec_nodes_on_iceshelf,double* nodes_on_iceshelf){
+ 
+ 	int i;
+@@ -3016,7 +3016,7 @@
+ 	return nflipped;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::ViscousHeatingCreateInput {{{1*/
++/*FUNCTION Penta::ViscousHeatingCreateInput {{{*/
+ void Penta::ViscousHeatingCreateInput(void){
+ 
+ 	/*Constants*/
+@@ -3064,14 +3064,14 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::SmearFunction {{{1*/
++/*FUNCTION Penta::SmearFunction {{{*/
+ void  Penta::SmearFunction(Vector* smearedvector,double (*WeightFunction)(double distance,double radius),double radius){
+ 	_error_("not implemented yet");
+ }
+-/*}}}1*/
++/*}}}*/
+ 
+ #ifdef _HAVE_RESPONSES_
+-/*FUNCTION Penta::IceVolume {{{1*/
++/*FUNCTION Penta::IceVolume {{{*/
+ double Penta::IceVolume(void){
+ 
+ 	/*The volume of a troncated prism is base * 1/3 sum(length of edges)*/
+@@ -3094,7 +3094,7 @@
+ 	return base*height;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MinVel{{{1*/
++/*FUNCTION Penta::MinVel{{{*/
+ void  Penta::MinVel(double* pminvel, bool process_units){
+ 
+ 	/*Get minimum:*/
+@@ -3107,7 +3107,7 @@
+ 	*pminvel=minvel;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MinVx{{{1*/
++/*FUNCTION Penta::MinVx{{{*/
+ void  Penta::MinVx(double* pminvx, bool process_units){
+ 
+ 	/*Get minimum:*/
+@@ -3120,7 +3120,7 @@
+ 	*pminvx=minvx;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MinVy{{{1*/
++/*FUNCTION Penta::MinVy{{{*/
+ void  Penta::MinVy(double* pminvy, bool process_units){
+ 
+ 	/*Get minimum:*/
+@@ -3133,7 +3133,7 @@
+ 	*pminvy=minvy;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MinVz{{{1*/
++/*FUNCTION Penta::MinVz{{{*/
+ void  Penta::MinVz(double* pminvz, bool process_units){
+ 
+ 	/*Get minimum:*/
+@@ -3146,7 +3146,7 @@
+ 	*pminvz=minvz;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MassFlux {{{1*/
++/*FUNCTION Penta::MassFlux {{{*/
+ double Penta::MassFlux( double* segment,bool process_units){
+ 
+ 	double mass_flux=0;
+@@ -3170,7 +3170,7 @@
+ 	return mass_flux;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MaxAbsVx{{{1*/
++/*FUNCTION Penta::MaxAbsVx{{{*/
+ void  Penta::MaxAbsVx(double* pmaxabsvx, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -3183,7 +3183,7 @@
+ 	*pmaxabsvx=maxabsvx;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MaxAbsVy{{{1*/
++/*FUNCTION Penta::MaxAbsVy{{{*/
+ void  Penta::MaxAbsVy(double* pmaxabsvy, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -3196,7 +3196,7 @@
+ 	*pmaxabsvy=maxabsvy;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MaxAbsVz{{{1*/
++/*FUNCTION Penta::MaxAbsVz{{{*/
+ void  Penta::MaxAbsVz(double* pmaxabsvz, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -3209,7 +3209,7 @@
+ 	*pmaxabsvz=maxabsvz;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MaxVel{{{1*/
++/*FUNCTION Penta::MaxVel{{{*/
+ void  Penta::MaxVel(double* pmaxvel, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -3223,7 +3223,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MaxVx{{{1*/
++/*FUNCTION Penta::MaxVx{{{*/
+ void  Penta::MaxVx(double* pmaxvx, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -3236,7 +3236,7 @@
+ 	*pmaxvx=maxvx;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MaxVy{{{1*/
++/*FUNCTION Penta::MaxVy{{{*/
+ void  Penta::MaxVy(double* pmaxvy, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -3249,7 +3249,7 @@
+ 	*pmaxvy=maxvy;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::MaxVz{{{1*/
++/*FUNCTION Penta::MaxVz{{{*/
+ void  Penta::MaxVz(double* pmaxvz, bool process_units){
+ 
+ 	/*Get maximum:*/
+@@ -3262,7 +3262,7 @@
+ 	*pmaxvz=maxvz;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::ElementResponse{{{1*/
++/*FUNCTION Penta::ElementResponse{{{*/
+ void Penta::ElementResponse(double* presponse,int response_enum,bool process_units){
+ 
+ 	switch(response_enum){
+@@ -3292,7 +3292,7 @@
+ #endif
+ 
+ #ifdef _HAVE_THERMAL_
+-/*FUNCTION Penta::CreateKMatrixEnthalpy {{{1*/
++/*FUNCTION Penta::CreateKMatrixEnthalpy {{{*/
+ ElementMatrix* Penta::CreateKMatrixEnthalpy(void){
+ 	
+ 	/*compute all stiffness matrices for this element*/
+@@ -3306,7 +3306,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixEnthalpyVolume {{{1*/
++/*FUNCTION Penta::CreateKMatrixEnthalpyVolume {{{*/
+ ElementMatrix* Penta::CreateKMatrixEnthalpyVolume(void){
+ 
+ 	/*Constants*/
+@@ -3463,7 +3463,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixEnthalpyShelf {{{1*/
++/*FUNCTION Penta::CreateKMatrixEnthalpyShelf {{{*/
+ ElementMatrix* Penta::CreateKMatrixEnthalpyShelf(void){
+ 
+ 	/*Constants*/
+@@ -3517,7 +3517,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixMelting {{{1*/
++/*FUNCTION Penta::CreateKMatrixMelting {{{*/
+ ElementMatrix* Penta::CreateKMatrixMelting(void){
+ 
+ 	if (!IsOnBed()) return NULL;
+@@ -3529,7 +3529,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixThermal {{{1*/
++/*FUNCTION Penta::CreateKMatrixThermal {{{*/
+ ElementMatrix* Penta::CreateKMatrixThermal(void){
+ 	
+ 	/*compute all stiffness matrices for this element*/
+@@ -3543,7 +3543,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixThermalVolume {{{1*/
++/*FUNCTION Penta::CreateKMatrixThermalVolume {{{*/
+ ElementMatrix* Penta::CreateKMatrixThermalVolume(void){
+ 
+ 	/*Constants*/
+@@ -3695,7 +3695,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixThermalShelf {{{1*/
++/*FUNCTION Penta::CreateKMatrixThermalShelf {{{*/
+ ElementMatrix* Penta::CreateKMatrixThermalShelf(void){
+ 
+ 
+@@ -3750,7 +3750,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorEnthalpy {{{1*/
++/*FUNCTION Penta::CreatePVectorEnthalpy {{{*/
+ ElementVector* Penta::CreatePVectorEnthalpy(void){
+ 
+ 	/*compute all load vectors for this element*/
+@@ -3766,7 +3766,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorEnthalpyVolume {{{1*/
++/*FUNCTION Penta::CreatePVectorEnthalpyVolume {{{*/
+ ElementVector* Penta::CreatePVectorEnthalpyVolume(void){
+ 
+ 	/*Constants*/
+@@ -3862,7 +3862,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorEnthalpyShelf {{{1*/
++/*FUNCTION Penta::CreatePVectorEnthalpyShelf {{{*/
+ ElementVector* Penta::CreatePVectorEnthalpyShelf(void){
+ 
+ 	/*Constants*/
+@@ -3919,7 +3919,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorEnthalpySheet {{{1*/
++/*FUNCTION Penta::CreatePVectorEnthalpySheet {{{*/
+ ElementVector* Penta::CreatePVectorEnthalpySheet(void){
+ 
+ 	/*Constants*/
+@@ -4008,12 +4008,12 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorMelting {{{1*/
++/*FUNCTION Penta::CreatePVectorMelting {{{*/
+ ElementVector* Penta::CreatePVectorMelting(void){
+ 	return NULL;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorThermal {{{1*/
++/*FUNCTION Penta::CreatePVectorThermal {{{*/
+ ElementVector* Penta::CreatePVectorThermal(void){
+ 
+ 	/*compute all load vectors for this element*/
+@@ -4029,7 +4029,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorThermalVolume {{{1*/
++/*FUNCTION Penta::CreatePVectorThermalVolume {{{*/
+ ElementVector* Penta::CreatePVectorThermalVolume(void){
+ 
+ 	/*Constants*/
+@@ -4116,7 +4116,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorThermalShelf {{{1*/
++/*FUNCTION Penta::CreatePVectorThermalShelf {{{*/
+ ElementVector* Penta::CreatePVectorThermalShelf(void){
+ 
+ 	/*Constants*/
+@@ -4173,7 +4173,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorThermalSheet {{{1*/
++/*FUNCTION Penta::CreatePVectorThermalSheet {{{*/
+ ElementVector* Penta::CreatePVectorThermalSheet(void){
+ 
+ 	/*Constants*/
+@@ -4240,7 +4240,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetSolutionFromInputsThermal{{{1*/
++/*FUNCTION Penta::GetSolutionFromInputsThermal{{{*/
+ void  Penta::GetSolutionFromInputsThermal(Vector* solution){
+ 
+ 	const int    numdof=NDOF1*NUMVERTICES;
+@@ -4271,7 +4271,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetSolutionFromInputsEnthalpy{{{1*/
++/*FUNCTION Penta::GetSolutionFromInputsEnthalpy{{{*/
+ void  Penta::GetSolutionFromInputsEnthalpy(Vector* solution){
+ 
+ 	const int    numdof=NDOF1*NUMVERTICES;
+@@ -4302,7 +4302,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionThermal {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionThermal {{{*/
+ void  Penta::InputUpdateFromSolutionThermal(double* solution){
+ 
+ 	const int    numdof=NDOF1*NUMVERTICES;
+@@ -4373,7 +4373,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionEnthalpy {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionEnthalpy {{{*/
+ void  Penta::InputUpdateFromSolutionEnthalpy(double* solution){
+ 
+ 	const int    numdof=NDOF1*NUMVERTICES;
+@@ -4454,7 +4454,7 @@
+ #endif
+ 
+ #ifdef _HAVE_CONTROL_
+-/*FUNCTION Penta::ControlInputGetGradient{{{1*/
++/*FUNCTION Penta::ControlInputGetGradient{{{*/
+ void Penta::ControlInputGetGradient(Vector* gradient,int enum_type,int control_index){
+ 
+ 	int doflist1[NUMVERTICES];
+@@ -4474,7 +4474,7 @@
+ 	((ControlInput*)input)->GetGradient(gradient,&doflist1[0]);
+ 
+ }/*}}}*/
+-/*FUNCTION Penta::ControlInputScaleGradient{{{1*/
++/*FUNCTION Penta::ControlInputScaleGradient{{{*/
+ void Penta::ControlInputScaleGradient(int enum_type,double scale){
+ 
+ 	Input* input=NULL;
+@@ -4490,7 +4490,7 @@
+ 
+ 	((ControlInput*)input)->ScaleGradient(scale);
+ }/*}}}*/
+-/*FUNCTION Penta::ControlInputSetGradient{{{1*/
++/*FUNCTION Penta::ControlInputSetGradient{{{*/
+ void Penta::ControlInputSetGradient(double* gradient,int enum_type,int control_index){
+ 
+ 	int    doflist1[NUMVERTICES];
+@@ -4513,7 +4513,7 @@
+ 	((ControlInput*)input)->SetGradient(grad_input);
+ 
+ }/*}}}*/
+-/*FUNCTION Penta::CreateKMatrixAdjointHoriz{{{1*/
++/*FUNCTION Penta::CreateKMatrixAdjointHoriz{{{*/
+ ElementMatrix* Penta::CreateKMatrixAdjointHoriz(void){
+ 
+ 	int approximation;
+@@ -4533,7 +4533,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixAdjointMacAyeal2d{{{1*/
++/*FUNCTION Penta::CreateKMatrixAdjointMacAyeal2d{{{*/
+ ElementMatrix* Penta::CreateKMatrixAdjointMacAyeal2d(void){
+ 
+ 	/*Figure out if this penta is collapsed. If so, then bailout, except if it is at the 
+@@ -4556,7 +4556,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixAdjointPattyn{{{1*/
++/*FUNCTION Penta::CreateKMatrixAdjointPattyn{{{*/
+ ElementMatrix* Penta::CreateKMatrixAdjointPattyn(void){
+ 
+ 	/*Constants*/
+@@ -4624,7 +4624,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixAdjointStokes{{{1*/
++/*FUNCTION Penta::CreateKMatrixAdjointStokes{{{*/
+ ElementMatrix* Penta::CreateKMatrixAdjointStokes(void){
+ 
+ 	/*Constants*/
+@@ -4703,7 +4703,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorAdjointHoriz{{{1*/
++/*FUNCTION Penta::CreatePVectorAdjointHoriz{{{*/
+ ElementVector* Penta::CreatePVectorAdjointHoriz(void){
+ 
+ 	int approximation;
+@@ -4723,7 +4723,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorAdjointMacAyeal{{{1*/
++/*FUNCTION Penta::CreatePVectorAdjointMacAyeal{{{*/
+ ElementVector* Penta::CreatePVectorAdjointMacAyeal(){
+ 
+ 	if (!IsOnBed()) return NULL;
+@@ -4737,7 +4737,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorAdjointPattyn{{{1*/
++/*FUNCTION Penta::CreatePVectorAdjointPattyn{{{*/
+ ElementVector* Penta::CreatePVectorAdjointPattyn(void){
+ 
+ 	if (!IsOnSurface()) return NULL;
+@@ -4751,7 +4751,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorAdjointStokes{{{1*/
++/*FUNCTION Penta::CreatePVectorAdjointStokes{{{*/
+ ElementVector* Penta::CreatePVectorAdjointStokes(void){
+ 
+ 	if (!IsOnSurface()) return NULL;
+@@ -4765,7 +4765,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GradientIndexing{{{1*/
++/*FUNCTION Penta::GradientIndexing{{{*/
+ void Penta::GradientIndexing(int* indexing,int control_index){
+ 
+ 	/*Get some parameters*/
+@@ -4779,7 +4779,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::Gradj {{{1*/
++/*FUNCTION Penta::Gradj {{{*/
+ void  Penta::Gradj(Vector* gradient,int control_type,int control_index){
+ 	/*dJ/dalpha = ∂L/∂alpha = ∂J/∂alpha + ∂/∂alpha(KU-F)*/
+ 
+@@ -4870,7 +4870,7 @@
+ 	xfree((void**)&responses);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GradjDragMacAyeal {{{1*/
++/*FUNCTION Penta::GradjDragMacAyeal {{{*/
+ void  Penta::GradjDragMacAyeal(Vector* gradient,int control_index){
+ 
+ 	/*Gradient is 0 if on shelf or not on bed*/
+@@ -4882,7 +4882,7 @@
+ 	delete tria->matice; delete tria;
+ 
+ } /*}}}*/
+-/*FUNCTION Penta::GradjDragPattyn {{{1*/
++/*FUNCTION Penta::GradjDragPattyn {{{*/
+ void  Penta::GradjDragPattyn(Vector* gradient,int control_index){
+ 
+ 	int        i,j,ig;
+@@ -4953,7 +4953,7 @@
+ 	delete friction;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GradjDragStokes {{{1*/
++/*FUNCTION Penta::GradjDragStokes {{{*/
+ void  Penta::GradjDragStokes(Vector* gradient,int control_index){
+ 
+ 	int        i,j,ig;
+@@ -5045,7 +5045,7 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GradjBbarMacAyeal {{{1*/
++/*FUNCTION Penta::GradjBbarMacAyeal {{{*/
+ void  Penta::GradjBbarMacAyeal(Vector* gradient,int control_index){
+ 
+ 	/*This element should be collapsed into a tria element at its base*/
+@@ -5063,7 +5063,7 @@
+ 	this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum);
+ 
+ } /*}}}*/
+-/*FUNCTION Penta::GradjBbarPattyn {{{1*/
++/*FUNCTION Penta::GradjBbarPattyn {{{*/
+ void  Penta::GradjBbarPattyn(Vector* gradient,int control_index){
+ 
+ 	/*Gradient is computed on bed only (Bbar)*/
+@@ -5080,7 +5080,7 @@
+ 	/*delete Average B*/
+ 	this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum);
+ } /*}}}*/
+-/*FUNCTION Penta::GradjBbarStokes {{{1*/
++/*FUNCTION Penta::GradjBbarStokes {{{*/
+ void  Penta::GradjBbarStokes(Vector* gradient,int control_index){
+ 
+ 	/*Gradient is computed on bed only (Bbar)*/
+@@ -5097,7 +5097,7 @@
+ 	/*delete Average B*/
+ 	this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum);
+ } /*}}}*/
+-/*FUNCTION Penta::InputControlUpdate{{{1*/
++/*FUNCTION Penta::InputControlUpdate{{{*/
+ void  Penta::InputControlUpdate(double scalar,bool save_parameter){
+ 
+ 	/*Intermediary*/
+@@ -5135,7 +5135,7 @@
+ 	xfree((void**)&control_type);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionAdjointStokes {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionAdjointStokes {{{*/
+ void  Penta::InputUpdateFromSolutionAdjointStokes(double* solution){
+ 
+ 	const int    numdof=NDOF4*NUMVERTICES;
+@@ -5178,7 +5178,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionAdjointHoriz {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionAdjointHoriz {{{*/
+ void  Penta::InputUpdateFromSolutionAdjointHoriz(double* solution){
+ 
+ 	const int numdof=NDOF2*NUMVERTICES;
+@@ -5213,7 +5213,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::SurfaceAverageVelMisfit {{{1*/
++/*FUNCTION Penta::SurfaceAverageVelMisfit {{{*/
+ double Penta::SurfaceAverageVelMisfit(bool process_units,int weight_index){
+ 
+ 	int    approximation;
+@@ -5250,7 +5250,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::SurfaceAbsVelMisfit {{{1*/
++/*FUNCTION Penta::SurfaceAbsVelMisfit {{{*/
+ double Penta::SurfaceAbsVelMisfit(bool process_units,int weight_index){
+ 
+ 	int    approximation;
+@@ -5287,7 +5287,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::SurfaceLogVelMisfit {{{1*/
++/*FUNCTION Penta::SurfaceLogVelMisfit {{{*/
+ double Penta::SurfaceLogVelMisfit(bool process_units,int weight_index){
+ 
+ 	int    approximation;
+@@ -5324,7 +5324,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::SurfaceLogVxVyMisfit {{{1*/
++/*FUNCTION Penta::SurfaceLogVxVyMisfit {{{*/
+ double Penta::SurfaceLogVxVyMisfit(bool process_units,int weight_index){
+ 
+ 	double J;
+@@ -5363,7 +5363,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::SurfaceRelVelMisfit {{{1*/
++/*FUNCTION Penta::SurfaceRelVelMisfit {{{*/
+ double Penta::SurfaceRelVelMisfit(bool process_units,int weight_index){
+ 
+ 	int    approximation;
+@@ -5400,13 +5400,13 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::ThicknessAbsGradient{{{1*/
++/*FUNCTION Penta::ThicknessAbsGradient{{{*/
+ double Penta::ThicknessAbsGradient(bool process_units,int weight_index){
+ 
+ 	_error_("Not implemented yet");
+ }
+ /*}}}*/
+-/*FUNCTION Penta::ThicknessAbsMisfit {{{1*/
++/*FUNCTION Penta::ThicknessAbsMisfit {{{*/
+ double Penta::ThicknessAbsMisfit(bool process_units,int weight_index){
+ 
+ 	int    approximation;
+@@ -5426,7 +5426,7 @@
+ 	return J;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::DragCoefficientAbsGradient{{{1*/
++/*FUNCTION Penta::DragCoefficientAbsGradient{{{*/
+ double Penta::DragCoefficientAbsGradient(bool process_units,int weight_index){
+ 
+ 	double J;
+@@ -5441,7 +5441,7 @@
+ 	return J;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::RheologyBbarAbsGradient{{{1*/
++/*FUNCTION Penta::RheologyBbarAbsGradient{{{*/
+ double Penta::RheologyBbarAbsGradient(bool process_units,int weight_index){
+ 
+ 	double J;
+@@ -5456,7 +5456,7 @@
+ 	return J;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetVectorFromControlInputs{{{1*/
++/*FUNCTION Penta::GetVectorFromControlInputs{{{*/
+ void  Penta::GetVectorFromControlInputs(Vector* vector,int control_enum,int control_index,const char* data){
+ 
+ 	int doflist1[NUMVERTICES];
+@@ -5479,7 +5479,7 @@
+ 	((ControlInput*)input)->GetVectorFromInputs(vector,&doflist1[0],data);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::SetControlInputsFromVector{{{1*/
++/*FUNCTION Penta::SetControlInputsFromVector{{{*/
+ void  Penta::SetControlInputsFromVector(double* vector,int control_enum,int control_index){
+ 
+ 	double  values[NUMVERTICES];
+@@ -5517,7 +5517,7 @@
+ #endif
+ 
+ #ifdef _HAVE_DAKOTA_
+-/*FUNCTION Penta::InputUpdateFromVectorDakota(double* vector, int name, int type);{{{1*/
++/*FUNCTION Penta::InputUpdateFromVectorDakota(double* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVectorDakota(double* vector, int name, int type){
+ 	
+ 	int i,j;
+@@ -5540,7 +5540,7 @@
+ 			/*Branch on the specified type of update: */
+ 			switch(name){
+ 				case ThicknessEnum:
+-					/*Update thickness + surface: assume bed is constant. On ice shelves, takes hydrostatic equilibrium {{{2*/
++					/*Update thickness + surface: assume bed is constant. On ice shelves, takes hydrostatic equilibrium {{{*/
+ 					double  thickness[6];
+ 					double  thickness_init[6];
+ 					double  hydrostatic_ratio[6];
+@@ -5619,17 +5619,17 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{1*/
++/*FUNCTION Penta::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVectorDakota(int* vector, int name, int type){
+ 	_error_(" not supported yet!");
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{1*/
++/*FUNCTION Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type){
+ 	_error_(" not supported yet!");
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type);{{{1*/
++/*FUNCTION Penta::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type);{{{*/
+ void  Penta::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
+ 	
+ 	int i,j,t;
+@@ -5677,7 +5677,7 @@
+ #endif
+ 
+ #ifdef _HAVE_DIAGNOSTIC_
+-/*FUNCTION Penta::CreateDVectorDiagnosticHoriz {{{1*/
++/*FUNCTION Penta::CreateDVectorDiagnosticHoriz {{{*/
+ ElementVector* Penta::CreateDVectorDiagnosticHoriz(void){
+ 
+ 	int approximation;
+@@ -5691,7 +5691,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateDVectorDiagnosticStokes{{{1*/
++/*FUNCTION Penta::CreateDVectorDiagnosticStokes{{{*/
+ ElementVector* Penta::CreateDVectorDiagnosticStokes(void){
+ 
+ 	/*output: */
+@@ -5716,7 +5716,7 @@
+ 	return De;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixCouplingMacAyealPattyn{{{1*/
++/*FUNCTION Penta::CreateKMatrixCouplingMacAyealPattyn{{{*/
+ ElementMatrix* Penta::CreateKMatrixCouplingMacAyealPattyn(void){
+ 	
+ 	/*compute all stiffness matrices for this element*/
+@@ -5730,7 +5730,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixCouplingMacAyealPattynViscous{{{1*/
++/*FUNCTION Penta::CreateKMatrixCouplingMacAyealPattynViscous{{{*/
+ ElementMatrix* Penta::CreateKMatrixCouplingMacAyealPattynViscous(void){
+ 
+ 	/*Constants*/
+@@ -5823,7 +5823,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixCouplingMacAyealPattynFriction{{{1*/
++/*FUNCTION Penta::CreateKMatrixCouplingMacAyealPattynFriction{{{*/
+ ElementMatrix* Penta::CreateKMatrixCouplingMacAyealPattynFriction(void){
+ 
+ 	/*Constants*/
+@@ -5921,7 +5921,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixCouplingMacAyealStokes{{{1*/
++/*FUNCTION Penta::CreateKMatrixCouplingMacAyealStokes{{{*/
+ ElementMatrix* Penta::CreateKMatrixCouplingMacAyealStokes(void){
+ 
+ 	/*compute all stiffness matrices for this element*/
+@@ -5935,7 +5935,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixCouplingMacAyealStokesViscous{{{1*/
++/*FUNCTION Penta::CreateKMatrixCouplingMacAyealStokesViscous{{{*/
+ ElementMatrix* Penta::CreateKMatrixCouplingMacAyealStokesViscous(void){
+ 
+ 	/*Constants*/
+@@ -6039,7 +6039,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixCouplingMacAyealStokesFriction {{{1*/
++/*FUNCTION Penta::CreateKMatrixCouplingMacAyealStokesFriction {{{*/
+ ElementMatrix* Penta::CreateKMatrixCouplingMacAyealStokesFriction(void){
+ 
+ 	/*Constants*/
+@@ -6155,7 +6155,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixCouplingPattynStokes{{{1*/
++/*FUNCTION Penta::CreateKMatrixCouplingPattynStokes{{{*/
+ ElementMatrix* Penta::CreateKMatrixCouplingPattynStokes(void){
+ 
+ 	/*Constants*/
+@@ -6204,7 +6204,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticHoriz {{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticHoriz {{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticHoriz(void){
+ 
+ 	int approximation;
+@@ -6232,7 +6232,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticHutter{{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticHutter{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticHutter(void){
+ 
+ 	/*Constants*/
+@@ -6295,7 +6295,7 @@
+ 	/*Clean up and return*/
+ 	return Ke;
+ }
+-/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyeal2d{{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyeal2d{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyeal2d(void){
+ 
+ 	/*Figure out if this penta is collapsed. If so, then bailout, except if it is at the 
+@@ -6318,7 +6318,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyeal3d{{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyeal3d{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyeal3d(void){
+ 
+ 	/*compute all stiffness matrices for this element*/
+@@ -6332,7 +6332,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyeal3dViscous{{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyeal3dViscous{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyeal3dViscous(void){
+ 
+ 	/*Constants*/
+@@ -6420,7 +6420,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyeal3dFriction{{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyeal3dFriction{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyeal3dFriction(void){
+ 
+ 	/*Initialize Element matrix and return if necessary*/
+@@ -6437,7 +6437,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyealPattyn{{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyealPattyn{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyealPattyn(void){
+ 
+ 	/*compute all stiffness matrices for this element*/
+@@ -6453,7 +6453,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyealStokes{{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticMacAyealStokes{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyealStokes(void){
+ 
+ 	/*compute all stiffness matrices for this element*/
+@@ -6469,7 +6469,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticPattyn{{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticPattyn{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticPattyn(void){
+ 
+ 	/*compute all stiffness matrices for this element*/
+@@ -6484,7 +6484,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticPattynViscous{{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticPattynViscous{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticPattynViscous(void){
+ 
+ 	/*Constants*/
+@@ -6549,7 +6549,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticPattynFriction{{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticPattynFriction{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticPattynFriction(void){
+ 
+ 	/*Constants*/
+@@ -6624,7 +6624,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticPattynStokes{{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticPattynStokes{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticPattynStokes(void){
+ 
+ 	/*compute all stiffness matrices for this element*/
+@@ -6640,7 +6640,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticStokes{{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticStokes{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticStokes(void){
+ 
+ 	/*compute all stiffness matrices for this element*/
+@@ -6654,7 +6654,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticStokesViscous {{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticStokesViscous {{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticStokesViscous(void){
+ 
+ 	/*Intermediaries */
+@@ -6715,7 +6715,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticStokesFriction{{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticStokesFriction{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticStokesFriction(void){
+ 
+ 	/*Constants*/
+@@ -6787,7 +6787,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticVert {{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticVert {{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticVert(void){
+ 	
+ 	/*compute all stiffness matrices for this element*/
+@@ -6802,7 +6802,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticVertVolume {{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticVertVolume {{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticVertVolume(void){
+ 
+ 	/*Constants*/
+@@ -6846,7 +6846,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateKMatrixDiagnosticVertSurface {{{1*/
++/*FUNCTION Penta::CreateKMatrixDiagnosticVertSurface {{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticVertSurface(void){
+ 
+ 	if (!IsOnSurface()) return NULL;
+@@ -6893,7 +6893,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorCouplingMacAyealStokes {{{1*/
++/*FUNCTION Penta::CreatePVectorCouplingMacAyealStokes {{{*/
+ ElementVector* Penta::CreatePVectorCouplingMacAyealStokes(void){
+ 
+ 	/*compute all load vectors for this element*/
+@@ -6907,7 +6907,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorCouplingMacAyealStokesViscous {{{1*/
++/*FUNCTION Penta::CreatePVectorCouplingMacAyealStokesViscous {{{*/
+ ElementVector* Penta::CreatePVectorCouplingMacAyealStokesViscous(void){
+ 
+ 	/*Constants*/
+@@ -6969,7 +6969,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorCouplingMacAyealStokesFriction{{{1*/
++/*FUNCTION Penta::CreatePVectorCouplingMacAyealStokesFriction{{{*/
+ ElementVector* Penta::CreatePVectorCouplingMacAyealStokesFriction(void){
+ 
+ 	/*Constants*/
+@@ -7044,7 +7044,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorCouplingPattynStokes {{{1*/
++/*FUNCTION Penta::CreatePVectorCouplingPattynStokes {{{*/
+ ElementVector* Penta::CreatePVectorCouplingPattynStokes(void){
+ 
+ 	/*compute all load vectors for this element*/
+@@ -7058,7 +7058,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorCouplingPattynStokesViscous {{{1*/
++/*FUNCTION Penta::CreatePVectorCouplingPattynStokesViscous {{{*/
+ ElementVector* Penta::CreatePVectorCouplingPattynStokesViscous(void){
+ 
+ 	/*Constants*/
+@@ -7120,7 +7120,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorCouplingPattynStokesFriction{{{1*/
++/*FUNCTION Penta::CreatePVectorCouplingPattynStokesFriction{{{*/
+ ElementVector* Penta::CreatePVectorCouplingPattynStokesFriction(void){
+ 
+ 	/*Constants*/
+@@ -7195,7 +7195,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorDiagnosticHoriz{{{1*/
++/*FUNCTION Penta::CreatePVectorDiagnosticHoriz{{{*/
+ ElementVector* Penta::CreatePVectorDiagnosticHoriz(void){
+ 
+ 	int approximation;
+@@ -7223,7 +7223,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorDiagnosticMacAyealPattyn{{{1*/
++/*FUNCTION Penta::CreatePVectorDiagnosticMacAyealPattyn{{{*/
+ ElementVector* Penta::CreatePVectorDiagnosticMacAyealPattyn(void){
+ 
+ 	/*compute all load vectors for this element*/
+@@ -7237,7 +7237,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorDiagnosticMacAyealStokes{{{1*/
++/*FUNCTION Penta::CreatePVectorDiagnosticMacAyealStokes{{{*/
+ ElementVector* Penta::CreatePVectorDiagnosticMacAyealStokes(void){
+ 
+ 	/*compute all load vectors for this element*/
+@@ -7253,7 +7253,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorDiagnosticPattynStokes{{{1*/
++/*FUNCTION Penta::CreatePVectorDiagnosticPattynStokes{{{*/
+ ElementVector* Penta::CreatePVectorDiagnosticPattynStokes(void){
+ 
+ 	/*compute all load vectors for this element*/
+@@ -7269,7 +7269,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorDiagnosticHutter{{{1*/
++/*FUNCTION Penta::CreatePVectorDiagnosticHutter{{{*/
+ ElementVector* Penta::CreatePVectorDiagnosticHutter(void){
+ 
+ 	/*Constants*/
+@@ -7357,7 +7357,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorDiagnosticMacAyeal{{{1*/
++/*FUNCTION Penta::CreatePVectorDiagnosticMacAyeal{{{*/
+ ElementVector* Penta::CreatePVectorDiagnosticMacAyeal(void){
+ 
+ 	if (!IsOnBed()) return NULL;
+@@ -7371,7 +7371,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorDiagnosticPattyn{{{1*/
++/*FUNCTION Penta::CreatePVectorDiagnosticPattyn{{{*/
+ ElementVector* Penta::CreatePVectorDiagnosticPattyn(void){
+ 
+ 	/*Constants*/
+@@ -7419,7 +7419,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorDiagnosticStokes {{{1*/
++/*FUNCTION Penta::CreatePVectorDiagnosticStokes {{{*/
+ ElementVector* Penta::CreatePVectorDiagnosticStokes(void){
+ 
+ 	/*compute all load vectors for this element*/
+@@ -7433,7 +7433,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorDiagnosticStokesViscous {{{1*/
++/*FUNCTION Penta::CreatePVectorDiagnosticStokesViscous {{{*/
+ ElementVector* Penta::CreatePVectorDiagnosticStokesViscous(void){
+ 
+ 	/*Constants*/
+@@ -7513,7 +7513,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorDiagnosticStokesShelf{{{1*/
++/*FUNCTION Penta::CreatePVectorDiagnosticStokesShelf{{{*/
+ ElementVector* Penta::CreatePVectorDiagnosticStokesShelf(void){
+ 
+ 	/*Intermediaries*/
+@@ -7581,7 +7581,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorDiagnosticVert {{{1*/
++/*FUNCTION Penta::CreatePVectorDiagnosticVert {{{*/
+ ElementVector* Penta::CreatePVectorDiagnosticVert(void){
+ 
+ 	/*compute all load vectors for this element*/
+@@ -7595,7 +7595,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorDiagnosticVertVolume {{{1*/
++/*FUNCTION Penta::CreatePVectorDiagnosticVertVolume {{{*/
+ ElementVector* Penta::CreatePVectorDiagnosticVertVolume(void){
+ 
+ 	/*Constants*/
+@@ -7651,7 +7651,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorDiagnosticVertBase {{{1*/
++/*FUNCTION Penta::CreatePVectorDiagnosticVertBase {{{*/
+ ElementVector* Penta::CreatePVectorDiagnosticVertBase(void){
+ 
+ 
+@@ -7716,7 +7716,7 @@
+ 	return pe;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateJacobianDiagnosticHoriz{{{1*/
++/*FUNCTION Penta::CreateJacobianDiagnosticHoriz{{{*/
+ ElementMatrix* Penta::CreateJacobianDiagnosticHoriz(void){
+ 
+ 	int approximation;
+@@ -7736,7 +7736,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateJacobianDiagnosticMacayeal2d{{{1*/
++/*FUNCTION Penta::CreateJacobianDiagnosticMacayeal2d{{{*/
+ ElementMatrix* Penta::CreateJacobianDiagnosticMacayeal2d(void){
+ 
+ 	/*Figure out if this penta is collapsed. If so, then bailout, except if it is at the 
+@@ -7759,7 +7759,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateJacobianDiagnosticPattyn{{{1*/
++/*FUNCTION Penta::CreateJacobianDiagnosticPattyn{{{*/
+ ElementMatrix* Penta::CreateJacobianDiagnosticPattyn(void){
+ 
+ 	/*Constants*/
+@@ -7824,7 +7824,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreateJacobianDiagnosticStokes{{{1*/
++/*FUNCTION Penta::CreateJacobianDiagnosticStokes{{{*/
+ ElementMatrix* Penta::CreateJacobianDiagnosticStokes(void){
+ 
+ 	/*Constants*/
+@@ -7900,7 +7900,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetSolutionFromInputsDiagnosticHoriz{{{1*/
++/*FUNCTION Penta::GetSolutionFromInputsDiagnosticHoriz{{{*/
+ void  Penta::GetSolutionFromInputsDiagnosticHoriz(Vector* solution){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+@@ -7942,7 +7942,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetSolutionFromInputsDiagnosticHutter{{{1*/
++/*FUNCTION Penta::GetSolutionFromInputsDiagnosticHutter{{{*/
+ void  Penta::GetSolutionFromInputsDiagnosticHutter(Vector* solution){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+@@ -7978,7 +7978,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetSolutionFromInputsDiagnosticVert{{{1*/
++/*FUNCTION Penta::GetSolutionFromInputsDiagnosticVert{{{*/
+ void  Penta::GetSolutionFromInputsDiagnosticVert(Vector* solution){
+ 
+ 	const int    numdof=NDOF1*NUMVERTICES;
+@@ -8011,7 +8011,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetSolutionFromInputsDiagnosticStokes{{{1*/
++/*FUNCTION Penta::GetSolutionFromInputsDiagnosticStokes{{{*/
+ void  Penta::GetSolutionFromInputsDiagnosticStokes(Vector* solution){
+ 
+ 	const int    numdof=NDOF4*NUMVERTICES;
+@@ -8056,7 +8056,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHoriz {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHoriz {{{*/
+ void  Penta::InputUpdateFromSolutionDiagnosticHoriz(double* solution){
+ 
+ 	int  approximation;
+@@ -8092,7 +8092,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyeal {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyeal {{{*/
+ void  Penta::InputUpdateFromSolutionDiagnosticMacAyeal(double* solution){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+@@ -8173,7 +8173,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealPattyn {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealPattyn {{{*/
+ void  Penta::InputUpdateFromSolutionDiagnosticMacAyealPattyn(double* solution){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+@@ -8257,7 +8257,7 @@
+ 	xfree((void**)&doflistm);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealStokes {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealStokes {{{*/
+ void  Penta::InputUpdateFromSolutionDiagnosticMacAyealStokes(double* solution){
+ 
+ 	const int    numdofm=NDOF2*NUMVERTICES;
+@@ -8357,7 +8357,7 @@
+ 	xfree((void**)&doflists);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticPattyn {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticPattyn {{{*/
+ void  Penta::InputUpdateFromSolutionDiagnosticPattyn(double* solution){
+ 	
+ 	const int    numdof=NDOF2*NUMVERTICES;
+@@ -8431,7 +8431,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticPattynStokes {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticPattynStokes {{{*/
+ void  Penta::InputUpdateFromSolutionDiagnosticPattynStokes(double* solution){
+ 
+ 	const int    numdofp=NDOF2*NUMVERTICES;
+@@ -8525,7 +8525,7 @@
+ 	xfree((void**)&doflists);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHutter {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHutter {{{*/
+ void  Penta::InputUpdateFromSolutionDiagnosticHutter(double* solution){
+ 	
+ 	const int    numdof=NDOF2*NUMVERTICES;
+@@ -8588,7 +8588,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticVert {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticVert {{{*/
+ void  Penta::InputUpdateFromSolutionDiagnosticVert(double* solution){
+ 
+ 	const int numdof=NDOF1*NUMVERTICES;
+@@ -8692,7 +8692,7 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticStokes {{{1*/
++/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticStokes {{{*/
+ void  Penta::InputUpdateFromSolutionDiagnosticStokes(double* solution){
+ 	
+ 	const int numdof=NDOF4*NUMVERTICES;
+@@ -8756,7 +8756,7 @@
+ #endif
+ 
+ #ifdef _HAVE_BALANCED_
+-/*FUNCTION Penta::CreateKMatrixBalancethickness {{{1*/
++/*FUNCTION Penta::CreateKMatrixBalancethickness {{{*/
+ ElementMatrix* Penta::CreateKMatrixBalancethickness(void){
+ 
+ 	/*Figure out if this penta is collapsed. If so, then bailout, except if it is at the 
+@@ -8781,7 +8781,7 @@
+ 	return Ke;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::CreatePVectorBalancethickness {{{1*/
++/*FUNCTION Penta::CreatePVectorBalancethickness {{{*/
+ ElementVector* Penta::CreatePVectorBalancethickness(void){
+ 
+ 	if (!IsOnBed()) return NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaHook.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaHook.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaHook.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION PentaHook::PentaHook(){{{1*/
++/*FUNCTION PentaHook::PentaHook(){{{*/
+ PentaHook::PentaHook(){
+ 	numanalyses=UNDEF;
+ 	this->hnodes=NULL;
+@@ -29,7 +29,7 @@
+ 	this->hneighbors=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION PentaHook::~PentaHook(){{{1*/
++/*FUNCTION PentaHook::~PentaHook(){{{*/
+ PentaHook::~PentaHook(){
+ 
+ 	int i;
+@@ -43,7 +43,7 @@
+ 	delete hneighbors;
+ }
+ /*}}}*/
+-/*FUNCTION PentaHook::PentaHook(int in_numanalyses,int matice_id, int matpar_id){{{1*/
++/*FUNCTION PentaHook::PentaHook(int in_numanalyses,int matice_id, int matpar_id){{{*/
+ PentaHook::PentaHook(int in_numanalyses,int matice_id, IoModel* iomodel){
+ 
+ 	/*intermediary: */
+@@ -66,19 +66,19 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION PentaHook::SetHookNodes{{{1*/
++/*FUNCTION PentaHook::SetHookNodes{{{*/
+ void PentaHook::SetHookNodes(int* node_ids,int analysis_counter){
+ 	this->hnodes[analysis_counter]= new Hook(node_ids,6);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaHook::InitHookNeighbors{{{1*/
++/*FUNCTION PentaHook::InitHookNeighbors{{{*/
+ void PentaHook::InitHookNeighbors(int* element_ids){
+ 	this->hneighbors=new Hook(element_ids,2);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaHook::SpawnTriaHook{{{1*/
++/*FUNCTION PentaHook::SpawnTriaHook{{{*/
+ void PentaHook::SpawnTriaHook(TriaHook* triahook,int* indices){
+ 
+ 	int i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _PENTA_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Element.h"
+ #include "./PentaHook.h"
+ #include "./PentaRef.h"
+@@ -43,12 +43,12 @@
+ 		Inputs      *inputs;
+ 		Results      *results;
+ 
+-		/*Penta constructors and destructor: {{{1*/
++		/*Penta constructors and destructor: {{{*/
+ 		Penta();
+ 		Penta(int penta_id,int penta_sid,int i, IoModel* iomodel,int nummodels);
+ 		~Penta();
+ 		/*}}}*/
+-		/*Object virtual functions definitions: {{{1*/
++		/*Object virtual functions definitions: {{{*/
+ 		Object*   copy();
+ 		void	  DeepEcho();
+ 		void	  Echo();
+@@ -56,7 +56,7 @@
+ 		int		  Id(); 
+ 		int		  MyRank();
+ 		/*}}}*/
+-		/*Update virtual functions definitions: {{{1*/
++		/*Update virtual functions definitions: {{{*/
+ 		void  InputUpdateFromConstant(bool constant, int name);
+ 		void  InputUpdateFromConstant(double constant, int name);
+ 		void  InputUpdateFromConstant(int constant, int name);
+@@ -72,7 +72,7 @@
+ 		#endif
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel);
+ 		/*}}}*/
+-		/*Element virtual functions definitions: {{{1*/
++		/*Element virtual functions definitions: {{{*/
+ 		void   AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,double* vertex_response,double* qmu_part);
+ 		void   BasalFrictionCreateInput(void);
+ 		void   ComputeBasalStress(Vector* sigma_b);
+@@ -161,7 +161,7 @@
+ 		void   InputControlUpdate(double scalar,bool save_parameter);
+ 		#endif
+ 		/*}}}*/
+-		/*Penta specific routines:{{{1*/
++		/*Penta specific routines:{{{*/
+ 		void	  BedNormal(double* bed_normal, double xyz_list[3][3]);
+ 		ElementMatrix* CreateKMatrixPrognostic(void);
+ 		ElementMatrix* CreateKMatrixSlope(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.cpp	(revision 12365)
+@@ -3,7 +3,7 @@
+  */
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -23,12 +23,12 @@
+ #define NUMNODES 3
+ 
+ /*Object constructors and destructor*/
+-/*FUNCTION TriaRef::TriaRef(){{{1*/
++/*FUNCTION TriaRef::TriaRef(){{{*/
+ TriaRef::TriaRef(){
+ 	this->element_type_list=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::TriaRef(int* types,int nummodels){{{1*/
++/*FUNCTION TriaRef::TriaRef(int* types,int nummodels){{{*/
+ 
+ TriaRef::TriaRef(const int nummodels){
+ 
+@@ -37,14 +37,14 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::~TriaRef(){{{1*/
++/*FUNCTION TriaRef::~TriaRef(){{{*/
+ TriaRef::~TriaRef(){
+ 	xfree((void**)&element_type_list);
+ }
+ /*}}}*/
+ 
+ /*Management*/
+-/*FUNCTION TriaRef::SetElementType{{{1*/
++/*FUNCTION TriaRef::SetElementType{{{*/
+ void TriaRef::SetElementType(int type,int type_counter){
+ 
+ 	_assert_(type==P1Enum || type==P1DGEnum);
+@@ -55,7 +55,7 @@
+ /*}}}*/
+ 
+ /*Reference Element numerics*/
+-/*FUNCTION TriaRef::GetBMacAyeal {{{1*/
++/*FUNCTION TriaRef::GetBMacAyeal {{{*/
+ void TriaRef::GetBMacAyeal(double* B, double* xyz_list, GaussTria* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+@@ -85,7 +85,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetBMacAyealStokes {{{1*/
++/*FUNCTION TriaRef::GetBMacAyealStokes {{{*/
+ void TriaRef::GetBMacAyealStokes(double* B, double* xyz_list, GaussTria* gauss){
+ 
+ 	/*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2. 
+@@ -116,7 +116,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetSegmentBFlux{{{1*/
++/*FUNCTION TriaRef::GetSegmentBFlux{{{*/
+ void TriaRef::GetSegmentBFlux(double* B,GaussTria* gauss, int index1,int index2){
+ 	/*Compute B  matrix. B=[phi1 phi2 -phi3 -phi4]
+ 	 *
+@@ -135,7 +135,7 @@
+ 	B[3] = -l1l3[index2];
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetSegmentBprimeFlux{{{1*/
++/*FUNCTION TriaRef::GetSegmentBprimeFlux{{{*/
+ void TriaRef::GetSegmentBprimeFlux(double* Bprime,GaussTria* gauss, int index1,int index2){
+ 	/*Compute Bprime  matrix. Bprime=[phi1 phi2 phi3 phi4]
+ 	 *
+@@ -154,7 +154,7 @@
+ 	Bprime[3] = l1l3[index2];
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetBPrognostic{{{1*/
++/*FUNCTION TriaRef::GetBPrognostic{{{*/
+ void TriaRef::GetBPrognostic(double* B_prog, double* xyz_list, GaussTria* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+@@ -178,7 +178,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetBprimeMacAyeal {{{1*/
++/*FUNCTION TriaRef::GetBprimeMacAyeal {{{*/
+ void TriaRef::GetBprimeMacAyeal(double* Bprime, double* xyz_list, GaussTria* gauss){
+ 
+ 	/*Compute B'  matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2. 
+@@ -209,7 +209,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetBprimeMacAyealStokes {{{1*/
++/*FUNCTION TriaRef::GetBprimeMacAyealStokes {{{*/
+ void TriaRef::GetBprimeMacAyealStokes(double* Bprime, double* xyz_list, GaussTria* gauss){
+ 
+ 	/*Compute Bprime  matrix. Bprime=[Bprime1 Bprime2 Bprime3] where Bprimei is of size 3*NDOF2. 
+@@ -243,7 +243,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetBprimePrognostic{{{1*/
++/*FUNCTION TriaRef::GetBprimePrognostic{{{*/
+ void TriaRef::GetBprimePrognostic(double* Bprime_prog, double* xyz_list, GaussTria* gauss){
+ 	/*Compute B'  matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2. 
+ 	 * For node i, Bi' can be expressed in the actual coordinate system
+@@ -268,7 +268,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetL{{{1*/
++/*FUNCTION TriaRef::GetL{{{*/
+ void TriaRef::GetL(double* L, double* xyz_list,GaussTria* gauss,int numdof){
+ 	/*Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof. 
+ 	 * For node i, Li can be expressed in the actual coordinate system
+@@ -305,7 +305,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetJacobian{{{1*/
++/*FUNCTION TriaRef::GetJacobian{{{*/
+ void TriaRef::GetJacobian(double* J, double* xyz_list,GaussTria* gauss){
+ 	/*The Jacobian is constant over the element, discard the gaussian points. 
+ 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
+@@ -325,7 +325,7 @@
+ 	*(J+NDOF2*1+1)=SQRT3/6.0*(2*y3-y1-y2);
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetSegmentJacobianDeterminant{{{1*/
++/*FUNCTION TriaRef::GetSegmentJacobianDeterminant{{{*/
+ void TriaRef::GetSegmentJacobianDeterminant(double* Jdet, double* xyz_list,GaussTria* gauss){
+ 	/*The Jacobian determinant is constant over the element, discard the gaussian points. 
+ 	 * J is assumed to have been allocated*/
+@@ -341,7 +341,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetJacobianDeterminant2d{{{1*/
++/*FUNCTION TriaRef::GetJacobianDeterminant2d{{{*/
+ void TriaRef::GetJacobianDeterminant2d(double* Jdet, double* xyz_list,GaussTria* gauss){
+ 	/*The Jacobian determinant is constant over the element, discard the gaussian points. 
+ 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
+@@ -356,7 +356,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetJacobianDeterminant3d {{{1*/
++/*FUNCTION TriaRef::GetJacobianDeterminant3d {{{*/
+ void TriaRef::GetJacobianDeterminant3d(double*  Jdet, double* xyz_list,GaussTria* gauss){
+ 	/*The Jacobian determinant is constant over the element, discard the gaussian points. 
+ 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
+@@ -378,7 +378,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetJacobianInvert{{{1*/
++/*FUNCTION TriaRef::GetJacobianInvert{{{*/
+ void TriaRef::GetJacobianInvert(double*  Jinv, double* xyz_list,GaussTria* gauss){
+ 
+ 	/*Jacobian*/
+@@ -392,7 +392,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetNodalFunctions{{{1*/
++/*FUNCTION TriaRef::GetNodalFunctions{{{*/
+ void TriaRef::GetNodalFunctions(double* basis,GaussTria* gauss){
+ 	/*This routine returns the values of the nodal functions  at the gaussian point.*/
+ 
+@@ -402,7 +402,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetSegmentNodalFunctions{{{1*/
++/*FUNCTION TriaRef::GetSegmentNodalFunctions{{{*/
+ void TriaRef::GetSegmentNodalFunctions(double* basis,GaussTria* gauss,int index1,int index2){
+ 	/*This routine returns the values of the nodal functions  at the gaussian point.*/
+ 
+@@ -416,7 +416,7 @@
+ 	basis[1]=BasisFunctions[index2];
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetNodalFunctionsDerivatives{{{1*/
++/*FUNCTION TriaRef::GetNodalFunctionsDerivatives{{{*/
+ void TriaRef::GetNodalFunctionsDerivatives(double* dbasis,double* xyz_list, GaussTria* gauss){
+ 
+ 	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+@@ -443,7 +443,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetNodalFunctionsDerivativesReference{{{1*/
++/*FUNCTION TriaRef::GetNodalFunctionsDerivativesReference{{{*/
+ void TriaRef::GetNodalFunctionsDerivativesReference(double* dl1dl3,GaussTria* gauss){
+ 	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+ 	 * natural coordinate system) at the gaussian point. */
+@@ -462,7 +462,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetInputDerivativeValue{{{1*/
++/*FUNCTION TriaRef::GetInputDerivativeValue{{{*/
+ void TriaRef::GetInputDerivativeValue(double* p, double* plist,double* xyz_list, GaussTria* gauss){
+ 
+ 	/*From node values of parameter p (plist[0],plist[1],plist[2]), return parameter derivative value at gaussian 
+@@ -485,7 +485,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaRef::GetInputValue{{{1*/
++/*FUNCTION TriaRef::GetInputValue{{{*/
+ void TriaRef::GetInputValue(double* p, double* plist, GaussTria* gauss){
+ 
+ 	/*From node values of parameter p (plist[0],plist[1],plist[2]), return parameter value at gaussian 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaHook.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaHook.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaHook.h	(revision 12365)
+@@ -18,7 +18,7 @@
+ 		Hook*  hmatpar; // 1 material parameter
+ 		Hook*  hneighbors; // 2 elements, first down, second up
+ 
+-		/*FUNCTION constructors, destructors {{{1*/
++		/*FUNCTION constructors, destructors {{{*/
+ 		PentaHook();
+ 		PentaHook(int in_numanalyses,int matice_id, IoModel* iomodel);
+ 		~PentaHook();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Patch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Patch.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Patch.cpp	(revision 12365)
+@@ -2,7 +2,7 @@
+  * \brief: implementation of the Patch object
+  */
+ 
+-/*Include files: {{{1*/
++/*Include files: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -21,7 +21,7 @@
+ /*}}}*/
+ 
+ /*Object constructors and destructors:*/
+-/*FUNCTION Patch::Patch() default constructor {{{1*/
++/*FUNCTION Patch::Patch() default constructor {{{*/
+ Patch::Patch(){
+ 	this->numrows=0;
+ 	this->numcols=0;
+@@ -30,7 +30,7 @@
+ 	this->values=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION Patch::Patch(int numrows, int maxvertices, int maxnodes){{{1*/
++/*FUNCTION Patch::Patch(int numrows, int maxvertices, int maxnodes){{{*/
+ Patch::Patch(int in_numrows, int in_maxvertices, int in_maxnodes){
+ 
+ 	int i,j;
+@@ -61,14 +61,14 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Patch::~Patch(){{{1*/
++/*FUNCTION Patch::~Patch(){{{*/
+ Patch::~Patch(){
+ 	xfree((void**)&values);
+ }
+ /*}}}*/
+ 
+ /*Object methods*/
+-/*FUNCTION Patch::fillelementinfo{{{1*/
++/*FUNCTION Patch::fillelementinfo{{{*/
+ void Patch::fillelementinfo(int count, int element_id, int* vertices_ids, int num_vertices){
+ 
+ 	int i;
+@@ -87,7 +87,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Patch::fillresultinfo{{{1*/
++/*FUNCTION Patch::fillresultinfo{{{*/
+ void Patch::fillresultinfo(int count,int enum_type,int step, double time, int interpolation, double* nodal_values, int num_nodes){
+ 
+ 	int i;
+@@ -109,7 +109,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Patch::Gather{{{1*/
++/*FUNCTION Patch::Gather{{{*/
+ void Patch::Gather(void){
+ 
+ 	int         i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12365)
+@@ -19,7 +19,7 @@
+ 
+ 
+ /*Constructor/Destructors*/
+-/*FUNCTION Hook::Hook(){{{1*/
++/*FUNCTION Hook::Hook(){{{*/
+ Hook::Hook(){
+ 	this->num=0;
+ 	this->objects=NULL;
+@@ -28,7 +28,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Hook::Hook(int* ids, int num){{{1*/
++/*FUNCTION Hook::Hook(int* ids, int num){{{*/
+ Hook::Hook(int* in_ids, int in_num){
+ 
+ 	/*Intermediaries*/
+@@ -59,7 +59,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Hook::~Hook(){{{1*/
++/*FUNCTION Hook::~Hook(){{{*/
+ Hook::~Hook(){
+ 	/*deallocate: */
+ 	xfree((void**)&this->objects);
+@@ -70,7 +70,7 @@
+ /*}}}*/
+ 
+ /*Some of the Object functionality: */
+-/*FUNCTION Hook::Echo{{{1*/
++/*FUNCTION Hook::Echo{{{*/
+ void Hook::Echo(void){
+ 
+ 	int i;
+@@ -89,7 +89,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Hook::DeepEcho{{{1*/
++/*FUNCTION Hook::DeepEcho{{{*/
+ void Hook::DeepEcho(void){
+ 
+ 	int i;
+@@ -117,7 +117,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Hook::copy {{{1*/
++/*FUNCTION Hook::copy {{{*/
+ Object* Hook::copy(void){
+ 
+ 	int i;
+@@ -147,7 +147,7 @@
+ /*}}}*/
+ 
+ /*Hook management: */
+-/*FUNCTION Hook::configure{{{1*/
++/*FUNCTION Hook::configure{{{*/
+ void Hook::configure(DataSet* dataset){
+ 
+ 	/*intermediary: */
+@@ -189,7 +189,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Hook::delivers{{{1*/
++/*FUNCTION Hook::delivers{{{*/
+ Object* Hook::delivers(void){
+ 	
+ 	/*first, check that we only have one T object in our object list: */
+@@ -202,32 +202,32 @@
+ }
+ 
+ /*}}}*/
+-/*FUNCTION Hook::deliverp{{{1*/
++/*FUNCTION Hook::deliverp{{{*/
+ Object** Hook::deliverp(void){
+ 	return objects;
+ }
+ /*}}}*/
+-/*FUNCTION Hook::Ids{{{1*/
++/*FUNCTION Hook::Ids{{{*/
+ int* Hook::Ids(void){
+ 	return this->ids;
+ }
+ /*}}}*/
+-/*FUNCTION Hook::GetNum{{{1*/
++/*FUNCTION Hook::GetNum{{{*/
+ int Hook::GetNum(void){
+ 	return this->num;
+ }
+ /*}}}*/
+-/*FUNCTION Hook::GetObjects{{{1*/
++/*FUNCTION Hook::GetObjects{{{*/
+ Object** Hook::GetObjects(void){
+ 	return this->objects;
+ }
+ /*}}}*/
+-/*FUNCTION Hook::GetOffsets{{{1*/
++/*FUNCTION Hook::GetOffsets{{{*/
+ int* Hook::GetOffsets(void){
+ 	return this->offsets;
+ }
+ /*}}}*/
+-/*FUNCTION Hook::Spawn{{{1*/
++/*FUNCTION Hook::Spawn{{{*/
+ Hook* Hook::Spawn(int* indices, int numindices){
+ 
+ 	int i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _DOUBLEINPUT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Input.h"
+ #include "../../include/include.h"
+ class GaussTria;
+@@ -19,12 +19,12 @@
+ 		int    enum_type;
+ 		double value;
+ 
+-		/*DoubleInput constructors, destructors: {{{1*/
++		/*DoubleInput constructors, destructors: {{{*/
+ 		DoubleInput();
+ 		DoubleInput(int enum_type,IssmDouble value);
+ 		~DoubleInput();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -32,7 +32,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*DoubleInput management: {{{1*/
++		/*DoubleInput management: {{{*/
+ 		int   InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+ 		Input* PointwiseDivide(Input* inputB);
+@@ -42,7 +42,7 @@
+ 		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue);
+ 		void GetInputValue(int* pvalue);
+ 		void GetInputValue(double* pvalue);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12365)
+@@ -17,7 +17,7 @@
+ #include "../../include/include.h"
+ 
+ /*ControlInput constructors and destructor*/
+-/*FUNCTION ControlInput::ControlInput(){{{1*/
++/*FUNCTION ControlInput::ControlInput(){{{*/
+ ControlInput::ControlInput(){
+ 	control_id  = 0;
+ 	values      = NULL;
+@@ -27,7 +27,7 @@
+ 	gradient    = NULL;
+ }
+ /*}}}*/
+-/*FUNCTION ControlInput::ControlInput(int enum_type,int enum_input,double* pvalues,double* pmin,double* pmax,int id){{{1*/
++/*FUNCTION ControlInput::ControlInput(int enum_type,int enum_input,double* pvalues,double* pmin,double* pmax,int id){{{*/
+ ControlInput::ControlInput(int in_enum_type,int enum_input,double* pvalues,double* pmin,double* pmax,int id){
+ 
+ 	control_id=id;
+@@ -52,7 +52,7 @@
+ 	gradient   =NULL;
+ }
+ /*}}}*/
+-/*FUNCTION ControlInput::~ControlInput(){{{1*/
++/*FUNCTION ControlInput::~ControlInput(){{{*/
+ ControlInput::~ControlInput(){
+ 	delete values;
+ 	delete savedvalues;
+@@ -63,12 +63,12 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-		/*FUNCTION ControlInput::Echo {{{1*/
++		/*FUNCTION ControlInput::Echo {{{*/
+ void ControlInput::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION ControlInput::DeepEcho{{{1*/
++/*FUNCTION ControlInput::DeepEcho{{{*/
+ void ControlInput::DeepEcho(void){
+ 
+ 	printf("ControlInput:\n");
+@@ -80,23 +80,23 @@
+ 	printf("---gradient: \n");   if (gradient)    gradient->Echo();
+ }
+ /*}}}*/
+-/*FUNCTION ControlInput::Id{{{1*/
++/*FUNCTION ControlInput::Id{{{*/
+ int    ControlInput::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION ControlInput::MyRank{{{1*/
++/*FUNCTION ControlInput::MyRank{{{*/
+ int    ControlInput::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION ControlInput::ObjectEnum{{{1*/
++/*FUNCTION ControlInput::ObjectEnum{{{*/
+ int ControlInput::ObjectEnum(void){
+ 
+ 	return ControlInputEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION ControlInput::copy{{{1*/
++/*FUNCTION ControlInput::copy{{{*/
+ Object* ControlInput::copy() {
+ 	
+ 	ControlInput* output=NULL;
+@@ -116,7 +116,7 @@
+ /*}}}*/
+ 	
+ /*ControlInput management*/
+-/*FUNCTION ControlInput::InstanceEnum{{{1*/
++/*FUNCTION ControlInput::InstanceEnum{{{*/
+ int ControlInput::InstanceEnum(void){
+ 
+ 	return this->enum_type;
+@@ -125,7 +125,7 @@
+ /*}}}*/
+ 
+ /*Object functions*/
+-/*FUNCTION ControlInput::Constrain(){{{1*/
++/*FUNCTION ControlInput::Constrain(){{{*/
+ void ControlInput::Constrain(void){
+ 
+ 	Input* newvalues=NULL;
+@@ -135,26 +135,26 @@
+ 	newvalues=this->values->PointwiseMax(minvalues);
+ 	delete values; this->values=newvalues;
+ }/*}}}*/
+-/*FUNCTION ControlInput::Constrain(double min, double max){{{1*/
++/*FUNCTION ControlInput::Constrain(double min, double max){{{*/
+ void ControlInput::Constrain(double min, double max){
+ 	   values->Constrain(min,max);
+ }/*}}}*/
+-/*FUNCTION ControlInput::Extrude{{{1*/
++/*FUNCTION ControlInput::Extrude{{{*/
+ void ControlInput::Extrude(void){
+ 	values->Extrude();
+ 	savedvalues->Extrude();
+ 	//gradient->Extrude();
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetGradient{{{1*/
++/*FUNCTION ControlInput::GetGradient{{{*/
+ void ControlInput::GetGradient(Vector* gradient_vec,int* doflist){
+ 	if(gradient) gradient->GetVectorFromInputs(gradient_vec,doflist);
+ }/*}}}*/
+-/*FUNCTION ControlInput::ScaleGradient{{{1*/
++/*FUNCTION ControlInput::ScaleGradient{{{*/
+ void ControlInput::ScaleGradient(double scaling_factor){
+ 	if(!gradient) _error_("Gradient of ControlInput %s not found",EnumToStringx(enum_type));
+ 	gradient->Scale(scaling_factor);
+ }/*}}}*/
+-/*FUNCTION ControlInput::SetGradient{{{1*/
++/*FUNCTION ControlInput::SetGradient{{{*/
+ void ControlInput::SetGradient(Input* gradient_in){
+ 
+ 	/*Get enum for current gradient*/
+@@ -177,31 +177,31 @@
+ 	gradient=gradient_in;
+ 
+ }/*}}}*/
+-/*FUNCTION ControlInput::SetInput{{{1*/
++/*FUNCTION ControlInput::SetInput{{{*/
+ void ControlInput::SetInput(Input* in_input){
+ 
+ 	delete values; this->values=in_input;
+ 	this->SaveValue(); //because this is what SpawnResult saves FIXME
+ 
+ }/*}}}*/
+-/*FUNCTION ControlInput::SpawnResult{{{1*/
++/*FUNCTION ControlInput::SpawnResult{{{*/
+ ElementResult* ControlInput::SpawnResult(int step, double time){
+ 	return savedvalues->SpawnResult(step,time);
+ }/*}}}*/
+-/*FUNCTION ControlInput::SpawnTriaInput{{{1*/
++/*FUNCTION ControlInput::SpawnTriaInput{{{*/
+ Input* ControlInput::SpawnTriaInput(int* indices){
+ 	return values->SpawnTriaInput(indices);
+ }/*}}}*/
+-/*FUNCTION ControlInput::SpawnGradient{{{1*/
++/*FUNCTION ControlInput::SpawnGradient{{{*/
+ ElementResult* ControlInput::SpawnGradient(int step, double time){
+ 	_assert_(gradient);
+ 	return gradient->SpawnResult(step,time);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetVectorFromInputs(Vector* vector,int* doflist){{{1*/
++/*FUNCTION ControlInput::GetVectorFromInputs(Vector* vector,int* doflist){{{*/
+ void ControlInput::GetVectorFromInputs(Vector* vector,int* doflist){
+ 	values->GetVectorFromInputs(vector,doflist);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetVectorFromInputs(Vector* vector,int* doflist,const char* data){{{1*/
++/*FUNCTION ControlInput::GetVectorFromInputs(Vector* vector,int* doflist,const char* data){{{*/
+ void ControlInput::GetVectorFromInputs(Vector* vector,int* doflist,const char* data){
+ 	 if(strcmp(data,"value")==0){
+ 		 _assert_(values);
+@@ -223,46 +223,46 @@
+ 		 _error_("Data %s not supported yet",data);
+ 	 }
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputAverage(double* pvalue){{{1*/
++/*FUNCTION ControlInput::GetInputAverage(double* pvalue){{{*/
+ void ControlInput::GetInputAverage(double* pvalue){
+ 	values->GetInputAverage(pvalue);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputValue(bool* pvalue){{{1*/
++/*FUNCTION ControlInput::GetInputValue(bool* pvalue){{{*/
+ void ControlInput::GetInputValue(bool* pvalue){
+ 	values->GetInputValue(pvalue);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputValue(int* pvalue){{{1*/
++/*FUNCTION ControlInput::GetInputValue(int* pvalue){{{*/
+ void ControlInput::GetInputValue(int* pvalue){
+ 	values->GetInputValue(pvalue);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputValue(double* pvalue){{{1*/
++/*FUNCTION ControlInput::GetInputValue(double* pvalue){{{*/
+ void ControlInput::GetInputValue(double* pvalue){
+ 	values->GetInputValue(pvalue);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputValue(double* pvalue){{{1*/
++/*FUNCTION ControlInput::GetInputValue(double* pvalue){{{*/
+ void ControlInput::GetInputValue(double* pvalue,GaussTria* gauss){
+ 	values->GetInputValue(pvalue,gauss);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputValue(double* pvalue){{{1*/
++/*FUNCTION ControlInput::GetInputValue(double* pvalue){{{*/
+ void ControlInput::GetInputValue(double* pvalue,GaussPenta* gauss){
+ 	values->GetInputValue(pvalue,gauss);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{1*/
++/*FUNCTION ControlInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{*/
+ void ControlInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){
+ 	values->GetInputDerivativeValue(derivativevalues,xyz_list,gauss);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{1*/
++/*FUNCTION ControlInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{*/
+ void ControlInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){
+ 	values->GetInputDerivativeValue(derivativevalues,xyz_list,gauss);
+ }/*}}}*/
+-/*FUNCTION ControlInput::SaveValue{{{1*/
++/*FUNCTION ControlInput::SaveValue{{{*/
+ void ControlInput::SaveValue(void){
+ 	if(!values) _error_("Values of %s not found",EnumToStringx(this->enum_type));
+ 
+ 	if(savedvalues) delete this->savedvalues;
+ 	this->savedvalues=(Input*)this->values->copy();
+ }/*}}}*/
+-/*FUNCTION ControlInput::UpdateValue{{{1*/
++/*FUNCTION ControlInput::UpdateValue{{{*/
+ void ControlInput::UpdateValue(double scalar){
+ 	if(!gradient)    _error_("Gradient of %s not found",EnumToStringx(this->enum_type));
+ 	if(!savedvalues) _error_("Values of %s not found",EnumToStringx(this->enum_type));
+@@ -271,11 +271,11 @@
+ 	this->values=(Input*)this->savedvalues->copy();
+ 	this->values->AXPY(gradient,scalar);
+ }/*}}}*/
+-/*FUNCTION ControlInput::VerticallyIntegrate{{{1*/
++/*FUNCTION ControlInput::VerticallyIntegrate{{{*/
+ void ControlInput::VerticallyIntegrate(Input* thickness_input){
+ 	values->VerticallyIntegrate(thickness_input);
+ }/*}}}*/
+-/*FUNCTION ControlInput::Configure{{{1*/
++/*FUNCTION ControlInput::Configure{{{*/
+ void ControlInput::Configure(Parameters* parameters){
+ 	/*do nothing: */
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/Input.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/Input.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _INPUT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../Object.h"
+ class Node;
+ class ElementResult;
+@@ -20,7 +20,7 @@
+ 	public: 
+ 		
+ 		virtual        ~Input(){};
+-		/*Virtual functions:{{{1*/
++		/*Virtual functions:{{{*/
+ 		virtual int  InstanceEnum()=0; 
+ 		virtual void GetInputValue(bool* pvalue)=0;
+ 		virtual void GetInputValue(int* pvalue)=0;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _CONTROLINPUT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Input.h"
+ #include "../../include/include.h"
+ class GaussTria;
+@@ -24,12 +24,12 @@
+ 		Input* maxvalues;
+ 		Input* gradient;
+ 
+-		/*ControlInput constructors, destructors: {{{1*/
++		/*ControlInput constructors, destructors: {{{*/
+ 		ControlInput();
+ 		ControlInput(int enum_type,int enum_input,double* pvalues,double* pmin,double* pmax,int id);
+ 		~ControlInput();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -37,7 +37,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*ControlInput management: {{{1*/
++		/*ControlInput management: {{{*/
+ 		int    InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+ 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+@@ -47,7 +47,7 @@
+ 		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		void SetInput(Input* in_input);
+ 		void GetInputValue(bool* pvalue);
+ 		void GetInputValue(int* pvalue);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp	(revision 12365)
+@@ -1,7 +1,7 @@
+ /*!\file DatasetInput.c
+  * \brief: implementation of the datasetinput object
+  */
+-/*Headers{{{1*/
++/*Headers{{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -18,32 +18,32 @@
+ /*}}}*/
+ 
+ /*DatasetInput constructors and destructor*/
+-/*FUNCTION DatasetInput::DatasetInput(){{{1*/
++/*FUNCTION DatasetInput::DatasetInput(){{{*/
+ DatasetInput::DatasetInput(){
+ 	enum_type=UNDEF;
+ 	inputs=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION DatasetInput::DatasetInput(int in_enum_type) {{{1*/
++/*FUNCTION DatasetInput::DatasetInput(int in_enum_type) {{{*/
+ DatasetInput::DatasetInput(int in_enum_type){
+ 
+ 	enum_type  = in_enum_type;
+ 	inputs     = new Inputs();
+ }
+ /*}}}*/
+-/*FUNCTION DatasetInput::~DatasetInput(){{{1*/
++/*FUNCTION DatasetInput::~DatasetInput(){{{*/
+ DatasetInput::~DatasetInput(){
+ 	delete inputs;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-		/*FUNCTION DatasetInput::Echo {{{1*/
++		/*FUNCTION DatasetInput::Echo {{{*/
+ void DatasetInput::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION DatasetInput::DeepEcho{{{1*/
++/*FUNCTION DatasetInput::DeepEcho{{{*/
+ void DatasetInput::DeepEcho(void){
+ 
+ 	printf("DatasetInput:\n");
+@@ -51,23 +51,23 @@
+ 	printf("---inputs: \n"); inputs->Echo();
+ }
+ /*}}}*/
+-/*FUNCTION DatasetInput::Id{{{1*/
++/*FUNCTION DatasetInput::Id{{{*/
+ int    DatasetInput::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION DatasetInput::MyRank{{{1*/
++/*FUNCTION DatasetInput::MyRank{{{*/
+ int    DatasetInput::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION DatasetInput::ObjectEnum{{{1*/
++/*FUNCTION DatasetInput::ObjectEnum{{{*/
+ int DatasetInput::ObjectEnum(void){
+ 
+ 	return DatasetInputEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DatasetInput::copy{{{1*/
++/*FUNCTION DatasetInput::copy{{{*/
+ Object* DatasetInput::copy() {
+ 	
+ 	DatasetInput* output=NULL;
+@@ -79,7 +79,7 @@
+ 	return output;
+ }
+ /*}}}*/
+-/*FUNCTION DatasetInput::SpawnTriaInput{{{1*/
++/*FUNCTION DatasetInput::SpawnTriaInput{{{*/
+ Input* DatasetInput::SpawnTriaInput(int* indices){
+ 
+ 	/*output*/
+@@ -96,7 +96,7 @@
+ /*}}}*/
+ 	
+ /*DatasetInput management*/
+-/*FUNCTION DatasetInput::InstanceEnum{{{1*/
++/*FUNCTION DatasetInput::InstanceEnum{{{*/
+ int DatasetInput::InstanceEnum(void){
+ 
+ 	return this->enum_type;
+@@ -105,12 +105,12 @@
+ /*}}}*/
+ 
+ /*Object functions*/
+-/*FUNCTION DatasetInput::Configure{{{1*/
++/*FUNCTION DatasetInput::Configure{{{*/
+ void DatasetInput::Configure(Parameters* parameters){
+ 	/*do nothing: */
+ }
+ /*}}}*/
+-/*FUNCTION DatasetInput::GetInputValue(double* pvalue,GaussTria* gauss,int index){{{1*/
++/*FUNCTION DatasetInput::GetInputValue(double* pvalue,GaussTria* gauss,int index){{{*/
+ void DatasetInput::GetInputValue(double* pvalue,GaussTria* gauss,int index){
+ 
+ 	/*Get requested input within dataset*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _DATASETINPUT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Input.h"
+ #include "../../include/include.h"
+ class GaussTria;
+@@ -20,12 +20,12 @@
+ 
+ 		Inputs*     inputs;
+ 
+-		/*DatasetInput constructors, destructors: {{{1*/
++		/*DatasetInput constructors, destructors: {{{*/
+ 		DatasetInput();
+ 		DatasetInput(int enum_type);
+ 		~DatasetInput();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id();
+@@ -33,7 +33,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*DatasetInput management: {{{1*/
++		/*DatasetInput management: {{{*/
+ 		int    InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+ 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+@@ -43,7 +43,7 @@
+ 		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+-		/*numeriics: {{{1*/
++		/*numeriics: {{{*/
+ 		void GetInputValue(bool* pvalue){_error_("not implemented yet");};
+ 		void GetInputValue(int* pvalue){_error_("not implemented yet");};
+ 		void GetInputValue(double* pvalue){_error_("not implemented yet");};
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12365)
+@@ -17,26 +17,26 @@
+ #include "../../include/include.h"
+ 
+ /*IntInput constructors and destructor*/
+-/*FUNCTION IntInput::IntInput(){{{1*/
++/*FUNCTION IntInput::IntInput(){{{*/
+ IntInput::IntInput(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::IntInput(double* values){{{1*/
++/*FUNCTION IntInput::IntInput(double* values){{{*/
+ IntInput::IntInput(int in_enum_type,IssmInt in_value){
+ 
+ 	enum_type=in_enum_type;
+ 	value=in_value;
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::~IntInput(){{{1*/
++/*FUNCTION IntInput::~IntInput(){{{*/
+ IntInput::~IntInput(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION IntInput::DeepEcho{{{1*/
++/*FUNCTION IntInput::DeepEcho{{{*/
+ void IntInput::DeepEcho(void){
+ 
+ 	printf("IntInput:\n");
+@@ -44,23 +44,23 @@
+ 	printf("   value: %i\n",(int)this->value);
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::Id{{{1*/
++/*FUNCTION IntInput::Id{{{*/
+ int    IntInput::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION IntInput::MyRank{{{1*/
++/*FUNCTION IntInput::MyRank{{{*/
+ int    IntInput::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::ObjectEnum{{{1*/
++/*FUNCTION IntInput::ObjectEnum{{{*/
+ int IntInput::ObjectEnum(void){
+ 
+ 	return IntInputEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::copy{{{1*/
++/*FUNCTION IntInput::copy{{{*/
+ Object* IntInput::copy() {
+ 	
+ 	return new IntInput(this->enum_type,this->value);
+@@ -69,19 +69,19 @@
+ /*}}}*/
+ 
+ /*IntInput management*/
+-/*FUNCTION IntInput::Echo {{{1*/
++/*FUNCTION IntInput::Echo {{{*/
+ void IntInput::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::InstanceEnum{{{1*/
++/*FUNCTION IntInput::InstanceEnum{{{*/
+ int IntInput::InstanceEnum(void){
+ 
+ 	return this->enum_type;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::SpawnTriaInput{{{1*/
++/*FUNCTION IntInput::SpawnTriaInput{{{*/
+ Input* IntInput::SpawnTriaInput(int* indices){
+ 
+ 	/*output*/
+@@ -95,7 +95,7 @@
+ 	return outinput;
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::SpawnResult{{{1*/
++/*FUNCTION IntInput::SpawnResult{{{*/
+ ElementResult* IntInput::SpawnResult(int step, double time){
+ 	
+ 	_error_(" not supported yet!");
+@@ -104,50 +104,50 @@
+ /*}}}*/
+ 
+ /*Object functions*/
+-/*FUNCTION IntInput::GetInputValue(bool* pvalue) {{{1*/
++/*FUNCTION IntInput::GetInputValue(bool* pvalue) {{{*/
+ void IntInput::GetInputValue(bool* pvalue){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputValue(int* pvalue){{{1*/
++/*FUNCTION IntInput::GetInputValue(int* pvalue){{{*/
+ void IntInput::GetInputValue(int* pvalue){
+ 	*pvalue=value;
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputValue(double* pvalue){{{1*/
++/*FUNCTION IntInput::GetInputValue(double* pvalue){{{*/
+ void IntInput::GetInputValue(double* pvalue){
+ 	_error_("IntInput cannot return a double in parallel");
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputValue(double* pvalue,GaussTria* gauss){{{1*/
++/*FUNCTION IntInput::GetInputValue(double* pvalue,GaussTria* gauss){{{*/
+ void IntInput::GetInputValue(double* pvalue,GaussTria* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputValue(double* pvalue,GaussPenta* gauss){{{1*/
++/*FUNCTION IntInput::GetInputValue(double* pvalue,GaussPenta* gauss){{{*/
+ void IntInput::GetInputValue(double* pvalue,GaussPenta* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{1*/
++/*FUNCTION IntInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{*/
+ void IntInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{1*/
++/*FUNCTION IntInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{*/
+ void IntInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION IntInput::ChangeEnum{{{1*/
++/*FUNCTION IntInput::ChangeEnum{{{*/
+ void IntInput::ChangeEnum(int newenumtype){
+ 	this->enum_type=newenumtype;
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::SquareMin{{{1*/
++/*FUNCTION IntInput::SquareMin{{{*/
+ void IntInput::SquareMin(double* psquaremin, bool process_units,Parameters* parameters){
+ 
+ 	/*square min of an integer is the square of the integer itself: */
+ 	*psquaremin=pow((double)value,2);
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::Scale{{{1*/
++/*FUNCTION IntInput::Scale{{{*/
+ void IntInput::Scale(double scale_factor){
+ 	double dvalue=(double)value*scale_factor;
+ 	value=(int)dvalue;
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::AXPY{{{1*/
++/*FUNCTION IntInput::AXPY{{{*/
+ void IntInput::AXPY(Input* xinput,double scalar){
+ 
+ 	double dvalue;
+@@ -170,7 +170,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::Constrain{{{1*/
++/*FUNCTION IntInput::Constrain{{{*/
+ void IntInput::Constrain(double cm_min, double cm_max){
+ 
+ 	if(!isnan(cm_min)) if (this->value<cm_min)this->value=(int)cm_min;
+@@ -178,21 +178,21 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::GetVectorFromInputs{{{1*/
++/*FUNCTION IntInput::GetVectorFromInputs{{{*/
+ void IntInput::GetVectorFromInputs(Vector* vector,int* doflist){
+ 
+ 	_error_(" not supporte yet!");
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::GetValuesPtr{{{1*/
++/*FUNCTION IntInput::GetValuesPtr{{{*/
+ void IntInput::GetValuesPtr(double** pvalues,int* pnum_values){
+ 
+ 	_error_(" not supported yet!");
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::Configure{{{1*/
++/*FUNCTION IntInput::Configure{{{*/
+ void IntInput::Configure(Parameters* parameters){
+ 	/*do nothing: */
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12365)
+@@ -17,31 +17,31 @@
+ #include "../../include/include.h"
+ 
+ /*BoolInput constructors and destructor*/
+-/*FUNCTION BoolInput::BoolInput(){{{1*/
++/*FUNCTION BoolInput::BoolInput(){{{*/
+ BoolInput::BoolInput(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::BoolInput(double* values){{{1*/
++/*FUNCTION BoolInput::BoolInput(double* values){{{*/
+ BoolInput::BoolInput(int in_enum_type,IssmBool in_value){
+ 
+ 	enum_type=in_enum_type;
+ 	value=in_value;
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::~BoolInput(){{{1*/
++/*FUNCTION BoolInput::~BoolInput(){{{*/
+ BoolInput::~BoolInput(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION BoolInput::Echo {{{1*/
++/*FUNCTION BoolInput::Echo {{{*/
+ void BoolInput::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::DeepEcho{{{1*/
++/*FUNCTION BoolInput::DeepEcho{{{*/
+ void BoolInput::DeepEcho(void){
+ 
+ 	printf("BoolInput:\n");
+@@ -49,23 +49,23 @@
+ 	printf("   value: %s\n",value?"true":"false");
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::Id{{{1*/
++/*FUNCTION BoolInput::Id{{{*/
+ int    BoolInput::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION BoolInput::MyRank{{{1*/
++/*FUNCTION BoolInput::MyRank{{{*/
+ int    BoolInput::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::ObjectEnum{{{1*/
++/*FUNCTION BoolInput::ObjectEnum{{{*/
+ int BoolInput::ObjectEnum(void){
+ 
+ 	return BoolInputEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::copy{{{1*/
++/*FUNCTION BoolInput::copy{{{*/
+ Object* BoolInput::copy() {
+ 	
+ 	return new BoolInput(this->enum_type,this->value);
+@@ -74,14 +74,14 @@
+ /*}}}*/
+ 	
+ /*BoolInput management*/
+-/*FUNCTION BoolInput::InstanceEnum{{{1*/
++/*FUNCTION BoolInput::InstanceEnum{{{*/
+ int BoolInput::InstanceEnum(void){
+ 
+ 	return this->enum_type;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::SpawnTriaInput{{{1*/
++/*FUNCTION BoolInput::SpawnTriaInput{{{*/
+ Input* BoolInput::SpawnTriaInput(int* indices){
+ 
+ 		/*output*/
+@@ -96,7 +96,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::SpawnResult{{{1*/
++/*FUNCTION BoolInput::SpawnResult{{{*/
+ ElementResult* BoolInput::SpawnResult(int step, double time){
+ 	
+ 	return new BoolElementResult(this->enum_type,this->value,step,time);
+@@ -105,46 +105,46 @@
+ /*}}}*/
+ 
+ /*Object functions*/
+-/*FUNCTION BoolInput::GetInputValue(bool* pvalue) {{{1*/
++/*FUNCTION BoolInput::GetInputValue(bool* pvalue) {{{*/
+ void BoolInput::GetInputValue(bool* pvalue){
+ 	*pvalue=value;
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputValue(int* pvalue){{{1*/
++/*FUNCTION BoolInput::GetInputValue(int* pvalue){{{*/
+ void BoolInput::GetInputValue(int* pvalue){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputValue(double* pvalue){{{1*/
++/*FUNCTION BoolInput::GetInputValue(double* pvalue){{{*/
+ void BoolInput::GetInputValue(double* pvalue){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputValue(double* pvalue,GaussTria* gauss){{{1*/
++/*FUNCTION BoolInput::GetInputValue(double* pvalue,GaussTria* gauss){{{*/
+ void BoolInput::GetInputValue(double* pvalue,GaussTria* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputValue(double* pvalue,GaussPenta* gauss){{{1*/
++/*FUNCTION BoolInput::GetInputValue(double* pvalue,GaussPenta* gauss){{{*/
+ void BoolInput::GetInputValue(double* pvalue,GaussPenta* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{1*/
++/*FUNCTION BoolInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{*/
+ void BoolInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{1*/
++/*FUNCTION BoolInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{*/
+ void BoolInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::ChangeEnum{{{1*/
++/*FUNCTION BoolInput::ChangeEnum{{{*/
+ void BoolInput::ChangeEnum(int newenumtype){
+ 	this->enum_type=newenumtype;
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::SquareMin{{{1*/
++/*FUNCTION BoolInput::SquareMin{{{*/
+ void BoolInput::SquareMin(double* psquaremin, bool process_units,Parameters* parameters){
+ 	/*square of a bool is the bool itself: */
+ 	*psquaremin=value;
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::Scale{{{1*/
++/*FUNCTION BoolInput::Scale{{{*/
+ void BoolInput::Scale(double scale_factor){
+ 	/*a bool cannot be scaled: */
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::AXPY{{{1*/
++/*FUNCTION BoolInput::AXPY{{{*/
+ void BoolInput::AXPY(Input* xinput,double scalar){
+ 
+ 	BoolInput*  xboolinput=NULL;
+@@ -165,7 +165,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::Constrain{{{1*/
++/*FUNCTION BoolInput::Constrain{{{*/
+ void BoolInput::Constrain(double cm_min, double cm_max){
+ 
+ 	if(!isnan(cm_min)) if (this->value<cm_min)this->value=cm_min;
+@@ -173,28 +173,28 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::Extrude{{{1*/
++/*FUNCTION BoolInput::Extrude{{{*/
+ void BoolInput::Extrude(void){
+ 
+ 	/*do nothing*/
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::GetVectorFromInputs{{{1*/
++/*FUNCTION BoolInput::GetVectorFromInputs{{{*/
+ void BoolInput::GetVectorFromInputs(Vector* vector,int* doflist){
+ 
+ 	_error_(" not supporte yet!");
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::GetValuesPtr{{{1*/
++/*FUNCTION BoolInput::GetValuesPtr{{{*/
+ void BoolInput::GetValuesPtr(double** pvalues,int* pnum_values){
+ 
+ 	_error_(" not supported yet!");
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::Configure{{{1*/
++/*FUNCTION BoolInput::Configure{{{*/
+ void BoolInput::Configure(Parameters* parameters){
+ 	/*do nothing: */
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _INTINPUT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Input.h"
+ #include "../../include/include.h"
+ class GaussTria;
+@@ -20,12 +20,12 @@
+ 		int    enum_type;
+ 		IssmInt value;
+ 
+-		/*IntInput constructors, destructors: {{{1*/
++		/*IntInput constructors, destructors: {{{*/
+ 		IntInput();
+ 		IntInput(int enum_type,IssmInt value);
+ 		~IntInput();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -33,7 +33,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*IntInput management: {{{1*/
++		/*IntInput management: {{{*/
+ 		int   InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+ 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+@@ -43,7 +43,7 @@
+ 		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue);
+ 		void GetInputValue(int* pvalue);
+ 		void GetInputValue(double* pvalue);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _BOOLINPUT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Input.h"
+ #include "../../include/include.h"
+ class GaussTria;
+@@ -20,12 +20,12 @@
+ 		int    enum_type;
+ 		IssmBool value;
+ 
+-		/*BoolInput constructors, destructors: {{{1*/
++		/*BoolInput constructors, destructors: {{{*/
+ 		BoolInput();
+ 		BoolInput(int enum_type,IssmBool value);
+ 		~BoolInput();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -33,7 +33,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*BoolInput management: {{{1*/
++		/*BoolInput management: {{{*/
+ 		int   InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+ 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+@@ -43,7 +43,7 @@
+ 		void Configure(Parameters* parameters);
+ 		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue);
+ 		void GetInputValue(int* pvalue);
+ 		void GetInputValue(double* pvalue);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12365)
+@@ -17,12 +17,12 @@
+ #include "../../include/include.h"
+ 
+ /*TriaP1Input constructors and destructor*/
+-/*FUNCTION TriaP1Input::TriaP1Input(){{{1*/
++/*FUNCTION TriaP1Input::TriaP1Input(){{{*/
+ TriaP1Input::TriaP1Input(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::TriaP1Input(int in_enum_type,double* values){{{1*/
++/*FUNCTION TriaP1Input::TriaP1Input(int in_enum_type,double* values){{{*/
+ TriaP1Input::TriaP1Input(int in_enum_type,double* in_values)
+ 	:TriaRef(1)
+ {
+@@ -40,19 +40,19 @@
+ 	values[2]=in_values[2];
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::~TriaP1Input(){{{1*/
++/*FUNCTION TriaP1Input::~TriaP1Input(){{{*/
+ TriaP1Input::~TriaP1Input(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION TriaP1Input::Echo {{{1*/
++/*FUNCTION TriaP1Input::Echo {{{*/
+ void TriaP1Input::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::DeepEcho{{{1*/
++/*FUNCTION TriaP1Input::DeepEcho{{{*/
+ void TriaP1Input::DeepEcho(void){
+ 
+ 	printf("TriaP1Input:\n");
+@@ -60,23 +60,23 @@
+ 	printf("   values: [%g %g %g]\n",this->values[0],this->values[1],this->values[2]);
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::Id{{{1*/
++/*FUNCTION TriaP1Input::Id{{{*/
+ int    TriaP1Input::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::MyRank{{{1*/
++/*FUNCTION TriaP1Input::MyRank{{{*/
+ int    TriaP1Input::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::ObjectEnum{{{1*/
++/*FUNCTION TriaP1Input::ObjectEnum{{{*/
+ int TriaP1Input::ObjectEnum(void){
+ 
+ 	return TriaP1InputEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::copy{{{1*/
++/*FUNCTION TriaP1Input::copy{{{*/
+ Object* TriaP1Input::copy() {
+ 	
+ 	return new TriaP1Input(this->enum_type,this->values);
+@@ -85,14 +85,14 @@
+ /*}}}*/
+ 	
+ /*TriaP1Input management*/
+-/*FUNCTION TriaP1Input::InstanceEnum{{{1*/
++/*FUNCTION TriaP1Input::InstanceEnum{{{*/
+ int TriaP1Input::InstanceEnum(void){
+ 
+ 	return this->enum_type;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::SpawnTriaInput{{{1*/
++/*FUNCTION TriaP1Input::SpawnTriaInput{{{*/
+ Input* TriaP1Input::SpawnTriaInput(int* indices){
+ 
+ 	/*output*/
+@@ -106,7 +106,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::SpawnResult{{{1*/
++/*FUNCTION TriaP1Input::SpawnResult{{{*/
+ ElementResult* TriaP1Input::SpawnResult(int step, double time){
+ 
+ 	return new TriaP1ElementResult(this->enum_type,this->values,step,time);
+@@ -115,7 +115,7 @@
+ /*}}}*/
+ 
+ /*Object functions*/
+-/*FUNCTION TriaP1Input::GetInputValue(double* pvalue,GaussTria* gauss){{{1*/
++/*FUNCTION TriaP1Input::GetInputValue(double* pvalue,GaussTria* gauss){{{*/
+ void TriaP1Input::GetInputValue(double* pvalue,GaussTria* gauss){
+ 
+ 	/*Call TriaRef function*/
+@@ -123,14 +123,14 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::GetInputDerivativeValue(double* p, double* xyz_list, GaussTria* gauss){{{1*/
++/*FUNCTION TriaP1Input::GetInputDerivativeValue(double* p, double* xyz_list, GaussTria* gauss){{{*/
+ void TriaP1Input::GetInputDerivativeValue(double* p, double* xyz_list, GaussTria* gauss){
+ 
+ 	/*Call TriaRef function*/
+ 	TriaRef::GetInputDerivativeValue(p,&values[0],xyz_list,gauss);
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::GetVxStrainRate2d{{{1*/
++/*FUNCTION TriaP1Input::GetVxStrainRate2d{{{*/
+ void TriaP1Input::GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){
+ 
+ 	/*Intermediary*/
+@@ -153,7 +153,7 @@
+ 				epsilonvx,0);
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::GetVyStrainRate2d{{{1*/
++/*FUNCTION TriaP1Input::GetVyStrainRate2d{{{*/
+ void TriaP1Input::GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){
+ 
+ 	/*Intermediary*/
+@@ -176,19 +176,19 @@
+ 				epsilonvy,0);
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::ChangeEnum{{{1*/
++/*FUNCTION TriaP1Input::ChangeEnum{{{*/
+ void TriaP1Input::ChangeEnum(int newenumtype){
+ 	this->enum_type=newenumtype;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::GetInputAverage{{{1*/
++/*FUNCTION TriaP1Input::GetInputAverage{{{*/
+ void TriaP1Input::GetInputAverage(double* pvalue){
+ 	*pvalue=1./3.*(values[0]+values[1]+values[2]);
+ }
+ /*}}}*/
+ 
+ /*Intermediary*/
+-/*FUNCTION TriaP1Input::SquareMin{{{1*/
++/*FUNCTION TriaP1Input::SquareMin{{{*/
+ void TriaP1Input::SquareMin(double* psquaremin, bool process_units,Parameters* parameters){
+ 
+ 	int i;
+@@ -211,7 +211,7 @@
+ 	*psquaremin=squaremin;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::ContrainMin{{{1*/
++/*FUNCTION TriaP1Input::ContrainMin{{{*/
+ void TriaP1Input::ConstrainMin(double minimum){
+ 	
+ 	int i;
+@@ -220,7 +220,7 @@
+ 	for(i=0;i<numnodes;i++) if (values[i]<minimum) values[i]=minimum;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::InfinityNorm{{{1*/
++/*FUNCTION TriaP1Input::InfinityNorm{{{*/
+ double TriaP1Input::InfinityNorm(void){
+ 
+ 	/*Output*/
+@@ -231,7 +231,7 @@
+ 	return norm;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::Max{{{1*/
++/*FUNCTION TriaP1Input::Max{{{*/
+ double TriaP1Input::Max(void){
+ 
+ 	const int numnodes=3;
+@@ -243,7 +243,7 @@
+ 	return max;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::MaxAbs{{{1*/
++/*FUNCTION TriaP1Input::MaxAbs{{{*/
+ double TriaP1Input::MaxAbs(void){
+ 
+ 	const int numnodes=3;
+@@ -255,7 +255,7 @@
+ 	return max;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::Min{{{1*/
++/*FUNCTION TriaP1Input::Min{{{*/
+ double TriaP1Input::Min(void){
+ 
+ 	const int numnodes=3;
+@@ -267,7 +267,7 @@
+ 	return min;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::MinAbs{{{1*/
++/*FUNCTION TriaP1Input::MinAbs{{{*/
+ double TriaP1Input::MinAbs(void){
+ 
+ 	const int numnodes=3;
+@@ -279,7 +279,7 @@
+ 	return min;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::Scale{{{1*/
++/*FUNCTION TriaP1Input::Scale{{{*/
+ void TriaP1Input::Scale(double scale_factor){
+ 	
+ 	int i;
+@@ -288,7 +288,7 @@
+ 	for(i=0;i<numnodes;i++)values[i]=values[i]*scale_factor;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::ArtificialNoise{{{1*/
++/*FUNCTION TriaP1Input::ArtificialNoise{{{*/
+ void TriaP1Input::ArtificialNoise(double min,double max){
+ 
+ 	int i;
+@@ -304,7 +304,7 @@
+ 	for(i=0;i<numnodes;i++)values[i]=values[i]+noise;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::AXPY{{{1*/
++/*FUNCTION TriaP1Input::AXPY{{{*/
+ void TriaP1Input::AXPY(Input* xinput,double scalar){
+ 
+ 	int i;
+@@ -327,7 +327,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::Constrain{{{1*/
++/*FUNCTION TriaP1Input::Constrain{{{*/
+ void TriaP1Input::Constrain(double cm_min, double cm_max){
+ 
+ 	int i;
+@@ -338,14 +338,14 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::GetVectorFromInputs{{{1*/
++/*FUNCTION TriaP1Input::GetVectorFromInputs{{{*/
+ void TriaP1Input::GetVectorFromInputs(Vector* vector,int* doflist){
+ 
+ 	const int numvertices=3;
+ 	vector->SetValues(numvertices,doflist,this->values,INS_VAL);
+ 
+ } /*}}}*/
+-/*FUNCTION TriaP1Input::GetValuesPtr{{{1*/
++/*FUNCTION TriaP1Input::GetValuesPtr{{{*/
+ void TriaP1Input::GetValuesPtr(double** pvalues,int* pnum_values){
+ 
+ 	*pvalues=this->values;
+@@ -353,7 +353,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::PointwiseMin{{{1*/
++/*FUNCTION TriaP1Input::PointwiseMin{{{*/
+ Input* TriaP1Input::PointwiseMin(Input* inputB){
+ 
+ 	/*Ouput*/
+@@ -384,7 +384,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::PointwiseMax{{{1*/
++/*FUNCTION TriaP1Input::PointwiseMax{{{*/
+ Input* TriaP1Input::PointwiseMax(Input* inputB){
+ 
+ 	/*Ouput*/
+@@ -415,7 +415,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::Configure{{{1*/
++/*FUNCTION TriaP1Input::Configure{{{*/
+ void TriaP1Input::Configure(Parameters* parameters){
+ 	/*do nothing: */
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _TRIAP1INPUT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Input.h"
+ #include "../Elements/TriaRef.h"
+ class GaussTria;
+@@ -20,12 +20,12 @@
+ 		int    enum_type;
+ 		double values[3];
+ 
+-		/*TriaP1Input constructors, destructors: {{{1*/
++		/*TriaP1Input constructors, destructors: {{{*/
+ 		TriaP1Input();
+ 		TriaP1Input(int enum_type,double* values);
+ 		~TriaP1Input();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -33,7 +33,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*TriaP1Input management: {{{1*/
++		/*TriaP1Input management: {{{*/
+ 		int   InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+ 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+@@ -43,7 +43,7 @@
+ 		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue){_error_("not implemented yet");}
+ 		void GetInputValue(int* pvalue){_error_("not implemented yet");}
+ 		void GetInputValue(double* pvalue){_error_("not implemented yet");}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12365)
+@@ -17,12 +17,12 @@
+ #include "../../include/include.h"
+ 
+ /*PentaP1Input constructors and destructor*/
+-/*FUNCTION PentaP1Input::PentaP1Input(){{{1*/
++/*FUNCTION PentaP1Input::PentaP1Input(){{{*/
+ PentaP1Input::PentaP1Input(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::PentaP1Input(int in_enum_type,double* values){{{1*/
++/*FUNCTION PentaP1Input::PentaP1Input(int in_enum_type,double* values){{{*/
+ PentaP1Input::PentaP1Input(int in_enum_type,double* in_values)
+ 		:PentaRef(1)
+ {
+@@ -40,19 +40,19 @@
+ 	values[5]=in_values[5];
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::~PentaP1Input(){{{1*/
++/*FUNCTION PentaP1Input::~PentaP1Input(){{{*/
+ PentaP1Input::~PentaP1Input(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION PentaP1Input::Echo {{{1*/
++/*FUNCTION PentaP1Input::Echo {{{*/
+ void PentaP1Input::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::DeepEcho{{{1*/
++/*FUNCTION PentaP1Input::DeepEcho{{{*/
+ void PentaP1Input::DeepEcho(void){
+ 
+ 	printf("PentaP1Input:\n");
+@@ -60,16 +60,16 @@
+ 	printf("   values: [%g %g %g %g %g %g]\n",this->values[0],this->values[1],this->values[2],this->values[3],this->values[4],this->values[5]);
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::Id{{{1*/
++/*FUNCTION PentaP1Input::Id{{{*/
+ int    PentaP1Input::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::MyRank{{{1*/
++/*FUNCTION PentaP1Input::MyRank{{{*/
+ int    PentaP1Input::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::ObjectEnum{{{1*/
++/*FUNCTION PentaP1Input::ObjectEnum{{{*/
+ int PentaP1Input::ObjectEnum(void){
+ 
+ 	return PentaP1InputEnum;
+@@ -78,21 +78,21 @@
+ /*}}}*/
+ 	
+ /*PentaP1Input management*/
+-/*FUNCTION PentaP1Input::copy{{{1*/
++/*FUNCTION PentaP1Input::copy{{{*/
+ Object* PentaP1Input::copy() {
+ 	
+ 	return new PentaP1Input(this->enum_type,this->values);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::InstanceEnum{{{1*/
++/*FUNCTION PentaP1Input::InstanceEnum{{{*/
+ int PentaP1Input::InstanceEnum(void){
+ 
+ 	return this->enum_type;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::SpawnTriaInput{{{1*/
++/*FUNCTION PentaP1Input::SpawnTriaInput{{{*/
+ Input* PentaP1Input::SpawnTriaInput(int* indices){
+ 
+ 	/*output*/
+@@ -117,7 +117,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::SpawnResult{{{1*/
++/*FUNCTION PentaP1Input::SpawnResult{{{*/
+ ElementResult* PentaP1Input::SpawnResult(int step, double time){
+ 
+ 	return new PentaP1ElementResult(this->enum_type,this->values,step,time);
+@@ -126,7 +126,7 @@
+ /*}}}*/
+ 
+ /*Object functions*/
+-/*FUNCTION PentaP1Input::GetInputValue(double* pvalue,GaussPenta* gauss){{{1*/
++/*FUNCTION PentaP1Input::GetInputValue(double* pvalue,GaussPenta* gauss){{{*/
+ void PentaP1Input::GetInputValue(double* pvalue,GaussPenta* gauss){
+ 
+ 	/*Call PentaRef function*/
+@@ -134,14 +134,14 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::GetInputDerivativeValue(double* p, double* xyz_list, GaussPenta* gauss){{{1*/
++/*FUNCTION PentaP1Input::GetInputDerivativeValue(double* p, double* xyz_list, GaussPenta* gauss){{{*/
+ void PentaP1Input::GetInputDerivativeValue(double* p, double* xyz_list, GaussPenta* gauss){
+ 
+ 	/*Call PentaRef function*/
+ 	PentaRef::GetInputDerivativeValue(p,&values[0],xyz_list,gauss);
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::GetVxStrainRate3d{{{1*/
++/*FUNCTION PentaP1Input::GetVxStrainRate3d{{{*/
+ void PentaP1Input::GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){
+ 	int i,j;
+ 
+@@ -186,7 +186,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::GetVyStrainRate3d{{{1*/
++/*FUNCTION PentaP1Input::GetVyStrainRate3d{{{*/
+ void PentaP1Input::GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){
+ 	int i,j;
+ 
+@@ -231,7 +231,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::GetVzStrainRate3d{{{1*/
++/*FUNCTION PentaP1Input::GetVzStrainRate3d{{{*/
+ void PentaP1Input::GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){
+ 	int i,j;
+ 
+@@ -277,7 +277,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::GetVxStrainRate3dPattyn{{{1*/
++/*FUNCTION PentaP1Input::GetVxStrainRate3dPattyn{{{*/
+ void PentaP1Input::GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){
+ 
+ 	int i;
+@@ -301,7 +301,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::GetVyStrainRate3dPattyn{{{1*/
++/*FUNCTION PentaP1Input::GetVyStrainRate3dPattyn{{{*/
+ void PentaP1Input::GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){
+ 
+ 	int i;
+@@ -325,19 +325,19 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::ChangeEnum{{{1*/
++/*FUNCTION PentaP1Input::ChangeEnum{{{*/
+ void PentaP1Input::ChangeEnum(int newenumtype){
+ 	this->enum_type=newenumtype;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::GetInputAverage{{{1*/
++/*FUNCTION PentaP1Input::GetInputAverage{{{*/
+ void PentaP1Input::GetInputAverage(double* pvalue){
+ 	*pvalue=1./6.*(values[0]+values[1]+values[2]+values[3]+values[4]+values[5]);
+ }
+ /*}}}*/
+ 
+ /*Intermediary*/
+-/*FUNCTION PentaP1Input::SquareMin{{{1*/
++/*FUNCTION PentaP1Input::SquareMin{{{*/
+ void PentaP1Input::SquareMin(double* psquaremin, bool process_units,Parameters* parameters){
+ 
+ 	int i;
+@@ -360,7 +360,7 @@
+ 	*psquaremin=squaremin;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::ConstrainMin{{{1*/
++/*FUNCTION PentaP1Input::ConstrainMin{{{*/
+ void PentaP1Input::ConstrainMin(double minimum){
+ 	
+ 	int i;
+@@ -369,7 +369,7 @@
+ 	for(i=0;i<numnodes;i++) if (values[i]<minimum) values[i]=minimum;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::InfinityNorm{{{1*/
++/*FUNCTION PentaP1Input::InfinityNorm{{{*/
+ double PentaP1Input::InfinityNorm(void){
+ 
+ 	/*Output*/
+@@ -380,7 +380,7 @@
+ 	return norm;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::Max{{{1*/
++/*FUNCTION PentaP1Input::Max{{{*/
+ double PentaP1Input::Max(void){
+ 
+ 	const int numnodes=6;
+@@ -392,7 +392,7 @@
+ 	return max;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::MaxAbs{{{1*/
++/*FUNCTION PentaP1Input::MaxAbs{{{*/
+ double PentaP1Input::MaxAbs(void){
+ 
+ 	const int numnodes=6;
+@@ -404,7 +404,7 @@
+ 	return max;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::Min{{{1*/
++/*FUNCTION PentaP1Input::Min{{{*/
+ double PentaP1Input::Min(void){
+ 
+ 	const int numnodes=6;
+@@ -416,7 +416,7 @@
+ 	return min;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::MinAbs{{{1*/
++/*FUNCTION PentaP1Input::MinAbs{{{*/
+ double PentaP1Input::MinAbs(void){
+ 
+ 	const int numnodes=6;
+@@ -428,7 +428,7 @@
+ 	return min;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::Scale{{{1*/
++/*FUNCTION PentaP1Input::Scale{{{*/
+ void PentaP1Input::Scale(double scale_factor){
+ 	
+ 	int i;
+@@ -437,7 +437,7 @@
+ 	for(i=0;i<numnodes;i++)values[i]=values[i]*scale_factor;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::AXPY{{{1*/
++/*FUNCTION PentaP1Input::AXPY{{{*/
+ void PentaP1Input::AXPY(Input* xinput,double scalar){
+ 
+ 	int i;
+@@ -464,7 +464,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::Constrain{{{1*/
++/*FUNCTION PentaP1Input::Constrain{{{*/
+ void PentaP1Input::Constrain(double cm_min, double cm_max){
+ 
+ 	int i;
+@@ -475,7 +475,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::Extrude{{{1*/
++/*FUNCTION PentaP1Input::Extrude{{{*/
+ void PentaP1Input::Extrude(void){
+ 
+ 	int i;
+@@ -484,7 +484,7 @@
+ 	for(i=0;i<3;i++) this->values[3+i]=this->values[i];
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::VerticallyIntegrate{{{1*/
++/*FUNCTION PentaP1Input::VerticallyIntegrate{{{*/
+ void PentaP1Input::VerticallyIntegrate(Input* thickness_input){
+ 
+ 	/*Intermediaries*/
+@@ -514,7 +514,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::PointwiseDivide{{{1*/
++/*FUNCTION PentaP1Input::PointwiseDivide{{{*/
+ Input* PentaP1Input::PointwiseDivide(Input* inputB){
+ 
+ 	/*Ouput*/
+@@ -545,7 +545,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::PointwiseMin{{{1*/
++/*FUNCTION PentaP1Input::PointwiseMin{{{*/
+ Input* PentaP1Input::PointwiseMin(Input* inputB){
+ 
+ 	/*Ouput*/
+@@ -576,7 +576,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::PointwiseMax{{{1*/
++/*FUNCTION PentaP1Input::PointwiseMax{{{*/
+ Input* PentaP1Input::PointwiseMax(Input* inputB){
+ 
+ 	/*Ouput*/
+@@ -607,14 +607,14 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::GetVectorFromInputs{{{1*/
++/*FUNCTION PentaP1Input::GetVectorFromInputs{{{*/
+ void PentaP1Input::GetVectorFromInputs(Vector* vector,int* doflist){
+ 
+ 	const int numvertices=6;
+ 	vector->SetValues(numvertices,doflist,this->values,INS_VAL);
+ 
+ } /*}}}*/
+-/*FUNCTION PentaP1Input::GetValuesPtr{{{1*/
++/*FUNCTION PentaP1Input::GetValuesPtr{{{*/
+ void PentaP1Input::GetValuesPtr(double** pvalues,int* pnum_values){
+ 
+ 	*pvalues=this->values;
+@@ -622,7 +622,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::Configure{{{1*/
++/*FUNCTION PentaP1Input::Configure{{{*/
+ void PentaP1Input::Configure(Parameters* parameters){
+ 	/*do nothing: */
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12365)
+@@ -17,31 +17,31 @@
+ #include "../../include/include.h"
+ 
+ /*DoubleInput constructors and destructor*/
+-/*FUNCTION DoubleInput::DoubleInput(){{{1*/
++/*FUNCTION DoubleInput::DoubleInput(){{{*/
+ DoubleInput::DoubleInput(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::DoubleInput(double value){{{1*/
++/*FUNCTION DoubleInput::DoubleInput(double value){{{*/
+ DoubleInput::DoubleInput(int in_enum_type,IssmDouble in_value){
+ 
+ 	enum_type=in_enum_type;
+ 	value=in_value;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::~DoubleInput(){{{1*/
++/*FUNCTION DoubleInput::~DoubleInput(){{{*/
+ DoubleInput::~DoubleInput(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-		/*FUNCTION DoubleInput::Echo {{{1*/
++		/*FUNCTION DoubleInput::Echo {{{*/
+ void DoubleInput::Echo(void){
+ 	this->DeepEcho();
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::DeepEcho{{{1*/
++/*FUNCTION DoubleInput::DeepEcho{{{*/
+ void DoubleInput::DeepEcho(void){
+ 
+ 	printf("DoubleInput:\n");
+@@ -49,23 +49,23 @@
+ 	printf("   value: %g\n",this->value);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::Id{{{1*/
++/*FUNCTION DoubleInput::Id{{{*/
+ int    DoubleInput::Id(void){ return -1; }
+ /*}}}*/
+-/*FUNCTION DoubleInput::MyRank{{{1*/
++/*FUNCTION DoubleInput::MyRank{{{*/
+ int    DoubleInput::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::ObjectEnum{{{1*/
++/*FUNCTION DoubleInput::ObjectEnum{{{*/
+ int DoubleInput::ObjectEnum(void){
+ 
+ 	return DoubleInputEnum;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::copy{{{1*/
++/*FUNCTION DoubleInput::copy{{{*/
+ Object* DoubleInput::copy() {
+ 	
+ 	return new DoubleInput(this->enum_type,this->value);
+@@ -74,14 +74,14 @@
+ /*}}}*/
+ 	
+ /*DoubleInput management*/
+-/*FUNCTION DoubleInput::InstanceEnum{{{1*/
++/*FUNCTION DoubleInput::InstanceEnum{{{*/
+ int DoubleInput::InstanceEnum(void){
+ 
+ 	return this->enum_type;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::SpawnTriaInput{{{1*/
++/*FUNCTION DoubleInput::SpawnTriaInput{{{*/
+ Input* DoubleInput::SpawnTriaInput(int* indices){
+ 
+ 	/*output*/
+@@ -96,7 +96,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::SpawnResult{{{1*/
++/*FUNCTION DoubleInput::SpawnResult{{{*/
+ ElementResult* DoubleInput::SpawnResult(int step, double time){
+ 
+ 	return new DoubleElementResult(this->enum_type,this->value,step,time);
+@@ -105,102 +105,102 @@
+ /*}}}*/
+ 
+ /*Object functions*/
+-/*FUNCTION DoubleInput::GetInputValue(bool* pvalue) {{{1*/
++/*FUNCTION DoubleInput::GetInputValue(bool* pvalue) {{{*/
+ void DoubleInput::GetInputValue(bool* pvalue){
+ 	_error_("Double input of enum %s cannot return a boolean",EnumToStringx(enum_type));
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputValue(int* pvalue){{{1*/
++/*FUNCTION DoubleInput::GetInputValue(int* pvalue){{{*/
+ void DoubleInput::GetInputValue(int* pvalue){
+ 	_error_("Double input of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputValue(double* pvalue){{{1*/
++/*FUNCTION DoubleInput::GetInputValue(double* pvalue){{{*/
+ void DoubleInput::GetInputValue(double* pvalue){
+ 
+ 	/*return value*/
+ 	*pvalue=value;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputValue(double* pvalue,GaussTria* gauss){{{1*/
++/*FUNCTION DoubleInput::GetInputValue(double* pvalue,GaussTria* gauss){{{*/
+ void DoubleInput::GetInputValue(double* pvalue,GaussTria* gauss){*pvalue=this->value;}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputValue(double* pvalue,GaussPenta* gauss){{{1*/
++/*FUNCTION DoubleInput::GetInputValue(double* pvalue,GaussPenta* gauss){{{*/
+ void DoubleInput::GetInputValue(double* pvalue,GaussPenta* gauss){*pvalue=this->value;}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{1*/
++/*FUNCTION DoubleInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{*/
+ void DoubleInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{1*/
++/*FUNCTION DoubleInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{*/
+ void DoubleInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){{{1*/
++/*FUNCTION DoubleInput::GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){{{*/
+ void DoubleInput::GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){
+ 	/*Epsilon is zero as vx is constant over the element*/
+ 	for(int i=0;i<3;i++) epsilonvx[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){{{1*/
++/*FUNCTION DoubleInput::GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){{{*/
+ void DoubleInput::GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){
+ 	/*Epsilon is zero as vy is constant over the element*/
+ 	for(int i=0;i<3;i++) epsilonvy[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){{{1*/
++/*FUNCTION DoubleInput::GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){{{*/
+ void DoubleInput::GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vx is constant over the element*/
+ 	for(int i=0;i<6;i++) epsilonvx[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){{{1*/
++/*FUNCTION DoubleInput::GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){{{*/
+ void DoubleInput::GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vy is constant over the element*/
+ 	for(int i=0;i<6;i++) epsilonvy[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){{{1*/
++/*FUNCTION DoubleInput::GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){{{*/
+ void DoubleInput::GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vz is constant over the element*/
+ 	for(int i=0;i<6;i++) epsilonvz[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){{{1*/
++/*FUNCTION DoubleInput::GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){{{*/
+ void DoubleInput::GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vx is constant over the element*/
+ 	for(int i=0;i<5;i++) epsilonvx[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){{{1*/
++/*FUNCTION DoubleInput::GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){{{*/
+ void DoubleInput::GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vy is constant over the element*/
+ 	for(int i=0;i<5;i++) epsilonvy[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::ChangeEnum{{{1*/
++/*FUNCTION DoubleInput::ChangeEnum{{{*/
+ void DoubleInput::ChangeEnum(int newenumtype){
+ 	this->enum_type=newenumtype;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::SquareMin{{{1*/
++/*FUNCTION DoubleInput::SquareMin{{{*/
+ void DoubleInput::SquareMin(double* psquaremin, bool process_units,Parameters* parameters){
+ 
+ 	/*square min of a double is the square of the double itself: */
+ 	*psquaremin=pow(value,2);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::Scale{{{1*/
++/*FUNCTION DoubleInput::Scale{{{*/
+ void DoubleInput::Scale(double scale_factor){
+ 	value=value*scale_factor;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::ConstrainMin{{{1*/
++/*FUNCTION DoubleInput::ConstrainMin{{{*/
+ void DoubleInput::ConstrainMin(double minimum){
+ 	if (value<minimum) value=minimum;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::AXPY{{{1*/
++/*FUNCTION DoubleInput::AXPY{{{*/
+ void DoubleInput::AXPY(Input* xinput,double scalar){
+ 
+ 	DoubleInput*  xdoubleinput=NULL;
+@@ -221,7 +221,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::Constrain{{{1*/
++/*FUNCTION DoubleInput::Constrain{{{*/
+ void DoubleInput::Constrain(double cm_min, double cm_max){
+ 
+ 	if(!isnan(cm_min)) if (this->value<cm_min)this->value=cm_min;
+@@ -229,46 +229,46 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::Max{{{1*/
++/*FUNCTION DoubleInput::Max{{{*/
+ double DoubleInput::Max(void){
+ 	return this->value;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::MaxAbs{{{1*/
++/*FUNCTION DoubleInput::MaxAbs{{{*/
+ double DoubleInput::MaxAbs(void){
+ 	return fabs(this->value);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::Min{{{1*/
++/*FUNCTION DoubleInput::Min{{{*/
+ double DoubleInput::Min(void){
+ 	return this->value;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::MinAbs{{{1*/
++/*FUNCTION DoubleInput::MinAbs{{{*/
+ double DoubleInput::MinAbs(void){
+ 	return fabs(this->value);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVectorFromInputs{{{1*/
++/*FUNCTION DoubleInput::GetVectorFromInputs{{{*/
+ void DoubleInput::GetVectorFromInputs(Vector* vector,int* doflist){
+ 
+ 	_error_(" not supporte yet!");
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetValuesPtr{{{1*/
++/*FUNCTION DoubleInput::GetValuesPtr{{{*/
+ void DoubleInput::GetValuesPtr(double** pvalues,int* pnum_values){
+ 
+ 	_error_(" not supported yet!");
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputAverage{{{1*/
++/*FUNCTION DoubleInput::GetInputAverage{{{*/
+ void DoubleInput::GetInputAverage(double* pvalue){
+ 	*pvalue=value;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::VerticallyIntegrate{{{1*/
++/*FUNCTION DoubleInput::VerticallyIntegrate{{{*/
+ void DoubleInput::VerticallyIntegrate(Input* thickness_input){
+ 
+ 	/*Intermediaries*/
+@@ -290,7 +290,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::PointwiseDivide{{{1*/
++/*FUNCTION DoubleInput::PointwiseDivide{{{*/
+ Input* DoubleInput::PointwiseDivide(Input* inputB){
+ 
+ 	/*Ouput*/
+@@ -310,7 +310,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::PointwiseMin{{{1*/
++/*FUNCTION DoubleInput::PointwiseMin{{{*/
+ Input* DoubleInput::PointwiseMin(Input* input){
+ 
+ 	/*Ouput*/
+@@ -331,7 +331,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::PointwiseMax{{{1*/
++/*FUNCTION DoubleInput::PointwiseMax{{{*/
+ Input* DoubleInput::PointwiseMax(Input* input){
+ 
+ 	/*Ouput*/
+@@ -352,7 +352,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::Configure{{{1*/
++/*FUNCTION DoubleInput::Configure{{{*/
+ void DoubleInput::Configure(Parameters* parameters){
+ 	/*do nothing: */
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _TRANSIENTINPUT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Input.h"
+ class GaussTria;
+ class Parameters;
+@@ -22,13 +22,13 @@
+ 		double* timesteps;
+ 		Parameters* parameters; //to find current time.
+ 
+-		/*TransientInput constructors, destructors: {{{1*/
++		/*TransientInput constructors, destructors: {{{*/
+ 		TransientInput();
+ 		TransientInput(int enum_type);
+ 		~TransientInput();
+ 		void AddTimeInput(Input* input,double time);
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1*/
++		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id();
+@@ -36,7 +36,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*TransientInput management: {{{1*/
++		/*TransientInput management: {{{*/
+ 		int    InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+ 		Input* PointwiseDivide(Input* forcingB){_error_("not implemented yet");};
+@@ -45,7 +45,7 @@
+ 		ElementResult* SpawnResult(int step, double time);
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue){_error_("not implemented yet");};
+ 		void GetInputValue(int* pvalue){_error_("not implemented yet");};
+ 		void GetInputValue(double* pvalue){_error_("not implemented yet");};
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12365)
+@@ -7,7 +7,7 @@
+ #define _PENTAP1INPUT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Input.h"
+ #include "../Elements/PentaRef.h"
+ class GaussTria;
+@@ -20,12 +20,12 @@
+ 		int    enum_type;
+ 		double values[6];
+ 
+-		/*PentaP1Input constructors, destructors: {{{1*/
++		/*PentaP1Input constructors, destructors: {{{*/
+ 		PentaP1Input();
+ 		PentaP1Input(int enum_type,double* values);
+ 		~PentaP1Input();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -33,7 +33,7 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*PentaP1Input management: {{{1*/
++		/*PentaP1Input management: {{{*/
+ 		int   InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+ 		Input* PointwiseDivide(Input* inputB);
+@@ -43,7 +43,7 @@
+ 		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+-		/*numerics: {{{1*/
++		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue){_error_("not implemented yet");};
+ 		void GetInputValue(int* pvalue){_error_("not implemented yet");};
+ 		void GetInputValue(double* pvalue){_error_("not implemented yet");};
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.h	(revision 12365)
+@@ -33,7 +33,7 @@
+ 		int*     sdoflist; //dof list in s_set
+ 
+ 
+-		/*DofIndexing constructors, destructors {{{1*/
++		/*DofIndexing constructors, destructors {{{*/
+ 		DofIndexing();
+ 		DofIndexing(int g_size);
+ 		void Init(int g_size,int* doftype);
+@@ -41,12 +41,12 @@
+ 		DofIndexing(DofIndexing* properties);
+ 		~DofIndexing();
+ 		/*}}}*/
+-		/*Object like functionality: {{{1*/
++		/*Object like functionality: {{{*/
+ 		void  Echo(void); 
+ 		void  DeepEcho(void); 
+ 		void  copy(DofIndexing* properties);
+ 		/*}}}*/
+-		/*DofIndexing management: {{{1*/
++		/*DofIndexing management: {{{*/
+ 		DofIndexing* Spawn(int* indices, int numindices);
+ 		/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _SEGMENT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Object.h"
+ /*}}}*/
+ 
+@@ -19,12 +19,12 @@
+ 		IssmDouble x2;
+ 		IssmDouble y2;
+ 
+-		/*Segment constructors, destructors {{{1*/
++		/*Segment constructors, destructors {{{*/
+ 		Segment();
+ 		Segment(int eid,IssmDouble x1,IssmDouble y1, IssmDouble x2, IssmDouble y2);
+ 		~Segment();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp	(revision 12365)
+@@ -16,7 +16,7 @@
+ #include "../../include/include.h"
+ 
+ /*ExponentialVariogram constructors and destructor*/
+-/*FUNCTION ExponentialVariogram::ExponentialVariogram(){{{1*/
++/*FUNCTION ExponentialVariogram::ExponentialVariogram(){{{*/
+ ExponentialVariogram::ExponentialVariogram(){
+ 	this->nugget = 0.2;
+ 	this->sill   = 1;
+@@ -24,7 +24,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION ExponentialVariogram::ExponentialVariogram(Options* options){{{1*/
++/*FUNCTION ExponentialVariogram::ExponentialVariogram(Options* options){{{*/
+ ExponentialVariogram::ExponentialVariogram(Options* options){
+ 
+ 	/*Defaults*/
+@@ -41,14 +41,14 @@
+ 	if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
+ }
+ /*}}}*/
+-/*FUNCTION ExponentialVariogram::~ExponentialVariogram(){{{1*/
++/*FUNCTION ExponentialVariogram::~ExponentialVariogram(){{{*/
+ ExponentialVariogram::~ExponentialVariogram(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION ExponentialVariogram::Echo {{{1*/
++/*FUNCTION ExponentialVariogram::Echo {{{*/
+ void ExponentialVariogram::Echo(void){
+ 	printf("ExponentialVariogram\n");
+ 	printf("   nugget: %g\n",this->nugget);
+@@ -58,7 +58,7 @@
+ /*}}}*/
+ 
+ /*Variogram function*/
+-/*FUNCTION ExponentialVariogram::Covariance{{{1*/
++/*FUNCTION ExponentialVariogram::Covariance{{{*/
+ double ExponentialVariogram::Covariance(double deltax,double deltay){
+ 	/*The covariance can be deduced from the variogram from the following
+ 	 * relationship:
+@@ -76,7 +76,7 @@
+ 	return cova;
+ }
+ /*}}}*/
+-/*FUNCTION ExponentialVariogram::SemiVariogram{{{1*/
++/*FUNCTION ExponentialVariogram::SemiVariogram{{{*/
+ double ExponentialVariogram::SemiVariogram(double deltax,double deltay){
+ 	/*http://en.wikipedia.org/wiki/Variogram*/
+ 	double h,a,gamma;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12365)
+@@ -16,7 +16,7 @@
+ #include "../../include/include.h"
+ 
+ /*GaussianVariogram constructors and destructor*/
+-/*FUNCTION GaussianVariogram::GaussianVariogram(){{{1*/
++/*FUNCTION GaussianVariogram::GaussianVariogram(){{{*/
+ GaussianVariogram::GaussianVariogram(){
+ 	this->nugget = 0.2;
+ 	this->sill   = 1;
+@@ -24,7 +24,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION GaussianVariogram::GaussianVariogram(Options* options){{{1*/
++/*FUNCTION GaussianVariogram::GaussianVariogram(Options* options){{{*/
+ GaussianVariogram::GaussianVariogram(Options* options){
+ 
+ 	/*Defaults*/
+@@ -41,14 +41,14 @@
+ 	if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
+ }
+ /*}}}*/
+-/*FUNCTION GaussianVariogram::~GaussianVariogram(){{{1*/
++/*FUNCTION GaussianVariogram::~GaussianVariogram(){{{*/
+ GaussianVariogram::~GaussianVariogram(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION GaussianVariogram::Echo {{{1*/
++/*FUNCTION GaussianVariogram::Echo {{{*/
+ void GaussianVariogram::Echo(void){
+ 	printf("GaussianVariogram\n");
+ 	printf("   nugget: %g\n",this->nugget);
+@@ -58,7 +58,7 @@
+ /*}}}*/
+ 
+ /*Variogram function*/
+-/*FUNCTION GaussianVariogram::Covariance{{{1*/
++/*FUNCTION GaussianVariogram::Covariance{{{*/
+ double GaussianVariogram::Covariance(double deltax,double deltay){
+ 	/*The covariance can be deduced from the variogram from the following
+ 	 * relationship:
+@@ -79,7 +79,7 @@
+ 	return cova;
+ }
+ /*}}}*/
+-/*FUNCTION GaussianVariogram::SemiVariogram{{{1*/
++/*FUNCTION GaussianVariogram::SemiVariogram{{{*/
+ double GaussianVariogram::SemiVariogram(double deltax,double deltay){
+ 	/*http://en.wikipedia.org/wiki/Variogram*/
+ 	double h2,a,gamma;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp	(revision 12365)
+@@ -16,7 +16,7 @@
+ #include "../../include/include.h"
+ 
+ /*SphericalVariogram constructors and destructor*/
+-/*FUNCTION SphericalVariogram::SphericalVariogram(){{{1*/
++/*FUNCTION SphericalVariogram::SphericalVariogram(){{{*/
+ SphericalVariogram::SphericalVariogram(){
+ 	this->nugget = 0.2;
+ 	this->sill   = 1;
+@@ -24,7 +24,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION SphericalVariogram::SphericalVariogram(Options* options){{{1*/
++/*FUNCTION SphericalVariogram::SphericalVariogram(Options* options){{{*/
+ SphericalVariogram::SphericalVariogram(Options* options){
+ 
+ 	/*Defaults*/
+@@ -41,14 +41,14 @@
+ 	if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
+ }
+ /*}}}*/
+-/*FUNCTION SphericalVariogram::~SphericalVariogram(){{{1*/
++/*FUNCTION SphericalVariogram::~SphericalVariogram(){{{*/
+ SphericalVariogram::~SphericalVariogram(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION SphericalVariogram::Echo {{{1*/
++/*FUNCTION SphericalVariogram::Echo {{{*/
+ void SphericalVariogram::Echo(void){
+ 	printf("SphericalVariogram\n");
+ 	printf("   nugget: %g\n",this->nugget);
+@@ -58,7 +58,7 @@
+ /*}}}*/
+ 
+ /*Variogram function*/
+-/*FUNCTION SphericalVariogram::Covariance{{{1*/
++/*FUNCTION SphericalVariogram::Covariance{{{*/
+ double SphericalVariogram::Covariance(double deltax,double deltay){
+ 	/*The covariance can be deduced from the variogram from the following
+ 	 * relationship:
+@@ -79,7 +79,7 @@
+ 	return cova;
+ }
+ /*}}}*/
+-/*FUNCTION SphericalVariogram::SemiVariogram{{{1*/
++/*FUNCTION SphericalVariogram::SemiVariogram{{{*/
+ double SphericalVariogram::SemiVariogram(double deltax,double deltay){
+ 	/*http://en.wikipedia.org/wiki/Variogram*/
+ 	double h,gamma;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp	(revision 12365)
+@@ -16,7 +16,7 @@
+ #include "../../include/include.h"
+ 
+ /*PowerVariogram constructors and destructor*/
+-/*FUNCTION PowerVariogram::PowerVariogram(){{{1*/
++/*FUNCTION PowerVariogram::PowerVariogram(){{{*/
+ PowerVariogram::PowerVariogram(){
+ 	this->nugget = 0.2;
+ 	this->slope  = 1.;
+@@ -24,7 +24,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION PowerVariogram::PowerVariogram(Options* options){{{1*/
++/*FUNCTION PowerVariogram::PowerVariogram(Options* options){{{*/
+ PowerVariogram::PowerVariogram(Options* options){
+ 
+ 	/*Defaults*/
+@@ -42,14 +42,14 @@
+ 	if(slope<=0) _error_("slope must be positive");
+ }
+ /*}}}*/
+-/*FUNCTION PowerVariogram::~PowerVariogram(){{{1*/
++/*FUNCTION PowerVariogram::~PowerVariogram(){{{*/
+ PowerVariogram::~PowerVariogram(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION PowerVariogram::Echo {{{1*/
++/*FUNCTION PowerVariogram::Echo {{{*/
+ void PowerVariogram::Echo(void){
+ 	printf("PowerVariogram\n");
+ 	printf("   nugget: %g\n",this->nugget);
+@@ -59,7 +59,7 @@
+ /*}}}*/
+ 
+ /*Variogram function*/
+-/*FUNCTION PowerVariogram::Covariance{{{1*/
++/*FUNCTION PowerVariogram::Covariance{{{*/
+ double PowerVariogram::Covariance(double deltax,double deltay){
+ 	/*The covariance can be deduced from the variogram from the following
+ 	 * relationship:
+@@ -77,7 +77,7 @@
+ 	return cova;
+ }
+ /*}}}*/
+-/*FUNCTION PowerVariogram::SemiVariogram{{{1*/
++/*FUNCTION PowerVariogram::SemiVariogram{{{*/
+ double PowerVariogram::SemiVariogram(double deltax,double deltay){
+ 	/*http://en.wikipedia.org/wiki/Variogram*/
+ 	double h,gamma;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12365)
+@@ -1,5 +1,5 @@
+ #include "../objects.h"
+-/*DOCUMENTATION What is a Quadtree? {{{1
++/*DOCUMENTATION What is a Quadtree? {{{
+  * 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
+@@ -45,8 +45,8 @@
+  *  \--   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*/
+-/*MACROS {{{1*/
++ }}}*/
++/*MACROS {{{*/
+ /* 
+  * 
+  *    J    j
+@@ -79,13 +79,13 @@
+ /*}}}*/
+ 
+ 	/*Constructors/Destructors*/
+-/*FUNCTION Quadtree::Quadtree(){{{1*/
++/*FUNCTION Quadtree::Quadtree(){{{*/
+ Quadtree::Quadtree(){
+ 	_error_("Constructor not supported");
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION Quadtree::Quadtree(double xmin,double xmax,double ymin,double ymax,int maxdepth){{{1*/
++/*}}}*/
++/*FUNCTION Quadtree::Quadtree(double xmin,double xmax,double ymin,double ymax,int maxdepth){{{*/
+ Quadtree::Quadtree(double xmin,double xmax,double ymin,double ymax,int maxdepth){
+ 
+ 	/*Intermediaries*/
+@@ -103,18 +103,18 @@
+ 	length=max(xmax-xmin,ymax-ymin);
+ 	this->root=NewQuadtreeBox(xmin+length/2,ymin+length/2,length);
+ }
+-/*}}}1*/
+-	/*FUNCTION Quadtree::~Quadtree(){{{1*/
++/*}}}*/
++	/*FUNCTION Quadtree::~Quadtree(){{{*/
+ 	Quadtree::~Quadtree(){
+ 
+ 		delete boxcontainer;
+ 		root=NULL;
+ 
+ 	}
+-	/*}}}1*/
++	/*}}}*/
+ 
+ 	/*Methods*/
+-/*FUNCTION Quadtree::Add{{{1*/
++/*FUNCTION Quadtree::Add{{{*/
+ void  Quadtree::Add(Observation* observation){
+ 
+ 	/*Intermediaries*/
+@@ -197,7 +197,7 @@
+ 	NbObs++;
+ 
+ }/*}}}*/
+-/*FUNCTION Quadtree::AddAndAverage{{{1*/
++/*FUNCTION Quadtree::AddAndAverage{{{*/
+ void Quadtree::AddAndAverage(double x,double y,double value){
+ 
+ 	QuadtreeBox **pbox = NULL;
+@@ -249,7 +249,7 @@
+ 		_error_("Box is not full");
+ 	}
+ }/*}}}*/
+-/*FUNCTION Quadtree::ClosestObs{{{1*/
++/*FUNCTION Quadtree::ClosestObs{{{*/
+ void Quadtree::ClosestObs(int *pindex,double x,double y){
+ 
+ 	QuadtreeBox **pbox = NULL;
+@@ -292,7 +292,7 @@
+ 
+ 	*pindex=index;
+ }/*}}}*/
+-/*FUNCTION Quadtree::Echo{{{1*/
++/*FUNCTION Quadtree::Echo{{{*/
+ void  Quadtree::Echo(void){
+ 
+ 	printf("Quadtree:\n");
+@@ -302,7 +302,7 @@
+ 	printf("   root          = %p\n",this->root);
+ 
+ }/*}}}*/
+-/*FUNCTION Quadtree::DeepEcho{{{1*/
++/*FUNCTION Quadtree::DeepEcho{{{*/
+ void  Quadtree::DeepEcho(void){
+ 
+ 	printf("Quadtree:\n");
+@@ -313,7 +313,7 @@
+ 	boxcontainer->Echo();
+ 
+ }/*}}}*/
+-/*FUNCTION Quadtree::IntergerCoordinates{{{1*/
++/*FUNCTION Quadtree::IntergerCoordinates{{{*/
+ void  Quadtree::IntergerCoordinates(int *xi,int *yi,double x,double y){
+ 
+ 	/*Intermediaries*/
+@@ -337,7 +337,7 @@
+ 	*xi=int(coefficient*(x - xmin));
+ 	*yi=int(coefficient*(y - ymin));
+ }/*}}}*/
+-/*FUNCTION Quadtree::NewQuadtreeBox(double xcenter,double ycenter,double length){{{1*/
++/*FUNCTION Quadtree::NewQuadtreeBox(double xcenter,double ycenter,double length){{{*/
+ Quadtree::QuadtreeBox* Quadtree::NewQuadtreeBox(double xcenter,double ycenter,double length){
+ 
+ 	/*Output*/
+@@ -361,7 +361,7 @@
+ 	/*currentbox now points toward next quadtree box*/
+ 	return newbox;
+ }/*}}}*/
+-/*FUNCTION Quadtree::NewQuadtreeBox(QuadtreeBox* master,int index) {{{1*/
++/*FUNCTION Quadtree::NewQuadtreeBox(QuadtreeBox* master,int index) {{{*/
+ Quadtree::QuadtreeBox* Quadtree::NewQuadtreeBox(QuadtreeBox* master,int index){
+ 
+ 	/*Output*/
+@@ -406,7 +406,7 @@
+ 	/*currentbox now points toward next quadtree box*/
+ 	return newbox;
+ }/*}}}*/
+-/*FUNCTION Quadtree::QuadtreeDepth{{{1*/
++/*FUNCTION Quadtree::QuadtreeDepth{{{*/
+ void Quadtree::QuadtreeDepth(int* A,int xi,int yi){
+ 
+ 	QuadtreeBox **pbox = NULL;
+@@ -434,7 +434,7 @@
+ 
+ 	*A=level;
+ }/*}}}*/
+-/*FUNCTION Quadtree::QuadtreeDepth2{{{1*/
++/*FUNCTION Quadtree::QuadtreeDepth2{{{*/
+ void Quadtree::QuadtreeDepth2(int* A,int xi,int yi){
+ 
+ 	QuadtreeBox **pbox = NULL;
+@@ -487,7 +487,7 @@
+ 
+ 	*A=level;
+ }/*}}}*/
+-/*FUNCTION Quadtree::RangeSearch{{{1*/
++/*FUNCTION Quadtree::RangeSearch{{{*/
+ void Quadtree::RangeSearch(int **pindices,int *pnobs,double x,double y,double range){
+ 
+ 	/*Intermediaries*/
+@@ -507,7 +507,7 @@
+ }/*}}}*/
+ 
+ /*QuadtreeBox methos*/
+-/*FUNCTION QuadtreeBox::Echo{{{1*/
++/*FUNCTION QuadtreeBox::Echo{{{*/
+ void  Quadtree::QuadtreeBox::Echo(void){
+ 
+ 	printf("QuadtreeBox:\n");
+@@ -517,7 +517,7 @@
+ 	printf("   length  = %g\n",this->length);
+ 
+ }/*}}}*/
+-/*FUNCTION QuadtreeBox::IsWithinRange{{{1*/
++/*FUNCTION QuadtreeBox::IsWithinRange{{{*/
+ int Quadtree::QuadtreeBox::IsWithinRange(double x,double y,double range){
+ 
+ 	/*Return 0 if the 2 boxes do not overlap*/
+@@ -536,7 +536,7 @@
+ 	return 1;
+ 
+ }/*}}}*/
+-/*FUNCTION QuadtreeBox::RangeSearch{{{1*/
++/*FUNCTION QuadtreeBox::RangeSearch{{{*/
+ void Quadtree::QuadtreeBox::RangeSearch(int* indices,int *pnobs,double x,double y,double range){
+ 
+ 	/*Intermediaries*/
+@@ -578,7 +578,7 @@
+ 	/*Assign output pointers: */
+ 	*pnobs=nobs;
+ }/*}}}*/
+-/*FUNCTION QuadtreeBox::WriteObservations{{{1*/
++/*FUNCTION QuadtreeBox::WriteObservations{{{*/
+ void Quadtree::QuadtreeBox::WriteObservations(int* indices,int *pnobs){
+ 
+ 	/*Intermediaries*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Observation.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Observation.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Observation.cpp	(revision 12365)
+@@ -6,12 +6,12 @@
+ #include "../objects.h"
+ 
+ /*Observation constructors and destructor*/
+-/*FUNCTION Observation::Observation(){{{1*/
++/*FUNCTION Observation::Observation(){{{*/
+ Observation::Observation(){
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Observation::Observation(double x,double y,int xi,int yi,int index,double value){{{1*/
++/*FUNCTION Observation::Observation(double x,double y,int xi,int yi,int index,double value){{{*/
+ Observation::Observation(double x_in,double y_in,int xi_in,int yi_in,int index_in,double value_in){
+ 
+ 	this->x      = x_in;
+@@ -24,14 +24,14 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Observation::~Observation(){{{1*/
++/*FUNCTION Observation::~Observation(){{{*/
+ Observation::~Observation(){
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION Observation::Echo {{{1*/
++/*FUNCTION Observation::Echo {{{*/
+ void Observation::Echo(void){
+ 
+ 	int  bit;
+@@ -48,7 +48,7 @@
+ /*}}}*/
+ 
+ /*Observations functions*/
+-/*FUNCTION Observation::WriteXYObs(double* px,double* py,double* pobs){{{1*/
++/*FUNCTION Observation::WriteXYObs(double* px,double* py,double* pobs){{{*/
+ void Observation::WriteXYObs(double* px,double* py,double* pobs){
+ 	*px   = this->x;
+ 	*py   = this->y;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _VERTEX_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Object.h"
+ class IoModel;
+ class Vector;
+@@ -34,14 +34,14 @@
+ 		int    clone;
+ 		int    dof; //dof to recover values in a vertex indexed vector
+ 
+-		/*Vertex constructors, destructors {{{1*/
++		/*Vertex constructors, destructors {{{*/
+ 		Vertex();
+ 		Vertex(int id, int sid,IssmDouble x, IssmDouble y, IssmDouble z, IssmDouble sigma, int connectivity); 
+ 		void Init(int id, int sid, IssmDouble x, IssmDouble y, IssmDouble z, IssmDouble sigma,int connectivity);
+ 		Vertex(int id, int sid, int i, IoModel* iomodel);
+ 		~Vertex();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -49,14 +49,14 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*DofObject routines {{{1*/
++		/*DofObject routines {{{*/
+ 		void  DistributeDofs(int* pdofcount);
+ 		void  OffsetDofs(int dofcount);
+ 		void  ShowTrueDofs(int* borderdofs);
+ 		void  UpdateCloneDofs(int* allborderdofs);
+ 		void  SetClone(int* minranks);
+ 		/*}}}*/
+-		/*Vertex management: {{{1*/
++		/*Vertex management: {{{*/
+ 		int   Sid(void); 
+ 		int   Connectivity(void); 
+ 		void  UpdatePosition(Vector* vz,Parameters* parameters,IssmDouble* thickness,IssmDouble* bed);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12365)
+@@ -2,7 +2,7 @@
+  * \brief: implementation of the Node object
+  */
+ 
+-/*Include files: {{{1*/
++/*Include files: {{{*/
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -20,14 +20,14 @@
+ /*}}}*/
+ 
+ /*Node constructors and destructors:*/
+-/*FUNCTION Node::Node() default constructor {{{1*/
++/*FUNCTION Node::Node() default constructor {{{*/
+ Node::Node(){
+ 		 this->inputs=NULL;
+ 		 this->hvertex=NULL;
+ 		 return;
+ }
+ /*}}}*/
+-/*FUNCTION Node::Node(int node_id,int node_sid,int vertex_id,int io_index, IoModel* iomodel,int analysis_type) {{{1*/
++/*FUNCTION Node::Node(int node_id,int node_sid,int vertex_id,int io_index, IoModel* iomodel,int analysis_type) {{{*/
+ Node::Node(int node_id,int node_sid,int vertex_id,int io_index, IoModel* iomodel,int analysis_type){
+ 
+ 	/*Intermediary*/
+@@ -144,7 +144,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Node::~Node(){{{1*/
++/*FUNCTION Node::~Node(){{{*/
+ Node::~Node(){
+ 	delete inputs;
+ 	delete hvertex;
+@@ -153,7 +153,7 @@
+ /*}}}*/
+ 
+ /*Object virtual functions definitions:*/
+-/*FUNCTION Node::Echo{{{1*/
++/*FUNCTION Node::Echo{{{*/
+ void Node::Echo(void){
+ 
+ 	printf("Node:\n");
+@@ -167,7 +167,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Node::DeepEcho{{{1*/
++/*FUNCTION Node::DeepEcho{{{*/
+ void Node::DeepEcho(void){
+ 
+ 	printf("Node:\n");
+@@ -182,17 +182,17 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Node::Id{{{1*/
++/*FUNCTION Node::Id{{{*/
+ int    Node::Id(void){ return id; }
+ /*}}}*/
+-/*FUNCTION Node::MyRank{{{1*/
++/*FUNCTION Node::MyRank{{{*/
+ int    Node::MyRank(void){ 
+ 	extern int my_rank;
+ 
+ 	return my_rank; 
+ }
+ /*}}}*/
+-/*FUNCTION Node::ObjectEnum{{{1*/
++/*FUNCTION Node::ObjectEnum{{{*/
+ int Node::ObjectEnum(void){
+ 
+ 	return NodeEnum;
+@@ -201,7 +201,7 @@
+ /*}}}*/
+ 
+ /*Node management:*/
+-/*FUNCTION Node::Configure {{{1*/
++/*FUNCTION Node::Configure {{{*/
+ void  Node::Configure(DataSet* nodesin,Vertices* verticesin){
+ 
+ 	int i;
+@@ -211,11 +211,11 @@
+ 	hvertex->configure(verticesin);
+ 
+ }
+-/*FUNCTION Node::SetCurrentConfiguration {{{1*/
++/*FUNCTION Node::SetCurrentConfiguration {{{*/
+ void  Node::SetCurrentConfiguration(DataSet* nodesin,Vertices* verticesin){
+ 
+ }
+-/*FUNCTION Node::GetDof {{{1*/
++/*FUNCTION Node::GetDof {{{*/
+ int   Node::GetDof(int dofindex,int setenum){
+ 
+ 	if(setenum==GsetEnum){
+@@ -234,7 +234,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Node::GetDofList1{{{1*/
++/*FUNCTION Node::GetDofList1{{{*/
+ int  Node::GetDofList1(void){
+ 
+ 	Vertex* vertex=NULL;
+@@ -244,7 +244,7 @@
+ 	return vertex->dof;
+ }
+ /*}}}*/
+-/*FUNCTION Node::GetDofList{{{1*/
++/*FUNCTION Node::GetDofList{{{*/
+ void  Node::GetDofList(int* outdoflist,int approximation_enum,int setenum){
+ 	int i;
+ 	int count=0;
+@@ -306,7 +306,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Node::GetSidList{{{1*/
++/*FUNCTION Node::GetSidList{{{*/
+ int  Node::GetSidList(void){
+ 
+ 	Vertex* vertex=NULL;
+@@ -316,7 +316,7 @@
+ 	return vertex->sid;
+ }
+ /*}}}*/
+-/*FUNCTION Node::GetLocalDofList{{{1*/
++/*FUNCTION Node::GetLocalDofList{{{*/
+ void  Node::GetLocalDofList(int* outdoflist,int approximation_enum,int setenum){
+ 	int i;
+ 	int count=0;
+@@ -415,10 +415,10 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Node::Sid{{{1*/
++/*FUNCTION Node::Sid{{{*/
+ int    Node::Sid(void){ return sid; }
+ /*}}}*/
+-/*FUNCTION Node::GetVertexId {{{1*/
++/*FUNCTION Node::GetVertexId {{{*/
+ int   Node::GetVertexId(void){
+ 
+ 	Vertex*  vertex=NULL;
+@@ -427,7 +427,7 @@
+ 	return vertex->id;
+ }
+ /*}}}*/
+-/*FUNCTION Node::GetVertexDof {{{1*/
++/*FUNCTION Node::GetVertexDof {{{*/
+ int   Node::GetVertexDof(void){
+ 
+ 	Vertex*  vertex=NULL;
+@@ -437,7 +437,7 @@
+ }
+ /*}}}*/
+ #ifdef _HAVE_DIAGNOSTIC_
+-/*FUNCTION Node::GetCoordinateSystem{{{1*/
++/*FUNCTION Node::GetCoordinateSystem{{{*/
+ void Node::GetCoordinateSystem(IssmDouble* coord_system_out){
+ 
+ 	/*Copy coord_system*/
+@@ -446,7 +446,7 @@
+ }
+ /*}}}*/
+ #endif
+-/*FUNCTION Node::SetVertexDof {{{1*/
++/*FUNCTION Node::SetVertexDof {{{*/
+ void   Node::SetVertexDof(int in_dof){
+ 
+ 	Vertex*  vertex=NULL;
+@@ -456,7 +456,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Node::InAnalysis{{{1*/
++/*FUNCTION Node::InAnalysis{{{*/
+ bool Node::InAnalysis(int in_analysis_type){
+ 	if (in_analysis_type==this->analysis_type) return true;
+ 	else return false;
+@@ -464,7 +464,7 @@
+ /*}}}*/
+ 
+ /*Node numerics:*/
+-/*FUNCTION Node::ApplyConstraints{{{1*/
++/*FUNCTION Node::ApplyConstraints{{{*/
+ void  Node::ApplyConstraint(int dof,IssmDouble value){
+ 
+ 	int index;
+@@ -475,7 +475,7 @@
+ 	this->indexing.svalues[dof-1]=value;
+ }
+ /*}}}*/
+-/*FUNCTION Node::RelaxConstraint{{{1*/
++/*FUNCTION Node::RelaxConstraint{{{*/
+ void  Node::RelaxConstraint(int dof){
+ 
+ 	/*Dof should be added to the f-set, and taken out of the s-set:*/
+@@ -483,7 +483,7 @@
+ 	this->indexing.svalues[dof-1]=NAN;
+ }
+ /*}}}*/
+-/*FUNCTION Node::CreateVecSets {{{1*/
++/*FUNCTION Node::CreateVecSets {{{*/
+ void  Node::CreateVecSets(Vector* pv_g,Vector* pv_f,Vector* pv_s){
+ 
+ 	IssmDouble gvalue=1.0; //all nodes are in the g set;
+@@ -509,7 +509,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Node::CreateNodalConstraints{{{1*/
++/*FUNCTION Node::CreateNodalConstraints{{{*/
+ void  Node::CreateNodalConstraints(Vector* ys){
+ 
+ 	int i;
+@@ -538,7 +538,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Node::DofInSSet {{{1*/
++/*FUNCTION Node::DofInSSet {{{*/
+ void  Node::DofInSSet(int dof){
+ 
+ 	/*Put dof for this node into the s set (ie, this dof will be constrained 
+@@ -548,7 +548,7 @@
+ 	this->indexing.s_set[dof]=1;
+ }
+ /*}}}*/
+-/*FUNCTION Node::DofInFSet {{{1*/
++/*FUNCTION Node::DofInFSet {{{*/
+ void  Node::DofInFSet(int dof){
+ 
+ 	/*Put dof for this node into the f set (ie, this dof will NOT be constrained 
+@@ -558,14 +558,14 @@
+ 	this->indexing.s_set[dof]=0;
+ }
+ /*}}}*/
+-/*FUNCTION Node::FreezeDof{{{1*/
++/*FUNCTION Node::FreezeDof{{{*/
+ void  Node::FreezeDof(int dof){
+ 	
+ 	DofInSSet(dof-1); //with 0 displacement for this dof.
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Node::GetApproximation {{{1*/
++/*FUNCTION Node::GetApproximation {{{*/
+ int   Node::GetApproximation(){
+ 
+ 	int approximation;
+@@ -576,7 +576,7 @@
+ 	return approximation;
+ }
+ /*}}}*/
+-/*FUNCTION Node::GetConnectivity {{{1*/
++/*FUNCTION Node::GetConnectivity {{{*/
+ int Node::GetConnectivity(){
+ 
+ 	Vertex*  vertex=NULL;
+@@ -584,7 +584,7 @@
+ 	return vertex->connectivity;
+ }
+ /*}}}*/
+-/*FUNCTION Node::GetNumberOfDofs{{{1*/
++/*FUNCTION Node::GetNumberOfDofs{{{*/
+ int   Node::GetNumberOfDofs(int approximation_enum,int setenum){
+ 
+ 	/*Get number of degrees of freedom in a node, for a certain set (g,f or s-set)
+@@ -632,7 +632,7 @@
+ 	return numdofs;
+ }
+ /*}}}*/
+-/*FUNCTION Node::GetSigma {{{1*/
++/*FUNCTION Node::GetSigma {{{*/
+ IssmDouble Node::GetSigma(){
+ 	Vertex* vertex=NULL;
+ 
+@@ -640,7 +640,7 @@
+ 	return vertex->sigma;
+ }
+ /*}}}*/
+-/*FUNCTION Node::GetX {{{1*/
++/*FUNCTION Node::GetX {{{*/
+ IssmDouble Node::GetX(){
+ 	Vertex* vertex=NULL;
+ 
+@@ -648,7 +648,7 @@
+ 	return vertex->x;
+ }
+ /*}}}*/
+-/*FUNCTION Node::GetY {{{1*/
++/*FUNCTION Node::GetY {{{*/
+ IssmDouble Node::GetY(){
+ 	Vertex* vertex=NULL;
+ 
+@@ -656,7 +656,7 @@
+ 	return vertex->y;
+ }
+ /*}}}*/
+-/*FUNCTION Node::GetZ {{{1*/
++/*FUNCTION Node::GetZ {{{*/
+ IssmDouble Node::GetZ(){
+ 	Vertex* vertex=NULL;
+ 
+@@ -664,14 +664,14 @@
+ 	return vertex->z;
+ }
+ /*}}}*/
+-/*FUNCTION Node::IsClone {{{1*/
++/*FUNCTION Node::IsClone {{{*/
+ int   Node::IsClone(){
+ 	
+ 	return indexing.clone;
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Node::IsOnBed {{{1*/
++/*FUNCTION Node::IsOnBed {{{*/
+ int   Node::IsOnBed(){
+ 
+ 	bool onbed;
+@@ -682,7 +682,7 @@
+ 	return onbed;
+ }
+ /*}}}*/
+-/*FUNCTION Node::IsGrounded {{{1*/
++/*FUNCTION Node::IsGrounded {{{*/
+ int   Node::IsGrounded(){
+ 
+ 	bool onsheet;
+@@ -693,7 +693,7 @@
+ 	return onsheet;
+ }		
+ /*}}}*/
+-/*FUNCTION Node::IsFloating {{{1*/
++/*FUNCTION Node::IsFloating {{{*/
+ int   Node::IsFloating(){
+ 	
+ 	bool onshelf;
+@@ -704,7 +704,7 @@
+ 	return onshelf;
+ }
+ /*}}}*/
+-/*FUNCTION Node::IsOnSurface {{{1*/
++/*FUNCTION Node::IsOnSurface {{{*/
+ int   Node::IsOnSurface(){
+ 
+ 	bool onsurface;
+@@ -715,67 +715,67 @@
+ 	return onsurface;
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromVector(IssmDouble* vector, int name, int type){{{1*/
++/*FUNCTION Node::InputUpdateFromVector(IssmDouble* vector, int name, int type){{{*/
+ void  Node::InputUpdateFromVector(IssmDouble* vector, int name, int type){
+ 
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromVector(int* vector, int name, int type){{{1*/
++/*FUNCTION Node::InputUpdateFromVector(int* vector, int name, int type){{{*/
+ void  Node::InputUpdateFromVector(int* vector, int name, int type){
+ 
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromVector(bool* vector, int name, int type){{{1*/
++/*FUNCTION Node::InputUpdateFromVector(bool* vector, int name, int type){{{*/
+ void  Node::InputUpdateFromVector(bool* vector, int name, int type){
+ 
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){{{1*/
++/*FUNCTION Node::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){{{*/
+ void  Node::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){
+ 
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){{{1*/
++/*FUNCTION Node::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){{{*/
+ void  Node::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){
+ 
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromVectorDakota(int* vector, int name, int type){{{1*/
++/*FUNCTION Node::InputUpdateFromVectorDakota(int* vector, int name, int type){{{*/
+ void  Node::InputUpdateFromVectorDakota(int* vector, int name, int type){
+ 
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromVectorDakota(bool* vector, int name, int type){{{1*/
++/*FUNCTION Node::InputUpdateFromVectorDakota(bool* vector, int name, int type){{{*/
+ void  Node::InputUpdateFromVectorDakota(bool* vector, int name, int type){
+ 
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromConstant(IssmDouble constant, int name){{{1*/
++/*FUNCTION Node::InputUpdateFromConstant(IssmDouble constant, int name){{{*/
+ void  Node::InputUpdateFromConstant(IssmDouble constant, int name){
+ 
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromConstant(int constant, int name){{{1*/
++/*FUNCTION Node::InputUpdateFromConstant(int constant, int name){{{*/
+ void  Node::InputUpdateFromConstant(int constant, int name){
+ 
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Node::InputUpdateFromConstant(bool constant, int name){{{1*/
++/*FUNCTION Node::InputUpdateFromConstant(bool constant, int name){{{*/
+ void  Node::InputUpdateFromConstant(bool constant, int name){
+ 
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Node::UpdateSpcs {{{1*/
++/*FUNCTION Node::UpdateSpcs {{{*/
+ void   Node::UpdateSpcs(IssmDouble* ys){
+ 
+ 	int     count=0;
+@@ -790,7 +790,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Node::VecMerge {{{1*/
++/*FUNCTION Node::VecMerge {{{*/
+ void   Node::VecMerge(Vector* ug, IssmDouble* vector_serial,int setenum){
+ 
+ 	IssmDouble* values=NULL;
+@@ -841,7 +841,7 @@
+ 	xfree((void**)&indices);
+ }
+ /*}}}*/
+-/*FUNCTION Node::VecReduce {{{1*/
++/*FUNCTION Node::VecReduce {{{*/
+ void   Node::VecReduce(Vector* vector, IssmDouble* ug_serial,int setenum){
+ 
+ 	IssmDouble* values=NULL;
+@@ -888,7 +888,7 @@
+ /*}}}*/
+ 
+ /* DofObject routines:*/
+-/*FUNCTION Node::DistributeDofs{{{1*/
++/*FUNCTION Node::DistributeDofs{{{*/
+ void  Node::DistributeDofs(int* pdofcount,int setenum){
+ 
+ 	int i;
+@@ -935,7 +935,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Node::Off_setDofs{{{1*/
++/*FUNCTION Node::Off_setDofs{{{*/
+ void  Node::OffsetDofs(int dofcount,int setenum){
+ 	
+ 	int i;
+@@ -959,7 +959,7 @@
+ 	else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
+ }
+ /*}}}*/
+-/*FUNCTION Node::ShowTrueDofs{{{1*/
++/*FUNCTION Node::ShowTrueDofs{{{*/
+ void  Node::ShowTrueDofs(int* truedofs, int ncols,int setenum){
+ 
+ 	int j;
+@@ -976,7 +976,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Node::UpdateCloneDofs{{{1*/
++/*FUNCTION Node::UpdateCloneDofs{{{*/
+ void  Node::UpdateCloneDofs(int* alltruedofs,int ncols,int setenum){
+ 
+ 	int j;
+@@ -995,7 +995,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Node::SetClone {{{1*/
++/*FUNCTION Node::SetClone {{{*/
+ void  Node::SetClone(int* minranks){
+ 
+ 	extern int my_rank;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _SPCDynamic_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../Object.h"
+ class DataSet;
+ /*}}}*/
+@@ -23,12 +23,12 @@
+ 
+ 	public:
+ 
+-		/*SpcDynamic constructors, destructors:{{{1*/
++		/*SpcDynamic constructors, destructors:{{{*/
+ 		SpcDynamic();
+ 		SpcDynamic(int sid,int nodeid, int dof,int analysis_type);
+ 		~SpcDynamic();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -36,11 +36,11 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Constraint virtual functions definitions: {{{1*/
++		/*Constraint virtual functions definitions: {{{*/
+ 		void   ConstrainNode(Nodes* nodes,Parameters* parameters);
+ 		bool   InAnalysis(int analysis_type);
+ 		/*}}}*/
+-		/*SpcDynamic management:{{{1 */
++		/*SpcDynamic management:{{{ */
+ 		int    GetNodeId();
+ 		int    GetDof();
+ 		double GetValue();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _SPCStatic_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../Object.h"
+ class DataSet;
+ /*}}}*/
+@@ -22,12 +22,12 @@
+ 
+ 	public:
+ 
+-		/*SpcStatic constructors, destructors:{{{1*/
++		/*SpcStatic constructors, destructors:{{{*/
+ 		SpcStatic();
+ 		SpcStatic(int sid,int nodeid, int dof,double value,int analysis_type);
+ 		~SpcStatic();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -35,11 +35,11 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Constraint virtual functions definitions: {{{1*/
++		/*Constraint virtual functions definitions: {{{*/
+ 		void   ConstrainNode(Nodes* nodes,Parameters* parameters);
+ 		bool   InAnalysis(int analysis_type);
+ 		/*}}}*/
+-		/*SpcStatic management:{{{1 */
++		/*SpcStatic management:{{{ */
+ 		int    GetNodeId();
+ 		int    GetDof();
+ 		double GetValue();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _SPCTRANSIENT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "../Object.h"
+ class DataSet;
+ /*}}}*/
+@@ -24,12 +24,12 @@
+ 
+ 	public:
+ 
+-		/*SpcTransient constructors, destructors:{{{1*/
++		/*SpcTransient constructors, destructors:{{{*/
+ 		SpcTransient();
+ 		SpcTransient(int sid,int nodeid, int dof,int nsteps, double* times, double* values,int analysis_type);
+ 		~SpcTransient();
+ 		/*}}}*/
+-		/*Object virtual functions definitions:{{{1 */
++		/*Object virtual functions definitions:{{{ */
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		int   Id(); 
+@@ -37,11 +37,11 @@
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+-		/*Constraint virtual functions definitions: {{{1*/
++		/*Constraint virtual functions definitions: {{{*/
+ 		void   ConstrainNode(Nodes* nodes,Parameters* parameters);
+ 		bool   InAnalysis(int analysis_type);
+ 		/*}}}*/
+-		/*SpcTransient management:{{{1 */
++		/*SpcTransient management:{{{ */
+ 		int    GetNodeId();
+ 		int    GetDof();
+ 		double GetValue();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/Constraint.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/Constraint.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/Constraint.h	(revision 12365)
+@@ -9,7 +9,7 @@
+ #define _CONSTRAINT_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ class Nodes;
+ #include "../Object.h"
+ #include "../../toolkits/toolkits.h"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp	(revision 12365)
+@@ -17,12 +17,12 @@
+ #include "../objects.h"
+ 
+ /*SpcDynamic constructors and destructor*/
+-/*FUNCTION SpcDynamic::SpcDynamic(){{{1*/
++/*FUNCTION SpcDynamic::SpcDynamic(){{{*/
+ SpcDynamic::SpcDynamic(){
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcDynamic::SpcDynamic(int spc_sid,int spc_nodeid,...){{{1*/
++/*}}}*/
++/*FUNCTION SpcDynamic::SpcDynamic(int spc_sid,int spc_nodeid,...){{{*/
+ SpcDynamic::SpcDynamic(int spc_sid,int spc_nodeid, int spc_dof,int spc_analysis_type){
+ 
+ 	sid=spc_sid;
+@@ -34,15 +34,15 @@
+ 
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcDynamic::~SpcDynamic{{{1*/
++/*}}}*/
++/*FUNCTION SpcDynamic::~SpcDynamic{{{*/
+ SpcDynamic::~SpcDynamic(){
+ 	return;
+ }
+-/*}}}1*/
++/*}}}*/
+ 		
+ /*Object virtual functions definitions:*/
+-/*FUNCTION SpcDynamic::Echo {{{1*/
++/*FUNCTION SpcDynamic::Echo {{{*/
+ void SpcDynamic::Echo(void){
+ 
+ 	printf("SpcDynamic:\n");
+@@ -54,44 +54,44 @@
+ 	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcDynamic::DeepEcho {{{1*/
++/*}}}*/
++/*FUNCTION SpcDynamic::DeepEcho {{{*/
+ void SpcDynamic::DeepEcho(void){
+ 
+ 	this->Echo();
+ 	return;
+ }		
+-/*}}}1*/
+-/*FUNCTION SpcDynamic::Id {{{1*/
++/*}}}*/
++/*FUNCTION SpcDynamic::Id {{{*/
+ int    SpcDynamic::Id(void){ return sid; }
+-/*}}}1*/
+-/*FUNCTION SpcDynamic::MyRank {{{1*/
++/*}}}*/
++/*FUNCTION SpcDynamic::MyRank {{{*/
+ int    SpcDynamic::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+-/*}}}1*/
+-/*FUNCTION SpcDynamic::ObjectEnum{{{1*/
++/*}}}*/
++/*FUNCTION SpcDynamic::ObjectEnum{{{*/
+ int SpcDynamic::ObjectEnum(void){
+ 
+ 	return SpcDynamicEnum;
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION SpcDynamic::copy {{{1*/
++/*}}}*/
++/*FUNCTION SpcDynamic::copy {{{*/
+ Object* SpcDynamic::copy() {
+ 	return new SpcDynamic(*this); 
+ }
+-/*}}}1*/
++/*}}}*/
+ 
+ /*Constraint virtual functions definitions: */
+-/*FUNCTION SpcDynamic::InAnalysis{{{1*/
++/*FUNCTION SpcDynamic::InAnalysis{{{*/
+ bool SpcDynamic::InAnalysis(int in_analysis_type){
+ 	if (in_analysis_type==this->analysis_type) return true;
+ 	else return false;
+ }
+ /*}}}*/
+-/*FUNCTION SpcDynamic::ConstrainNode{{{1*/
++/*FUNCTION SpcDynamic::ConstrainNode{{{*/
+ void SpcDynamic::ConstrainNode(Nodes* nodes,Parameters* parameters){
+ 
+ 	Node* node=NULL;
+@@ -109,25 +109,25 @@
+ /*}}}*/
+ 
+ /*SpcDynamic functions*/
+-/*FUNCTION SpcDynamic::GetDof {{{1*/
++/*FUNCTION SpcDynamic::GetDof {{{*/
+ int SpcDynamic::GetDof(){
+ 	return dof;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcDynamic::GetNodeId {{{1*/
++/*}}}*/
++/*FUNCTION SpcDynamic::GetNodeId {{{*/
+ int   SpcDynamic::GetNodeId(){
+ 	
+ 	return nodeid;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcDynamic::GetValue {{{1*/
++/*}}}*/
++/*FUNCTION SpcDynamic::GetValue {{{*/
+ double SpcDynamic::GetValue(){
+ 	_assert_(this->isset);
+ 	_assert_(!isnan(value));
+ 	return value;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcDynamic::SetDynamicConstraint {{{1*/
++/*}}}*/
++/*FUNCTION SpcDynamic::SetDynamicConstraint {{{*/
+ void SpcDynamic::SetDynamicConstraint(Nodes* nodes,double* yg_serial){
+ 
+ 	int pos;
+@@ -138,4 +138,4 @@
+ 	this->value=yg_serial[pos];
+ 	this->isset=true;
+ }
+-/*}}}1*/
++/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp	(revision 12365)
+@@ -17,12 +17,12 @@
+ #include "../objects.h"
+ 
+ /*SpcStatic constructors and destructor*/
+-/*FUNCTION SpcStatic::SpcStatic(){{{1*/
++/*FUNCTION SpcStatic::SpcStatic(){{{*/
+ SpcStatic::SpcStatic(){
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcStatic::SpcStatic(int spc_sid,int spc_nodeid,...){{{1*/
++/*}}}*/
++/*FUNCTION SpcStatic::SpcStatic(int spc_sid,int spc_nodeid,...){{{*/
+ SpcStatic::SpcStatic(int spc_sid,int spc_nodeid, int spc_dof,double spc_value,int spc_analysis_type){
+ 
+ 	sid=spc_sid;
+@@ -33,15 +33,15 @@
+ 
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcStatic::~SpcStatic{{{1*/
++/*}}}*/
++/*FUNCTION SpcStatic::~SpcStatic{{{*/
+ SpcStatic::~SpcStatic(){
+ 	return;
+ }
+-/*}}}1*/
++/*}}}*/
+ 		
+ /*Object virtual functions definitions:*/
+-/*FUNCTION SpcStatic::Echo {{{1*/
++/*FUNCTION SpcStatic::Echo {{{*/
+ void SpcStatic::Echo(void){
+ 
+ 	printf("SpcStatic:\n");
+@@ -52,8 +52,8 @@
+ 	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcStatic::DeepEcho {{{1*/
++/*}}}*/
++/*FUNCTION SpcStatic::DeepEcho {{{*/
+ void SpcStatic::DeepEcho(void){
+ 
+ 	printf("SpcStatic:\n");
+@@ -64,37 +64,37 @@
+ 	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
+ 	return;
+ }		
+-/*}}}1*/
+-/*FUNCTION SpcStatic::Id {{{1*/
++/*}}}*/
++/*FUNCTION SpcStatic::Id {{{*/
+ int    SpcStatic::Id(void){ return sid; }
+-/*}}}1*/
+-/*FUNCTION SpcStatic::MyRank {{{1*/
++/*}}}*/
++/*FUNCTION SpcStatic::MyRank {{{*/
+ int    SpcStatic::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+-/*}}}1*/
+-/*FUNCTION SpcStatic::ObjectEnum{{{1*/
++/*}}}*/
++/*FUNCTION SpcStatic::ObjectEnum{{{*/
+ int SpcStatic::ObjectEnum(void){
+ 
+ 	return SpcStaticEnum;
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION SpcStatic::copy {{{1*/
++/*}}}*/
++/*FUNCTION SpcStatic::copy {{{*/
+ Object* SpcStatic::copy() {
+ 	return new SpcStatic(*this); 
+ }
+-/*}}}1*/
++/*}}}*/
+ 
+ /*Constraint virtual functions definitions: */
+-/*FUNCTION SpcStatic::InAnalysis{{{1*/
++/*FUNCTION SpcStatic::InAnalysis{{{*/
+ bool SpcStatic::InAnalysis(int in_analysis_type){
+ 	if (in_analysis_type==this->analysis_type) return true;
+ 	else return false;
+ }
+ /*}}}*/
+-/*FUNCTION SpcStatic::ConstrainNode{{{1*/
++/*FUNCTION SpcStatic::ConstrainNode{{{*/
+ void SpcStatic::ConstrainNode(Nodes* nodes,Parameters* parameters){
+ 
+ 	Node* node=NULL;
+@@ -110,20 +110,20 @@
+ /*}}}*/
+ 
+ /*SpcStatic functions*/
+-/*FUNCTION SpcStatic::GetDof {{{1*/
++/*FUNCTION SpcStatic::GetDof {{{*/
+ int SpcStatic::GetDof(){
+ 	return dof;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcStatic::GetNodeId {{{1*/
++/*}}}*/
++/*FUNCTION SpcStatic::GetNodeId {{{*/
+ int   SpcStatic::GetNodeId(){
+ 	
+ 	return nodeid;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcStatic::GetValue {{{1*/
++/*}}}*/
++/*FUNCTION SpcStatic::GetValue {{{*/
+ double SpcStatic::GetValue(){
+ 	_assert_(!isnan(value));
+ 	return value;
+ }
+-/*}}}1*/
++/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12365)
+@@ -17,7 +17,7 @@
+ #include "../objects.h"
+ 
+ /*SpcTransient constructors and destructor*/
+-/*FUNCTION SpcTransient::SpcTransient(){{{1*/
++/*FUNCTION SpcTransient::SpcTransient(){{{*/
+ SpcTransient::SpcTransient(){
+ 	sid=-1;
+ 	nodeid=-1;
+@@ -28,8 +28,8 @@
+ 	analysis_type=-1;
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcTransient::SpcTransient(int spc_sid,int spc_nodeid,...){{{1*/
++/*}}}*/
++/*FUNCTION SpcTransient::SpcTransient(int spc_sid,int spc_nodeid,...){{{*/
+ SpcTransient::SpcTransient(int spc_sid,int spc_nodeid, int spc_dof,int spc_nsteps, double* spc_times, double* spc_values,int spc_analysis_type){
+ 
+ 	sid=spc_sid;
+@@ -45,17 +45,17 @@
+ 	analysis_type=spc_analysis_type;
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcTransient::~SpcTransient{{{1*/
++/*}}}*/
++/*FUNCTION SpcTransient::~SpcTransient{{{*/
+ SpcTransient::~SpcTransient(){
+ 	xfree((void**)&times);
+ 	xfree((void**)&values);
+ 	return;
+ }
+-/*}}}1*/
++/*}}}*/
+ 		
+ /*Object virtual functions definitions:*/
+-/*FUNCTION SpcTransient::Echo {{{1*/
++/*FUNCTION SpcTransient::Echo {{{*/
+ void SpcTransient::Echo(void){
+ 
+ 	int i;
+@@ -71,43 +71,43 @@
+ 	}
+ 	return;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcTransient::DeepEcho {{{1*/
++/*}}}*/
++/*FUNCTION SpcTransient::DeepEcho {{{*/
+ void SpcTransient::DeepEcho(void){
+ 	this->Echo();
+ }		
+-/*}}}1*/
+-/*FUNCTION SpcTransient::Id {{{1*/
++/*}}}*/
++/*FUNCTION SpcTransient::Id {{{*/
+ int    SpcTransient::Id(void){ return sid; }
+-/*}}}1*/
+-/*FUNCTION SpcTransient::MyRank {{{1*/
++/*}}}*/
++/*FUNCTION SpcTransient::MyRank {{{*/
+ int    SpcTransient::MyRank(void){ 
+ 	extern int my_rank;
+ 	return my_rank; 
+ }
+-/*}}}1*/
+-/*FUNCTION SpcTransient::ObjectEnum{{{1*/
++/*}}}*/
++/*FUNCTION SpcTransient::ObjectEnum{{{*/
+ int SpcTransient::ObjectEnum(void){
+ 
+ 	return SpcTransientEnum;
+ 
+ }
+-/*}}}1*/
+-/*FUNCTION SpcTransient::copy {{{1*/
++/*}}}*/
++/*FUNCTION SpcTransient::copy {{{*/
+ Object* SpcTransient::copy() {
+ 	return new SpcTransient(sid,nodeid,dof,nsteps,times,values,analysis_type);
+ }
+-/*}}}1*/
++/*}}}*/
+ 
+ /*Constraint virtual functions definitions:*/
+-/*FUNCTION SpcTransient::InAnalysis{{{1*/
++/*FUNCTION SpcTransient::InAnalysis{{{*/
+ bool SpcTransient::InAnalysis(int in_analysis_type){
+ 	
+ 	if (in_analysis_type==this->analysis_type) return true;
+ 	else return false;
+ }
+ /*}}}*/
+-/*FUNCTION SpcTransient::ConstrainNode{{{1*/
++/*FUNCTION SpcTransient::ConstrainNode{{{*/
+ void SpcTransient::ConstrainNode(Nodes* nodes,Parameters* parameters){
+ 
+ 	Node* node=NULL;
+@@ -157,20 +157,20 @@
+ /*}}}*/
+ 
+ /*SpcTransient functions*/
+-/*FUNCTION SpcTransient::GetDof {{{1*/
++/*FUNCTION SpcTransient::GetDof {{{*/
+ int SpcTransient::GetDof(){
+ 	return dof;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcTransient::GetNodeId {{{1*/
++/*}}}*/
++/*FUNCTION SpcTransient::GetNodeId {{{*/
+ int   SpcTransient::GetNodeId(){
+ 	
+ 	return nodeid;
+ }
+-/*}}}1*/
+-/*FUNCTION SpcTransient::GetValue {{{1*/
++/*}}}*/
++/*FUNCTION SpcTransient::GetValue {{{*/
+ double SpcTransient::GetValue(){
+ 	return values[0];
+ }
+-/*}}}1*/
++/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DakotaPlugin.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DakotaPlugin.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DakotaPlugin.h	(revision 12365)
+@@ -8,7 +8,7 @@
+ #ifdef _HAVE_DAKOTA_ //only works if dakota library has been compiled in.
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ 
+ 
+ #include "DirectApplicInterface.H"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12365)
+@@ -21,7 +21,7 @@
+ #include "../io/io.h"
+ #include "../include/include.h"
+ 
+-/*FUNCTION IoModel::IoModel(){{{1*/
++/*FUNCTION IoModel::IoModel(){{{*/
+ IoModel::IoModel(){
+ 	this->fid=NULL;
+ 	this->data=NULL;
+@@ -38,7 +38,7 @@
+ 	this->constraintcounter=0;
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::IoModel(FILE*  iomodel_handle){{{1*/
++/*FUNCTION IoModel::IoModel(FILE*  iomodel_handle){{{*/
+ IoModel::IoModel(FILE* iomodel_handle){
+ 	
+ 	/*First, keep track of the file handle: */
+@@ -67,7 +67,7 @@
+ 	this->constraintcounter=0;
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::~IoModel(){{{1*/
++/*FUNCTION IoModel::~IoModel(){{{*/
+ IoModel::~IoModel(){
+ 
+ 	delete this->constants;
+@@ -91,7 +91,7 @@
+ }
+ /*}}}*/
+ 
+-/*FUNCTION IoModel::CheckEnumSync{{{1*/
++/*FUNCTION IoModel::CheckEnumSync{{{*/
+ void  IoModel::CheckEnumSync(void){
+ 
+ 	extern int my_rank;
+@@ -134,7 +134,7 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::Constant(bool* poutput,int constant_enum){{{1*/
++/*FUNCTION IoModel::Constant(bool* poutput,int constant_enum){{{*/
+ void IoModel::Constant(bool* poutput,int constant_enum){
+ 
+ 	_assert_(constant_enum>=0);
+@@ -143,7 +143,7 @@
+ 	this->constants->FindParam(poutput,constant_enum);
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::Constant(int* poutput,int constant_enum){{{1*/
++/*FUNCTION IoModel::Constant(int* poutput,int constant_enum){{{*/
+ void IoModel::Constant(int* poutput,int constant_enum){
+ 
+ 	_assert_(constant_enum>=0);
+@@ -152,7 +152,7 @@
+ 	this->constants->FindParam(poutput,constant_enum);
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::Constant(double* poutput,int constant_enum){{{1*/
++/*FUNCTION IoModel::Constant(double* poutput,int constant_enum){{{*/
+ void IoModel::Constant(double* poutput,int constant_enum){
+ 
+ 	_assert_(constant_enum>=0);
+@@ -161,7 +161,7 @@
+ 	this->constants->FindParam(poutput,constant_enum);
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::Constant(char** poutput,int constant_enum){{{1*/
++/*FUNCTION IoModel::Constant(char** poutput,int constant_enum){{{*/
+ void IoModel::Constant(char** poutput,int constant_enum){
+ 
+ 	_assert_(constant_enum>=0);
+@@ -170,7 +170,7 @@
+ 	this->constants->FindParam(poutput,constant_enum);
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::CopyConstantObject{{{1*/
++/*FUNCTION IoModel::CopyConstantObject{{{*/
+ Param* IoModel::CopyConstantObject(int constant_enum){
+ 
+ 	_assert_(this->constants);
+@@ -182,7 +182,7 @@
+ 	return (Param*)param->copy();
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::Data{{{1*/
++/*FUNCTION IoModel::Data{{{*/
+ double* IoModel::Data(int data_enum){
+ 
+ 	_assert_(data_enum<MaximumNumberOfEnums);
+@@ -191,7 +191,7 @@
+ 	return this->data[data_enum];
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::DeleteData{{{1*/
++/*FUNCTION IoModel::DeleteData{{{*/
+ void  IoModel::DeleteData(int num,...){
+ 
+ 	va_list ap;
+@@ -209,7 +209,7 @@
+ 	}
+ 	va_end(ap);
+ } /*}}}*/
+-/*FUNCTION IoModel::FetchConstants{{{1*/
++/*FUNCTION IoModel::FetchConstants{{{*/
+ void  IoModel::FetchConstants(void){
+ 
+ 	extern int my_rank;
+@@ -232,7 +232,7 @@
+ 	_assert_(this->constants);
+ 
+ 	/*Go find in the binary file, the position of the data we want to fetch: */
+-	if(my_rank==0){ //cpu 0{{{2
++	if(my_rank==0){ //cpu 0{{{
+ 	
+ 		/*First set FILE* position to the beginning of the file: */
+ 		fseek(this->fid,0,SEEK_SET);
+@@ -367,7 +367,7 @@
+ 		}
+ 	} //}}}
+ 	#ifdef _HAVE_MPI_
+-	else{ //cpu ~0 {{{2
++	else{ //cpu ~0 {{{
+ 		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: */
+ 			if(record_code==0){
+@@ -439,7 +439,7 @@
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(bool*     pbool,int data_enum){{{1*/
++/*FUNCTION IoModel::FetchData(bool*     pbool,int data_enum){{{*/
+ void  IoModel::FetchData(bool* pboolean,int data_enum){
+ 
+ 	extern int my_rank;
+@@ -469,7 +469,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(int*      pinteger,int data_enum){{{1*/
++/*FUNCTION IoModel::FetchData(int*      pinteger,int data_enum){{{*/
+ void  IoModel::FetchData(int* pinteger,int data_enum){
+ 
+ 	extern int my_rank;
+@@ -499,7 +499,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(double*   pscalar,int data_enum){{{1*/
++/*FUNCTION IoModel::FetchData(double*   pscalar,int data_enum){{{*/
+ void  IoModel::FetchData(double* pscalar,int data_enum){
+ 
+ 
+@@ -529,7 +529,7 @@
+ 		 
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(char**    pstring,int data_enum){{{1*/
++/*FUNCTION IoModel::FetchData(char**    pstring,int data_enum){{{*/
+ void  IoModel::FetchData(char** pstring,int data_enum){
+ 
+ 	extern int my_rank;
+@@ -580,7 +580,7 @@
+ 	*pstring=string;
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(int**  pintegerematrix,int* pM,int* pN,int data_enum){{{1*/
++/*FUNCTION IoModel::FetchData(int**  pintegerematrix,int* pM,int* pN,int data_enum){{{*/
+ void  IoModel::FetchData(int** pmatrix,int* pM,int* pN,int data_enum){
+ 
+ 	extern int my_rank;
+@@ -655,7 +655,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(double**  pdoublematrix,int* pM,int* pN,int data_enum){{{1*/
++/*FUNCTION IoModel::FetchData(double**  pdoublematrix,int* pM,int* pN,int data_enum){{{*/
+ void  IoModel::FetchData(double** pmatrix,int* pM,int* pN,int data_enum){
+ 
+ 	extern int my_rank;
+@@ -708,7 +708,7 @@
+ 	if (pN)*pN=N;
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(char***   pstrings,int* pnumstrings,int data_enum){{{1*/
++/*FUNCTION IoModel::FetchData(char***   pstrings,int* pnumstrings,int data_enum){{{*/
+ void  IoModel::FetchData(char*** pstrings,int* pnumstrings,int data_enum){
+ 
+ 	extern int my_rank;
+@@ -778,7 +778,7 @@
+ 	*pnumstrings=numstrings;
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(double*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{1*/
++/*FUNCTION IoModel::FetchData(double*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{*/
+ void  IoModel::FetchData(double*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){
+ 
+ 	int i;
+@@ -867,7 +867,7 @@
+ 	*pnumrecords=numrecords;
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(int num,...){{{1*/
++/*FUNCTION IoModel::FetchData(int num,...){{{*/
+ void  IoModel::FetchData(int num,...){
+ 
+ 	va_list ap;
+@@ -902,7 +902,7 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchDataToInput{{{1*/
++/*FUNCTION IoModel::FetchDataToInput{{{*/
+ void IoModel::FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum,double default_value){
+ 
+ 	/*intermediary: */
+@@ -934,7 +934,7 @@
+ 	fid=this->SetFilePointerToData(&code, &vector_layout,vector_enum);
+ 
+ 	switch(code){
+-		case 1: //boolean constant.  {{{2
++		case 1: //boolean constant.  {{{
+ 			this->FetchData(&boolean,vector_enum);
+ 
+ 			/*Add boolean constant input to all elements: */
+@@ -947,7 +947,7 @@
+ 				}
+ 			}
+ 			break; /*}}}*/
+-		case 2: //integer constant.  {{{2
++		case 2: //integer constant.  {{{
+ 			this->FetchData(&integer,vector_enum);
+ 
+ 			/*Add integer constant input to all elements: */
+@@ -960,7 +960,7 @@
+ 				}
+ 			}
+ 			break; /*}}}*/
+-		case 3: //double constant.  {{{2
++		case 3: //double constant.  {{{
+ 			this->FetchData(&scalar,vector_enum);
+ 
+ 			/*Add double constant input to all elements: */
+@@ -973,7 +973,7 @@
+ 				}
+ 			}
+ 			break; /*}}}*/
+-		case 5: //boolean vector.  {{{2
++		case 5: //boolean vector.  {{{
+ 
+ 			/*Fetch vector:*/
+ 			this->FetchData(&doublevector,&M,&N,vector_enum); //we still have a doublevector, because it might include times in transient mode
+@@ -1011,7 +1011,7 @@
+ 				}
+ 			}
+ 			break; /*}}}*/
+-		case 6: //int vector.  {{{2
++		case 6: //int vector{{{
+ 
+ 			/*Fetch vector:*/
+ 			this->FetchData(&doublevector,&M,&N,vector_enum); //we still have a doublevector, because it might include times in transient mode
+@@ -1049,7 +1049,7 @@
+ 				}
+ 			}
+ 			break; /*}}}*/
+-		case 7: //double vector.  {{{2
++		case 7: //double vector{{{
+ 
+ 			/*Fetch vector:*/
+ 			this->FetchData(&doublevector,&M,&N,vector_enum);
+@@ -1088,7 +1088,7 @@
+ 			}
+ 
+ 			break; /*}}}*/
+-		default: /*{{{2*/
++		default: /*{{{*/
+ 			_error_("%s%i%s","data code ",code," not supported yet!");
+ 			break;
+ 			/*}}}*/
+@@ -1097,7 +1097,7 @@
+ 	xfree((void**)&doublevector);
+ 	xfree((void**)&string);
+ }
+-/*FUNCTION IoModel::SetFilePointerToData{{{1*/
++/*FUNCTION IoModel::SetFilePointerToData{{{*/
+ FILE* IoModel::SetFilePointerToData(int* pcode,int* pvector_type, int data_enum){
+ 
+ 	extern int my_rank;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.h	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.h	(revision 12365)
+@@ -6,7 +6,7 @@
+ #define _FEMMODEL_H_
+ 
+ /*Headers:*/
+-/*{{{1*/
++/*{{{*/
+ #include "./Object.h"
+ #include "../toolkits/toolkits.h"
+ class DataSet;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/mesh/bamg.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/mesh/bamg.m	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/mesh/bamg.m	(revision 12365)
+@@ -57,7 +57,7 @@
+ bamg_geometry=bamggeom;
+ bamg_mesh=bamgmesh;
+ 
+-% Bamg Geometry parameters {{{1
++% Bamg Geometry parameters {{{
+ if exist(options,'domain'),
+ 
+ 	%Check that file exists
+@@ -258,7 +258,7 @@
+ 	%do nothing...
+ end
+ %}}}
+-% Bamg Mesh parameters {{{1
++% Bamg Mesh parameters {{{
+ if (~exist(options,'domain') & md.mesh.numberofvertices~=0 & md.mesh.dimension==2),
+ 
+ 	if isstruct(md.private.bamg) & isfield(md.private.bamg,'mesh'),
+@@ -273,7 +273,7 @@
+ 	end
+ end
+ %}}}
+-% Bamg Options {{{1
++% Bamg Options {{{
+ bamg_options.Crack=getfieldvalue(options,'Crack',0);
+ bamg_options.anisomax=getfieldvalue(options,'anisomax',10^30);
+ bamg_options.coeff=getfieldvalue(options,'coeff',1);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/setmask.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/setmask.m	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/setmask.m	(revision 12365)
+@@ -24,7 +24,7 @@
+ 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
++%Assign elementonfloatingice, elementongroundedice, vertexongroundedice and vertexonfloatingice. Only change at your own peril! This is synchronized heavily with the GroundingLineMigration module. {{{
+ elementonfloatingice=FlagElements(md,floatingicename);
+ elementongroundedice=FlagElements(md,groundedicename);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/WriteData.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/WriteData.m	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/WriteData.m	(revision 12365)
+@@ -232,7 +232,7 @@
+ 	%Get Enum
+ 	enum=eval([string 'Enum();']); 
+ end % }}}
+-function code=FormatToCode(format) % {{{1
++function code=FormatToCode(format) % {{{
+ %This routine takes the format string, and hardcodes it into an integer, which 
+ %is passed along the record, in order to identify the nature of the dataset being 
+ %sent.
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/setmask.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/setmask.py	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/setmask.py	(revision 12365)
+@@ -21,7 +21,7 @@
+ 	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
++	#Assign elementonfloatingice, elementongroundedice, vertexongroundedice and vertexonfloatingice. Only change at your own peril! This is synchronized heavily with the GroundingLineMigration module. {{{
+ 	elementonfloatingice = fe.FlagElements(md, floatingicename)
+ 	elementongroundedice = fe.FlagElements(md, groundedicename) 
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/qmu/preqmu.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/qmu/preqmu.m	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/qmu/preqmu.m	(revision 12365)
+@@ -43,7 +43,7 @@
+ variables=expandvariables(md,variables);
+ responses=expandresponses(md,responses);
+ 
+-%go through variables and responses, and check they don't have more than md.qmu.numberofpartitions values. Also determine numvariables and numresponses{{{1
++%go through variables and responses, and check they don't have more than md.qmu.numberofpartitions values. Also determine numvariables and numresponses{{{
+ numvariables=0;
+ variable_fieldnames=fieldnames(variables);
+ for i=1:length(variable_fieldnames),
+@@ -75,7 +75,7 @@
+ dakota_in_data(md.qmu.method(options.imethod),variables,responses,md.qmu.params(options.iparams),options.qmufile);
+ system(['rm -rf ' md.miscellaneous.name '.m']);
+ 
+-%build a list of variables and responses descriptors. the list is not expanded. {{{1
++%build a list of variables and responses descriptors. the list is not expanded. {{{
+ variabledescriptors={};
+ variable_fieldnames=fieldnames(md.qmu.variables(options.ivar));
+ for i=1:length(variable_fieldnames),
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/plotoptions.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/plotoptions.m	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/plotoptions.m	(revision 12365)
+@@ -5,18 +5,18 @@
+ 
+ classdef plotoptions
+     properties (SetAccess=public) 
+-		 % {{{1
++		 % {{{
+ 		 numberofplots = 0;
+ 		 figurenumber  = 1;
+ 		 list          = cell(0,0);
+ 		 %}}}
+ 	 end
+ 	 methods
+-		 function opt=plotoptions(varargin) % {{{1
++		 function opt=plotoptions(varargin) % {{{
+ 			 opt=buildlist(opt,varargin{:});
+ 		 end
+ 		 %}}}
+-		 function disp(opt) % {{{1
++		 function disp(opt) % {{{
+ 			 disp(sprintf('\n%s = \n',inputname(1)));
+ 			 disp(sprintf('   numberofplots: %i',opt.numberofplots));
+ 			 disp(sprintf('   figurenumber: %i',opt.figurenumber));
+@@ -40,7 +40,7 @@
+ 			 end
+ 		 end
+ 		 %}}}
+-		 function opt=buildlist(opt,varargin) % {{{1
++		 function opt=buildlist(opt,varargin) % {{{
+ 
+ 			 %check length of input
+ 			 if mod((nargin-1),2),
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/organizer.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/organizer.m	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/organizer.m	(revision 12365)
+@@ -15,7 +15,7 @@
+ 
+ classdef organizer
+     properties (SetAccess=private) 
+-		 % {{{1
++		 % {{{
+ 		 currentstep   =0;
+ 	 end
+     properties (SetAccess=public) 
+@@ -27,7 +27,7 @@
+ 		 %}}}
+ 	 end
+ 	 methods
+-		 function org=organizer(varargin) % {{{1
++		 function org=organizer(varargin) % {{{
+ 
+ 			 %process options
+ 			 options=pairoptions(varargin{:});
+@@ -56,7 +56,7 @@
+ 			 end
+ 		 end
+ 		 %}}}
+-		 function disp(org) % {{{1
++		 function disp(org) % {{{
+ 			 disp(sprintf('   Repository: ''%s''',org.repository));
+ 			 disp(sprintf('   Prefix:     ''%s''',org.prefix));
+ 			 if isempty(org.steps)
+@@ -68,7 +68,7 @@
+ 			 end
+ 		 end
+ 		 %}}}
+-		 function md=loadmodel(org,string),% {{{1
++		 function md=loadmodel(org,string),% {{{
+ 
+ 			 %Get model path
+ 			 if ~ischar(string), error('argument provided is not a string'); end
+@@ -94,7 +94,7 @@
+ 				 error(['Could not find ' path ]);
+ 			 end
+ 		 end%}}}
+-		 function bool=perform(org,string) % {{{1
++		 function bool=perform(org,string) % {{{
+ 			 
+ 			 bool=false;
+ 
+@@ -128,7 +128,7 @@
+ 			 assignin('caller',inputname(1),org);
+ 
+ 		 end%}}}
+-		 function savemodel(org,md) % {{{1
++		 function savemodel(org,md) % {{{
+ 
+ 			 %check
+ 			 if (org.currentstep==0), error('Cannot save model because organizer (org) is empty! Make sure you did not skip any perform call'); end
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/solver.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/solver.m	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/solver.m	(revision 12365)
+@@ -17,7 +17,7 @@
+ 					 error('constructor not supported');
+ 				 end
+ 			 end % }}}
+-		 function obj = addoptions(obj,analysis,varargin) % {{{1
++		 function obj = addoptions(obj,analysis,varargin) % {{{
+ 		 % Usage example:
+ 		 %    md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum,stokesoptions());
+ 		 %    md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/bamggeom.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/bamggeom.m	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/bamggeom.m	(revision 12365)
+@@ -5,7 +5,7 @@
+ 
+ classdef bamggeom
+ 	properties (SetAccess=public) 
+-		% {{{1
++		% {{{
+ 		Vertices=[];
+ 		Edges=[];
+ 		TangentAtEdges=[];
+@@ -17,7 +17,7 @@
+ 		% }}}
+ 	end
+ 	methods
+-		function bg = bamggeom(varargin)% {{{1
++		function bg = bamggeom(varargin)% {{{
+ 		%BAMGGEOM - constructor for bamggeom object
+ 		%
+ 		%   Usage:
+@@ -43,7 +43,7 @@
+ 				error('bamggeom constructor error message: unknown type of constructor call');
+ 			end
+ 		end%}}}
+-		function display(bg)% {{{1
++		function display(bg)% {{{
+ 			disp(sprintf('\n%s = \n',inputname(1)));
+ 			disp(struct(bg))
+ 		end%}}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/bamgmesh.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/bamgmesh.m	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/bamgmesh.m	(revision 12365)
+@@ -5,7 +5,7 @@
+ 
+ classdef bamgmesh
+ 	properties (SetAccess=public) 
+-		% {{{1
++		% {{{
+ 		Vertices=[];
+ 		Edges=[];
+ 		Triangles=[];
+@@ -25,7 +25,7 @@
+ 		% }}}
+ 	end
+ 	methods
+-		function bg = bamgmesh(varargin)% {{{1
++		function bg = bamgmesh(varargin)% {{{
+ 
+ 		switch nargin
+ 			case 0
+@@ -47,7 +47,7 @@
+ 				error('bamgmesh constructor error message: unknown type of constructor call');
+ 			end
+ 		end%}}}
+-		function display(bm)% {{{1
++		function display(bm)% {{{
+ 			disp(sprintf('\n%s = \n',inputname(1)));
+ 			disp(struct(bm))
+ 		end%}}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/verbose.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/verbose.m	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/verbose.m	(revision 12365)
+@@ -20,7 +20,7 @@
+ 
+ classdef verbose
+ 	properties (SetAccess=public) 
+-		% {{{1
++		% {{{
+ 		%BEGINFIELDS
+ 		mprocessor  = false;
+ 		module      = false;
+@@ -34,7 +34,7 @@
+ 	end
+ 	%}}}
+ 	methods
+-		function verbose=verbose(varargin) % {{{1
++		function verbose=verbose(varargin) % {{{
+ 
+ 			switch(nargin),
+ 				case 0,
+@@ -69,7 +69,7 @@
+ 			end
+ 		end
+ 		%}}}
+-		function binary=VerboseToBinary(verbose) % {{{1
++		function binary=VerboseToBinary(verbose) % {{{
+ 
+ 		%BEGINVERB2BIN
+ 		binary=0;
+@@ -84,7 +84,7 @@
+ 
+ 		end
+ 		%}}}
+-		function verbose=BinaryToVerbose(verbose,binary) % {{{1
++		function verbose=BinaryToVerbose(verbose,binary) % {{{
+ 
+ 		%BEGINBIN2VERB
+ 		if bitand(binary,1), verbose.mprocessor=true; else verbose.mprocessor=false; end
+@@ -101,7 +101,7 @@
+ 		function checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 		end % }}}
+-		function disp(verbose) % {{{1
++		function disp(verbose) % {{{
+ 			
+ 		%BEGINDISP
+ 		disp(sprintf('class ''%s''  = ',class(verbose)));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m	(revision 12365)
+@@ -5,7 +5,7 @@
+ 
+ classdef model
+     properties (SetAccess=public) %Model fields
+-		 % {{{1
++		 % {{{
+ 		 %Careful here: no other class should be used as default value this is a bug of matlab
+ 		 mesh             = 0;
+ 		 mask             = 0;
+@@ -74,7 +74,7 @@
+ 		 end% }}}
+ 	 end
+ 	 methods
+-		 function md = model(varargin) % {{{1
++		 function md = model(varargin) % {{{
+ 
+ 			 switch nargin
+ 				 case 0
+@@ -356,7 +356,7 @@
+ 			 end
+ 
+ 		 end% }}}
+-		 function md = setdefaultparameters(md) % {{{1
++		 function md = setdefaultparameters(md) % {{{
+ 
+ 			 %initialize subclasses
+ 			 md.mesh             = mesh();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/planet.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/planet.m	(revision 12364)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/planet.m	(revision 12365)
+@@ -5,7 +5,7 @@
+ 
+ classdef planet < model
+     properties (SetAccess=public) %Planet fields
+-		 % {{{1
++		 % {{{
+ 		 %Planet specific fields
+ 		 r=NaN;
+ 		 theta=NaN;
+@@ -13,7 +13,7 @@
+ 		 %}}}
+ 	 end
+ 	 methods
+-		function md=planetmesh(md,varargin) % {{{1
++		function md=planetmesh(md,varargin) % {{{
+ 		%PLANETMESH: build 2d shell mesh
+ 		%
+ 		% Usage: md=planetmesh(md,'method','mixed','radius',6378000,'angleresol',1);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12365-12366.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12365-12366.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12365-12366.diff	(revision 12679)
@@ -0,0 +1,93 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Patch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Patch.cpp	(revision 12365)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Patch.cpp	(revision 12366)
+@@ -51,7 +51,7 @@
+ 		this->values=NULL;
+ 	}
+ 	else{
+-		this->values=(double*)xmalloc(this->numcols*this->numrows*sizeof(double));
++	        this->values=xNew<IssmDouble>(this->numcols*this->numrows);
+ 		for(i=0;i<this->numrows;i++){
+ 			for(j=0;j<this->numcols;j++){
+ 				this->values[i*this->numcols+j]=NAN;
+@@ -63,7 +63,7 @@
+ /*}}}*/
+ /*FUNCTION Patch::~Patch(){{{*/
+ Patch::~Patch(){
+-	xfree((void**)&values);
++	xDelete<IssmDouble>(values);
+ }
+ /*}}}*/
+ 
+@@ -72,7 +72,7 @@
+ void Patch::fillelementinfo(int count, int element_id, int* vertices_ids, int num_vertices){
+ 
+ 	int i;
+-	double* row=NULL;
++	IssmDouble* row=NULL;
+ 
+ 	/*point to the start of the row: */
+ 	row=this->values+count*this->numcols;
+@@ -88,10 +88,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Patch::fillresultinfo{{{*/
+-void Patch::fillresultinfo(int count,int enum_type,int step, double time, int interpolation, double* nodal_values, int num_nodes){
++void Patch::fillresultinfo(int count,int enum_type,int step, IssmDouble time, int interpolation, IssmDouble* nodal_values, int num_nodes){
+ 
+ 	int i;
+-	double* row=NULL;
++	IssmDouble* row=NULL;
+ 
+ 	/*point to the start of the row: */
+ 	row=this->values+count*this->numcols;
+@@ -100,7 +100,7 @@
+ 	 enum_type step time element_id interpolation vertices_ids nodal_values
+ 	 */
+ 	row[0]=enum_type;
+-	row[1]=(double)step;
++	row[1]=(IssmDouble)step;
+ 	row[2]=time;
+ 	row[4]=interpolation;
+ 	for(i=0;i<num_nodes;i++){
+@@ -118,7 +118,7 @@
+ 	extern int  num_procs;
+ 	int         total_numrows;
+ 	int         node_numrows;
+-	double     *total_values  = NULL;
++	IssmDouble     *total_values  = NULL;
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Status  status;
+ 	#endif
+@@ -135,12 +135,12 @@
+ 	if(total_numrows==0) return;
+ 
+ 	/*Now, allocate buffer to holds all the values, on node 0: */
+-	if(my_rank==0)total_values=(double*)xmalloc(this->numcols*total_numrows*sizeof(double));
++	if(my_rank==0)total_values=xNew<IssmDouble>(this->numcols*total_numrows);
+ 
+ 	/*Start by copying node 0 values onto total_values: */
+ 	if(my_rank==0){
+ 		count=0;
+-		memcpy(total_values+count,this->values,this->numcols*this->numrows*sizeof(double));
++		xMemCpy<IssmDouble>(total_values+count,this->values,this->numcols*this->numrows);
+ 		count+=this->numrows*this->numcols;
+ 	}
+ 
+@@ -163,13 +163,13 @@
+ 	 * reality. For other cpus, no point in keeping their data anymore: */
+ 	if(my_rank==0){
+ 		this->numrows=total_numrows;
+-		xfree((void**)&this->values);
++		xDelete<IssmDouble>(this->values);
+ 		this->values=total_values;
+ 	}
+ 	#ifdef _HAVE_MPI_
+ 	else{
+ 		this->numrows=0;
+-		xfree((void**)&this->values);
++		xDelete<IssmDouble>(this->values);
+ 	}
+ 	#endif
+ }/*}}}*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12366-12367.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12366-12367.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12366-12367.diff	(revision 12679)
@@ -0,0 +1,37 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp	(revision 12366)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp	(revision 12367)
+@@ -70,7 +70,10 @@
+ 	/*Calculate length*/
+ 	h=sqrt(pow(deltax,2.)+pow(deltay,2.));
+ 
+-	/*return covariance*/
++	/*If h is too small, return sill*/
++	if(h<0.0000001) return sill;
++
++	/*compute covariance*/
+ 	a     = 1./3.;
+ 	cova = (sill-nugget)*exp(-h/(a*range));
+ 	return cova;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12366)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12367)
+@@ -70,12 +70,13 @@
+ 	/*Calculate length square*/
+ 	h2=pow(deltax,2.)+pow(deltay,2.);
+ 
+-	/*return covariance*/
++	/*If h is too small, return sill*/
++	if(h2<0.0000001) return sill;
++
++	/*compute covariance*/
+ 	a     = 1./3.;
+ 	cova = (sill-nugget)*exp(-h2/(a*range*range));
+ 
+-	if(h2<0.0000001) cova = sill;
+-
+ 	return cova;
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12367-12368.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12367-12368.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12367-12368.diff	(revision 12679)
@@ -0,0 +1,33 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12367)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12368)
+@@ -215,8 +215,8 @@
+ 	Observation *observation1 = NULL;
+ 	Observation *observation2 = NULL;
+ 
+-	int *counter= (int*)xmalloc(n*sizeof(int));
+-	for(j=0;j<n;j++) counter[j] = 0;
++	double *counter = (double*)xmalloc(n*sizeof(double));
++	for(j=0;j<n;j++) counter[j] = 0.0;
+ 	for(j=0;j<n;j++) gamma[j]   = 0.0;
+ 
+ 	for(i=0;i<this->Size();i++){
+@@ -233,14 +233,14 @@
+ 			if(index<0)   index = 0;
+ 
+ 			gamma[index]   += 1./2.*pow(observation1->value - observation2->value,2.);
+-			counter[index] += 1;
++			counter[index] += 1.;
+ 		}
+ 	}
+ 
+ 	/*Normalize semivariogram*/
+-	gamma[0]=0;
++	gamma[0]=0.;
+ 	for(k=0;k<n;k++){
+-		if(counter[k]) gamma[k] = gamma[k]/double(counter[k]);
++		if(counter[k]) gamma[k] = gamma[k]/counter[k];
+ 	}
+ 
+ 	/*Assign output pointer*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12368-12369.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12368-12369.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12368-12369.diff	(revision 12679)
@@ -0,0 +1,85 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m	(revision 12368)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m	(revision 12369)
+@@ -144,48 +144,41 @@
+ 				 fclose(fid);
+ 			 end
+ 		 end %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{
+-			 
++		 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
++
++			 %compress the files into one zip.
++			 compressstring=['tar -zcf ' dirname '.tar.gz ' modelname '.bin ' modelname '.queue '  modelname '.petsc '];
++			 for i=1:numel(filelist),
++				 compressstring = [compressstring ' ' filelist{i}];
++			 end
++			 if cluster.interactive,
++				 compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog '];
++			 end
++			 system(compressstring);
++
++			 disp('uploading input file and queueing script');
++			 if cluster.interactive,
++				 directory=[cluster.executionpath '/Interactive' num2str(cluster.interactive)];
++			 else 
++				 directory=cluster.executionpath;
++			 end
++
++			 if ~cluster.bbftp,
++				 issmscpout(cluster.name,directory,cluster.login,cluster.port,{[dirname '.tar.gz']});
++			 else
++				 issmbbftpout(cluster.name,directory,cluster.login,cluster.port,cluster.numstreams,{[dirname '.tar.gz']});
++			 end
++
+ 			 %lauch command, to be executed via ssh
+ 			 if ~cluster.interactive, 
+-				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  && qsub ' md.miscellaneous.name '.queue '];
+-			else
+-				launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive) ' && tar -zxf ' md.private.runtimename '.tar.gz'];
+-			end
++				 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
++					 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && qsub ' modelname '.queue '];
++			 else
++				 launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive) ' && tar -zxf ' dirname '.tar.gz'];
++			 end
+ 
+-			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 '.run ' md.miscellaneous.name '.errlog ' md.miscellaneous.name '.outlog '];
+-				end
+-				system(compressstring);
+-				
+-				disp('uploading input file and queueing script');
+-				if cluster.interactive,
+-					directory=[cluster.executionpath '/Interactive' num2str(cluster.interactive)];
+-				else 
+-					directory=cluster.executionpath;
+-				end
+-				
+-				if ~cluster.bbftp,
+-					issmscpout(cluster.name,directory,cluster.login,cluster.port,{[md.private.runtimename '.tar.gz']});
+-				else
+-					issmbbftpout(cluster.name,directory,cluster.login,cluster.port,cluster.numstreams,{[md.private.runtimename '.tar.gz']});
+-				end
+-				
+-				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
++			 disp('launching solution sequence on remote cluster');
++			 issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
+ 		 end
+ 		 %}}}
+ 		 function Download(cluster,dirname,filelist)% {{{
Index: /issm/oecreview/Archive/12321-12677/ISSM-12369-12370.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12369-12370.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12369-12370.diff	(revision 12679)
@@ -0,0 +1,128 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m	(revision 12369)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m	(revision 12370)
+@@ -147,7 +147,7 @@
+ 		 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
+ 
+ 			 %compress the files into one zip.
+-			 compressstring=['tar -zcf ' dirname '.tar.gz ' modelname '.bin ' modelname '.queue '  modelname '.petsc '];
++			 compressstring=['tar -zcf ' dirname '.tar.gz '];
+ 			 for i=1:numel(filelist),
+ 				 compressstring = [compressstring ' ' filelist{i}];
+ 			 end
+@@ -191,9 +191,9 @@
+ 			 end
+ 
+ 			 if ~cluster.bbftp,
+-				 issmscpin(cluster.name, cluster.login, cluster.port, directory, packages);
++				 issmscpin(cluster.name,cluster.login,cluster.port,directory,filelist);
+ 			 else
+-				 issmbbftpin(cluster.name, cluster.login, cluster.port, cluster.numstreams, directory, packages);
++				 issmbbftpin(cluster.name, cluster.login, cluster.port, cluster.numstreams, directory, filelist);
+ 			 end
+ 
+ 		 end %}}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m	(revision 12369)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m	(revision 12370)
+@@ -97,6 +97,26 @@
+ 
+ 		 end
+ 		 %}}}
++		 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
++
++			 %compress the files into one zip.
++			 compressstring=['tar -zcf ' dirname '.tar.gz '];
++			 for i=1:numel(filelist),
++				 compressstring = [compressstring ' ' filelist{i}];
++			 end
++			 if cluster.interactive,
++				 compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog '];
++			 end
++			 system(compressstring);
++
++			 disp('uploading input file and queueing script');
++			 issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[dirname '.tar.gz']});
++
++			 disp('launching solution sequence on remote cluster');
++			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
++				 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && source  ' modelname '.queue '];
++			 issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
++		 end %}}}
+ 		 function Download(cluster,dirname,filelist)% {{{
+ 
+ 			 %copy files from cluster to current directory
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m	(revision 12369)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m	(revision 12370)
+@@ -113,7 +113,7 @@
+ 			 end
+ 
+ 			 %compress the files into one zip.
+-			 compressstring=['tar -zcf ' dirname '.tar.gz ' modelname '.bin ' modelname '.queue '  modelname '.petsc '];
++			 compressstring=['tar -zcf ' dirname '.tar.gz '];
+ 			 for i=1:numel(filelist),
+ 				 compressstring = [compressstring ' ' filelist{i}];
+ 			 end
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/acenet.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/acenet.m	(revision 12369)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/acenet.m	(revision 12370)
+@@ -78,37 +78,26 @@
+ 
+ 		 end
+ 		 %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{
+-			  %retrieve parameters 
+-          modelname=md.miscellaneous.name;
+-          solution=md.private.solution;
++		 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
+ 
+-			 %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  && qsub ' modelname '.queue '];
++			 %compress the files into one zip.
++			 compressstring=['tar -zcf ' dirname '.tar.gz ' modelname '.bin ' modelname '.queue '  modelname '.petsc '];
++			 for i=1:numel(filelist),
++				 compressstring = [compressstring ' ' filelist{i}];
++			 end
++			 if cluster.interactive,
++				 compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog '];
++			 end
++			 system(compressstring);
+ 
+-			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
+-				system(compressstring);
+-				
+-				disp('uploading input file and queueing script');
+-				issmscpout(md.cluster.name,md.cluster.executionpath,md.cluster.login,md.cluster.port,{[md.private.runtimename '.tar.gz']});
+-				
+-				disp('launching solution sequence on remote cluster');
+-				issmssh(md.cluster.name,md.cluster.login,md.cluster.port,launchcommand);
++			 disp('uploading input file and queueing script');
++			 issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[dirname '.tar.gz']});
+ 
+-			else
+-				disp('batch mode requested: not launching job interactively');
+-				disp('launch solution sequence on remote cluster by hand');
+-			end
+-
+-		 end
+-		 %}}}
++			 disp('launching solution sequence on remote cluster');
++			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
++				 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && source  ' modelname '.queue '];
++			 issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
++		 end %}}}
+ 		 function Download(cluster,dirname,filelist)% {{{
+ 
+ 			 %copy files from cluster to current directory
Index: /issm/oecreview/Archive/12321-12677/ISSM-12370-12371.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12370-12371.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12370-12371.diff	(revision 12679)
@@ -0,0 +1,321 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/none.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/none.m	(revision 12370)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/none.m	(revision 12371)
+@@ -1,18 +0,0 @@
+-%NONE class definition
+-%
+-%   Usage:
+-%      cluster=none();
+-%      cluster=none('np',3);
+-%      cluster=none('np',3,'login','username');
+-
+-classdef none
+-    properties (SetAccess=public)
+-		name='none'
+-    end
+-    methods
+-		 function cluster=none(varargin) % {{{
+-			 error('Cannot assign md.cluster to ''none'': ISSM is not available in serial model anymore');
+-		 end
+-		 %}}}
+-	end
+-end
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/greenplanet.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/greenplanet.m	(revision 12370)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/greenplanet.m	(revision 12371)
+@@ -101,46 +101,26 @@
+ 				 fclose(fid);
+ 			 end
+ 		 end %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{
+-			 
+-			 %lauch command, to be executed via ssh
+-			 if ~cluster.interactive, 
+-				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  && qsub ' md.miscellaneous.name '.queue '];
+-			else
+-				launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive) ' && tar -zxf ' md.private.runtimename '.tar.gz'];
+-			end
++		 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
+ 
+-			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 '.run ' md.miscellaneous.name '.errlog ' md.miscellaneous.name '.outlog '];
+-				end
+-				system(compressstring);
+-				
+-				disp('uploading input file and queueing script');
+-				if cluster.interactive,
+-					directory=[cluster.executionpath '/Interactive' num2str(cluster.interactive)];
+-				else 
+-					directory=cluster.executionpath;
+-				end
+-				
+-				issmscpout(cluster.name,directory,cluster.login,cluster.port,{[md.private.runtimename '.tar.gz']});
+-				
+-				disp('launching solution sequence on remote cluster');
+-				issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
++			 %compress the files into one zip.
++			 compressstring=['tar -zcf ' dirname '.tar.gz '];
++			 for i=1:numel(filelist),
++				 compressstring = [compressstring ' ' filelist{i}];
++			 end
++			 if cluster.interactive,
++				 compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog '];
++			 end
++			 system(compressstring);
+ 
+-			else
+-				disp('batch mode requested: not launching job interactively');
+-				disp('launch solution sequence on remote cluster by hand');
+-			end
+-		 end
+-		 %}}}
++			 disp('uploading input file and queueing script');
++			 issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[dirname '.tar.gz']});
++
++			 disp('launching solution sequence on remote cluster');
++			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
++				 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && qsub ' modelname '.queue '];
++			 issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
++		 end %}}}
+ 		 function Download(cluster,dirname,filelist)% {{{
+ 
+ 			 %copy files from cluster to current directory
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/gemini.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/gemini.m	(revision 12370)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/gemini.m	(revision 12371)
+@@ -70,34 +70,26 @@
+ 
+ 		 end
+ 		 %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{
+-			 
+-			 %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  && qsub ' modelname '.queue '];
++		 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
+ 
+-			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
+-				system(compressstring);
+-				
+-				disp('uploading input file and queueing script');
+-				issmscpout(md.cluster.name,md.cluster.executionpath,md.cluster.login,md.cluster.port,{[md.private.runtimename '.tar.gz']});
+-				
+-				disp('launching solution sequence on remote cluster');
+-				issmssh(md.cluster.name,md.cluster.login,md.cluster.port,launchcommand);
++			 %compress the files into one zip.
++			 compressstring=['tar -zcf ' dirname '.tar.gz '];
++			 for i=1:numel(filelist),
++				 compressstring = [compressstring ' ' filelist{i}];
++			 end
++			 if cluster.interactive,
++				 compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog '];
++			 end
++			 system(compressstring);
+ 
+-			else
+-				disp('batch mode requested: not launching job interactively');
+-				disp('launch solution sequence on remote cluster by hand');
+-			end
++			 disp('uploading input file and queueing script');
++			 issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[dirname '.tar.gz']});
+ 
+-		 end
+-		 %}}}
++			 disp('launching solution sequence on remote cluster');
++			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
++				 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && qsub ' modelname '.queue '];
++			 issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
++		 end %}}}
+ 		 function Download(cluster,dirname,filelist)% {{{
+ 
+ 			 %copy files from cluster to current directory
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m	(revision 12370)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m	(revision 12371)
+@@ -114,7 +114,7 @@
+ 
+ 			 disp('launching solution sequence on remote cluster');
+ 			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
+-				 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && source  ' modelname '.queue '];
++				 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && qsub ' modelname '.queue '];
+ 			 issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
+ 		 end %}}}
+ 		 function Download(cluster,dirname,filelist)% {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m	(revision 12370)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m	(revision 12371)
+@@ -105,12 +105,6 @@
+ 		 end
+ 		 %}}}
+ 		 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
+-			 
+-			 if ispc,
+-				 %launch right here, do not compress or archive
+-				 system([modelname '.bat']);
+-				 return;
+-			 end
+ 
+ 			 %compress the files into one zip.
+ 			 compressstring=['tar -zcf ' dirname '.tar.gz '];
+@@ -129,7 +123,7 @@
+ 			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
+ 				 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && source  ' modelname '.queue '];
+ 			 issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
+-		end %}}}
++		 end %}}}
+ 		 function Download(cluster,dirname,filelist)% {{{
+ 
+ 			if ispc,
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/acenet.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/acenet.m	(revision 12370)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/acenet.m	(revision 12371)
+@@ -81,7 +81,7 @@
+ 		 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
+ 
+ 			 %compress the files into one zip.
+-			 compressstring=['tar -zcf ' dirname '.tar.gz ' modelname '.bin ' modelname '.queue '  modelname '.petsc '];
++			 compressstring=['tar -zcf ' dirname '.tar.gz '];
+ 			 for i=1:numel(filelist),
+ 				 compressstring = [compressstring ' ' filelist{i}];
+ 			 end
+@@ -95,7 +95,7 @@
+ 
+ 			 disp('launching solution sequence on remote cluster');
+ 			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
+-				 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && source  ' modelname '.queue '];
++				 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && qsub ' modelname '.queue '];
+ 			 issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
+ 		 end %}}}
+ 		 function Download(cluster,dirname,filelist)% {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/cosmos.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/cosmos.m	(revision 12370)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/cosmos.m	(revision 12371)
+@@ -69,34 +69,26 @@
+ 
+ 		 end
+ 		 %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{
+-			 
+-			 %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  && qsub -S/bin/sh ' modelname '.queue '];
++		 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
+ 
+-			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
+-				system(compressstring);
+-				
+-				disp('uploading input file and queueing script');
+-				issmscpout(md.cluster.name,md.cluster.executionpath,md.cluster.login,md.cluster.port,{[md.private.runtimename '.tar.gz']});
+-				
+-				disp('launching solution sequence on remote cluster');
+-				issmssh(md.cluster.name,md.cluster.login,md.cluster.port,launchcommand);
++			 %compress the files into one zip.
++			 compressstring=['tar -zcf ' dirname '.tar.gz '];
++			 for i=1:numel(filelist),
++				 compressstring = [compressstring ' ' filelist{i}];
++			 end
++			 if cluster.interactive,
++				 compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog '];
++			 end
++			 system(compressstring);
+ 
+-			else
+-				disp('batch mode requested: not launching job interactively');
+-				disp('launch solution sequence on remote cluster by hand');
+-			end
++			 disp('uploading input file and queueing script');
++			 issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[dirname '.tar.gz']});
+ 
+-		 end
+-		 %}}}
++			 disp('launching solution sequence on remote cluster');
++			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
++				 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && qsub ' modelname '.queue '];
++			 issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
++		 end %}}}
+ 		 function Download(cluster,dirname,filelist)% {{{
+ 
+ 			 %copy files from cluster to current directory
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pollux.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pollux.m	(revision 12370)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pollux.m	(revision 12371)
+@@ -69,34 +69,26 @@
+ 
+ 		 end
+ 		 %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{
+-			 
+-			 %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  && qsub ' modelname '.queue '];
++		 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
+ 
+-			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
+-				system(compressstring);
+-				
+-				disp('uploading input file and queueing script');
+-				issmscpout(md.cluster.name,md.cluster.executionpath,md.cluster.login,md.cluster.port,{[md.private.runtimename '.tar.gz']});
+-				
+-				disp('launching solution sequence on remote cluster');
+-				issmssh(md.cluster.name,md.cluster.login,md.cluster.port,launchcommand);
++			 %compress the files into one zip.
++			 compressstring=['tar -zcf ' dirname '.tar.gz '];
++			 for i=1:numel(filelist),
++				 compressstring = [compressstring ' ' filelist{i}];
++			 end
++			 if cluster.interactive,
++				 compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog '];
++			 end
++			 system(compressstring);
+ 
+-			else
+-				disp('batch mode requested: not launching job interactively');
+-				disp('launch solution sequence on remote cluster by hand');
+-			end
++			 disp('uploading input file and queueing script');
++			 issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[dirname '.tar.gz']});
+ 
+-		 end
+-		 %}}}
++			 disp('launching solution sequence on remote cluster');
++			 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
++				 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && qsub ' modelname '.queue '];
++			 issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
++		 end %}}}
+ 		 function Download(cluster,dirname,filelist)% {{{
+ 
+ 			 %copy files from cluster to current directory
Index: /issm/oecreview/Archive/12321-12677/ISSM-12371-12372.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12371-12372.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12371-12372.diff	(revision 12679)
@@ -0,0 +1,39 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m	(revision 12371)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m	(revision 12372)
+@@ -69,34 +69,6 @@
+ 
+ 		 end
+ 		 %}}}
+-		 function LaunchQueueJob(cluster,md,options)% {{{
+-			 
+-			 %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  && qsub ' modelname '.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
+-				system(compressstring);
+-				
+-				disp('uploading input file and queueing script');
+-				issmscpout(md.cluster.name,md.cluster.executionpath,md.cluster.login,md.cluster.port,{[md.private.runtimename '.tar.gz']});
+-				
+-				disp('launching solution sequence on remote cluster');
+-				issmssh(md.cluster.name,md.cluster.login,md.cluster.port,launchcommand);
+-
+-			else
+-				disp('batch mode requested: not launching job interactively');
+-				disp('launch solution sequence on remote cluster by hand');
+-			end
+-
+-		 end
+-		 %}}}
+ 		 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
+ 
+ 			 %compress the files into one zip.
Index: /issm/oecreview/Archive/12321-12677/ISSM-12372-12373.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12372-12373.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12372-12373.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m	(revision 12372)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m	(revision 12373)
+@@ -152,7 +152,7 @@
+ 				 compressstring = [compressstring ' ' filelist{i}];
+ 			 end
+ 			 if cluster.interactive,
+-				 compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog '];
++				 compressstring = [compressstring ' ' modelname '.run '  modelname '.errlog ' modelname '.outlog '];
+ 			 end
+ 			 system(compressstring);
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12373-12374.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12373-12374.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12373-12374.diff	(revision 12679)
@@ -0,0 +1,107 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_manager.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_manager.m	(revision 12373)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_manager.m	(revision 12374)
+@@ -167,6 +167,12 @@
+ 	return;
+ end
+ 
++%Figure out if this is a Profile plot
++if exist(options,'profile')
++	plot_profile(md,data,options,nlines,ncols,i);
++	return;
++end
++
+ %process data and model
+ [x y z elements is2d isplanet]=processmesh(md,data,options);
+ [data2 datatype]=processdata(md,data,options);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m	(revision 12374)
+@@ -0,0 +1,47 @@
++function plot_profile(md,data,options,nlines,ncols,i)
++%PLOT_SECTION - plot a given field on a profile
++%
++%   Usage:
++%      plot_profile(md,data,options,nlines,ncols,i)
++%
++%   See also: PLOTMODEL
++
++%process model
++[x_m y_m z_m elements_m is2d isplanet]=processmesh(md,[],options);
++if ~is2d, error('only 3d model supported'); end
++
++%Get number of curves and generate random colors
++numcurves=size(data,2);
++colorm=getfieldvalue(options,'colormap','lines');
++color=eval([ colorm '(numcurves);']);
++options=removefield(options,'colormap',0); %back to default colormap
++
++%Loop over number of curves
++for i=1:numcurves,
++
++	%Process data
++	[datai datatype]=processdata(md,data(:,i),options);
++
++	%resolution
++	if exist(options,'resolution'),
++		resolution=getfieldvalue(options,'resolution');
++	else %Default resolution
++		resolution=[100];
++		disp(['plot_profile warning: no resolution specified, use default resolution: [horizontal_resolution vertical_resolution]=[' num2str(resolution)  ']']);
++	end
++
++	%Compute profile value
++	[z,data_interp]=ProfileValues(md,data,xprof,yprof,resolution)
++
++	%plot profile
++	subplot(nlines,ncols,i)
++	A=elements(:,1); B=elements(:,2); C=elements(:,3);  D=elements(:,4); 
++	plot(data_interp,z,'color',color(i,:),'LineWidth',getfieldvalue(options,'linewidth',1));
++	hold on;
++end
++
++%apply options
++options=addfielddefault(options,'title','Profile');
++options=addfielddefault(options,'colorbar',0);
++options=addfielddefault(options,'ylabel','z');
++applyoptions(md,[],options);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plotdoc.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plotdoc.m	(revision 12373)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plotdoc.m	(revision 12374)
+@@ -93,6 +93,7 @@
+ disp('                       horizontal_resolution must be in meter, and vertical_resolution a number of layers');
+ disp('       ''showsection'': show section used by ''sectionvalue'' (string ''on'' or a number of labels)');
+ disp('       ''sectionvalue'': give the value of data on a profile given by an Argus file (string ''Argusfile_name.exp'')');
++disp('       ''profile'': give the value of data along a vertical profile ([xlocation ylocation])');
+ disp('       ''smooth'': smooth element data (string ''yes'' or integer)');
+ disp('       ''title'': same as standard matlab option');
+ disp('       ''view'': same as standard matlab option (ex: 2, 3 or [90 180]');
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/ProfileValues.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/ProfileValues.m	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/ProfileValues.m	(revision 12374)
+@@ -0,0 +1,21 @@
++function [Z,data_interp]=ProfileValues(md,data,xprof,yprof,resolution)
++%PROFILEVALUES - compute the value of a field on a vertical profile
++%
++%   This routine gets the value of a given field of the model on points
++%   given by filname (Argus type file)
++%
++%   Usage:
++%      [z,data]=ProfileValues(md,data,filename,resolution)
++%      [z,data]=ProfileValues(md,data,profile_structure,resolution)
++
++%Get bed and surface for each 2d point, offset to make sure that it is inside the glacier system
++offset=10^-3;
++bed=InterpFromMeshToMesh2d(md.mesh.elements2d,md.mesh.x2d,md.mesh.y2d,project2d(md,md.geometry.bed,1),xprof,yprof)+offset;
++surface=InterpFromMeshToMesh2d(md.mesh.elements2d,md.mesh.x2d,md.mesh.y2d,project2d(md,md.geometry.surface,1),xprof,yprof)-offset;
++
++%Some useful parameters
++layers=ceil(mean(md.geometry.thickness)/res_v);
++Z=bed:resolution:surface;
++X=xprof*ones(size(Z));
++Y=yprof*ones(size(Z));
++data_interp=InterpFromMeshToMesh3d(md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.z,data,X,Y,Z,NaN);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12374-12375.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12374-12375.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12374-12375.diff	(revision 12679)
@@ -0,0 +1,64 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m	(revision 12374)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m	(revision 12375)
+@@ -8,7 +8,7 @@
+ 
+ %process model
+ [x_m y_m z_m elements_m is2d isplanet]=processmesh(md,[],options);
+-if ~is2d, error('only 3d model supported'); end
++if is2d, error('only 3d model supported'); end
+ 
+ %Get number of curves and generate random colors
+ numcurves=size(data,2);
+@@ -16,6 +16,14 @@
+ color=eval([ colorm '(numcurves);']);
+ options=removefield(options,'colormap',0); %back to default colormap
+ 
++%Get coordinates
++location=getfieldvalue(options,'profile');
++if ~isnumeric(location) | numel(location)~=2,
++	error('location provided not supported (should be [x y])');
++end
++xprof=location(1);
++yprof=location(2);
++
+ %Loop over number of curves
+ for i=1:numcurves,
+ 
+@@ -31,12 +39,11 @@
+ 	end
+ 
+ 	%Compute profile value
+-	[z,data_interp]=ProfileValues(md,data,xprof,yprof,resolution)
++	[z,data_interp]=ProfileValues(md,data,xprof,yprof,resolution);
+ 
+ 	%plot profile
+ 	subplot(nlines,ncols,i)
+-	A=elements(:,1); B=elements(:,2); C=elements(:,3);  D=elements(:,4); 
+-	plot(data_interp,z,'color',color(i,:),'LineWidth',getfieldvalue(options,'linewidth',1));
++	plot(data_interp,z,'color',color(i,:),'LineWidth',getfieldvalue(options,'linewidth',1),'LineStyle','-');
+ 	hold on;
+ end
+ 
+@@ -44,4 +51,5 @@
+ options=addfielddefault(options,'title','Profile');
+ options=addfielddefault(options,'colorbar',0);
+ options=addfielddefault(options,'ylabel','z');
++options=addfielddefault(options,'view',2);
+ applyoptions(md,[],options);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/ProfileValues.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/ProfileValues.m	(revision 12374)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/ProfileValues.m	(revision 12375)
+@@ -14,8 +14,8 @@
+ surface=InterpFromMeshToMesh2d(md.mesh.elements2d,md.mesh.x2d,md.mesh.y2d,project2d(md,md.geometry.surface,1),xprof,yprof)-offset;
+ 
+ %Some useful parameters
+-layers=ceil(mean(md.geometry.thickness)/res_v);
+-Z=bed:resolution:surface;
++layers=ceil(mean(md.geometry.thickness)/resolution);
++Z=(bed:resolution:surface)';
+ X=xprof*ones(size(Z));
+ Y=yprof*ones(size(Z));
+ data_interp=InterpFromMeshToMesh3d(md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.z,data,X,Y,Z,NaN);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12375-12376.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12375-12376.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12375-12376.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m	(revision 12375)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m	(revision 12376)
+@@ -35,7 +35,7 @@
+ 		resolution=getfieldvalue(options,'resolution');
+ 	else %Default resolution
+ 		resolution=[100];
+-		disp(['plot_profile warning: no resolution specified, use default resolution: [horizontal_resolution vertical_resolution]=[' num2str(resolution)  ']']);
++		disp(['plot_profile warning: no resolution specified, using default: ' num2str(resolution) ]);
+ 	end
+ 
+ 	%Compute profile value
Index: /issm/oecreview/Archive/12321-12677/ISSM-12376-12377.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12376-12377.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12376-12377.diff	(revision 12679)
@@ -0,0 +1,707 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12377)
+@@ -0,0 +1,257 @@
++/*!\file:  kriging.cpp
++ * \brief: kriging main parallel program
++ */ 
++
++#include "../issm.h"
++#include "../include/globals.h"
++
++/*Local prototypes*/
++void ProcessArguments2(char** pbinfilename,char** poutbinfilename,char** plockfilename,int argc,char **argv);
++void ProcessInputfile(double **px,double **py,double **pdata,int *pnobs,double **px_interp,double **py_interp,int *pninterp,Options **poptions,FILE* fid);
++
++int main(int argc,char **argv){
++
++	/*I/O: */
++	FILE *output_fid = NULL;
++	FILE *input_fid  = NULL;
++	bool  waitonlock = false;
++
++	/*File names*/
++	char *lockfilename   = NULL;
++	char *binfilename    = NULL;
++	char *outbinfilename = NULL;
++
++	/*Input*/
++	int      ninterp,nobs;
++	double  *x        = NULL;
++	double  *y        = NULL;
++	double  *data     = NULL;
++	double  *x_interp = NULL;
++	double  *y_interp = NULL;
++	Options *options  = NULL;
++
++	/*Output*/
++	double *predictions = NULL;
++	double *error       = NULL;
++
++	ISSMBOOT();
++
++	/*Initialize environments: Petsc, MPI, etc...: */
++#ifdef _HAVE_PETSC_
++	int ierr=PetscInitialize(&argc,&argv,(char*)0,"");  
++	if(ierr) _error_("Could not initialize Petsc");
++#else
++#ifdef _HAVE_MPI_
++	MPI_Init(&argc,&argv);
++#endif
++#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");
++	_printf_(true,"Ice Sheet System Model (%s) version %s\n",PACKAGE_NAME,PACKAGE_VERSION);
++	_printf_(true,"(website: %s contact: %s)\n",PACKAGE_URL,PACKAGE_BUGREPORT);
++	_printf_(true,"\n");
++	ProcessArguments2(&binfilename,&outbinfilename,&lockfilename,argc,argv);
++
++	/*Process input files*/
++	input_fid=pfopen(binfilename,"rb");
++	ProcessInputfile(&x,&y,&data,&nobs,&x_interp,&y_interp,&ninterp,&options,input_fid);
++	pfclose(input_fid,binfilename);
++
++	_printf_(true,"call computational core:\n");
++	pKrigingx(&predictions,&error,x,y,data,nobs,x_interp,y_interp,ninterp,options);
++
++	_printf_(true,"write results to disk:\n");
++	output_fid=pfopen(outbinfilename,"wb");
++	Results *results = new Results();
++	results->AddObject(new DoubleVecExternalResult(results->Size()+1,0,predictions,ninterp,1,0));
++	results->AddObject(new DoubleVecExternalResult(results->Size()+1,0,error,ninterp,1,0));
++	for(int i=0;i<results->Size();i++){
++		ExternalResult* result=(ExternalResult*)results->GetObjectByOffset(i);
++		result->WriteData(output_fid,1);
++	}
++	pfclose(output_fid,outbinfilename);
++
++	/*Close output and petsc options file and write lock file if requested*/
++	_printf_(true,"write lock file:\n");
++	WriteLockFile(lockfilename);
++
++	/*Free ressources */
++	xfree((void**)&lockfilename);
++	xfree((void**)&binfilename);
++	xfree((void**)&outbinfilename);
++	xfree((void**)&x);
++	xfree((void**)&y);
++	xfree((void**)&data);
++	xfree((void**)&x_interp);
++	xfree((void**)&y_interp);
++	xfree((void**)&predictions);
++	xfree((void**)&error);
++	delete options;
++	delete results;
++
++#ifdef _HAVE_PETSC_
++	_printf_(true,"closing MPI and Petsc\n");
++	PetscFinalize(); 
++#else
++#ifdef _HAVE_MPI_
++	_printf_(true,"closing MPI and Petsc\n");
++	MPI_Finalize();
++#endif
++#endif
++
++	/*end module: */
++	ISSMEND();
++
++	return 0; //unix success return;
++}
++
++void ProcessArguments2(char** pbinfilename,char** poutbinfilename,char** plockfilename,int argc,char **argv){
++
++	char *modelname      = NULL;
++	char *binfilename    = NULL;
++	char *outbinfilename = NULL;
++	char *lockfilename   = NULL;
++
++	if(argc<2)_error_("Usage error: missing model name");
++	modelname=argv[2];
++	binfilename    = (char*)xmalloc((strlen(modelname)+strlen(".bin")   +1)*sizeof(char)); sprintf(binfilename,   "%s%s",modelname,".bin");
++	outbinfilename = (char*)xmalloc((strlen(modelname)+strlen(".outbin")+1)*sizeof(char)); sprintf(outbinfilename,"%s%s",modelname,".outbin");
++	lockfilename   = (char*)xmalloc((strlen(modelname)+strlen(".lock")  +1)*sizeof(char)); sprintf(lockfilename,  "%s%s",modelname,".lock");
++
++	/*Clean up and assign output pointer*/
++	*pbinfilename=binfilename;
++	*poutbinfilename=outbinfilename;
++	*plockfilename=lockfilename;
++}
++
++void ProcessInputfile(double **px,double **py,double **pdata,int *pnobs,double **px_interp,double **py_interp,int *pninterp,Options **poptions,FILE* fid){
++
++	int      ninterp,nobs;
++	double  *x        = NULL;
++	double  *y        = NULL;
++	double  *data     = NULL;
++	double  *x_interp = NULL;
++	double  *y_interp = NULL;
++	Options *options  = NULL;
++
++	int dummy,M,N;
++	IoModel* iomodel = new IoModel();
++	iomodel->fid=fid;
++	iomodel->CheckEnumSync();
++
++	/*Read x*/
++	fid=iomodel->SetFilePointerToData(&dummy,&dummy,0);
++	if(my_rank==0){
++		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
++	}
++	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
++	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); 
++	if(M*N){
++		x=(double*)xmalloc(M*N*sizeof(double));
++		if(my_rank==0){  
++			if(fread(x,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
++		}
++		MPI_Bcast(x,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
++	}
++	nobs=M*N;
++
++	/*Read y*/
++	fid=iomodel->SetFilePointerToData(&dummy,&dummy,1);
++	if(my_rank==0){  
++		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
++	}
++	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
++	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); 
++	if(M*N){
++		y=(double*)xmalloc(M*N*sizeof(double));
++		if(my_rank==0){  
++			if(fread(y,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
++		}
++		MPI_Bcast(y,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
++	}
++	_assert_(M*N==nobs);
++
++	/*Read data*/
++	fid=iomodel->SetFilePointerToData(&dummy,&dummy,2);
++	if(my_rank==0){  
++		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
++	}
++	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
++	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); 
++	if(M*N){
++		data=(double*)xmalloc(M*N*sizeof(double));
++		if(my_rank==0){  
++			if(fread(data,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
++		}
++		MPI_Bcast(data,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
++	}
++	_assert_(M*N==nobs);
++
++	/*Read x_interp*/
++	fid=iomodel->SetFilePointerToData(&dummy,&dummy,3);
++	if(my_rank==0){  
++		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
++	}
++	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
++	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); 
++	if(M*N){
++		x_interp=(double*)xmalloc(M*N*sizeof(double));
++		if(my_rank==0){  
++			if(fread(x_interp,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
++		}
++		MPI_Bcast(x_interp,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
++	}
++	ninterp=N*M;
++
++	/*Read y_interp*/
++	fid=iomodel->SetFilePointerToData(&dummy,&dummy,4);
++	if(my_rank==0){  
++		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
++	}
++	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
++	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); 
++	if(M*N){
++		y_interp=(double*)xmalloc(M*N*sizeof(double));
++		if(my_rank==0){  
++			if(fread(y_interp,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
++		}
++		MPI_Bcast(y_interp,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
++	}
++	_assert_(N*M==ninterp);
++
++	/*Read options*/
++	options = new Options();
++
++	/*Assign output pointer*/
++	*px        = x;
++	*py        = y;
++	*pdata     = data;
++	*pnobs     = nobs;
++	*px_interp = x_interp;
++	*py_interp = y_interp;
++	*pninterp  = ninterp;
++	*poptions  = options;
++	delete iomodel;
++}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/issm.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/issm.h	(revision 12376)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/issm.h	(revision 12377)
+@@ -21,5 +21,4 @@
+ #include "./solvers/solvers.h"
+ #include "./modules/modules.h"
+ 
+-
+ #endif //ifndef _ISSM_H_
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12376)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12377)
+@@ -20,6 +20,7 @@
+ #include "../shared/shared.h"
+ #include "../include/include.h"
+ #include "../EnumDefinitions/EnumDefinitions.h"
++#include "../io/io.h"
+ 
+ using namespace std;
+ /*}}}*/
+@@ -70,7 +71,7 @@
+ 	}
+ 
+ 	/*Initialize Quadtree*/
+-	printf("Generating quadtree with a maximum box size %g (depth=%i)... ",minlength,maxdepth);
++	_printf_(true,"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*/
+@@ -100,9 +101,9 @@
+ 			this->quadtree->AddAndAverage(x[i],y[i],observations_list[i]);
+ 		}
+ 	}
+-	printf("done\n");
+-	printf("Initial number of observations: %i\n",n);
+-	printf("  Final number of observations: %i\n",this->quadtree->NbObs);
++	_printf_(true,"done\n");
++	_printf_(true,"Initial number of observations: %i\n",n);
++	_printf_(true,"  Final number of observations: %i\n",this->quadtree->NbObs);
+ }
+ /*}}}*/
+ /*FUNCTION Observations::~Observations(){{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/diskio.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/diskio.h	(revision 12376)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/diskio.h	(revision 12377)
+@@ -9,9 +9,6 @@
+ #include "../../Container/Container.h"
+ #include "../../include/include.h"
+ 
+-class DataSet;
+-class Parameters;
+-
+ FILE* pfopen(char* filename,const char* format);
+ void  pfclose(FILE* fid,char* filename);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/io.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/io.h	(revision 12376)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/io.h	(revision 12377)
+@@ -5,13 +5,11 @@
+ #ifndef _ISSM_IO_H_
+ #define _ISSM_IO_H_
+ 
+-#ifdef HAVE_CONFIG_H //config.h {{{
++#ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #else
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif 
+-//}}}
+-
+ #include "./Disk/diskio.h"
+ 
+ /*printf: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp	(revision 12376)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp	(revision 12377)
+@@ -15,7 +15,7 @@
+ #include "../../io/io.h"
+ #include "../../objects/objects.h"
+ 		
+-void OutputResultsx(                    Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results* results){
++void OutputResultsx(Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results* results){
+ 
+ 	extern int  my_rank;
+ 	FILE       *fid                     = NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12376)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12377)
+@@ -9,12 +9,9 @@
+ #include "../../objects/objects.h"
+ #include "../../Container/Observations.h"
+ #include "../modules.h"
+-
+ #ifdef _HAVE_GSL_
+ #include <gsl/gsl_linalg.h>
+ #endif
+-
+-#include "../../objects/Kriging/GaussianVariogram.h"
+ /*FUNCTION Krigingx{{{*/
+ 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){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12377)
+@@ -0,0 +1,212 @@
++/*!\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 "../../Container/Observations.h"
++#include "../modules.h"
++
++#ifdef _HAVE_GSL_
++#include <gsl/gsl_linalg.h>
++#endif
++
++/*FUNCTION pKrigingx{{{*/
++int pKrigingx(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){
++
++	extern int num_procs;
++	extern int my_rank;
++
++	/*output*/
++	double *predictions = NULL;
++	double *error       = NULL;
++
++	/*Intermediaries*/
++	int           mindata,maxdata;
++	double        radius;
++	char         *output       = NULL;
++	Variogram    *variogram    = NULL;
++	Observations *observations = NULL;
++
++	/*Get Variogram from Options*/
++	ProcessVariogram(&variogram,options);
++	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);
++
++	/*Allocate output*/
++	predictions =(double*)xcalloc(n_interp,sizeof(double));
++	error       =(double*)xcalloc(n_interp,sizeof(double));
++
++	/*Get output*/
++	options->Get(&output,"output","prediction");
++
++	if(strcmp(output,"quadtree")==0){
++		observations->QuadtreeColoring(predictions,x_interp,y_interp,n_interp);
++	}
++	else if(strcmp(output,"variomap")==0){
++		observations->Variomap(predictions,x_interp,n_interp);
++	}
++	else if(strcmp(output,"prediction")==0){
++
++		/*Intermediaries*/
++		int           i,j,n_obs;
++		double        numerator,denominator,ratio,localpercent;
++		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: */
++		for(int idx=my_rank;idx<n_interp;idx+=num_procs){
++
++			/*Print info*/
++			_printf_(true,"\r      interpolation progress: %5.2lf%%",double(idx)/double(n_interp)*100);
++
++			/*Get list of observations for current point*/
++			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;
++			}
++
++			/*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[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->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
++			GslSolve(&Ginv1, Gamma,ones,n_obs);   // Gamma^-1 ones
++			GslSolve(&GinvZ, Gamma,obs,n_obs);    // Gamma^-1 Z
++
++			/*Prepare predictor*/
++			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;
++
++			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);
++			xfree((void**)&y);
++			xfree((void**)&obs);
++			xfree((void**)&Gamma);
++			xfree((void**)&gamma0);
++			xfree((void**)&ones);
++			xfree((void**)&GinvG0);
++			xfree((void**)&Ginv1);
++			xfree((void**)&GinvZ);
++		}
++
++		double *sumpredictions =(double*)xmalloc(n_interp*sizeof(double));
++		double *sumerror       =(double*)xmalloc(n_interp*sizeof(double));
++		MPI_Allreduce(predictions,sumpredictions,n_interp,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
++		MPI_Allreduce(error,sumerror,n_interp,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
++		xfree((void**)&error); error=sumerror;
++		xfree((void**)&predictions); predictions=sumpredictions;
++	}
++	else{
++		_error_("output '%s' not supported yet",output);
++	}
++	_printf_(true,"\r      interpolation progress: %5.2lf%%\n",100.);
++
++	/*clean-up and Assign output pointer*/
++	delete variogram;
++	delete observations;
++	xfree((void**)&output);
++	*ppredictions = predictions;
++	*perror       = error;
++	return 1;
++}/*}}}*/
++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 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);
++
++	/*Assign output pointer*/
++	xfree((void**)&model);
++	*pvariogram = variogram;
++}/*}}}*/
++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;
++
++		/*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);
++
++		/*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");
++
++		/*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;
++#else
++		_error_("GSL support required");
++#endif
++	}/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12376)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12377)
+@@ -12,6 +12,7 @@
+ class Variogram;
+ 
+ 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);
++int  pKrigingx(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);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12376)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12377)
+@@ -632,6 +632,25 @@
+ 						./modules/Krigingx/Krigingx.cpp\
+ 						./modules/Krigingx/Krigingx.h
+ 
++#For parallel kriging, only difference is ./modules/Krigingx/pKrigingx.cpp with no multithreading
++pkriging_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/PowerVariogram.h\
++						./objects/Kriging/PowerVariogram.cpp\
++						./objects/Kriging/Quadtree.h\
++						./objects/Kriging/Quadtree.cpp\
++						./objects/Kriging/Observation.h\
++						./objects/Kriging/Observation.cpp\
++						./modules/Krigingx/pKrigingx.cpp\
++						./modules/Krigingx/Krigingx.h
++
+ #}}}
+ #Kml sources  {{{1
+ kml_sources = ./modules/Exp2Kmlx/Exp2Kmlx.h\
+@@ -963,6 +982,7 @@
+ ALLCXXFLAGS= -fPIC -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_  $(CXXFLAGS) $(CXXOPTFLAGS) 
+ 
+ libISSMCore_a_SOURCES  = $(issm_sources)
++libISSMCore_a_SOURCES += $(pkriging_sources)
+ libISSMCore_a_CXXFLAGS = $(ALLCXXFLAGS)
+ 
+ if MODULES
+@@ -1004,6 +1024,10 @@
+ 
+ issm_SOURCES = solutions/issm.cpp
+ issm_CXXFLAGS= -fPIC $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 
++
++bin_PROGRAMS += kriging
++kriging_SOURCES = solutions/kriging.cpp
++kriging_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 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h	(revision 12376)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h	(revision 12377)
+@@ -17,12 +17,12 @@
+ class IoModel {
+ 
+ 	private: 
+-		FILE        *fid;         //pointer to input file
+ 		IssmDouble     **data;        //this dataset holds temporary data, memory intensive.
+ 		Parameters  *constants;   //this dataset holds all IssmDouble, int, bool and char *parameters read in from the input file.*
+ 
+ 	public:
+ 		/*This data needs to stay memory resident at all time, even if it's memory intensive: */
++		FILE        *fid;         //pointer to input file
+ 		bool *my_elements;
+ 		bool *my_nodes;
+ 		int  *my_vertices;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12376)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12377)
+@@ -70,19 +70,20 @@
+ /*FUNCTION IoModel::~IoModel(){{{*/
+ IoModel::~IoModel(){
+ 
+-	delete this->constants;
++	if(this->constants) delete this->constants;
+ 
+ 	/*Some checks in debugging mode*/
+ 	#ifdef _ISSM_DEBUG_
+-	for(int i=0;i<MaximumNumberOfEnums;i++){
+-		if(this->data[i]){
+-			_printf_("Info: previous pointer of %s has not been freed (DeleteData has not been called)",EnumToStringx(i));
++	if(this->data){
++		for(int i=0;i<MaximumNumberOfEnums;i++){
++			if(this->data[i]){
++				_printf_("Info: previous pointer of %s has not been freed (DeleteData has not been called)",EnumToStringx(i));
++			}
+ 		}
+ 	}
+ 	#endif
+ 
+ 	xfree((void**)&this->data);
+-
+ 	xfree((void**)&this->my_elements);
+ 	xfree((void**)&this->my_nodes);
+ 	xfree((void**)&this->my_vertices);
+@@ -97,11 +98,9 @@
+ 	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
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12377-12378.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12377-12378.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12377-12378.diff	(revision 12679)
@@ -0,0 +1,49 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/DataProcessing/pkriging.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/DataProcessing/pkriging.m	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/DataProcessing/pkriging.m	(revision 12378)
+@@ -0,0 +1,44 @@
++function [B E]=pkriging(x,y,observations,x_interp,y_interp,varargin);
++%PKRIGING - parallel Kriging
++%
++%   Usage:
++%      [B E]=pkriging(x,y,observations,x_interp,y_interp,varargin);
++
++options=pairoptions(varargin{:});
++cluster=getfieldvalue(options,'cluster',generic('np',10));
++name   = 'krig';
++
++% =========================================   MARSHALL.m =================================================
++disp(['marshalling file ' name '.bin']);
++fid=fopen([name '.bin'],'wb');
++if fid==-1,
++	error(['marshall error message: could not open ' name '.bin file for binary writing']);
++end
++
++%First, write MaximumNumberOfEnum to make sure that the Enums are synchronized
++WriteData(fid,'enum',MaximumNumberOfEnums(),'data',true,'format','Boolean');
++
++%Write all data
++WriteData(fid,'enum',0,'data',x,'format','DoubleMat');
++WriteData(fid,'enum',1,'data',y,'format','DoubleMat');
++WriteData(fid,'enum',2,'data',observations,'format','DoubleMat');
++WriteData(fid,'enum',3,'data',x_interp,'format','DoubleMat');
++WriteData(fid,'enum',4,'data',y_interp,'format','DoubleMat');
++options.marshall(fid);
++st=fclose(fid);
++if st==-1,
++	error(['marshall error message: could not close file ' name '.bin']);
++end
++% =========================================   MARSHALL.m =================================================
++
++%Launch job on remote cluster
++BuildKrigingQueueScript(cluster,name,'',1,0,0); %gather, valgrind, gprof
++LaunchQueueJob(cluster,name,name,{[name '.bin'] [name '.queue']});
++Download(cluster,name,{[name '.outbin']});
++
++%Process results
++structure=parseresultsfromdisk([name '.outbin'],0);
++B=structure.AutodiffForward(1:length(structure.AutodiffForward)/2);
++B=reshape(B,size(x_interp,1),size(x_interp,2));
++E=structure.AutodiffForward(length(structure.AutodiffForward)/2+1:end);
++E=reshape(E,size(x_interp,1),size(x_interp,2));
Index: /issm/oecreview/Archive/12321-12677/ISSM-12378-12379.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12378-12379.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12378-12379.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Exp/expcoarsen.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Exp/expcoarsen.m	(revision 12378)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Exp/expcoarsen.m	(revision 12379)
+@@ -25,7 +25,7 @@
+ 
+ %Get exp oldfile
+ [path root ext ver]=fileparts(oldfile);
+-A=expread(oldfile,1);
++A=expread(oldfile);
+ numprofiles=size(A,2);
+ 
+ %Go through the profiles
Index: /issm/oecreview/Archive/12321-12677/ISSM-12379-12380.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12379-12380.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12379-12380.diff	(revision 12679)
@@ -0,0 +1,57 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m	(revision 12379)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m	(revision 12380)
+@@ -104,6 +104,52 @@
+ 			 end
+ 		 end
+ 		 %}}}
++		 function BuildKrigingQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
++
++			 %write queuing script 
++			 if ~ispc,
++
++				 fid=fopen([modelname '.queue'],'w');
++				 fprintf(fid,'#!/bin/sh\n');
++				 if ~isvalgrind,
++					 if cluster.interactive
++						 fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s ',cluster.np,cluster.codepath,cluster.executionpath,modelname);
++					 else
++						 fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s 2> %s.errlog >%s.outlog ',cluster.np,cluster.codepath,cluster.executionpath,modelname,modelname,modelname);
++					 end
++				 elseif isgprof,
++					 fprintf(fid,'\n gprof %s/kriging.exe gmon.out > %s.performance',cluster.codepath,modelname);
++				 else
++					 %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/kriging.exe %s %s 2> %s.errlog >%s.outlog ',...
++						 cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,cluster.executionpath,modelname,modelname,modelname);
++				 end
++				 if ~io_gather, %concatenate the output files:
++					 fprintf(fid,'\ncat %s.outbin.* > %s.outbin',modelname,modelname);
++				 end
++				 fclose(fid);
++
++			 else % Windows
++
++				 fid=fopen([modelname '.bat'],'w');
++				 fprintf(fid,'@echo off\n');
++				 if cluster.interactive
++					 fprintf(fid,'"%s/issm.exe" %s "%s" %s ',cluster.codepath,EnumToString(solution),cluster.executionpath,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
++				 fclose(fid);
++			 end
++
++			 %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,modelname,dirname,filelist)% {{{
+ 
+ 			 %compress the files into one zip.
Index: /issm/oecreview/Archive/12321-12677/ISSM-12380-12381.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12380-12381.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12380-12381.diff	(revision 12679)
@@ -0,0 +1,43 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12380)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12381)
+@@ -68,15 +68,17 @@
+ 	pKrigingx(&predictions,&error,x,y,data,nobs,x_interp,y_interp,ninterp,options);
+ 
+ 	_printf_(true,"write results to disk:\n");
+-	output_fid=pfopen(outbinfilename,"wb");
+ 	Results *results = new Results();
+-	results->AddObject(new DoubleVecExternalResult(results->Size()+1,0,predictions,ninterp,1,0));
+-	results->AddObject(new DoubleVecExternalResult(results->Size()+1,0,error,ninterp,1,0));
+-	for(int i=0;i<results->Size();i++){
+-		ExternalResult* result=(ExternalResult*)results->GetObjectByOffset(i);
+-		result->WriteData(output_fid,1);
++	if(my_rank==0){
++		output_fid=pfopen(outbinfilename,"wb");
++		results->AddObject(new DoubleVecExternalResult(results->Size()+1,0,predictions,ninterp,1,0));
++		results->AddObject(new DoubleVecExternalResult(results->Size()+1,1,error,ninterp,1,0));
++		for(int i=0;i<results->Size();i++){
++			ExternalResult* result=(ExternalResult*)results->GetObjectByOffset(i);
++			result->WriteData(output_fid,1);
++		}
++		pfclose(output_fid,outbinfilename);
+ 	}
+-	pfclose(output_fid,outbinfilename);
+ 
+ 	/*Close output and petsc options file and write lock file if requested*/
+ 	_printf_(true,"write lock file:\n");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/DataProcessing/pkriging.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/DataProcessing/pkriging.m	(revision 12380)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/DataProcessing/pkriging.m	(revision 12381)
+@@ -38,7 +38,7 @@
+ 
+ %Process results
+ structure=parseresultsfromdisk([name '.outbin'],0);
+-B=structure.AutodiffForward(1:length(structure.AutodiffForward)/2);
++B=structure.AutodiffForward;
+ B=reshape(B,size(x_interp,1),size(x_interp,2));
+-E=structure.AutodiffForward(length(structure.AutodiffForward)/2+1:end);
++E=structure.AutodiffIsautodiff;
+ E=reshape(E,size(x_interp,1),size(x_interp,2));
Index: /issm/oecreview/Archive/12321-12677/ISSM-12381-12382.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12381-12382.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12381-12382.diff	(revision 12679)
@@ -0,0 +1,381 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12381)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12382)
+@@ -135,116 +135,34 @@
+ 
+ void ProcessInputfile(double **px,double **py,double **pdata,int *pnobs,double **px_interp,double **py_interp,int *pninterp,Options **poptions,FILE* fid){
+ 
+-	int      ninterp,nobs;
++	int      ninterp,nobs,numoptions;
+ 	double  *x        = NULL;
+ 	double  *y        = NULL;
+ 	double  *data     = NULL;
+ 	double  *x_interp = NULL;
+ 	double  *y_interp = NULL;
+ 	Options *options  = NULL;
++	Option  *option   = NULL;
+ 
+ 	int dummy,M,N;
+ 	IoModel* iomodel = new IoModel();
+ 	iomodel->fid=fid;
+ 	iomodel->CheckEnumSync();
++	iomodel->FetchData(&x,&M,&N,0);        nobs=M*N;
++	iomodel->FetchData(&y,&M,&N,1);        _assert_(M*N==nobs);
++	iomodel->FetchData(&data,&M,&N,2);     _assert_(M*N==nobs);
++	iomodel->FetchData(&x_interp,&M,&N,3); ninterp=M*N;
++	iomodel->FetchData(&y_interp,&M,&N,4); _assert_(M*N==ninterp);
+ 
+-	/*Read x*/
+-	fid=iomodel->SetFilePointerToData(&dummy,&dummy,0);
+-	if(my_rank==0){
+-		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
+-	}
+-	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
+-	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); 
+-	if(M*N){
+-		x=(double*)xmalloc(M*N*sizeof(double));
+-		if(my_rank==0){  
+-			if(fread(x,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+-		}
+-		MPI_Bcast(x,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+-	}
+-	nobs=M*N;
+-
+-	/*Read y*/
+-	fid=iomodel->SetFilePointerToData(&dummy,&dummy,1);
+-	if(my_rank==0){  
+-		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
+-	}
+-	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
+-	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); 
+-	if(M*N){
+-		y=(double*)xmalloc(M*N*sizeof(double));
+-		if(my_rank==0){  
+-			if(fread(y,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+-		}
+-		MPI_Bcast(y,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+-	}
+-	_assert_(M*N==nobs);
+-
+-	/*Read data*/
+-	fid=iomodel->SetFilePointerToData(&dummy,&dummy,2);
+-	if(my_rank==0){  
+-		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
+-	}
+-	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
+-	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); 
+-	if(M*N){
+-		data=(double*)xmalloc(M*N*sizeof(double));
+-		if(my_rank==0){  
+-			if(fread(data,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+-		}
+-		MPI_Bcast(data,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+-	}
+-	_assert_(M*N==nobs);
+-
+-	/*Read x_interp*/
+-	fid=iomodel->SetFilePointerToData(&dummy,&dummy,3);
+-	if(my_rank==0){  
+-		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
+-	}
+-	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
+-	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); 
+-	if(M*N){
+-		x_interp=(double*)xmalloc(M*N*sizeof(double));
+-		if(my_rank==0){  
+-			if(fread(x_interp,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+-		}
+-		MPI_Bcast(x_interp,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+-	}
+-	ninterp=N*M;
+-
+-	/*Read y_interp*/
+-	fid=iomodel->SetFilePointerToData(&dummy,&dummy,4);
+-	if(my_rank==0){  
+-		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
+-	}
+-	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
+-	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); 
+-	if(M*N){
+-		y_interp=(double*)xmalloc(M*N*sizeof(double));
+-		if(my_rank==0){  
+-			if(fread(y_interp,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+-		}
+-		MPI_Bcast(y_interp,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+-	}
+-	_assert_(N*M==ninterp);
+-
+ 	/*Read options*/
+ 	options = new Options();
++	iomodel->LastIndex(&N);
++	numoptions=(int)((N-4)/2);
++	for(int i=0;i<numoptions;i++){
++		iomodel->FetchData(&option,5+2*i);
++		options->AddOption(option);
++		option=NULL;
++	}
+ 
+ 	/*Assign output pointer*/
+ 	*px        = x;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12381)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12382)
+@@ -330,7 +330,16 @@
+ 					./solutions/CorePointerFromSolutionEnum.cpp\
+ 					./solvers/solver_linear.cpp\
+ 					./solvers/solver_nonlinear.cpp\
+-					./solvers/solver_newton.cpp
++					./solvers/solver_newton.cpp\
++					./objects/Options/Option.cpp\
++					./objects/Options/Option.h\
++					./objects/Options/OptionDouble.cpp\
++					./objects/Options/OptionDouble.h\
++					./objects/Options/OptionChar.cpp\
++					./objects/Options/OptionChar.h\
++					./objects/Options/OptionUtilities.cpp\
++					./objects/Options/OptionUtilities.h
++
+ #}}}
+ #DAKOTA sources  {{{1
+ dakota_sources = ./objects/DakotaPlugin.h\
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h	(revision 12381)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h	(revision 12382)
+@@ -12,8 +12,8 @@
+ 
+ class Elements;
+ class Param;
++class Option;
+ 
+-
+ class IoModel {
+ 
+ 	private: 
+@@ -22,7 +22,7 @@
+ 
+ 	public:
+ 		/*This data needs to stay memory resident at all time, even if it's memory intensive: */
+-		FILE        *fid;         //pointer to input file
++		FILE *fid;         //pointer to input file
+ 		bool *my_elements;
+ 		bool *my_nodes;
+ 		int  *my_vertices;
+@@ -40,26 +40,28 @@
+ 		IoModel(FILE* iomodel_handle);
+ 
+ 		/*Input/Output*/
+-		void    CheckEnumSync(void);
+-		void    Constant(bool   *poutput,int constant_enum);
+-		void    Constant(int    *poutput,int constant_enum);
+-		void    Constant(IssmDouble *poutput,int constant_enum);
+-		void    Constant(char  **poutput,int constant_enum);
+-		Param  *CopyConstantObject(int constant_enum);
++		void        CheckEnumSync(void);
++		void        Constant(bool *poutput,int constant_enum);
++		void        Constant(int *poutput,int constant_enum);
++		void        Constant(IssmDouble *poutput,int constant_enum);
++		void        Constant(char **poutput,int constant_enum);
++		Param      *CopyConstantObject(int constant_enum);
+ 		IssmDouble *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(IssmDouble*   pscalar,int data_enum);
+-		void    FetchData(char**    pstring,int data_enum);
+-		void    FetchData(int** pmatrix,int* pM,int* pN,int data_enum);
+-		void    FetchData(IssmDouble**  pscalarmatrix,int* pM,int* pN,int data_enum);
+-		void    FetchData(char***   pstringarray,int* pnumstrings,int data_enum);
+-		void    FetchData(IssmDouble*** 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,IssmDouble default_value=0);
+-		FILE*   SetFilePointerToData(int* pcode,int* pvector_type, int data_enum);
++		void        DeleteData(int num,...);
++		void        FetchConstants(void);
++		void        FetchData(bool* pboolean,int data_enum);
++		void        FetchData(int* pinteger,int data_enum);
++		void        FetchData(IssmDouble* pscalar,int data_enum);
++		void        FetchData(char** pstring,int data_enum);
++		void        FetchData(int** pmatrix,int* pM,int* pN,int data_enum);
++		void        FetchData(IssmDouble**  pscalarmatrix,int* pM,int* pN,int data_enum);
++		void        FetchData(char***   pstringarray,int* pnumstrings,int data_enum);
++		void        FetchData(IssmDouble*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
++		void        FetchData(Option **poption,int data_enum);
++		void        FetchData(int num,...);
++		void        FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum=NoneEnum,IssmDouble default_value=0);
++		void        LastIndex(int *pindex);
++		FILE*       SetFilePointerToData(int* pcode,int* pvector_type, int data_enum);
+ };
+ 
+ #endif  /* _IOMODEL_H */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12381)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12382)
+@@ -866,6 +866,57 @@
+ 	*pnumrecords=numrecords;
+ }
+ /*}}}*/
++/*FUNCTION IoModel::FetchData(Option** poption,int data_enum){{{*/
++void  IoModel::FetchData(Option** poption,int index){
++
++	extern int my_rank;
++	extern int num_procs;
++
++	/*output: */
++	int     code;
++	Option *option      = NULL;
++	char   *name        = NULL;
++
++	/*First get option name*/
++	this->FetchData(&name,index);
++	_printf_(true,"Option name is %s\n",name);
++
++	/*Get option value*/
++	fid=this->SetFilePointerToData(&code,NULL,index+1);
++	switch(code){
++		case 3: {//double
++			  double *value = NULL;
++			  value=(double*)xmalloc(1*sizeof(double));
++			  FetchData(value,index+1);
++			  _printf_(true,"value = %g\n",*value);
++			  option = new OptionDouble();
++			  ((OptionDouble*)option)->values = value;
++			  option->name  = name;
++			  option->numel = 1;
++			  option->ndims = 1;
++			  option->size  = NULL;
++			  break;
++			  }
++		case 4: {//char
++			  char* value = NULL;
++			  FetchData(&value,index+1);
++			  _printf_(true,"value = %s\n",value);
++			  option = new OptionChar();
++			  ((OptionChar*)option)->values = value;
++			  option->name  = name;
++			  option->numel = 1;
++			  option->ndims = 1;
++			  option->size  = NULL;
++			  break;
++			  }
++		default:
++			  _error_("Option of format %i not supported yet",code);
++	}
++
++	/*Assign output pointers: */
++	*poption=option;
++}
++/*}}}*/
+ /*FUNCTION IoModel::FetchData(int num,...){{{*/
+ void  IoModel::FetchData(int num,...){
+ 
+@@ -1096,21 +1147,56 @@
+ 	xfree((void**)&doublevector);
+ 	xfree((void**)&string);
+ }
++/*FUNCTION IoModel::LastIndex{{{*/
++void IoModel::LastIndex(int *pindex){
++
++	extern int my_rank;
++	int        lastindex,index;
++	int        record_length;
++
++	/*Go find in the binary file, the position of the data we want to fetch: */
++	if(my_rank==0){
++
++		/*First set FILE* position to the beginning of the file: */
++		fseek(fid,0,SEEK_SET);
++
++		/*Now march through file looking for the correct data identifier: */
++		for(;;){
++			/*Read enum for this size of first string name: */
++			if(fread(&index,sizeof(int),1,fid)==0){
++				/*Ok, we have reached the end of the file. break: */
++				break;
++			}
++
++			/*read the record length, and use it to skip this record: */
++			fread(&record_length,sizeof(int),1,fid);
++			fseek(fid,record_length,SEEK_CUR);
++			lastindex=index;
++		}
++	}
++	/*Broadcast code and vector type: */
++#ifdef _HAVE_MPI_
++	MPI_Bcast(&lastindex,1,MPI_INT,0,MPI_COMM_WORLD); 
++#endif
++
++	/*Assign output pointers:*/
++	*pindex=lastindex;
++}
+ /*FUNCTION IoModel::SetFilePointerToData{{{*/
+ FILE* IoModel::SetFilePointerToData(int* pcode,int* pvector_type, int data_enum){
+ 
+ 	extern int my_rank;
+ 	extern int num_procs;
+-	
++
+ 	int found=0;
+ 	int record_enum;
+ 	int record_length;
+ 	int record_code; //1 to 7 number
+ 	int vector_type; //nodal or elementary
+- 
++
+ 	/*Go find in the binary file, the position of the data we want to fetch: */
+ 	if(my_rank==0){
+-	
++
+ 		/*First set FILE* position to the beginning of the file: */
+ 		fseek(fid,0,SEEK_SET);
+ 
+@@ -1122,7 +1208,7 @@
+ 				found=0;
+ 				break;
+ 			}
+-			
++
+ 			/*Is this the record sought for? : */
+ 			if (data_enum==record_enum){
+ 				/*Ok, we have found the correct string. Pass the record length, and read data type code: */
+@@ -1142,17 +1228,17 @@
+ 			}
+ 		}
+ 	}
+-	#ifdef _HAVE_MPI_
++#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
++#endif
+ 
+ 	/*Broadcast code and vector type: */
+-	#ifdef _HAVE_MPI_
++#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
++#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pcode=record_code;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12382-12383.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12382-12383.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12382-12383.diff	(revision 12679)
@@ -0,0 +1,29 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/pairoptions.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/pairoptions.m	(revision 12382)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/pairoptions.m	(revision 12383)
+@@ -222,16 +222,20 @@
+ 				end
+ 			end
+ 		end % }}}
+-		function marshall(obj,fid)% {{{
+-			disp('No options marshalled for now');
++		function marshall(obj,fid,firstindex)% {{{
++
+ 			for i=1:size(obj.list,1),
+ 				name  = obj.list{i,1};
+ 				value = obj.list{i,2};
+ 
++				%Write option name
++				WriteData(fid,'enum',(firstindex-1)+2*i-1,'data',name,'format','String');
++
++				%Write option value
+ 				if (isnumeric(value) & numel(value)==1),
+-					%
++					WriteData(fid,'enum',(firstindex-1)+2*i,'data',value,'format','Double');
+ 				elseif ischar(value),
+-					%
++					WriteData(fid,'enum',(firstindex-1)+2*i,'data',value,'format','String');
+ 				else
+ 					error(['Cannot marshall option ' name ': format not supported yet']);
+ 				end
Index: /issm/oecreview/Archive/12321-12677/ISSM-12383-12384.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12383-12384.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12383-12384.diff	(revision 12679)
@@ -0,0 +1,38 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/DataProcessing/pkriging.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/DataProcessing/pkriging.m	(revision 12383)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/DataProcessing/pkriging.m	(revision 12384)
+@@ -6,6 +6,7 @@
+ 
+ options=pairoptions(varargin{:});
+ cluster=getfieldvalue(options,'cluster',generic('np',10));
++options=removefield(options,'cluster',0);
+ name   = 'krig';
+ 
+ % =========================================   MARSHALL.m =================================================
+@@ -24,7 +25,7 @@
+ WriteData(fid,'enum',2,'data',observations,'format','DoubleMat');
+ WriteData(fid,'enum',3,'data',x_interp,'format','DoubleMat');
+ WriteData(fid,'enum',4,'data',y_interp,'format','DoubleMat');
+-options.marshall(fid);
++options.marshall(fid,5);
+ st=fclose(fid);
+ if st==-1,
+ 	error(['marshall error message: could not close file ' name '.bin']);
+@@ -33,12 +34,14 @@
+ 
+ %Launch job on remote cluster
+ BuildKrigingQueueScript(cluster,name,'',1,0,0); %gather, valgrind, gprof
++tic
+ LaunchQueueJob(cluster,name,name,{[name '.bin'] [name '.queue']});
++toc
+ Download(cluster,name,{[name '.outbin']});
+ 
+ %Process results
+ structure=parseresultsfromdisk([name '.outbin'],0);
+ B=structure.AutodiffForward;
+-B=reshape(B,size(x_interp,1),size(x_interp,2));
++B=reshape(B,size(x_interp,1),size(x_interp,2))';
+ E=structure.AutodiffIsautodiff;
+-E=reshape(E,size(x_interp,1),size(x_interp,2));
++E=reshape(E,size(x_interp,1),size(x_interp,2))';
Index: /issm/oecreview/Archive/12321-12677/ISSM-12386-12387.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12386-12387.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12386-12387.diff	(revision 12679)
@@ -0,0 +1,12 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-greenplanet.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-greenplanet.sh	(revision 12386)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-greenplanet.sh	(revision 12387)
+@@ -9,6 +9,7 @@
+  --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="/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 \
Index: /issm/oecreview/Archive/12321-12677/ISSM-12389-12390.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12389-12390.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12389-12390.diff	(revision 12679)
@@ -0,0 +1,244 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plotmodel.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plotmodel.m	(revision 12389)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plotmodel.m	(revision 12390)
+@@ -47,7 +47,7 @@
+ 	try,
+ 		for i=1:numberofplots,
+ 			plot_manager(getfieldvalue(options.list{i},'model',md),options.list{i},subplotwidth,nlines,ncols,i);
+-			%cbfreeze;
++
+ 		end
+ 	catch me,
+ 		%figure(figurenumber),close;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12389)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12390)
+@@ -76,48 +76,66 @@
+ data_grid(data_nan)=data_min; 
+ 
+ colorm=getfieldvalue(options,'colormap','Rignot');
+-if strcmpi(colorm,'Rignot'),
+-	%hue (H)
+-	h_data=(data_grid-data_min)/(data_max-data_min+eps);
+-	if radaronly, h_data(:)=0; end
+-	%saturation (S)
+-	s_data=max(min((0.1+h_data).^(1/transparency),1),0);
+-elseif strcmpi(colorm,'Seroussi'),
+-	%hue (H)
+-	h_data=1-(data_grid-data_min)/(data_max-data_min+eps)*0.7;
+-	%h_data=(data_grid-data_min)/(data_max-data_min)*2/3;
+-	if radaronly, h_data(:)=0; end
+-	%saturation (S)
+-	s_data=max(min((0.1+h_data).^(1/transparency),1),0);
+-elseif strcmpi(colorm,'redblue')
+-	data_mean=data_min+(data_max-data_min)/2;
+-	%hue (H)
+-	%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;
+-	%saturation (S)
+-	s_data=max(min(abs(data_grid-data_mean)/(data_max-data_mean) ,1),0);
++
++%Special colormaps that require hsv treatment
++if strcmpi(colorm,'Rignot') | strcmpi(colorm,'Seroussi') | strcmpi(colorm,'redblue')
++	if strcmpi(colorm,'Rignot'),
++		h=(data_grid-data_min)/(data_max-data_min+eps);
++		if radaronly, h(:)=0; end
++		s=max(min((0.1+h).^(1/transparency),1),0);
++	elseif strcmpi(colorm,'Seroussi'),
++		h=1-(data_grid-data_min)/(data_max-data_min+eps)*0.7;
++		if radaronly, h(:)=0; end
++		s=max(min((0.1+h).^(1/transparency),1),0);
++	elseif strcmpi(colorm,'redblue')
++		data_mean=data_min+(data_max-data_min)/2;
++		h=1*ones(size(data_grid));
++		h(find(data_grid<data_mean))=0.7;
++		s=max(min(abs(data_grid-data_mean)/(data_max-data_mean) ,1),0);
++	else
++		error('colormap not supported yet. (''Rignot'' and ''redblue'' are the only cupported colormaps)');
++	end
++
++	%(S) Saturation is 0 in NaNs
++	s(data_nan)=0;
++
++	%(V) intensity is based on radar image
++	radar=(md.radaroverlay.pwr).^(contrast);
++	v=radar/max(radar(:)); %use radar power as intensity
++	%pos=find(v==0);v(pos)=1; %Change background from black to white
++
++	%Transform HSV to RGB
++	image_hsv=zeros(size(data_grid,1),size(data_grid,2),3);
++	image_hsv(:,:,1)=h; clear h;
++	image_hsv(:,:,2)=s; clear s;
++	image_hsv(:,:,3)=v; clear v;
++	image_rgb=hsv2rgb(image_hsv);
+ else
+-	error('colormap not supported yet. (''Rignot'' and ''redblue'' are the only cupported colormaps)');
+-end
++	if ischar(colorm),
++		eval(['colorm = ' colorm ';']);
++	end
++	len = size(colorm,1);
+ 
+-%Saturation is 0 in NaNs
+-s_data(data_nan)=0;
+-%intensity (V)
+-radar=(md.radaroverlay.pwr).^(contrast);
+-v_data=radar/max(radar(:)); %use radar power as intensity
++	ind = floor((len-1)*(data_grid-data_min)/(data_max - data_min + eps) +1);
++	image_rgb=zeros(size(data_grid,1),size(data_grid,2),3);
++	r=colorm(:,1); image_rgb(:,:,1)=r(ind); clear r;
++	g=colorm(:,2); image_rgb(:,:,2)=g(ind); clear g;
++	b=colorm(:,3); image_rgb(:,:,3)=b(ind); clear b;
+ 
+-%Change background from black to white
+-%pos=find(v_data==0);v_data(pos)=1;
++	%Now add radarmap
++	image_hsv=rgb2hsv(image_rgb);
++	radar = (md.radaroverlay.pwr).^(contrast);
++	h=radar/max(radar(:));
++	image_hsv(:,:,3)=h;
++	s=image_hsv(:,:,2);
++	s(data_nan)=0;
++	image_hsv(:,:,2)=s;
++	v=image_hsv(:,:,3);
++	%pos=find(v==0);v(pos)=1; %Change background from black to white
++	image_hsv(:,:,3)=v;
++	image_rgb=hsv2rgb(image_hsv);
++end
+ 
+-%Transform HSV to RGB
+-image_hsv=zeros(size(data_grid,1),size(data_grid,2),3);
+-image_hsv(:,:,1)=h_data;
+-image_hsv(:,:,2)=s_data;
+-image_hsv(:,:,3)=v_data;
+-image_rgb=hsv2rgb(image_hsv);
+-
+ %Select plot area 
+ subplotmodel(plotlines,plotcols,i,options);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12389)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12390)
+@@ -30,22 +30,18 @@
+ 	end
+ end
+ 
+-%xlabel
++%xlabel, ylabel and zlabel
+ if exist(options,'xlabel');
+ 	xlabel(getfieldvalue(options,'xlabel'),'FontSize',fontsize,'FontWeight',fontweight);
+ end
+-
+-%ylabel
+ if exist(options,'ylabel');
+ 	ylabel(getfieldvalue(options,'ylabel'),'FontSize',fontsize,'FontWeight',fontweight);
+ end
+-
+-%zlabel
+ if exist(options,'zlabel');
+ 	zlabel(getfieldvalue(options,'zlabel'),'FontSize',fontsize,'FontWeight',fontweight);
+ end
+ 
+-%xtikcs
++%xticks, yticks and zticks
+ if exist(options,'xtick'), set(gca,'XTick',getfieldvalue(options,'xtick')); end
+ if exist(options,'ytick'), set(gca,'YTick',getfieldvalue(options,'ytick')); end
+ if exist(options,'ztick'), set(gca,'ZTick',getfieldvalue(options,'ztick')); end
+@@ -74,15 +70,16 @@
+ 	eval(['box ' getfieldvalue(options,'box')]);
+ end
+ 
+-%xlim
++%xlim, ylim and zlim
+ if exist(options,'xlim');
+ 	xlim(getfieldvalue(options,'xlim'));
+ end
+-
+-%ylim
+ if exist(options,'ylim');
+ 	ylim(getfieldvalue(options,'ylim'));
+ end
++if exist(options,'zlim');
++	zlim(getfieldvalue(options,'zlim'));
++end
+ 
+ %latlon
+ %Must be done here (before xlim and ylim??) so that it uses the same xlim and ylim as plot_overlay
+@@ -91,12 +88,6 @@
+ 	latlonoverlay(md,options);
+ end
+ 
+-
+-%zlim
+-if exist(options,'zlim');
+-	zlim(getfieldvalue(options,'zlim'));
+-end
+-
+ %Basinzoom
+ if exist(options,'basin');
+ 	basinzoom(options);
+@@ -107,7 +98,6 @@
+ 	showbasins(options);
+ end
+ 
+-
+ %Caxis
+ if exist(options,'caxis'),
+ 	caxis(getfieldvalue(options,'caxis'));
+@@ -132,40 +122,34 @@
+ 		c = jet(64);
+ 		c = c (32:end,:);
+ 	elseif strcmpi(cname,'redblue'),
+-		%m = 30;
+-		%n = fix(0.5*m);
+-		%r = [(0:1:n-1)/n,ones(1,n)];
+-		%g = [(0:n-1)/n, (n-1:-1:0)/n];
+-		%b = [ones(1,n),(n-1:-1:0)/n];
+-		%c = [r(:), g(:), b(:)]; 
+-
+ 		c = hsv(64);
+ 		c = rgb2hsv(c);
+ 		c(:,2) = max(min( abs(c(:,1)-0.5)/0.5 ,1),0);
+ 		c(1:32,1)   = 0.7;
+ 		c(33:end,1) = 1;
+ 		c = hsv2rgb(c);
+-
+ 	elseif strcmpi(cname,'Rignot'),
+-		c = hsv;
+-
+-		%adjust saturation
++		c = hsv(252);
+ 		c = rgb2hsv(c);
+ 		alpha=getfieldvalue(options,'alpha',1);
+ 		c(:,2) = max(min( (0.1+c(:,1)).^(1/alpha) ,1),0);
+ 		c = hsv2rgb(c);
+-
+ 	elseif strcmpi(cname,'Rignot2'),
+-		c = hsv;
+-
+-		%adjust saturation
++		c = hsv(252);
+ 		c = rgb2hsv(c);
+ 		alpha=getfieldvalue(options,'alpha',1);
+ 		c(:,2) = max(min( (0.1+c(:,1)).^(1/alpha) ,1),0);
+ 		c = hsv2rgb(c);
+-
+ 		c=flipud(c);
+-
++	elseif strcmpi(cname,'Seroussi'),
++		c = hsv(252);
++		c = flipud(c);
++		c = c(1:floor(0.7*size(c,1)),:);
++		c = rgb2hsv(c);
++		alpha=getfieldvalue(options,'alpha',1);
++		c(:,2) = max(min( (0.1+c(:,1)).^(1/alpha) ,1),0);
++		c = hsv2rgb(c);
++		%c = flipud(c);
+ 	else
+ 		c = cname;
+ 	end
Index: /issm/oecreview/Archive/12321-12677/ISSM-12390-12391.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12390-12391.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12390-12391.diff	(revision 12679)
@@ -0,0 +1,194 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/getcolormap.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/getcolormap.m	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/getcolormap.m	(revision 12391)
+@@ -0,0 +1,55 @@
++function map = getcolormap(options)
++%GETCOLORMAP - get colormap from options
++%
++%   Usage:
++%      map = getcolormap(options)
++
++%default is jet(256)
++if ~exist(options,'colormap'),
++	map = jet(256);
++	return
++end
++
++map = getfieldvalue(options,'colormap');
++if isnumeric(map);
++	%user provided a full colormap
++	return;
++end
++
++%OK this is an in-house colormap
++if ~ischar(map), error('colormap format not supported'); end
++
++if strcmpi(map,'Ala'),
++	map = jet(256);
++	map = map(128:end,:);
++elseif strcmpi(map,'redblue'),
++	map = hsv(256);
++	map = rgb2hsv(map);
++	map(:,2)       = max(min( abs(map(:,1)-0.5)/0.5 ,1),0);
++	map(1:128,1)   = 0.7;
++	map(129:end,1) = 1;
++	map = hsv2rgb(map);
++elseif strcmpi(map,'Rignot'),
++	alpha=getfieldvalue(options,'alpha',1);
++	map = hsv(256);
++	map = rgb2hsv(map);
++	map(:,2) = max(min( (0.1+map(:,1)).^(1/alpha) ,1),0);
++	map = hsv2rgb(map);
++elseif strcmpi(map,'Rignot2'),
++	alpha=getfieldvalue(options,'alpha',1);
++	map = hsv(256);
++	map = rgb2hsv(map);
++	map(:,2) = max(min( (0.1+map(:,1)).^(1/alpha) ,1),0);
++	map = hsv2rgb(map);
++	map=flipud(map);
++elseif strcmpi(map,'Seroussi'),
++	alpha=getfieldvalue(options,'alpha',1);
++	map = hsv(256);
++	map = flipud(map);
++	map = map(1:floor(0.7*size(map,1)),:);
++	map = rgb2hsv(map);
++	map(:,2) = max(min( (0.1+map(:,1)).^(1/alpha) ,1),0);
++	map = hsv2rgb(map);
++else
++	eval(['map = ' map ';']);
++end
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_gridded.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_gridded.m	(revision 12390)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_gridded.m	(revision 12391)
+@@ -6,8 +6,6 @@
+ %
+ %   See also: PLOTMODEL
+ 
+-whitepos=getfieldvalue(options,'whitepos',2); %1: up, 2: down, else: none
+-
+ %process mesh and data
+ [x y z elements is2d isplanet]=processmesh(md,[],options);
+ [data datatype]=processdata(md,data,options);
+@@ -28,6 +26,12 @@
+ 	error('data_grid size too small in plot_gridded, check posting and uni');
+ end
+ 
++%Get and change colormap
++map    = getcolormap(options);
++lenmap = size(map,1);
++map    = [1 1 1; map];
++options=changefieldvalue(options,'colormap',map);
++
+ %Process data_grid: add white in NaN and correct caxis accordingly
+ if exist(options,'caxis'),
+ 	caxis_opt=getfieldvalue(options,'caxis');
+@@ -39,29 +43,16 @@
+ 	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]);
+-	data_grid(isnan(data_grid))=white;
+-elseif whitepos==2,
+-	white  =data_min - (data_max-data_min)/55;
+-	options=changefieldvalue(options,'caxis',[white data_max]);
+-	data_grid(isnan(data_grid))=white;
+-end
++options = changefieldvalue(options,'cbYLim',[data_min data_max]);
++white   = data_min - (data_max-data_min)/(lenmap);
++options = changefieldvalue(options,'caxis',[white data_max]);
++data_grid(isnan(data_grid))=white;
+ 
+ %Select plot area 
+ subplot(plotlines,plotcols,i);
+ 
+ %shading interp;
+ h=imagesc(xlim,ylim,data_grid);set(gca,'YDir','normal');
+-map=getfieldvalue(options,'colormap',jet);
+-if whitepos==1,
+-	map(end,:)=[1 1 1];
+-elseif whitepos==2,
+-	map(1,:)=[1 1 1];
+-end
+-options=changefieldvalue(options,'colormap',map);
+ 
+ %last step: mesh gridded?
+ if exist(options,'edgecolor'),
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12390)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12391)
+@@ -111,12 +111,11 @@
+ 	image_hsv(:,:,3)=v; clear v;
+ 	image_rgb=hsv2rgb(image_hsv);
+ else
+-	if ischar(colorm),
+-		eval(['colorm = ' colorm ';']);
+-	end
++	colorm = getcolormap(options);
+ 	len = size(colorm,1);
+ 
+-	ind = floor((len-1)*(data_grid-data_min)/(data_max - data_min + eps) +1);
++	ind = round((len-1)*(data_grid-data_min)/(data_max - data_min + eps) +1);
++	ind(find(ind>len))=len;
+ 	image_rgb=zeros(size(data_grid,1),size(data_grid,2),3);
+ 	r=colorm(:,1); image_rgb(:,:,1)=r(ind); clear r;
+ 	g=colorm(:,2); image_rgb(:,:,2)=g(ind); clear g;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12390)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12391)
+@@ -116,47 +116,8 @@
+ end
+ 
+ %colormap
+-if exist(options,'colormap'),
+-	cname=getfieldvalue(options,'colormap');
+-	if strcmpi(cname,'Ala'),
+-		c = jet(64);
+-		c = c (32:end,:);
+-	elseif strcmpi(cname,'redblue'),
+-		c = hsv(64);
+-		c = rgb2hsv(c);
+-		c(:,2) = max(min( abs(c(:,1)-0.5)/0.5 ,1),0);
+-		c(1:32,1)   = 0.7;
+-		c(33:end,1) = 1;
+-		c = hsv2rgb(c);
+-	elseif strcmpi(cname,'Rignot'),
+-		c = hsv(252);
+-		c = rgb2hsv(c);
+-		alpha=getfieldvalue(options,'alpha',1);
+-		c(:,2) = max(min( (0.1+c(:,1)).^(1/alpha) ,1),0);
+-		c = hsv2rgb(c);
+-	elseif strcmpi(cname,'Rignot2'),
+-		c = hsv(252);
+-		c = rgb2hsv(c);
+-		alpha=getfieldvalue(options,'alpha',1);
+-		c(:,2) = max(min( (0.1+c(:,1)).^(1/alpha) ,1),0);
+-		c = hsv2rgb(c);
+-		c=flipud(c);
+-	elseif strcmpi(cname,'Seroussi'),
+-		c = hsv(252);
+-		c = flipud(c);
+-		c = c(1:floor(0.7*size(c,1)),:);
+-		c = rgb2hsv(c);
+-		alpha=getfieldvalue(options,'alpha',1);
+-		c(:,2) = max(min( (0.1+c(:,1)).^(1/alpha) ,1),0);
+-		c = hsv2rgb(c);
+-		%c = flipud(c);
+-	else
+-		c = cname;
+-	end
+-	h=colormap(c);
+-else
+-	h=colormap(jet(60));
+-end
++c = getcolormap(options);
++h=colormap(c);
+ 
+ %wrapping
+ if exist(options,'wrapping'),
Index: /issm/oecreview/Archive/12321-12677/ISSM-12391-12392.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12391-12392.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12391-12392.diff	(revision 12679)
@@ -0,0 +1,29 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12391)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12392)
+@@ -112,10 +112,12 @@
+ 	image_rgb=hsv2rgb(image_hsv);
+ else
+ 	colorm = getcolormap(options);
+-	len = size(colorm,1);
++	len    = size(colorm,1);
++	size(colorm)
+ 
+-	ind = round((len-1)*(data_grid-data_min)/(data_max - data_min + eps) +1);
++	ind = ceil((len-1)*(data_grid-data_min)/(data_max - data_min + eps) +1);
+ 	ind(find(ind>len))=len;
++	max(ind(:))
+ 	image_rgb=zeros(size(data_grid,1),size(data_grid,2),3);
+ 	r=colorm(:,1); image_rgb(:,:,1)=r(ind); clear r;
+ 	g=colorm(:,2); image_rgb(:,:,2)=g(ind); clear g;
+@@ -124,7 +126,8 @@
+ 	%Now add radarmap
+ 	image_hsv=rgb2hsv(image_rgb);
+ 	radar = (md.radaroverlay.pwr).^(contrast);
+-	h=radar/max(radar(:));
++	h=image_hsv(:,:,3);
++	h=h.*radar/max(radar(:));
+ 	image_hsv(:,:,3)=h;
+ 	s=image_hsv(:,:,2);
+ 	s(data_nan)=0;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12392-12393.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12392-12393.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12392-12393.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/thermal.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/thermal.m	(revision 12392)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/thermal.m	(revision 12393)
+@@ -47,7 +47,7 @@
+ 			checkfield(md,'thermal.stabilization','numel',1,'values',[0 1 2]);
+ 			checkfield(md,'thermal.spctemperature','forcing',1);
+ 			if (ismember(EnthalpyAnalysisEnum,analyses) & md.thermal.isenthalpy),
+-			checkfield(md,'thermal.spctemperature','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*md.geometry.thickness,'message','spctemperature should be below the adjusted melting point');
++			checkfield(md,'thermal.spctemperature','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*(md.geometry.surface-md.mesh.z),'message','spctemperature should be below the adjusted melting point');
+ 			checkfield(md,'thermal.isenthalpy','numel',1,'values',[0 1]);
+ 			end
+ 		end % }}}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12393-12394.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12393-12394.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12393-12394.diff	(revision 12679)
@@ -0,0 +1,39 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12393)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12394)
+@@ -113,29 +113,21 @@
+ else
+ 	colorm = getcolormap(options);
+ 	len    = size(colorm,1);
+-	size(colorm)
+ 
+ 	ind = ceil((len-1)*(data_grid-data_min)/(data_max - data_min + eps) +1);
+ 	ind(find(ind>len))=len;
+-	max(ind(:))
+ 	image_rgb=zeros(size(data_grid,1),size(data_grid,2),3);
+ 	r=colorm(:,1); image_rgb(:,:,1)=r(ind); clear r;
+ 	g=colorm(:,2); image_rgb(:,:,2)=g(ind); clear g;
+ 	b=colorm(:,3); image_rgb(:,:,3)=b(ind); clear b;
+ 
+ 	%Now add radarmap
+-	image_hsv=rgb2hsv(image_rgb);
+ 	radar = (md.radaroverlay.pwr).^(contrast);
+-	h=image_hsv(:,:,3);
+-	h=h.*radar/max(radar(:));
+-	image_hsv(:,:,3)=h;
+-	s=image_hsv(:,:,2);
+-	s(data_nan)=0;
+-	image_hsv(:,:,2)=s;
+-	v=image_hsv(:,:,3);
+-	%pos=find(v==0);v(pos)=1; %Change background from black to white
+-	image_hsv(:,:,3)=v;
+-	image_rgb=hsv2rgb(image_hsv);
++	radar = radar/max(radar(:));
++	%pos=find(radar==0); %Change background from black to white
++	r = image_rgb(:,:,1).*radar;  r(data_nan) = radar(data_nan);  r(pos) = 1;  image_rgb(:,:,1) = r;  clear r;
++	g = image_rgb(:,:,2).*radar;  g(data_nan) = radar(data_nan);  g(pos) = 1;  image_rgb(:,:,2) = g;  clear g;
++	b = image_rgb(:,:,3).*radar;  b(data_nan) = radar(data_nan);  b(pos) = 1;  image_rgb(:,:,3) = b;  clear b;
+ end
+ 
+ %Select plot area 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12394-12395.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12394-12395.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12394-12395.diff	(revision 12679)
@@ -0,0 +1,234 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12394)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12395)
+@@ -117,7 +117,7 @@
+ 
+ %colormap
+ c = getcolormap(options);
+-h=colormap(c);
++h = colormap(c);
+ 
+ %wrapping
+ if exist(options,'wrapping'),
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/colormaps/haxby.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/colormaps/haxby.m	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/colormaps/haxby.m	(revision 12395)
+@@ -0,0 +1,42 @@
++function map = haxby(m);
++%HAXBY  Haxby color map
++%   HAXBY(M) returns an M-by-3 matrix containing a colormap with Haxby's
++%   colors, commonly used for displaying bathymetry data.
++%   HAXBY, by itself, is the same length as the current colormap.
++%
++%   For example, to reset the colormap of the current figure:
++%
++%             colormap(haxby)
++%
++%   Use
++%             colormap(flipud(haxby))
++%
++%   for bathymetry data (positive downward).
++%
++%   Colormap is based on the colors used by W. F. Haxby's Gravity
++%   field of World's oceans, 1985, developed for geoid and gravity maps.
++%   The version used here is formed from a linear interpolation of
++%   the GMT color table used by MB-System by David W. Caress and Dale N. Chayes.
++%   <http://www.ldeo.columbia.edu/res/pi/MB-System>
++%
++%   See also HSV, GRAY, PINK, COOL, BONE, COPPER, FLAG, HOT
++%   COLORMAP, RGBPLOT.
++
++% Kelsey Jordahl
++% Marymount Manhattan College
++% Time-stamp: <Fri Oct 30 12:45:12 EDT 2009>
++
++if nargin < 1, m = size(get(gcf,'colormap'),1); end
++% mbm_grdplot Haxby color pallette
++ncolors=11;
++c=[ 37    57   175;    40   127   251;    50   190   255;   106   235   255;
++138   236   174;   205   255   162;   240   236   121;   255   189    87;
++255   161    68;   255   186   133;   255   255   255];
++pp=1:(m-1)/(ncolors-1):m;
++r=interp1(pp,c(:,1),1:m);
++g=interp1(pp,c(:,2),1:m);
++b=interp1(pp,c(:,3),1:m);
++map=[r' g' b']/255;
++
++%Fix bug of interp1 (M. Morlighem)
++map(find(map>1))=1;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/colormaps/lbmap.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/colormaps/lbmap.m	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/colormaps/lbmap.m	(revision 12395)
+@@ -0,0 +1,109 @@
++function map = lbmap(n,scheme)
++%LBMAP Returns specified Light-Bertlein colormap.
++%
++%   LBMAP(N,SCHEME) returns an Nx3 colormap. SCHEME can be one of the
++%   following strings:
++%
++%       'Blue'       Single-hue progression to purlish-blue (default)
++%       'BlueGray'   Diverging progression from blue to gray
++%       'BrownBlue'  Orange-white-purple diverging scheme
++%       'RedBlue'    Modified spectral scheme
++%
++%   If N is not specified, the size of the colormap is determined by the
++%   current figure. If no figure exists, MATLAB creates one.
++%
++%Example 1: 7-color single-hue blue (default)
++%   load penny
++%   imagesc(P)
++%   colormap(lbmap(7))
++%   colorbar
++%
++%Example 2: 11-color modified spectrum
++%   load penny
++%   imagesc(P)
++%   colormap(lbmap(11,'RedBlue'))
++%   colorbar
++%
++%   See also HSV, GRAY, HOT, BONE, COPPER, PINK, FLAG, COLORMAP, RGBPLOT.
++
++% Reference:
++% A. Light & P.J. Bartlein, "The End of the Rainbow? Color Schemes for
++% Improved Data Graphics," Eos,Vol. 85, No. 40, 5 October 2004.
++% http://geography.uoregon.edu/datagraphics/EOS/Light&Bartlein_EOS2004.pdf
++
++% Copyright 2007-2010 The MathWorks, Inc.
++
++%defensive programming
++error(nargchk(0,2,nargin))
++error(nargoutchk(0,1,nargout))
++
++%defaults
++if nargin<2
++	scheme = 'Blue';
++end
++if nargin<1
++	n = size(get(gcf,'colormap'),1);
++end
++
++%valid schemes
++switch lower(scheme)
++	case 'blue'
++		baseMap = BlueMap;
++	case 'bluegray'
++		baseMap = BlueGrayMap;
++	case 'brownblue'
++		baseMap = BrownBlueMap;
++	case 'redblue'
++		baseMap = RedBlueMap;
++	otherwise
++		error(['Invalid scheme ' scheme])
++	end
++	idx1 = linspace(0,1,size(baseMap,1));
++	idx2 = linspace(0,1,n);
++	map = interp1(idx1,baseMap,idx2);
++
++function baseMap = BlueMap
++	baseMap = [243 246 248;
++	224 232 240;
++	171 209 236;
++	115 180 224;
++	35 157 213;
++	0 142 205;
++	0 122 192]/255;
++
++function baseMap = BlueGrayMap
++	%DivergingBlueGray
++	baseMap = [  0 170 227;
++	53 196 238;
++	133 212 234;
++	190 230 242;
++	217 224 230;
++	146 161 170;
++	109 122 129;
++	65  79  81]/255;
++
++function baseMap = BrownBlueMap
++	baseMap = [144 100  44;
++	187 120  54;
++	225 146  65;
++	248 184 139;
++	244 218 200;
++	241 244 245;
++	207 226 240;
++	160 190 225;
++	109 153 206;
++	70  99 174;
++	24  79 162]/255;
++
++function baseMap = RedBlueMap
++	baseMap = [175  53  71;
++	216  82  88;
++	239 133 122;
++	245 177 139;
++	249 216 168;
++	242 238 197;
++	216 236 241;
++	154 217 238;
++	68 199 239;
++	0 170 226;
++	0 116 188]/255;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/colormaps/getcolormap.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/colormaps/getcolormap.m	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/colormaps/getcolormap.m	(revision 12395)
+@@ -0,0 +1,55 @@
++function map = getcolormap(options)
++%GETCOLORMAP - get colormap from options
++%
++%   Usage:
++%      map = getcolormap(options)
++
++%default is jet(256)
++if ~exist(options,'colormap'),
++	map = jet(256);
++	return
++end
++
++map = getfieldvalue(options,'colormap');
++if isnumeric(map);
++	%user provided a full colormap
++	return;
++end
++
++%OK this is an in-house colormap
++if ~ischar(map), error('colormap format not supported'); end
++
++if strcmpi(map,'Ala'),
++	map = jet(256);
++	map = map(128:end,:);
++elseif strcmpi(map,'redblue'),
++	map = hsv(256);
++	map = rgb2hsv(map);
++	map(:,2)       = max(min( abs(map(:,1)-0.5)/0.5 ,1),0);
++	map(1:128,1)   = 0.7;
++	map(129:end,1) = 1;
++	map = hsv2rgb(map);
++elseif strcmpi(map,'Rignot'),
++	alpha=getfieldvalue(options,'alpha',1);
++	map = hsv(256);
++	map = rgb2hsv(map);
++	map(:,2) = max(min( (0.1+map(:,1)).^(1/alpha) ,1),0);
++	map = hsv2rgb(map);
++elseif strcmpi(map,'Rignot2'),
++	alpha=getfieldvalue(options,'alpha',1);
++	map = hsv(256);
++	map = rgb2hsv(map);
++	map(:,2) = max(min( (0.1+map(:,1)).^(1/alpha) ,1),0);
++	map = hsv2rgb(map);
++	map=flipud(map);
++elseif strcmpi(map,'Seroussi'),
++	alpha=getfieldvalue(options,'alpha',1);
++	map = hsv(256);
++	map = flipud(map);
++	map = map(1:floor(0.7*size(map,1)),:);
++	map = rgb2hsv(map);
++	map(:,2) = max(min( (0.1+map(:,1)).^(1/alpha) ,1),0);
++	map = hsv2rgb(map);
++else
++	eval(['map = ' map ';']);
++end
Index: /issm/oecreview/Archive/12321-12677/ISSM-12395-12396.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12395-12396.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12395-12396.diff	(revision 12679)
@@ -0,0 +1,60 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/getcolormap.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/getcolormap.m	(revision 12395)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/getcolormap.m	(revision 12396)
+@@ -1,55 +0,0 @@
+-function map = getcolormap(options)
+-%GETCOLORMAP - get colormap from options
+-%
+-%   Usage:
+-%      map = getcolormap(options)
+-
+-%default is jet(256)
+-if ~exist(options,'colormap'),
+-	map = jet(256);
+-	return
+-end
+-
+-map = getfieldvalue(options,'colormap');
+-if isnumeric(map);
+-	%user provided a full colormap
+-	return;
+-end
+-
+-%OK this is an in-house colormap
+-if ~ischar(map), error('colormap format not supported'); end
+-
+-if strcmpi(map,'Ala'),
+-	map = jet(256);
+-	map = map(128:end,:);
+-elseif strcmpi(map,'redblue'),
+-	map = hsv(256);
+-	map = rgb2hsv(map);
+-	map(:,2)       = max(min( abs(map(:,1)-0.5)/0.5 ,1),0);
+-	map(1:128,1)   = 0.7;
+-	map(129:end,1) = 1;
+-	map = hsv2rgb(map);
+-elseif strcmpi(map,'Rignot'),
+-	alpha=getfieldvalue(options,'alpha',1);
+-	map = hsv(256);
+-	map = rgb2hsv(map);
+-	map(:,2) = max(min( (0.1+map(:,1)).^(1/alpha) ,1),0);
+-	map = hsv2rgb(map);
+-elseif strcmpi(map,'Rignot2'),
+-	alpha=getfieldvalue(options,'alpha',1);
+-	map = hsv(256);
+-	map = rgb2hsv(map);
+-	map(:,2) = max(min( (0.1+map(:,1)).^(1/alpha) ,1),0);
+-	map = hsv2rgb(map);
+-	map=flipud(map);
+-elseif strcmpi(map,'Seroussi'),
+-	alpha=getfieldvalue(options,'alpha',1);
+-	map = hsv(256);
+-	map = flipud(map);
+-	map = map(1:floor(0.7*size(map,1)),:);
+-	map = rgb2hsv(map);
+-	map(:,2) = max(min( (0.1+map(:,1)).^(1/alpha) ,1),0);
+-	map = hsv2rgb(map);
+-else
+-	eval(['map = ' map ';']);
+-end
Index: /issm/oecreview/Archive/12321-12677/ISSM-12396-12397.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12396-12397.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12396-12397.diff	(revision 12679)
@@ -0,0 +1,65 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12396)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12397)
+@@ -26,7 +26,7 @@
+ 		outmatrix_cols=0;
+ 		outmatrix=NULL;
+ 	}
+-	else if(mxIsClass(dataref,"double") || mxIsClass(dataref,"single")){
++	else if(mxIsClass(dataref,"double") || mxIsClass(dataref,"single") || mxIsClass(dataref,"int16")){
+ 		/*Check dataref is not pointing to NaN: */
+ 		if ( mxIsNaN(*(mxGetPr(dataref))) && (mxGetM(dataref)==1) && (mxGetN(dataref)==1) ){
+ 			outmatrix_rows=0;
+@@ -34,6 +34,9 @@
+ 			outmatrix=NULL;
+ 		}
+ 		else{
++			if(!mxIsClass(dataref,"double") && !mxIsClass(dataref,"single")){
++				printf("Warning: converting matlab data from '%s' to 'double'\n",mxGetClassName(dataref));
++			}
+ 			/*Convert matlab matrix to double* matrix: */
+ 			MatlabMatrixToDoubleMatrix(&outmatrix,&outmatrix_rows,&outmatrix_cols,dataref);
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp	(revision 12396)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp	(revision 12397)
+@@ -17,9 +17,10 @@
+ 
+ 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;
++	int        i,j,count,rows,cols;
++	double    *pmxdoublematrix = NULL;
++	float     *pmxsinglematrix = NULL;
++	short int *pmxint16matrix  = NULL;
+ 
+ 	/*output: */
+ 	double* matrix=NULL;
+@@ -88,6 +89,23 @@
+ 			}
+ 		}
+ 	}
++	else if(mxIsClass(mxmatrix,"int16")){
++		/*Dealing with dense matrix: recover pointer and size: */
++		pmxint16matrix=(short*)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)pmxint16matrix[rows*j+i];
++				}
++			}
++		}
++	}
+ 	else{
+ 		_error_("Matlab matrix type Not implemented yet");
+ 	}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12397-12398.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12397-12398.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12397-12398.diff	(revision 12679)
@@ -0,0 +1,57 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/colormaps/haxby.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/colormaps/haxby.m	(revision 12397)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/colormaps/haxby.m	(revision 12398)
+@@ -1,37 +1,31 @@
+ function map = haxby(m);
+-%HAXBY  Haxby color map
++%HAXBY - Haxby color map
+ %   HAXBY(M) returns an M-by-3 matrix containing a colormap with Haxby's
+ %   colors, commonly used for displaying bathymetry data.
+ %   HAXBY, by itself, is the same length as the current colormap.
+ %
+-%   For example, to reset the colormap of the current figure:
+-%
+-%             colormap(haxby)
+-%
+-%   Use
+-%             colormap(flipud(haxby))
+-%
+-%   for bathymetry data (positive downward).
+-%
+ %   Colormap is based on the colors used by W. F. Haxby's Gravity
+ %   field of World's oceans, 1985, developed for geoid and gravity maps.
+ %   The version used here is formed from a linear interpolation of
+ %   the GMT color table used by MB-System by David W. Caress and Dale N. Chayes.
+ %   <http://www.ldeo.columbia.edu/res/pi/MB-System>
+-%
+-%   See also HSV, GRAY, PINK, COOL, BONE, COPPER, FLAG, HOT
+-%   COLORMAP, RGBPLOT.
+ 
+-% Kelsey Jordahl
+-% Marymount Manhattan College
+-% Time-stamp: <Fri Oct 30 12:45:12 EDT 2009>
++if nargin < 1, m = size(get(gcf,'colormap'),1); end
+ 
+-if nargin < 1, m = size(get(gcf,'colormap'),1); end
+-% mbm_grdplot Haxby color pallette
+ ncolors=11;
+-c=[ 37    57   175;    40   127   251;    50   190   255;   106   235   255;
+-138   236   174;   205   255   162;   240   236   121;   255   189    87;
+-255   161    68;   255   186   133;   255   255   255];
++c=[...
++	37     57   175
++	40    127   251
++	50    190   255
++	106   235   255
++	138   236   174
++	205   255   162
++	240   236   121
++	255   189    87
++	255   161    68
++	255   186   133
++	255   255   255];
++
+ pp=1:(m-1)/(ncolors-1):m;
+ r=interp1(pp,c(:,1),1:m);
+ g=interp1(pp,c(:,2),1:m);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12398-12399.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12398-12399.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12398-12399.diff	(revision 12679)
@@ -0,0 +1,99 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/subplotmodel.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/subplotmodel.m	(revision 12398)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/subplotmodel.m	(revision 12399)
+@@ -14,7 +14,6 @@
+ hmargin = getfieldvalue(options,'hmargin',[.01 .01]);
+ vmargin = getfieldvalue(options,'vmargin',[.01 .01]);
+ 
+-
+ height = (1-sum(vmargin)-(nlines-1)*gap(1))/nlines; 
+ width  = (1-sum(hmargin)-(ncols-1)*gap(2))/ncols;
+ ymin   = 1-vmargin(2)-height; 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12398)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12399)
+@@ -40,6 +40,10 @@
+ 	options=addfielddefault(options,'ylim',ylim);
+ 	md=radarpower(md,options);
+ end
++contrast = getfieldvalue(options,'contrast',1);  
++radar = (md.radaroverlay.pwr).^(contrast);
++radar = radar/max(radar(:));
++%radar(find(radar==0))=1; %Change background from black to white
+ 
+ %InterpFromMeshToGrid
+ xmin=min(md.radaroverlay.x);
+@@ -52,7 +56,7 @@
+ [x_m y_m data_grid]=InterpFromMeshToGrid(elements,x/getfieldvalue(options,'unit',1),y/getfieldvalue(options,'unit',1),...
+ 	data,xmin,ymax,xspacing,yspacing,nlines,ncols,NaN);
+ 
+-%Process data_grid
++%Process data_grid (For processing, it is better not to have nan)
+ pos=find(isinf(data_grid));
+ if ~isempty(pos),
+ 	disp('Warning: removing Infs from vector (probably log(0)?)');
+@@ -69,21 +73,18 @@
+ 	data_max=max(data_grid(:));
+ end
+ data_nan=find(isnan(data_grid));
+-
+-%Generate HSV image
+-contrast=getfieldvalue(options,'contrast',1);  
+-transparency=getfieldvalue(options,'alpha',1);
+ data_grid(data_nan)=data_min; 
+ 
++%Special colormaps that require hsv treatment
+ colorm=getfieldvalue(options,'colormap','Rignot');
+-
+-%Special colormaps that require hsv treatment
+ if strcmpi(colorm,'Rignot') | strcmpi(colorm,'Seroussi') | strcmpi(colorm,'redblue')
+ 	if strcmpi(colorm,'Rignot'),
++		transparency=getfieldvalue(options,'alpha',1);
+ 		h=(data_grid-data_min)/(data_max-data_min+eps);
+ 		if radaronly, h(:)=0; end
+ 		s=max(min((0.1+h).^(1/transparency),1),0);
+ 	elseif strcmpi(colorm,'Seroussi'),
++		transparency=getfieldvalue(options,'alpha',1);
+ 		h=1-(data_grid-data_min)/(data_max-data_min+eps)*0.7;
+ 		if radaronly, h(:)=0; end
+ 		s=max(min((0.1+h).^(1/transparency),1),0);
+@@ -95,14 +96,10 @@
+ 	else
+ 		error('colormap not supported yet. (''Rignot'' and ''redblue'' are the only cupported colormaps)');
+ 	end
+-
+ 	%(S) Saturation is 0 in NaNs
+ 	s(data_nan)=0;
+-
+ 	%(V) intensity is based on radar image
+-	radar=(md.radaroverlay.pwr).^(contrast);
+-	v=radar/max(radar(:)); %use radar power as intensity
+-	%pos=find(v==0);v(pos)=1; %Change background from black to white
++	v=radar; %use radar power as intensity
+ 
+ 	%Transform HSV to RGB
+ 	image_hsv=zeros(size(data_grid,1),size(data_grid,2),3);
+@@ -124,7 +121,6 @@
+ 	%Now add radarmap
+ 	radar = (md.radaroverlay.pwr).^(contrast);
+ 	radar = radar/max(radar(:));
+-	%pos=find(radar==0); %Change background from black to white
+ 	r = image_rgb(:,:,1).*radar;  r(data_nan) = radar(data_nan);  r(pos) = 1;  image_rgb(:,:,1) = r;  clear r;
+ 	g = image_rgb(:,:,2).*radar;  g(data_nan) = radar(data_nan);  g(pos) = 1;  image_rgb(:,:,2) = g;  clear g;
+ 	b = image_rgb(:,:,3).*radar;  b(data_nan) = radar(data_nan);  b(pos) = 1;  image_rgb(:,:,3) = b;  clear b;
+@@ -145,10 +141,10 @@
+ end
+ 
+ %Apply options, without colorbar and without grid
+-options=changefieldvalue(options,'colormap',colorm);           %We used an HSV colorbar
++options=changefieldvalue(options,'colormap',colorm);              % We used an HSV colorbar
+ if ~isnan(data_min),
+-	options=changefieldvalue(options,'caxis',[data_min data_max]); %force caxis so that the colorbar is ready
++	options=changefieldvalue(options,'caxis',[data_min data_max]); % force caxis so that the colorbar is ready
+ end
+-options=addfielddefault(options,'axis','equal off');           %default axis
++options=addfielddefault(options,'axis','equal off');              % default axis
+ applyoptions(md,data,options);
+ drawnow
Index: /issm/oecreview/Archive/12321-12677/ISSM-12399-12400.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12399-12400.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12399-12400.diff	(revision 12679)
@@ -0,0 +1,17 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12399)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12400)
+@@ -121,9 +121,9 @@
+ 	%Now add radarmap
+ 	radar = (md.radaroverlay.pwr).^(contrast);
+ 	radar = radar/max(radar(:));
+-	r = image_rgb(:,:,1).*radar;  r(data_nan) = radar(data_nan);  r(pos) = 1;  image_rgb(:,:,1) = r;  clear r;
+-	g = image_rgb(:,:,2).*radar;  g(data_nan) = radar(data_nan);  g(pos) = 1;  image_rgb(:,:,2) = g;  clear g;
+-	b = image_rgb(:,:,3).*radar;  b(data_nan) = radar(data_nan);  b(pos) = 1;  image_rgb(:,:,3) = b;  clear b;
++	r = image_rgb(:,:,1).*radar;  r(data_nan) = radar(data_nan);  image_rgb(:,:,1) = r;  clear r;
++	g = image_rgb(:,:,2).*radar;  g(data_nan) = radar(data_nan);  image_rgb(:,:,2) = g;  clear g;
++	b = image_rgb(:,:,3).*radar;  b(data_nan) = radar(data_nan);  image_rgb(:,:,3) = b;  clear b;
+ end
+ 
+ %Select plot area 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12400-12401.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12400-12401.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12400-12401.diff	(revision 12679)
@@ -0,0 +1,32 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/radarpower.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/radarpower.m	(revision 12400)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/radarpower.m	(revision 12401)
+@@ -36,13 +36,16 @@
+ 		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=[jplsvn() '/projects/ModelData/MOG/mog150_greenland_map.jpg'];
+-		geom=load([jplsvn() '/projects/ModelData/MOG/mog150_greenland_map.jpgw'],'ascii');
++		name = 'mog150_greenland_map';
++		%name = 'mog100_hp1_v10';
++		%name = 'mog500_hp1_v10';
++		jpgim=[jplsvn() '/projects/ModelData/MOG/' name '.jpg'];
++		geom=load([jplsvn() '/projects/ModelData/MOG/' name '.jpgw'],'ascii');
+ 
+ 		%geom:   xposting nbcols nbrows yposting xmin ymax
+ 		xmin=max(geom(5),x0);
+ 		xmax=min(geom(5)+geom(1)*geom(2),x1);
+-		ymin=max(geom(6)-geom(4)*geom(3),y0);
++		ymin=max(geom(6)-geom(3)*geom(4),y0);
+ 		ymax=min(geom(6),y1);
+ 
+ 		firstcol=max(1,floor((xmin-geom(5))/geom(1))); %x min
+@@ -105,7 +108,6 @@
+ 	topleftx=floor((x0-overlay_xlim(1))/overlay_xposting); % x min
+ 	toplefty=floor((overlay_ylim(2)-y1)/overlay_yposting); % y max
+ 
+-
+ 	%Read and crop file
+ 	disp('Warning: expecting coordinates in polar stereographic (Std Latitude: 70ºN Meridian: 45º)');
+ 	im=imread(overlay_image);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12401-12402.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12401-12402.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12401-12402.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/initialization.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/initialization.m	(revision 12401)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/initialization.m	(revision 12402)
+@@ -54,7 +54,7 @@
+ 				checkfield(md,'initialization.vz','NaN',1,'size',[md.mesh.numberofvertices 1]);
+ 				checkfield(md,'initialization.pressure','NaN',1,'size',[md.mesh.numberofvertices 1]);
+ 			end
+-			if (ismember(EnthalpyAnalysisEnum,analyses) & md.thermal.isenthalpy),
++			if (ismember(EnthalpyAnalysisEnum,analyses) & md.thermal.isenthalpy) | solution==EnthalpySolutionEnum,
+ 				checkfield(md,'initialization.waterfraction','>=',0,'size',[md.mesh.numberofvertices 1]);
+ 			end
+ 		end % }}}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12402-12403.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12402-12403.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12402-12403.diff	(revision 12679)
@@ -0,0 +1,15 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12402)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12403)
+@@ -319,6 +319,10 @@
+ 			screen=get(0,'ScreenSize');
+ 			left=screen(1); bott=screen(2); widt=screen(3); heig=screen(4)-25;
+ 			set(gcf,'Position',fix([left bott widt/2 heig]));
++		elseif strcmpi(figposition,'square'),
++			screen=get(0,'ScreenSize');
++			left=screen(1); bott=screen(2); widt=min(screen(3)-25,screen(4)-25);
++			set(gcf,'Position',fix([left bott widt widt]));
+ 		elseif strcmpi(figposition,'portrait'),
+ 			%reformat with letter paper size (8.5" x 11")
+ 			screen=get(0,'ScreenSize');
Index: /issm/oecreview/Archive/12321-12677/ISSM-12403-12404.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12403-12404.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12403-12404.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12403)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12404)
+@@ -322,7 +322,7 @@
+ 		elseif strcmpi(figposition,'square'),
+ 			screen=get(0,'ScreenSize');
+ 			left=screen(1); bott=screen(2); widt=min(screen(3)-25,screen(4)-25);
+-			set(gcf,'Position',fix([left bott widt widt]));
++			set(gcf,'Position',fix([left+(screen(3)-widt)/2 bott widt widt]));
+ 		elseif strcmpi(figposition,'portrait'),
+ 			%reformat with letter paper size (8.5" x 11")
+ 			screen=get(0,'ScreenSize');
Index: /issm/oecreview/Archive/12321-12677/ISSM-12404-12405.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12404-12405.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12404-12405.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12404)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12405)
+@@ -322,7 +322,7 @@
+ 		elseif strcmpi(figposition,'square'),
+ 			screen=get(0,'ScreenSize');
+ 			left=screen(1); bott=screen(2); widt=min(screen(3)-25,screen(4)-25);
+-			set(gcf,'Position',fix([left+(screen(3)-widt)/2 bott widt widt]));
++			set(gcf,'Position',fix([left+(screen(3)-widt) bott widt widt]));
+ 		elseif strcmpi(figposition,'portrait'),
+ 			%reformat with letter paper size (8.5" x 11")
+ 			screen=get(0,'ScreenSize');
Index: /issm/oecreview/Archive/12321-12677/ISSM-12405-12406.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12405-12406.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12405-12406.diff	(revision 12679)
@@ -0,0 +1,34 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12405)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12406)
+@@ -4958,7 +4958,6 @@
+ 	xfree((void**)&doflist);
+ }
+ /*}}}*/
+-
+ /*FUNCTION Tria::InputUpdateFromSolutionAdjointBalancethickness {{{*/
+ void  Tria::InputUpdateFromSolutionAdjointBalancethickness(double* solution){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12405)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12406)
+@@ -2841,7 +2841,7 @@
+ 	dt=C/(maxabsvy/dx+maxabsvy/dy+maxabsvz/dz);
+ 
+ 	return dt;
+-}
++}/*}}}*/
+ /*FUNCTION Penta::Update(int index,IoModel* iomodel,int analysis_counter,int analysis_type) {{{*/
+ void Penta::Update(int index,IoModel* iomodel,int analysis_counter,int analysis_type){ 
+ 
+@@ -6294,7 +6294,7 @@
+ 
+ 	/*Clean up and return*/
+ 	return Ke;
+-}
++}/*}}}*/
+ /*FUNCTION Penta::CreateKMatrixDiagnosticMacAyeal2d{{{*/
+ ElementMatrix* Penta::CreateKMatrixDiagnosticMacAyeal2d(void){
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12406-12407.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12406-12407.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12406-12407.diff	(revision 12679)
@@ -0,0 +1,247 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/export_fig/export_fig.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/export_fig/export_fig.m	(revision 12406)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/export_fig/export_fig.m	(revision 12407)
+@@ -15,6 +15,7 @@
+ %   export_fig ... -<renderer>
+ %   export_fig ... -<colorspace>
+ %   export_fig ... -append
++%   export_fig ... -bookmark
+ %   export_fig(..., handle)
+ %
+ % This function saves a figure or single axes to one or more vector and/or
+@@ -119,6 +120,8 @@
+ %   -append - option indicating that if the file (pdfs only) already
+ %             exists, the figure is to be appended as a new page, instead
+ %             of being overwritten (default).
++%   -bookmark - option to indicate that a bookmark with the name of the
++%               figure is to be created in the output file (pdf only).
+ %   handle - The handle of the figure or axes (can be an array of handles
+ %            of several axes, but these must be in the same figure) to be
+ %            saved. Default: gcf.
+@@ -158,6 +161,10 @@
+ % 23/02/12: Ensure that axes limits don't change during printing
+ % 14/03/12: Fix bug in fixing the axes limits (thanks to Tobias Lamour for
+ %           reporting it).
++% 02/05/12: Incorporate patch of Petr Nechaev (many thanks), enabling
++%           bookmarking of figures in pdf files.
++% 09/05/12: Incorporate patch of Arcelia Arrieta (many thanks), to keep
++%           tick marks fixed.
+ 
+ function [im alpha] = export_fig(varargin)
+ % Make sure the figure is rendered correctly _now_ so that properties like
+@@ -193,13 +200,16 @@
+ % MATLAB "feature": axes limits can change when printing
+ Hlims = findall(fig, 'Type', 'axes');
+ if ~cls
+-    % Record the old axes limit modes
++    % Record the old axes limit and tick modes
+     Xlims = make_cell(get(Hlims, 'XLimMode'));
+     Ylims = make_cell(get(Hlims, 'YLimMode'));
+     Zlims = make_cell(get(Hlims, 'ZLimMode'));
++    Xtick = make_cell(get(Hlims, 'XTickMode'));
++    Ytick = make_cell(get(Hlims, 'YTickMode'));
++    Ztick = make_cell(get(Hlims, 'ZTickMode'));
+ end
+-% Set all axes limit modes to manual, so the limits can't change
+-set(Hlims, 'XLimMode', 'manual', 'YLimMode', 'manual', 'ZLimMode', 'manual');
++% Set all axes limit and tick modes to manual, so the limits and ticks can't change
++set(Hlims, 'XLimMode', 'manual', 'YLimMode', 'manual', 'ZLimMode', 'manual', 'XTickMode', 'manual', 'YTickMode', 'manual', 'ZTickMode', 'manual');
+ % Set to print exactly what is there
+ set(fig, 'InvertHardcopy', 'off');
+ % Set the renderer
+@@ -402,6 +412,14 @@
+         if options.transparent && ~isequal(get(fig, 'Color'), 'none')
+             eps_remove_background(tmp_nam);
+         end
++        % Add a bookmark to the PDF if desired
++        if options.bookmark
++            fig_nam = get(fig, 'Name');
++            if isempty(fig_nam)
++                warning('export_fig:EmptyBookmark', 'Bookmark requested for figure with no name. Bookmark will be empty.');
++            end
++            add_bookmark(tmp_nam, fig_nam);
++        end
+         % Generate a pdf
+         eps2pdf(tmp_nam, pdf_nam, 1, options.append, options.colourspace==2, options.quality);
+     catch ex
+@@ -434,9 +452,9 @@
+ else
+     % Reset the hardcopy mode
+     set(fig, 'InvertHardcopy', old_mode);
+-    % Reset the axes limit modes
++    % Reset the axes limit and tick modes
+     for a = 1:numel(Hlims)
+-        set(Hlims(a), 'XLimMode', Xlims{a}, 'YLimMode', Ylims{a}, 'ZLimMode', Zlims{a});
++        set(Hlims(a), 'XLimMode', Xlims{a}, 'YLimMode', Ylims{a}, 'ZLimMode', Zlims{a}, 'XTickMode', Xtick{a}, 'YTickMode', Ytick{a}, 'ZTickMode', Ztick{a});
+     end
+ end
+ return
+@@ -461,6 +479,7 @@
+                  'alpha', nout == 2, ...
+                  'aa_factor', 3, ...
+                  'magnify', 1, ...
++                 'bookmark', false, ...
+                  'quality', []);
+ native = false; % Set resolution to native of an image
+ 
+@@ -503,6 +522,8 @@
+                     options.aa_factor = str2double(varargin{a}(3));
+                 case 'append'
+                     options.append = true;
++                case 'bookmark'
++                    options.bookmark = true;
+                 case 'native'
+                     native = true;
+                 otherwise
+@@ -742,7 +763,41 @@
+ 
+ % Helper function
+ function A = make_cell(A)
+- if ~iscell(A)
+-     A = {A};
+- end
+- 
++if ~iscell(A)
++    A = {A};
++end
++return
++
++function add_bookmark(fname, bookmark_text)
++% Adds a bookmark to the temporary EPS file after %%EndPageSetup
++% Read in the file
++fh = fopen(fname, 'r');
++if fh == -1
++    error('File %s not found.', fname);
++end
++try
++    fstrm = fread(fh, '*char')';
++catch ex
++    fclose(fh);
++    rethrow(ex);
++end
++fclose(fh);
++
++% Include standard pdfmark prolog to maximize compatibility
++fstrm = strrep(fstrm, '%%BeginProlog', sprintf('%%%%BeginProlog\n/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse'));
++% Add page bookmark
++fstrm = strrep(fstrm, '%%EndPageSetup', sprintf('%%%%EndPageSetup\n[ /Title (%s) /OUT pdfmark',bookmark_text));
++
++% Write out the updated file
++fh = fopen(fname, 'w');
++if fh == -1
++    error('Unable to open %s for writing.', fname);
++end
++try
++    fwrite(fh, fstrm, 'char*1');
++catch ex
++    fclose(fh);
++    rethrow(ex);
++end
++fclose(fh);
++return
+\ No newline at end of file
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/export_fig/print2eps.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/export_fig/print2eps.m	(revision 12406)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/export_fig/print2eps.m	(revision 12407)
+@@ -44,6 +44,8 @@
+ % Jackson for reporting the issue. Also fix a bug whereby using a font
+ % alias can lead to another font being swapped in.
+ 
++% 10/4/2012 Make the font swapping case insensitive.
++
+ function print2eps(name, fig, varargin)
+ options = {'-depsc2'};
+ if nargin < 2
+@@ -56,35 +58,44 @@
+     name = [name '.eps']; % Add the missing extension
+ end
+ % Find all the used fonts in the figure
+-fonts = get(findall(fig, '-property', 'FontName'), 'FontName');
++font_handles = findall(fig, '-property', 'FontName');
++fonts = get(font_handles, 'FontName');
+ if ~iscell(fonts)
+     fonts = {fonts};
+ end
+-fonts = unique(fonts);
+ % Map supported font aliases onto the correct name
++fontsl = lower(fonts);
+ for a = 1:numel(fonts)
+-    f = lower(fonts{a});
++    f = fontsl{a};
+     f(f==' ') = [];
+     switch f
+         case {'times', 'timesnewroman', 'times-roman'}
+-            fonts{a} = 'Times-Roman';
++            fontsl{a} = 'times-roman';
+         case {'arial', 'helvetica'}
+-            fonts{a} = 'Helvetica';
++            fontsl{a} = 'helvetica';
+         case {'newcenturyschoolbook', 'newcenturyschlbk'}
+-            fonts{a} = 'NewCenturySchlbk';
++            fontsl{a} = 'newcenturyschlbk';
+         otherwise
+     end
+ end
++fontslu = unique(fontsl);
+ % Determine the font swap table
+ matlab_fonts = {'Helvetica', 'Times-Roman', 'Palatino', 'Bookman', 'Helvetica-Narrow', 'Symbol', ...
+                 'AvantGarde', 'NewCenturySchlbk', 'Courier', 'ZapfChancery', 'ZapfDingbats'};
+-require_swap = find(~ismember(fonts, matlab_fonts));
+-unused_fonts = find(~ismember(matlab_fonts, fonts));
+-font_swap = min(numel(require_swap), numel(unused_fonts));
+-font_swap = [reshape(matlab_fonts(unused_fonts(1:font_swap)), 1, font_swap); reshape(fonts(require_swap(1:font_swap)), 1, font_swap)];
++matlab_fontsl = lower(matlab_fonts);
++require_swap = find(~ismember(fontslu, matlab_fontsl));
++unused_fonts = find(~ismember(matlab_fontsl, fontslu));
++font_swap = cell(3, 0);
++for a = 1:min(numel(require_swap), numel(unused_fonts))
++    ind = find(strcmp(fontslu{require_swap(a)}, fontsl));
++    n = numel(ind);
++    font_swap(1,end+1:end+n) = reshape(mat2cell(font_handles(ind), ones(n, 1)), 1, []);
++    font_swap(2,end-n+1:end) = matlab_fonts(unused_fonts(a));
++    font_swap(3,end-n+1:end) = reshape(fonts(ind), 1, []);
++end
+ % Swap the fonts
+ for a = 1:size(font_swap, 2)
+-    set(findall(fig, 'FontName', font_swap{2,a}), 'FontName', font_swap{1,a});
++    set(font_swap{1,a}, 'FontName', font_swap{2,a});
+ end
+ % Set paper size
+ old_mode = get(fig, 'PaperPositionMode');
+@@ -113,9 +124,10 @@
+ if ~isempty(font_swap)
+     % Reset the font names in the figure
+     for a = 1:size(font_swap, 2)
+-        set(findall(fig, 'FontName', font_swap{1,a}), 'FontName', font_swap{2,a});
++        set(font_swap{1,a}, 'FontName', font_swap{3,a});
+     end
+     % Replace the font names in the eps file
++    font_swap = font_swap(2:3,:);
+     try
+         swap_fonts(name, font_swap{:});
+     catch
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/export_fig/print2array.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/export_fig/print2array.m	(revision 12406)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/export_fig/print2array.m	(revision 12407)
+@@ -41,6 +41,9 @@
+ % 27/1/2012 Bug fix affecting painters rendering tall figures. Thanks to
+ % Ken Campbell for reporting it.
+ 
++% 3/4/2012 Bug fix to median input. Thanks to Andy Matthews for reporting
++% it.
++
+ function [A bcol] = print2array(fig, res, renderer)
+ % Generate default input arguments, if needed
+ if nargin < 2
+@@ -118,7 +121,7 @@
+                 break;
+             end
+         end
+-        bcol = median([reshape(A(:,[l r],:), [], size(A, 3)); reshape(A([t b],:,:), [], size(A, 3))], 1);
++        bcol = uint8(median(single([reshape(A(:,[l r],:), [], size(A, 3)); reshape(A([t b],:,:), [], size(A, 3))]), 1));
+         for c = 1:size(A, 3)
+             A(:,[1:l-1, r+1:end],c) = bcol(c);
+             A([1:t-1, b+1:end],:,c) = bcol(c);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12407-12408.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12407-12408.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12407-12408.diff	(revision 12679)
@@ -0,0 +1,19 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12407)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12408)
+@@ -1027,12 +1027,12 @@
+ 			for (i=0;i<nbt;i++){
+ 				Triangle &t=triangles[i];
+ 				if (t.det>0 && !(t.Hidden(0)||t.Hidden(1) || t.Hidden(2) )){
+-					if(t.Anisotropy()<2 & t.Length()<1.e+5){
++					//if(t.Anisotropy()<2 & t.Length()<1.e+5){
+ 						index[num*3+0]=GetId(t[0])+1; //back to M indexing
+ 						index[num*3+1]=GetId(t[1])+1; //back to M indexing
+ 						index[num*3+2]=GetId(t[2])+1; //back to M indexing
+ 						num=num+1;
+-					}
++					//}
+ 				}
+ 			}
+ 		}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12408-12409.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12408-12409.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12408-12409.diff	(revision 12679)
@@ -0,0 +1,29 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12408)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12409)
+@@ -7,7 +7,7 @@
+ #include "../../include/include.h"
+ #include "../../toolkits/toolkits.h"
+ #include "../../objects/objects.h"
+-#include "../../Container/Observations.h"
++#include "../../Container/Container.h"
+ #include "../modules.h"
+ 
+ #ifdef _HAVE_GSL_
+@@ -130,12 +130,15 @@
+ 			xfree((void**)&GinvZ);
+ 		}
+ 
++#ifdef _HAVE_MPI_
+ 		double *sumpredictions =(double*)xmalloc(n_interp*sizeof(double));
+ 		double *sumerror       =(double*)xmalloc(n_interp*sizeof(double));
+ 		MPI_Allreduce(predictions,sumpredictions,n_interp,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
+ 		MPI_Allreduce(error,sumerror,n_interp,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
+ 		xfree((void**)&error); error=sumerror;
+ 		xfree((void**)&predictions); predictions=sumpredictions;
++#endif
++
+ 	}
+ 	else{
+ 		_error_("output '%s' not supported yet",output);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12409-12410.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12409-12410.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12409-12410.diff	(revision 12679)
@@ -0,0 +1,11 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Container.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Container.h	(revision 12409)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Container.h	(revision 12410)
+@@ -16,5 +16,6 @@
+ #include "./Parameters.h"
+ #include "./Results.h"
+ #include "./Vertices.h"
++#include "./Observations.h"
+ 
+ #endif //ifndef _CONTAINER_H_
Index: /issm/oecreview/Archive/12321-12677/ISSM-12410-12411.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12410-12411.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12410-12411.diff	(revision 12679)
@@ -0,0 +1,26 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12410)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12411)
+@@ -990,6 +990,21 @@
+ 	fi
+ 	AC_MSG_RESULT(done)
+ 	dnl }}}
++	dnl with-kriging{{{
++	AC_ARG_WITH([kriging],
++		AS_HELP_STRING([--with-kriging = YES],[compile with kriging capabilities (default is yes)]),
++		[KRIGING=$withval],[KRIGING=yes]) 
++	AC_MSG_CHECKING(for kriging capability compilation)
++
++	if test "x$KRIGING" = "xyes"; then
++		HAVE_KRIGING=yes
++		AC_DEFINE([_HAVE_KRIGING_],[1],[with kriging capability])
++	else
++		HAVE_KRIGING=no
++	fi
++	AM_CONDITIONAL([KRIGING], [test x$HAVE_KRIGING = xyes])
++	AC_MSG_RESULT($HAVE_KRIGING)
++	dnl }}}
+ 	dnl with-steadystate{{{
+ 	AC_ARG_WITH([steadystate],
+ 		AS_HELP_STRING([--with-steadystate = YES],[compile with steadystate capabilities (default is yes)]),
Index: /issm/oecreview/Archive/12321-12677/ISSM-12411-12412.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12411-12412.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12411-12412.diff	(revision 12679)
@@ -0,0 +1,11 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-ad.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-ad.sh	(revision 12411)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-ad.sh	(revision 12412)
+@@ -15,4 +15,5 @@
+ 	--without-steadystate \
+ 	--without-transient \
+ 	--without-3d \
+-	--without-groundingline
++	--without-groundingline \
++	--without-kriging 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12412-12413.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12412-12413.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12412-12413.diff	(revision 12679)
@@ -0,0 +1,277 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12412)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12413)
+@@ -2,7 +2,7 @@
+ 
+ EXEEXT=$(ISSMEXT)
+ 
+-#Library declaration {{{1
++#Library declaration {{{
+ lib_LIBRARIES = libISSMCore.a libISSMOverload.a
+ if PYTHON
+ lib_LIBRARIES += libISSMPython.a 
+@@ -16,7 +16,7 @@
+ #}}}
+ 
+ #sources
+-#Core sources{{{1
++#Core sources{{{
+ core_sources = ./issm.h\
+ 					./issm-binding.h\
+ 					./include/macros.h\
+@@ -341,7 +341,7 @@
+ 					./objects/Options/OptionUtilities.h
+ 
+ #}}}
+-#DAKOTA sources  {{{1
++#DAKOTA sources  {{{
+ dakota_sources = ./objects/DakotaPlugin.h\
+ 					  ./objects/DakotaPlugin.cpp\
+ 					  ./modules/InputUpdateFromDakotax/InputUpdateFromDakotax.h\
+@@ -365,22 +365,22 @@
+ 					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h\
+ 					  ./modules/Dakotax/SpawnCoreParallel.cpp
+ #}}}
+-#Transient sources  {{{1
++#Transient sources  {{{
+ transient_sources  = ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp \
+ 					 ./solutions/transient_core.cpp
+ #}}}
+-#Steadystate sources  {{{1
++#Steadystate sources  {{{
+ steadystate_sources = ./solutions/steadystate_core.cpp\
+ 					  ./solutions/steadystateconvergence.cpp
+ #}}}
+-#Prognostic sources  {{{1
++#Prognostic sources  {{{
+ prognostic_sources = ./modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp\
+ 					      ./modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp\
+ 					      ./modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp\
+ 					      ./modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp\
+ 						  ./solutions/prognostic_core.cpp
+ #}}}
+-#Thermal sources  {{{1
++#Thermal sources  {{{
+ thermal_sources = ./modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp\
+ 					   ./modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp\
+ 					   ./modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp\
+@@ -400,7 +400,7 @@
+ 					   ./solutions/enthalpy_core.cpp\
+ 					   ./solvers/solver_thermal_nonlinear.cpp
+ #}}}
+-#Control sources  {{{1
++#Control sources  {{{
+ control_sources= ./modules/ControlInputGetGradientx/ControlInputGetGradientx.cpp\
+ 					  ./modules/ControlInputGetGradientx/ControlInputGetGradientx.h\
+ 					  ./modules/ControlInputSetGradientx/ControlInputSetGradientx.cpp\
+@@ -455,7 +455,7 @@
+ 					  ./solvers/solver_adjoint_linear.cpp
+ 
+ #}}}
+-#Hydrology sources  {{{1
++#Hydrology sources  {{{
+ hydrology_sources  = ./modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp\
+ 					      ./modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp\
+ 					      ./modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp\
+@@ -463,7 +463,7 @@
+ 						  ./solutions/hydrology_core.cpp\
+ 						  ./solutions/hydrology_core_step.cpp 
+ #}}}
+-#Diagnostic sources  {{{1
++#Diagnostic sources  {{{
+ diagnostic_sources = ./modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp\
+ 					      ./modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp \
+ 					      ./modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp \
+@@ -484,14 +484,14 @@
+ 						  ./solutions/diagnostic_core.cpp\
+ 						  ./solvers/solver_stokescoupling_nonlinear.cpp
+ #}}}
+-#Balanced sources  {{{1
++#Balanced sources  {{{
+ balanced_sources = ./modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp\
+ 					    ./modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp\
+ 					    ./modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp\
+ 						./modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp\
+ 						./solutions/balancethickness_core.cpp
+ #}}}
+-#Responses sources  {{{1
++#Responses sources  {{{
+ responses_sources = ./modules/MinVelx/MinVelx.h\
+ 					     ./modules/MinVelx/MinVelx.cpp\
+ 					     ./modules/MaxVelx/MaxVelx.h\
+@@ -521,7 +521,7 @@
+ 					     ./modules/MassFluxx/MassFluxx.cpp\
+ 					     ./modules/MassFluxx/MassFluxx.h
+ #}}}
+-#Slope sources  {{{1
++#Slope sources  {{{
+ slope_sources =  ./modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp\
+ 					  ./modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp \
+ 					  ./modules/ModelProcessorx/BedSlope/CreateConstraintsBedSlope.cpp\
+@@ -533,16 +533,16 @@
+ 					  ./solutions/surfaceslope_core.cpp\
+ 					  ./solutions/bedslope_core.cpp
+ #}}}
+-#Groundingline sources  {{{1
++#Groundingline sources  {{{
+ groundingline_sources= ./modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp\
+ 					        ./modules/GroundinglineMigrationx/GroundinglineMigrationx.h
+ #}}}
+-#Rifts sources  {{{1
++#Rifts sources  {{{
+ rifts_sources = ./objects/Loads/Riftfront.cpp\
+ 				    ./objects/Loads/Riftfront.h\
+ 				    ./modules/ConstraintsStatex/RiftConstraintsState.cpp
+ #}}}
+-#3D sources  {{{1
++#3D sources  {{{
+ threed_sources = ./objects/Gauss/GaussPenta.h\
+ 				     ./objects/Gauss/GaussPenta.cpp\
+ 				     ./objects/ElementResults/PentaP1ElementResult.h\
+@@ -556,7 +556,7 @@
+ 				     ./objects/Elements/PentaRef.h\
+ 				     ./objects/Elements/PentaRef.cpp
+ #}}}
+-#Bamg sources  {{{1
++#Bamg sources  {{{
+ bamg_sources =  ./objects/Bamg/BamgGeom.h\
+ 				./objects/Bamg/BamgGeom.cpp\
+ 				./objects/Bamg/BamgMesh.h\
+@@ -622,7 +622,7 @@
+ 				./modules/BamgTriangulatex/BamgTriangulatex.cpp\
+ 				./modules/BamgTriangulatex/BamgTriangulatex.h
+ #}}}
+-#Kriging sources  {{{1
++#Kriging sources  {{{
+ kriging_sources = ./Container/Observations.h\
+ 						./Container/Observations.cpp\
+ 						./objects/Kriging/Variogram.h \
+@@ -661,7 +661,7 @@
+ 						./modules/Krigingx/Krigingx.h
+ 
+ #}}}
+-#Kml sources  {{{1
++#Kml sources  {{{
+ kml_sources = ./modules/Exp2Kmlx/Exp2Kmlx.h\
+ 			     ./modules/Exp2Kmlx/Exp2Kmlx.cpp\
+ 			     ./modules/Kml2Expx/Kml2Expx.h\
+@@ -729,7 +729,7 @@
+ 			     ./objects/KML/KMLFileReadUtils.cpp\
+ 			     ./objects/KML/KMLFileReadUtils.h
+ #}}}
+-#Petsc sources  {{{1
++#Petsc sources  {{{
+ petsc_sources= ./toolkits/petsc\
+ 					./toolkits/petsc/patches\
+ 					./toolkits/petsc/patches/SolverEnum.h\
+@@ -764,11 +764,11 @@
+ 					./modules/Solverx/DofTypesToIndexSet.cpp
+ 
+ #}}}
+-#Gsl sources  {{{1
++#Gsl sources  {{{
+ gsl_sources= ./modules/Solverx/SolverxGsl.cpp
+ 
+ #}}}
+-#Mpi sources  {{{1
++#Mpi sources  {{{
+ mpi_sources= ./toolkits/mpi/mpiincludes.h\
+ 				./toolkits/mpi/patches/mpipatches.h\
+ 				./toolkits/mpi/patches/DetermineLocalSize.cpp\
+@@ -776,11 +776,11 @@
+ 				./toolkits/mpi/patches/MPI_Lowerrow.cpp\
+ 				./toolkits/mpi/patches/MPI_Boundariesfromrange.cpp
+ #}}}
+-#Metis sources  {{{1
++#Metis sources  {{{
+ metis_sources= ./toolkits/metis/patches/metispatches.h\
+ 					./toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp
+ #}}}
+-#Python sources  {{{1
++#Python sources  {{{
+ python_sources=     ./python/io/pythonio.h\
+ 					./python/python-binding.h\
+ 				    ./python/io/WritePythonData.cpp\
+@@ -788,7 +788,7 @@
+ 				    ./python/io/FetchPythonData.cpp
+ 
+ #}}}
+-#Matlab sources  {{{1
++#Matlab sources  {{{
+ matlab_sources= ./toolkits/matlab/matlabincludes.h\
+ 				    ./matlab/matlab-binding.h\
+ 				    ./matlab/io/matlabio.h\
+@@ -805,12 +805,12 @@
+ 					 ./matlab/io/MatlabMatrixToSeqMat.cpp\
+ 					 ./matlab/io/MatlabVectorToSeqVec.cpp
+ #}}}
+-#Matlab and Petsc sources  {{{1
++#Matlab and Petsc sources  {{{
+ matlabpetsc_sources= ./matlab/io/MatlabMatrixToPetscMatrix.cpp\
+ 					 ./matlab/io/MatlabVectorToPetscVector.cpp
+ 	
+ #}}}
+-#Modules sources{{{1
++#Modules sources{{{
+ module_sources= ./objects/Options/Option.cpp\
+ 			./objects/Options/Option.h\
+ 			./objects/Options/OptionDouble.cpp\
+@@ -898,11 +898,10 @@
+ 			./modules/PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.h
+ #}}}
+ 
+-#{{{1 Conditional build-up of sources
++#{{{ 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 
+ 
+-
+ #First the core
+ issm_sources  =  $(core_sources)
+ 
+@@ -985,13 +984,14 @@
+ endif
+ endif
+ 
+-
++if KRIGING
++issm_sources +=  $(pkriging_sources)
++endif
+ #}}}
+-#Library flags and sources {{{1
++#Library flags and sources {{{
+ ALLCXXFLAGS= -fPIC -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_  $(CXXFLAGS) $(CXXOPTFLAGS) 
+ 
+ libISSMCore_a_SOURCES  = $(issm_sources)
+-libISSMCore_a_SOURCES += $(pkriging_sources)
+ libISSMCore_a_CXXFLAGS = $(ALLCXXFLAGS)
+ 
+ if MODULES
+@@ -1013,12 +1013,12 @@
+ endif
+ 
+ #}}}
+-#Overload library, to overload any non-standard symbols. {{{1
++#Overload library, to overload any non-standard symbols. {{{
+ libISSMOverload_a_SOURCES = ./shared/String/stricmp.c
+ libISSMOverload_a_CFLAGS  = -fPIC -D_C_ $(COPTFLAGS) $(CFLAGS)
+ #}}}
+ 
+-#Executable {{{1
++#Executable {{{
+ bin_PROGRAMS = issm 
+ 
+ #Standard libraries
+@@ -1034,9 +1034,11 @@
+ issm_SOURCES = solutions/issm.cpp
+ issm_CXXFLAGS= -fPIC $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 
+ 
++if KRIGING
+ bin_PROGRAMS += kriging
+ kriging_SOURCES = solutions/kriging.cpp
+ kriging_CXXFLAGS= -fPIC $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 
++endif
+ #}}}
+ #Automatic differentiation: append this fold to the end of the src/c/Makefile.am to get this Makefile.am {{{
+ if ADIC2 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12413-12414.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12413-12414.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12413-12414.diff	(revision 12679)
@@ -0,0 +1,20 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/types.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/types.h	(revision 12413)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/types.h	(revision 12414)
+@@ -27,9 +27,15 @@
+ #endif  
+ 
+ #ifdef _HAVE_ADOLC_
++// for active variables
+ typedef adouble IssmDouble;
++// for passive variables
++typedef double IssmPDouble;
+ #else 
++// see above
+ typedef double IssmDouble; 
++// see above
++typedef IssmDouble IssmPDouble;
+ #endif
+ 
+ typedef bool IssmBool;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12414-12415.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12414-12415.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12414-12415.diff	(revision 12679)
@@ -0,0 +1,23 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment.csh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment.csh	(revision 12414)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment.csh	(revision 12415)
+@@ -126,3 +126,7 @@
+ #VALGRIND
+ setenv VALGRIND_DIR {$VALGRIND_DIR}
+ setenv PATH {$PATH}:{$VALGRIND_DIR}
++
++#GSL
++setenv GSL_DIR {$GSL_DIR}
++setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:{$GSL_DIR}/lib
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment_variables.csh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment_variables.csh	(revision 12414)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment_variables.csh	(revision 12415)
+@@ -82,3 +82,6 @@
+ 
+ #valgrind
+ set VALGRIND_DIR={$ISSM_DIR}/externalpackages/valgrind/install/bin
++
++#gsl
++set GSL_DIR={$ISSM_DIR}/externalpackages/gsl/install
Index: /issm/oecreview/Archive/12321-12677/ISSM-12415-12416.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12415-12416.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12415-12416.diff	(revision 12679)
@@ -0,0 +1,450 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h	(revision 12415)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h	(revision 12416)
+@@ -17,8 +17,8 @@
+ class IoModel {
+ 
+ 	private: 
+-		IssmDouble     **data;        //this dataset holds temporary data, memory intensive.
+-		Parameters  *constants;   //this dataset holds all IssmDouble, int, bool and char *parameters read in from the input file.*
++		IssmPDouble **data;        //this dataset holds temporary data, memory intensive.
++		Parameters  *constants;   //this dataset holds all IssmPDouble, int, bool and char *parameters read in from the input file.*
+ 
+ 	public:
+ 		/*This data needs to stay memory resident at all time, even if it's memory intensive: */
+@@ -43,23 +43,23 @@
+ 		void        CheckEnumSync(void);
+ 		void        Constant(bool *poutput,int constant_enum);
+ 		void        Constant(int *poutput,int constant_enum);
+-		void        Constant(IssmDouble *poutput,int constant_enum);
++		void        Constant(IssmPDouble *poutput,int constant_enum);
+ 		void        Constant(char **poutput,int constant_enum);
+ 		Param      *CopyConstantObject(int constant_enum);
+-		IssmDouble *Data(int dataenum);
++		IssmPDouble *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(IssmDouble* pscalar,int data_enum);
++		void        FetchData(IssmPDouble* pscalar,int data_enum);
+ 		void        FetchData(char** pstring,int data_enum);
+ 		void        FetchData(int** pmatrix,int* pM,int* pN,int data_enum);
+-		void        FetchData(IssmDouble**  pscalarmatrix,int* pM,int* pN,int data_enum);
++		void        FetchData(IssmPDouble**  pscalarmatrix,int* pM,int* pN,int data_enum);
+ 		void        FetchData(char***   pstringarray,int* pnumstrings,int data_enum);
+-		void        FetchData(IssmDouble*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
++		void        FetchData(IssmPDouble*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
+ 		void        FetchData(Option **poption,int data_enum);
+ 		void        FetchData(int num,...);
+-		void        FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum=NoneEnum,IssmDouble default_value=0);
++		void        FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum=NoneEnum,IssmPDouble default_value=0);
+ 		void        LastIndex(int *pindex);
+ 		FILE*       SetFilePointerToData(int* pcode,int* pvector_type, int data_enum);
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12415)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12416)
+@@ -49,10 +49,10 @@
+ 
+ 	/*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*/
++	this->FetchConstants(); /*this routine goes through the input file, and fetches bools, ints, IssmPDoubles and strings only, nothing memory intensive*/
+ 
+ 	/*Initialize data: */
+-	this->data=(double**)xmalloc(MaximumNumberOfEnums*sizeof(double*));
++	this->data=(IssmPDouble**)xmalloc(MaximumNumberOfEnums*sizeof(IssmPDouble*));
+ 	for(int i=0;i<MaximumNumberOfEnums;i++) this->data[i]=NULL;
+ 	
+ 	/*Initialize permanent data: */
+@@ -151,8 +151,8 @@
+ 	this->constants->FindParam(poutput,constant_enum);
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::Constant(double* poutput,int constant_enum){{{*/
+-void IoModel::Constant(double* poutput,int constant_enum){
++/*FUNCTION IoModel::Constant(IssmPDouble* poutput,int constant_enum){{{*/
++void IoModel::Constant(IssmPDouble* poutput,int constant_enum){
+ 
+ 	_assert_(constant_enum>=0);
+ 	_assert_(this->constants);
+@@ -182,7 +182,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION IoModel::Data{{{*/
+-double* IoModel::Data(int data_enum){
++IssmPDouble* IoModel::Data(int data_enum){
+ 
+ 	_assert_(data_enum<MaximumNumberOfEnums);
+ 	_assert_(data_enum>=0);
+@@ -222,7 +222,7 @@
+ 	/*records: */
+ 	int  booleanint=0;
+ 	int  integer=0;
+-	double scalar=0;
++	IssmPDouble scalar=0;
+ 	char* string=NULL;
+ 	int   string_size;
+ 
+@@ -236,7 +236,7 @@
+ 		/*First set FILE* position to the beginning of the file: */
+ 		fseek(this->fid,0,SEEK_SET);
+ 
+-		/*Now march through file looking for the correct data identifiers (bool,int,double or string): */
++		/*Now march through file looking for the correct data identifiers (bool,int,IssmPDouble or string): */
+ 		for(;;){
+ 			if(fread(&record_enum,sizeof(int),1,this->fid)==0){
+ 
+@@ -287,7 +287,7 @@
+ 						break;
+ 					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 ");
++						if(fread(&scalar,sizeof(IssmPDouble),1,this->fid)!=1) _error_(" could not read scalar ");
+ 						#ifdef _HAVE_MPI_
+ 						MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+ 						#endif
+@@ -498,8 +498,8 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(double*   pscalar,int data_enum){{{*/
+-void  IoModel::FetchData(double* pscalar,int data_enum){
++/*FUNCTION IoModel::FetchData(IssmPDouble*   pscalar,int data_enum){{{*/
++void  IoModel::FetchData(IssmPDouble* pscalar,int data_enum){
+ 
+ 
+ 	extern int my_rank;
+@@ -507,17 +507,17 @@
+ 	
+ 
+ 	/*output: */
+-	double   scalar;
++	IssmPDouble   scalar;
+ 	int      code;
+ 	
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+ 	
+-	if(code!=3)_error_("expecting a double for enum %s",EnumToStringx(data_enum));
++	if(code!=3)_error_("expecting a IssmPDouble for enum %s",EnumToStringx(data_enum));
+ 	
+ 	/*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */
+ 	if(my_rank==0){
+-		if(fread(&scalar,sizeof(double),1,fid)!=1)_error_(" could not read scalar ");
++		if(fread(&scalar,sizeof(IssmPDouble),1,fid)!=1)_error_(" could not read scalar ");
+ 	}
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+@@ -588,7 +588,7 @@
+ 
+ 	/*output: */
+ 	int M,N;
+-	double* matrix=NULL;
++	IssmPDouble* matrix=NULL;
+ 	int*    integer_matrix=NULL;
+ 	int code=0;
+ 	int vector_type=0;
+@@ -597,7 +597,7 @@
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
+ 
+-	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a double, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
++	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmPDouble, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
+ 	
+ 	/*Now fetch: */
+ 
+@@ -620,11 +620,11 @@
+ 
+ 	/*Now allocate matrix: */
+ 	if(M*N){
+-		matrix=(double*)xmalloc(M*N*sizeof(double));
++		matrix=(IssmPDouble*)xmalloc(M*N*sizeof(IssmPDouble));
+ 
+ 		/*Read matrix on node 0, then broadcast: */
+ 		if(my_rank==0){  
+-			if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
++			if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
+ 		}
+ 		
+ 		#ifdef _HAVE_MPI_
+@@ -654,21 +654,21 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(double**  pdoublematrix,int* pM,int* pN,int data_enum){{{*/
+-void  IoModel::FetchData(double** pmatrix,int* pM,int* pN,int data_enum){
++/*FUNCTION IoModel::FetchData(IssmPDouble**  pIssmPDoublematrix,int* pM,int* pN,int data_enum){{{*/
++void  IoModel::FetchData(IssmPDouble** pmatrix,int* pM,int* pN,int data_enum){
+ 
+ 	extern int my_rank;
+ 	extern int num_procs;
+ 
+ 	/*output: */
+ 	int M,N;
+-	double* matrix=NULL;
++	IssmPDouble* matrix=NULL;
+ 	int code=0;
+ 	int vector_type=0;
+ 	
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
+-	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a double, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
++	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmPDouble, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
+ 	
+ 	/*Now fetch: */
+ 
+@@ -690,11 +690,11 @@
+ 
+ 	/*Now allocate matrix: */
+ 	if(M*N){
+-		matrix=(double*)xmalloc(M*N*sizeof(double));
++		matrix=(IssmPDouble*)xmalloc(M*N*sizeof(IssmPDouble));
+ 
+ 		/*Read matrix on node 0, then broadcast: */
+ 		if(my_rank==0){  
+-			if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
++			if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
+ 		}
+ 		#ifdef _HAVE_MPI_
+ 		MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+@@ -777,8 +777,8 @@
+ 	*pnumstrings=numstrings;
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(double*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{*/
+-void  IoModel::FetchData(double*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){
++/*FUNCTION IoModel::FetchData(IssmPDouble*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{*/
++void  IoModel::FetchData(IssmPDouble*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){
+ 
+ 	int i;
+ 
+@@ -786,19 +786,19 @@
+ 	extern int num_procs;
+ 
+ 	/*output: */
+-	double** matrices=NULL;
++	IssmPDouble** matrices=NULL;
+ 	int*     mdims=NULL;
+ 	int*     ndims=NULL;
+ 	int      numrecords=0;
+ 
+ 	/*intermediary: */
+ 	int     M, N;
+-	double *matrix = NULL;
++	IssmPDouble *matrix = NULL;
+ 	int     code;
+ 	
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+-	if(code!=8)_error_("expecting a double mat array for enum %s",EnumToStringx(data_enum));
++	if(code!=8)_error_("expecting a IssmPDouble mat array for enum %s",EnumToStringx(data_enum));
+ 	
+ 	/*Now fetch: */
+ 	if(my_rank==0){  
+@@ -811,7 +811,7 @@
+ 	if(numrecords){
+ 
+ 		/*Allocate matrices :*/
+-		matrices=(double**)xmalloc(numrecords*sizeof(double*));
++		matrices=(IssmPDouble**)xmalloc(numrecords*sizeof(IssmPDouble*));
+ 		mdims=(int*)xmalloc(numrecords*sizeof(int));
+ 		ndims=(int*)xmalloc(numrecords*sizeof(int));
+ 
+@@ -840,11 +840,11 @@
+ 
+ 			/*Now allocate matrix: */
+ 			if(M*N){
+-				matrix=(double*)xmalloc(M*N*sizeof(double));
++				matrix=(IssmPDouble*)xmalloc(M*N*sizeof(IssmPDouble));
+ 
+ 				/*Read matrix on node 0, then broadcast: */
+ 				if(my_rank==0){  
+-					if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
++					if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
+ 				}
+ 
+ 				#ifdef _HAVE_MPI_
+@@ -884,9 +884,9 @@
+ 	/*Get option value*/
+ 	fid=this->SetFilePointerToData(&code,NULL,index+1);
+ 	switch(code){
+-		case 3: {//double
+-			  double *value = NULL;
+-			  value=(double*)xmalloc(1*sizeof(double));
++		case 3: {//IssmPDouble
++			  IssmPDouble *value = NULL;
++			  value=(IssmPDouble*)xmalloc(1*sizeof(IssmPDouble));
+ 			  FetchData(value,index+1);
+ 			  _printf_(true,"value = %g\n",*value);
+ 			  option = new OptionDouble();
+@@ -922,12 +922,12 @@
+ 
+ 	va_list ap;
+ 	int     dataenum;
+-	double* matrix=NULL;
++	IssmPDouble* matrix=NULL;
+ 	int     M,N;
+ 	int     i;
+ 
+ 	/*Go through the entire list of enums and fetch the corresponding data. Add it to the iomodel->data dataset. Everything
+-	 *we fetch is a double* : */
++	 *we fetch is a IssmPDouble* : */
+ 	
+ 	va_start(ap,num);
+ 	for(i=0; i<num; i++){
+@@ -953,7 +953,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION IoModel::FetchDataToInput{{{*/
+-void IoModel::FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum,double default_value){
++void IoModel::FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum,IssmPDouble default_value){
+ 
+ 	/*intermediary: */
+ 	int     i;
+@@ -972,9 +972,9 @@
+ 	/*variables being fetched: */
+ 	bool    boolean;
+ 	int     integer;
+-	double  scalar;
++	IssmPDouble  scalar;
+ 	char   *string        = NULL;
+-	double *doublevector  = NULL;
++	IssmPDouble *IssmPDoublevector  = NULL;
+ 	int     M,N;
+ 
+ 	/*Fetch parameters: */
+@@ -992,7 +992,7 @@
+ 			for (i=0;i<numberofelements;i++){
+ 				if(this->my_elements[i]){
+ 					Element* element=(Element*)elements->GetObjectByOffset(counter);
+-					element->InputCreate((double)boolean,vector_enum,code); 
++					element->InputCreate((IssmPDouble)boolean,vector_enum,code); 
+ 					counter++;
+ 				}
+ 			}
+@@ -1005,15 +1005,15 @@
+ 			for (i=0;i<numberofelements;i++){
+ 				if(this->my_elements[i]){
+ 					Element* element=(Element*)elements->GetObjectByOffset(counter);
+-					element->InputCreate((double)integer,vector_enum,code); 
++					element->InputCreate((IssmPDouble)integer,vector_enum,code); 
+ 					counter++;
+ 				}
+ 			}
+ 			break; /*}}}*/
+-		case 3: //double constant.  {{{
++		case 3: //IssmPDouble constant.  {{{
+ 			this->FetchData(&scalar,vector_enum);
+ 
+-			/*Add double constant input to all elements: */
++			/*Add IssmPDouble constant input to all elements: */
+ 			counter=0;
+ 			for (i=0;i<numberofelements;i++){
+ 				if(this->my_elements[i]){
+@@ -1026,17 +1026,17 @@
+ 		case 5: //boolean vector.  {{{
+ 
+ 			/*Fetch vector:*/
+-			this->FetchData(&doublevector,&M,&N,vector_enum); //we still have a doublevector, because it might include times in transient mode
++			this->FetchData(&IssmPDoublevector,&M,&N,vector_enum); //we still have a IssmPDoublevector, because it might include times in transient mode
+ 			/*Check we got something, otherwise fetch default: */
+-			if(doublevector){ 
++			if(IssmPDoublevector){ 
+ 				defaulting=false;  //we are not defaulting, because  we do have a vector
+ 			}
+ 			else{
+ 				/*do we have a default enum to go fetch? */
+ 				if(default_vector_enum!=NoneEnum){
+ 					/*yes. fetch it: */
+-					this->FetchData(&doublevector,&M,&N,default_vector_enum);
+-					if(doublevector){
++					this->FetchData(&IssmPDoublevector,&M,&N,default_vector_enum);
++					if(IssmPDoublevector){
+ 						defaulting=false;  //we are not defaulting, because  we do have a vector
+ 					}
+ 					else{
+@@ -1056,7 +1056,7 @@
+ 				if(this->my_elements[i]){
+ 					Element* element=(Element*)elements->GetObjectByOffset(counter);
+ 					if(defaulting) element->InputCreate(default_value,vector_enum,code); 
+-					else           element->InputCreate(doublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
++					else           element->InputCreate(IssmPDoublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
+ 					counter++;
+ 				}
+ 			}
+@@ -1064,17 +1064,17 @@
+ 		case 6: //int vector{{{
+ 
+ 			/*Fetch vector:*/
+-			this->FetchData(&doublevector,&M,&N,vector_enum); //we still have a doublevector, because it might include times in transient mode
++			this->FetchData(&IssmPDoublevector,&M,&N,vector_enum); //we still have a IssmPDoublevector, because it might include times in transient mode
+ 			/*Check we got something, otherwise fetch default: */
+-			if(doublevector){ 
++			if(IssmPDoublevector){ 
+ 				defaulting=false;  //we are not defaulting, because  we do have a vector
+ 			}
+ 			else{
+ 				/*do we have a default enum to go fetch? */
+ 				if(default_vector_enum!=NoneEnum){
+ 					/*yes. fetch it: */
+-					this->FetchData(&doublevector,&M,&N,default_vector_enum);
+-					if(doublevector){
++					this->FetchData(&IssmPDoublevector,&M,&N,default_vector_enum);
++					if(IssmPDoublevector){
+ 						defaulting=false;  //we are not defaulting, because  we do have a vector
+ 					}
+ 					else{
+@@ -1094,25 +1094,25 @@
+ 				if(this->my_elements[i]){
+ 					Element* element=(Element*)elements->GetObjectByOffset(counter);
+ 					if(defaulting) element->InputCreate(default_value,vector_enum,code); 
+-					else           element->InputCreate(doublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
++					else           element->InputCreate(IssmPDoublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
+ 					counter++;
+ 				}
+ 			}
+ 			break; /*}}}*/
+-		case 7: //double vector{{{
++		case 7: //IssmPDouble vector{{{
+ 
+ 			/*Fetch vector:*/
+-			this->FetchData(&doublevector,&M,&N,vector_enum);
++			this->FetchData(&IssmPDoublevector,&M,&N,vector_enum);
+ 			/*Check we got something, otherwise fetch default: */
+-			if(doublevector){ 
++			if(IssmPDoublevector){ 
+ 				defaulting=false;  //we are not defaulting, because  we do have a vector
+ 			}
+ 			else{
+ 				/*do we have a default enum to go fetch? */
+ 				if(default_vector_enum!=NoneEnum){
+ 					/*yes. fetch it: */
+-					this->FetchData(&doublevector,&M,&N,default_vector_enum);
+-					if(doublevector){
++					this->FetchData(&IssmPDoublevector,&M,&N,default_vector_enum);
++					if(IssmPDoublevector){
+ 						defaulting=false;  //we are not defaulting, because  we do have a vector
+ 					}
+ 					else{
+@@ -1132,7 +1132,7 @@
+ 				if(this->my_elements[i]){
+ 					Element* element=(Element*)elements->GetObjectByOffset(counter);
+ 					if(defaulting) element->InputCreate(default_value,vector_enum,code); 
+-					else           element->InputCreate(doublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
++					else           element->InputCreate(IssmPDoublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
+ 					counter++;
+ 				}
+ 			}
+@@ -1144,7 +1144,7 @@
+ 			/*}}}*/
+ 	}
+ 	/*Free ressources:*/
+-	xfree((void**)&doublevector);
++	xfree((void**)&IssmPDoublevector);
+ 	xfree((void**)&string);
+ }
+ /*FUNCTION IoModel::LastIndex{{{*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12416-12417.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12416-12417.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12416-12417.diff	(revision 12679)
@@ -0,0 +1,101 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/Solverx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/Solverx.h	(revision 12416)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/Solverx.h	(revision 12417)
+@@ -18,11 +18,12 @@
+ 
+ #ifdef _HAVE_PETSC_
+ void	SolverxPetsc(Vec* puf, Mat Kff, Vec pf, Vec uf0,Vec df, Parameters* parameters);
+-void    DofTypesToIndexSet(IS* pisv, IS* pisp, Vec df,int typeenum);
++void  DofTypesToIndexSet(IS* pisv, IS* pisp, Vec df,int typeenum);
+ #endif
+ 
+ #ifdef _HAVE_GSL_
+-void	SolverxGsl(SeqVec** puf,SeqMat* Kff, SeqVec* pf);
++void SolverxGsl(SeqVec** puf,SeqMat* Kff, SeqVec* pf);
++void SolverxGsl(double** pX,double* A,double* B,int n);
+ #endif
+ 
+ #endif  /* _SOLVERX_H */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12416)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12417)
+@@ -12,17 +12,13 @@
+ #else
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+- 
+ #include <gsl/gsl_linalg.h>
+ 
+-void	SolverxGsl(SeqVec** puf,SeqMat* Kff, SeqVec* pf){
++void SolverxGsl(SeqVec** puf,SeqMat* Kff, SeqVec* pf){/*{{{*/
+ 
+-	/*intermediary: */
+-	SeqMat* KffCopy=NULL;
+-
+-	/*Output: */
+-	SeqVec*        uf               = NULL;
+-
++	/*Intermediaries*/
++	SeqMat* KffCopy = NULL;
++	SeqVec*  uf = NULL;
+ 	
+ 	/*GSL Matrices and vectors: */
+ 	gsl_matrix_view m;
+@@ -33,7 +29,6 @@
+ 	/*We are going to do an in place LU decomp, so we need to save the matrix with its original structure: */
+ 	KffCopy=Kff->Duplicate();
+ 
+-
+ 	/*Intermediary: */
+ 	int M,N,N2,s;
+ 
+@@ -62,10 +57,44 @@
+ 	/*Free resources:*/
+ 	gsl_permutation_free (p);
+ 	gsl_vector_free (x);
+-
+ 	delete KffCopy;
+ 
+-
+ 	/*Assign output pointers:*/
+ 	*puf=uf;
+-}
++}/*}}}*/
++void SolverxGsl(double** pX,double* A,double* B,int n){/*{{{*/
++
++	/*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));
++
++	/*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);
++
++	//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));
++
++	/*Clean up and assign output pointer*/
++	xfree((void**)&Acopy);
++	gsl_permutation_free(p);
++	gsl_vector_free(x);
++	*pX=X;
++}/*}}}*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12417-12418.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12417-12418.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12417-12418.diff	(revision 12679)
@@ -0,0 +1,46 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12417)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12418)
+@@ -579,7 +579,7 @@
+ 	*pstring=string;
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(int**  pintegerematrix,int* pM,int* pN,int data_enum){{{*/
++/*FUNCTION IoModel::FetchData(int**     pintegerematrix,int* pM,int* pN,int data_enum){{{*/
+ void  IoModel::FetchData(int** pmatrix,int* pM,int* pN,int data_enum){
+ 
+ 	extern int my_rank;
+@@ -866,7 +866,7 @@
+ 	*pnumrecords=numrecords;
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(Option** poption,int data_enum){{{*/
++/*FUNCTION IoModel::FetchData(Option**  poption,int data_enum){{{*/
+ void  IoModel::FetchData(Option** poption,int index){
+ 
+ 	extern int my_rank;
+@@ -879,7 +879,6 @@
+ 
+ 	/*First get option name*/
+ 	this->FetchData(&name,index);
+-	_printf_(true,"Option name is %s\n",name);
+ 
+ 	/*Get option value*/
+ 	fid=this->SetFilePointerToData(&code,NULL,index+1);
+@@ -888,7 +887,6 @@
+ 			  IssmPDouble *value = NULL;
+ 			  value=(IssmPDouble*)xmalloc(1*sizeof(IssmPDouble));
+ 			  FetchData(value,index+1);
+-			  _printf_(true,"value = %g\n",*value);
+ 			  option = new OptionDouble();
+ 			  ((OptionDouble*)option)->values = value;
+ 			  option->name  = name;
+@@ -900,7 +898,6 @@
+ 		case 4: {//char
+ 			  char* value = NULL;
+ 			  FetchData(&value,index+1);
+-			  _printf_(true,"value = %s\n",value);
+ 			  option = new OptionChar();
+ 			  ((OptionChar*)option)->values = value;
+ 			  option->name  = name;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12418-12419.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12418-12419.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12418-12419.diff	(revision 12679)
@@ -0,0 +1,238 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12418)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12419)
+@@ -19,6 +19,7 @@
+ #include "./Observations.h"
+ #include "../shared/shared.h"
+ #include "../include/include.h"
++#include "../modules/modules.h"
+ #include "../EnumDefinitions/EnumDefinitions.h"
+ #include "../io/io.h"
+ 
+@@ -114,7 +115,56 @@
+ /*}}}*/
+ 
+ /*Methods*/
+-/*FUNCTION Observations::ObservationList{{{*/
++/*FUNCTION Observations::ClosestObservation{{{*/
++void Observations::ClosestObservation(double *px,double *py,double *pobs,double x_interp,double y_interp,double radius){
++
++	/*Output and Intermediaries*/
++	bool         stop;
++	int          nobs,i,index;
++	double       h2,hmin2,radius2;
++	int         *indices      = NULL;
++	Observation *observation  = NULL;
++
++	/*If radius is not provided or is 0, return all observations*/
++	if(radius==0) radius=this->quadtree->root->length;
++
++	/*Compute radius square*/
++	radius2 = radius*radius;
++
++	/*Find all observations that are in radius*/
++	this->quadtree->RangeSearch(&indices,&nobs,x_interp,y_interp,radius);
++	for (i=0;i<nobs;i++){
++		observation=(Observation*)this->GetObjectByOffset(indices[i]);
++		h2 = (observation->x-x_interp)*(observation->x-x_interp) + (observation->y-y_interp)*(observation->y-y_interp);
++
++		if(i==0){
++			hmin2 = h2;
++			index = i;
++		}
++		else{
++			if(h2<hmin2){
++				hmin2 = h2;
++				index = i;
++			}
++		}
++	}  
++
++	/*Assign output pointer*/
++	if(!nobs){
++		*px=UNDEF;
++		*py=UNDEF;
++		*pobs=UNDEF;
++	}
++	else{
++		observation=(Observation*)this->GetObjectByOffset(indices[index]);
++		*px=observation->x;
++		*py=observation->y;
++		*pobs=observation->value;
++	}
++	xfree((void**)&indices);
++
++}/*}}}*/
++/*FUNCTION Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double radius,int maxdata){{{*/
+ void Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double radius,int maxdata){
+ 
+ 	/*Output and Intermediaries*/
+@@ -129,8 +179,10 @@
+ 	double      *obs          = NULL;
+ 	Observation *observation  = NULL;
+ 
++	/*If radius is not provided or is 0, return all observations*/
++	if(radius==0) radius=this->quadtree->root->length;
++
+ 	/*Compute radius square*/
+-	if(radius==0) radius=this->quadtree->root->length;
+ 	radius2 = radius*radius;
+ 
+ 	/*Find all observations that are in radius*/
+@@ -195,6 +247,121 @@
+ 	*pobs=obs;
+ 	*pnobs=nobs;
+ }/*}}}*/
++/*FUNCTION Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs){{{*/
++void Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs){
++
++	/*Output and Intermediaries*/
++	int          nobs;
++	double      *x            = NULL;
++	double      *y            = NULL;
++	double      *obs          = NULL;
++	Observation *observation  = NULL;
++
++	nobs = this->Size();
++
++	if(nobs){
++		x   = (double*)xmalloc(nobs*sizeof(double));
++		y   = (double*)xmalloc(nobs*sizeof(double));
++		obs = (double*)xmalloc(nobs*sizeof(double));
++		for(int i=0;i<this->Size();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;
++}/*}}}*/
++/*FUNCTION Observations::InterpolationKriging{{{*/
++void Observations::InterpolationKriging(double *pprediction,double *perror,double x_interp,double y_interp,double radius,int mindata,int maxdata,Variogram* variogram){
++
++	/*Intermediaries*/
++	int           i,j,n_obs;
++	double        prediction,error;
++	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;
++
++	/*Some checks*/
++	_assert_(mindata>0 && maxdata>0);
++	_assert_(pprediction && perror);
++
++	/*If radius is not provided or is 0, return all observations*/
++	if(radius==0) radius=this->quadtree->root->length;
++
++	/*Get list of observations for current point*/
++	this->ObservationList(&x,&y,&obs,&n_obs,x_interp,y_interp,radius,maxdata);
++
++	/*If we have less observations than mindata, return UNDEF*/
++	if(n_obs<mindata){
++		*pprediction = -999.0; 
++		*perror      = -999.0; 
++		return;
++	}
++
++	/*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[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,y[i]-y_interp);
++	for(i=0;i<n_obs;i++) gamma0[i] = variogram->Covariance(x[i]-x_interp,y[i]-y_interp);
++
++	/*Solve the three linear systems*/
++#if _HAVE_GSL_
++	SolverxGsl(&GinvG0,Gamma,gamma0,n_obs); // Gamma^-1 gamma0
++	SolverxGsl(&Ginv1, Gamma,ones,n_obs);   // Gamma^-1 ones
++	SolverxGsl(&GinvZ, Gamma,obs,n_obs);    // Gamma^-1 Z
++#else
++	_error_("GSL is required");
++#endif
++
++	/*Prepare predictor*/
++	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;
++
++	prediction = 0.;
++	error      = - numerator*numerator/denominator;
++	for(i=0;i<n_obs;i++) prediction += (gamma0[i]-ratio)*GinvZ[i];
++	for(i=0;i<n_obs;i++) error += gamma0[i]*GinvG0[i];
++
++	/*clean-up*/
++	*pprediction = prediction;
++	*perror = error;
++	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);
++
++}/*}}}*/
+ /*FUNCTION Observations::QuadtreeColoring{{{*/
+ void Observations::QuadtreeColoring(double* A,double *x,double *y,int n){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.h	(revision 12418)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.h	(revision 12419)
+@@ -15,7 +15,6 @@
+ class DataSet;
+ class Inputs;
+ 
+-
+ class Elements: public DataSet{
+ 
+ 	public:
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.h	(revision 12418)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.h	(revision 12419)
+@@ -7,6 +7,7 @@
+ 
+ class Obsevration;
+ class Quadtree;
++class Variogram;
+ class Options;
+ 
+ class Observations: public DataSet{
+@@ -22,6 +23,9 @@
+ 		~Observations();
+ 
+ 		/*Methods*/
++		void ClosestObservation(double *px,double *py,double *pobs,double x_interp,double y_interp,double radius);
++		void InterpolationKriging(double *pprediction,double *perror,double x_interp,double y_interp,double radius,int mindata,int maxdata,Variogram* variogram);
++		void ObservationList(double **px,double **py,double **pobs,int* pnobs);
+ 		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: /issm/oecreview/Archive/12321-12677/ISSM-12419-12420.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12419-12420.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12419-12420.diff	(revision 12679)
@@ -0,0 +1,35 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/include.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/include.h	(revision 12419)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/include.h	(revision 12420)
+@@ -9,6 +9,4 @@
+ #include "./typedefs.h"
+ #include "./types.h"
+ 
+-
+ #endif //ifndef _INCLUDE_H_
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/shared.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/shared.h	(revision 12419)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/shared.h	(revision 12420)
+@@ -5,7 +5,6 @@
+ #ifndef _SHARED_H_
+ #define _SHARED_H_
+ 
+-
+ #include "Alloc/alloc.h"
+ #include "Alloc/alloc_module.h"
+ #include "Alloc/xNewDelete.h"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12419)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12420)
+@@ -766,7 +766,6 @@
+ #}}}
+ #Gsl sources  {{{
+ gsl_sources= ./modules/Solverx/SolverxGsl.cpp
+-
+ #}}}
+ #Mpi sources  {{{
+ mpi_sources= ./toolkits/mpi/mpiincludes.h\
Index: /issm/oecreview/Archive/12321-12677/ISSM-12420-12421.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12420-12421.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12420-12421.diff	(revision 12679)
@@ -0,0 +1,423 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12420)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12421)
+@@ -55,6 +55,68 @@
+ 	else if(strcmp(output,"variomap")==0){
+ 		observations->Variomap(predictions,x_interp,n_interp);
+ 	}
++	else if(strcmp(output,"delaunay")==0){
++		int nobs,nel;
++		double *x     = NULL;
++		double *y     = NULL;
++		double *data  = NULL;
++		int    *index = NULL;
++		double *indexd= NULL;
++
++		observations->ObservationList(&x,&y,&data,&nobs);
++
++		printf("Generation Delaunay Triangulation\n");
++		BamgTriangulatex(&index,&nel,x,y,nobs);
++		indexd =(double*)xcalloc(nel*3,sizeof(double));
++		for(int i=0;i<nel*3;i++) indexd[i]=(double)index[i];
++		xfree((void**)&index);
++
++		printf("Interpolating\n");
++		xfree((void**)&predictions);
++		InterpFromMeshToMesh2dx(&predictions,indexd,x,y,nobs,nel,data,nobs,1,x_interp,y_interp,n_interp,NULL,0,new DataSet());
++		xfree((void**)&x);
++		xfree((void**)&y);
++		xfree((void**)&index);
++		xfree((void**)&data);
++	}
++	else if(strcmp(output,"nearestneighbor")==0){
++		/*initialize thread parameters: */
++		gate.n_interp     = n_interp;
++		gate.x_interp     = x_interp;
++		gate.y_interp     = y_interp;
++		gate.radius       = radius;
++		gate.mindata      = mindata;
++		gate.maxdata      = maxdata;
++		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: */
++		LaunchThread(NearestNeighbort,(void*)&gate,num);
++		printf("\r      interpolation progress:  100.00%%\n");
++		xfree((void**)&gate.percent);
++	}
++	else if(strcmp(output,"idw")==0){ //Inverse distance weighting
++		/*initialize thread parameters: */
++		gate.n_interp     = n_interp;
++		gate.x_interp     = x_interp;
++		gate.y_interp     = y_interp;
++		gate.radius       = radius;
++		gate.mindata      = mindata;
++		gate.maxdata      = maxdata;
++		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: */
++		LaunchThread(idwt,(void*)&gate,num);
++		printf("\r      interpolation progress:  100.00%%\n");
++		xfree((void**)&gate.percent);
++	}
+ 	else if(strcmp(output,"prediction")==0){
+ 
+ 		/*initialize thread parameters: */
+@@ -117,17 +179,57 @@
+ 	double       *percent      = gate->percent;
+ 
+ 	/*Intermediaries*/
++	double        localpercent;
++
++	/*partition loop across threads: */
++	PartitionRange(&i0,&i1,n_interp,num_threads,my_thread);
++	for(int idx=i0;idx<i1;idx++){
++
++		/*Print info*/
++		percent[my_thread]=double(idx-i0)/double(i1-i0)*100.;
++		localpercent=percent[0];
++		for(int i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]);
++		printf("\r      interpolation progress: %5.2lf%%",localpercent);
++
++		/*Kriging interpolation*/
++		observations->InterpolationKriging(&predictions[idx],&error[idx],x_interp[idx],y_interp[idx],radius,mindata,maxdata,variogram);
++	}
++
++	return NULL;
++}/*}}}*/
++/*FUNCTION NearestNeighbort{{{*/
++void* NearestNeighbort(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        radius       = gate->radius;
++	int           mindata      = gate->mindata;
++	int           maxdata      = gate->maxdata;
++	Variogram    *variogram    = gate->variogram;
++	Observations *observations = gate->observations;
++	double       *predictions  = gate->predictions;
++	double       *error        = gate->error;
++	double       *percent      = gate->percent;
++
++	/*Intermediaries*/
+ 	int           i,j,n_obs;
+-	double        numerator,denominator,ratio,localpercent;
+-	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;
++	double        x,y,obs;
++	double        localpercent;
+ 
+ 	/*partition loop across threads: */
+ 	PartitionRange(&i0,&i1,n_interp,num_threads,my_thread);
+@@ -139,60 +241,77 @@
+ 		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],radius,maxdata);
+-		if(n_obs<mindata){
+-			predictions[idx] = -999.0; 
+-			error[idx]       = -999.0; 
+-			continue;
+-		}
++		/*Get closest observation to current point*/
++		observations->ClosestObservation(&x,&y,&obs,x_interp[idx],y_interp[idx],radius);
++		predictions[idx] = obs; 
++	}
+ 
+-		/*Allocate intermediary matrix and vectors*/
++	return NULL;
++}/*}}}*/
++/*FUNCTION idwt{{{*/
++void* idwt(void* vpthread_handle){
+ 
+-		Gamma  = (double*)xmalloc(n_obs*n_obs*sizeof(double));
+-		gamma0 = (double*)xmalloc(n_obs*sizeof(double));
+-		ones   = (double*)xmalloc(n_obs*sizeof(double));
++	/*gate variables :*/
++	KrigingxThreadStruct *gate        = NULL;
++	pthread_handle       *handle      = NULL;
++	int my_thread;
++	int num_threads;
++	int i0,i1;
+ 
+-		/*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->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;
++	/*recover handle and gate: */
++	handle      = (pthread_handle*)vpthread_handle;
++	gate        = (KrigingxThreadStruct*)handle->gate;
++	my_thread   = handle->id;
++	num_threads = handle->num;
+ 
+-		/*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->Covariance(x[i]-x_interp[idx],y[i]-y_interp[idx]);
++	/*recover parameters :*/
++	int           n_interp     = gate->n_interp;
++	double       *x_interp     = gate->x_interp;
++	double       *y_interp     = gate->y_interp;
++	double        radius       = gate->radius;
++	int           mindata      = gate->mindata;
++	int           maxdata      = gate->maxdata;
++	Variogram    *variogram    = gate->variogram;
++	Observations *observations = gate->observations;
++	double       *predictions  = gate->predictions;
++	double       *error        = gate->error;
++	double       *percent      = gate->percent;
+ 
+-		/*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
++	/*Intermediaries*/
++	int           i,j,n_obs;
++	double        localpercent;
++	double        numerator,denominator,h,weight;
++	double *x     = NULL;
++	double *y     = NULL;
++	double *obs   = NULL;
++	double  power = 2.;
+ 
+-		/*Prepare predictor*/
+-		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;
++	/*partition loop across threads: */
++	PartitionRange(&i0,&i1,n_interp,num_threads,my_thread);
++	for(int idx=i0;idx<i1;idx++){
+ 
+-		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];
++		/*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);
+ 
+-		/*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);
++		/*Get closest observation to current point*/
++		observations->ObservationList(&x,&y,&obs,&n_obs,x_interp[idx],y_interp[idx],radius,maxdata);
++		if(n_obs){
++			numerator   = 0;
++			denominator = 0;
++			for(j=0;j<n_obs;j++){
++				h      = sqrt( (x[j]-x_interp[idx])*(x[j]-x_interp[idx]) + (y[j]-y_interp[idx])*(y[j]-y_interp[idx]));
++				weight = 1./pow(h,power);
++				numerator   += weight*obs[j];
++				denominator += weight;
++			}
++			predictions[idx] = numerator/denominator; 
++		}
++		else{
++			predictions[idx] = UNDEF; 
++		}
+ 	}
+ 
+ 	return NULL;
+@@ -218,43 +337,3 @@
+ 	xfree((void**)&model);
+ 	*pvariogram = variogram;
+ }/*}}}*/
+-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;
+-
+-		/*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);
+-
+-		/*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");
+-
+-		/*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;
+-#else
+-		_error_("GSL support required");
+-#endif
+-	}/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12420)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12421)
+@@ -55,80 +55,12 @@
+ 	}
+ 	else if(strcmp(output,"prediction")==0){
+ 
+-		/*Intermediaries*/
+-		int           i,j,n_obs;
+-		double        numerator,denominator,ratio,localpercent;
+-		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: */
+ 		for(int idx=my_rank;idx<n_interp;idx+=num_procs){
+-
+-			/*Print info*/
+ 			_printf_(true,"\r      interpolation progress: %5.2lf%%",double(idx)/double(n_interp)*100);
+-
+-			/*Get list of observations for current point*/
+-			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;
+-			}
+-
+-			/*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[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->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
+-			GslSolve(&Ginv1, Gamma,ones,n_obs);   // Gamma^-1 ones
+-			GslSolve(&GinvZ, Gamma,obs,n_obs);    // Gamma^-1 Z
+-
+-			/*Prepare predictor*/
+-			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;
+-
+-			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);
+-			xfree((void**)&y);
+-			xfree((void**)&obs);
+-			xfree((void**)&Gamma);
+-			xfree((void**)&gamma0);
+-			xfree((void**)&ones);
+-			xfree((void**)&GinvG0);
+-			xfree((void**)&Ginv1);
+-			xfree((void**)&GinvZ);
++			observations->InterpolationKriging(&predictions[idx],&error[idx],x_interp[idx],y_interp[idx],radius,mindata,maxdata,variogram);
+ 		}
++		_printf_(true,"\r      interpolation progress: %5.2lf%%\n",100.);
+ 
+ #ifdef _HAVE_MPI_
+ 		double *sumpredictions =(double*)xmalloc(n_interp*sizeof(double));
+@@ -138,7 +70,6 @@
+ 		xfree((void**)&error); error=sumerror;
+ 		xfree((void**)&predictions); predictions=sumpredictions;
+ #endif
+-
+ 	}
+ 	else{
+ 		_error_("output '%s' not supported yet",output);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12420)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12421)
+@@ -14,7 +14,6 @@
+ 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);
+ int  pKrigingx(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);
+ 
+ /*threading: */
+ typedef struct{
+@@ -32,4 +31,6 @@
+ }KrigingxThreadStruct;
+ 
+ void* Krigingxt(void*);
++void* NearestNeighbort(void*);
++void* idwt(void*);
+ #endif /* _KRIGINGX_H */
Index: /issm/oecreview/Archive/12321-12677/ISSM-12421-12422.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12421-12422.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12421-12422.diff	(revision 12679)
@@ -0,0 +1,287 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12421)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12422)
+@@ -275,6 +275,55 @@
+ 	*pobs=obs;
+ 	*pnobs=nobs;
+ }/*}}}*/
++/*FUNCTION Observations::InterpolationIDW{{{*/
++void Observations::InterpolationIDW(double *pprediction,double x_interp,double y_interp,double radius,int mindata,int maxdata,double power){
++
++	/*Intermediaries*/
++	int    i,n_obs;
++	double prediction;
++	double numerator,denominator,h,weight;
++	double *x   = NULL;
++	double *y   = NULL;
++	double *obs = NULL;
++
++	/*Some checks*/
++	_assert_(maxdata>0);
++	_assert_(pprediction);
++	_assert_(power>0);
++
++	/*If radius is not provided or is 0, return all observations*/
++	if(radius==0) radius=this->quadtree->root->length;
++
++	/*Get list of observations for current point*/
++	this->ObservationList(&x,&y,&obs,&n_obs,x_interp,y_interp,radius,maxdata);
++
++	/*If we have less observations than mindata, return UNDEF*/
++	if(n_obs<mindata){
++		prediction = UNDEF; 
++	}
++	else{
++		numerator   = 0.;
++		denominator = 0.;
++		for(i=0;i<n_obs;i++){
++			h = sqrt( (x[i]-x_interp)*(x[i]-x_interp) + (y[i]-y_interp)*(y[i]-y_interp));
++			if (h<0.0000001){
++				numerator   = obs[i];
++				denominator = 1.;
++				break;
++			}
++			weight = 1./pow(h,power);
++			numerator   += weight*obs[i];
++			denominator += weight;
++		}
++		prediction = numerator/denominator; 
++	}
++
++	/*clean-up*/
++	*pprediction = prediction;
++	xfree((void**)&x);
++	xfree((void**)&y);
++	xfree((void**)&obs);
++}/*}}}*/
+ /*FUNCTION Observations::InterpolationKriging{{{*/
+ void Observations::InterpolationKriging(double *pprediction,double *perror,double x_interp,double y_interp,double radius,int mindata,int maxdata,Variogram* variogram){
+ 
+@@ -362,6 +411,18 @@
+ 	xfree((void**)&GinvZ);
+ 
+ }/*}}}*/
++/*FUNCTION Observations::InterpolationNearestNeighbor{{{*/
++void Observations::InterpolationNearestNeighbor(double *pprediction,double x_interp,double y_interp,double radius){
++
++	/*Intermediaries*/
++	double        x,y,obs;
++
++	/*Get clostest observation*/
++	this->ClosestObservation(&x,&y,&obs,x_interp,y_interp,radius);
++
++	/*Assign output pointer*/
++	*pprediction = obs;
++}/*}}}*/
+ /*FUNCTION Observations::QuadtreeColoring{{{*/
+ void Observations::QuadtreeColoring(double* A,double *x,double *y,int n){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.h	(revision 12421)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.h	(revision 12422)
+@@ -24,7 +24,9 @@
+ 
+ 		/*Methods*/
+ 		void ClosestObservation(double *px,double *py,double *pobs,double x_interp,double y_interp,double radius);
++		void InterpolationIDW(double *pprediction,double x_interp,double y_interp,double radius,int mindata,int maxdata,double power);
+ 		void InterpolationKriging(double *pprediction,double *perror,double x_interp,double y_interp,double radius,int mindata,int maxdata,Variogram* variogram);
++		void InterpolationNearestNeighbor(double *pprediction,double x_interp,double y_interp,double radius);
+ 		void ObservationList(double **px,double **py,double **pobs,int* pnobs);
+ 		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);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12421)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12422)
+@@ -227,8 +227,7 @@
+ 	double       *percent      = gate->percent;
+ 
+ 	/*Intermediaries*/
+-	int           i,j,n_obs;
+-	double        x,y,obs;
++	int           i;
+ 	double        localpercent;
+ 
+ 	/*partition loop across threads: */
+@@ -241,9 +240,7 @@
+ 		for(i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]);
+ 		printf("\r      interpolation progress: %5.2lf%%",localpercent);
+ 
+-		/*Get closest observation to current point*/
+-		observations->ClosestObservation(&x,&y,&obs,x_interp[idx],y_interp[idx],radius);
+-		predictions[idx] = obs; 
++		observations->InterpolationNearestNeighbor(&predictions[idx],x_interp[idx],y_interp[idx],radius);
+ 	}
+ 
+ 	return NULL;
+@@ -278,12 +275,7 @@
+ 	double       *percent      = gate->percent;
+ 
+ 	/*Intermediaries*/
+-	int           i,j,n_obs;
+-	double        localpercent;
+-	double        numerator,denominator,h,weight;
+-	double *x     = NULL;
+-	double *y     = NULL;
+-	double *obs   = NULL;
++	double localpercent;
+ 	double  power = 2.;
+ 
+ 	/*partition loop across threads: */
+@@ -293,27 +285,11 @@
+ 		/*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]);
++		for(int i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]);
+ 		printf("\r      interpolation progress: %5.2lf%%",localpercent);
+ 
+-		/*Get closest observation to current point*/
+-		observations->ObservationList(&x,&y,&obs,&n_obs,x_interp[idx],y_interp[idx],radius,maxdata);
+-		if(n_obs){
+-			numerator   = 0;
+-			denominator = 0;
+-			for(j=0;j<n_obs;j++){
+-				h      = sqrt( (x[j]-x_interp[idx])*(x[j]-x_interp[idx]) + (y[j]-y_interp[idx])*(y[j]-y_interp[idx]));
+-				weight = 1./pow(h,power);
+-				numerator   += weight*obs[j];
+-				denominator += weight;
+-			}
+-			predictions[idx] = numerator/denominator; 
+-		}
+-		else{
+-			predictions[idx] = UNDEF; 
+-		}
++		observations->InterpolationIDW(&predictions[idx],x_interp[idx],y_interp[idx],radius,mindata,maxdata,power);
+ 	}
+-
+ 	return NULL;
+ }/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12421)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12422)
+@@ -8,12 +8,8 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../../objects/objects.h"
+ #include "../../Container/Container.h"
+-#include "../modules.h"
++#include "../../io/io.h"
+ 
+-#ifdef _HAVE_GSL_
+-#include <gsl/gsl_linalg.h>
+-#endif
+-
+ /*FUNCTION pKrigingx{{{*/
+ int pKrigingx(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){
+ 
+@@ -31,8 +27,7 @@
+ 	Variogram    *variogram    = NULL;
+ 	Observations *observations = NULL;
+ 
+-	/*Get Variogram from Options*/
+-	ProcessVariogram(&variogram,options);
++	/*Get some Options*/
+ 	options->Get(&radius,"searchradius",0.);
+ 	options->Get(&mindata,"mindata",1);
+ 	options->Get(&maxdata,"maxdata",50);
+@@ -55,6 +50,9 @@
+ 	}
+ 	else if(strcmp(output,"prediction")==0){
+ 
++		/*Process Variogram*/
++		ProcessVariogram(&variogram,options);
++
+ 		/*partition loop across threads: */
+ 		for(int idx=my_rank;idx<n_interp;idx+=num_procs){
+ 			_printf_(true,"\r      interpolation progress: %5.2lf%%",double(idx)/double(n_interp)*100);
+@@ -71,10 +69,41 @@
+ 		xfree((void**)&predictions); predictions=sumpredictions;
+ #endif
+ 	}
++	else if(strcmp(output,"nearestneighbor")==0){
++
++		/*partition loop across threads: */
++		for(int idx=my_rank;idx<n_interp;idx+=num_procs){
++			_printf_(true,"\r      interpolation progress: %5.2lf%%",double(idx)/double(n_interp)*100);
++			observations->InterpolationNearestNeighbor(&predictions[idx],x_interp[idx],y_interp[idx],radius);
++		}
++		_printf_(true,"\r      interpolation progress: %5.2lf%%\n",100.);
++
++#ifdef _HAVE_MPI_
++		double *sumpredictions =(double*)xmalloc(n_interp*sizeof(double));
++		MPI_Allreduce(predictions,sumpredictions,n_interp,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
++		xfree((void**)&predictions); predictions=sumpredictions;
++#endif
++	}
++	else if(strcmp(output,"idw")==0){
++		double power;
++		options->Get(&power,"power",2.);
++
++		/*partition loop across threads: */
++		for(int idx=my_rank;idx<n_interp;idx+=num_procs){
++			_printf_(true,"\r      interpolation progress: %5.2lf%%",double(idx)/double(n_interp)*100);
++			observations->InterpolationIDW(&predictions[idx],x_interp[idx],y_interp[idx],radius,mindata,maxdata,power);
++		}
++		_printf_(true,"\r      interpolation progress: %5.2lf%%\n",100.);
++
++#ifdef _HAVE_MPI_
++		double *sumpredictions =(double*)xmalloc(n_interp*sizeof(double));
++		MPI_Allreduce(predictions,sumpredictions,n_interp,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
++		xfree((void**)&predictions); predictions=sumpredictions;
++#endif
++	}
+ 	else{
+ 		_error_("output '%s' not supported yet",output);
+ 	}
+-	_printf_(true,"\r      interpolation progress: %5.2lf%%\n",100.);
+ 
+ 	/*clean-up and Assign output pointer*/
+ 	delete variogram;
+@@ -104,43 +133,3 @@
+ 	xfree((void**)&model);
+ 	*pvariogram = variogram;
+ }/*}}}*/
+-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;
+-
+-		/*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);
+-
+-		/*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");
+-
+-		/*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;
+-#else
+-		_error_("GSL support required");
+-#endif
+-	}/*}}}*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12422-12423.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12422-12423.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12422-12423.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/thermal.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/thermal.m	(revision 12422)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/thermal.m	(revision 12423)
+@@ -46,7 +46,7 @@
+ 
+ 			checkfield(md,'thermal.stabilization','numel',1,'values',[0 1 2]);
+ 			checkfield(md,'thermal.spctemperature','forcing',1);
+-			if (ismember(EnthalpyAnalysisEnum,analyses) & md.thermal.isenthalpy),
++			if (ismember(EnthalpyAnalysisEnum,analyses) & md.thermal.isenthalpy & md.mesh.dimension==3),
+ 			checkfield(md,'thermal.spctemperature','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*(md.geometry.surface-md.mesh.z),'message','spctemperature should be below the adjusted melting point');
+ 			checkfield(md,'thermal.isenthalpy','numel',1,'values',[0 1]);
+ 			end
Index: /issm/oecreview/Archive/12321-12677/ISSM-12423-12424.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12423-12424.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12423-12424.diff	(revision 12679)
@@ -0,0 +1,1515 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12423)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12424)
+@@ -1,8 +1,8 @@
+ /*  Gauss point structures and prototypes  */
+ 
++#include "../../include/include.h"
+ #include "./GaussPoints.h"
+ #include "../Alloc/alloc.h"
+-#include "../../include/include.h"
+ #include "../../io/io.h"
+ #include "../Exceptions/exceptions.h"
+ #include <math.h>
+@@ -10,7 +10,7 @@
+ 
+ /*General Gauss points*/
+ /*FUNCTION GaussLegendreLinear {{{*/
+-void GaussLegendreLinear( double** pxgaus, double** pxwgt, int ngaus){
++void GaussLegendreLinear( IssmPDouble** pxgaus, IssmPDouble** pxwgt, int ngaus){
+ 	/* Gauss-Legendre quadrature points.
+ 
+ 		The recurrence coefficients for Legendre polynomials on (-1,1)
+@@ -24,35 +24,35 @@
+ 
+ 	/*Intermediaries*/
+ 	int i;
+-	double *alpha,*beta;
++	IssmPDouble *alpha,*beta;
+ 
+ 	/*p= 1, npoint= 1*/
+-	static double wgt1[]={2.000000000000000};
+-	static double xi1[]={0.000000000000000};
++	static IssmPDouble wgt1[]={2.000000000000000};
++	static IssmPDouble xi1[]={0.000000000000000};
+ 
+ 	/*p= 3, npoint= 2*/
+-	static double wgt2[]={1.000000000000000, 1.000000000000000};
+-	static double xi2[]={-0.577350269189626, 0.577350269189626};
++	static IssmPDouble wgt2[]={1.000000000000000, 1.000000000000000};
++	static IssmPDouble xi2[]={-0.577350269189626, 0.577350269189626};
+ 
+ 	/*p= 5, npoint= 3*/
+-	static double wgt3[]={0.555555555555556, 0.888888888888889, 0.555555555555556};
+-	static double xi3[]={-0.774596669241483, 0.000000000000000, 0.774596669241483};
++	static IssmPDouble wgt3[]={0.555555555555556, 0.888888888888889, 0.555555555555556};
++	static IssmPDouble xi3[]={-0.774596669241483, 0.000000000000000, 0.774596669241483};
+ 
+ 	/*p= 7, npoint= 4*/
+-	static double wgt4[]={0.347854845137454, 0.652145154862546, 0.652145154862546, 0.347854845137454};
+-	static double xi4[]={-0.861136311594053,-0.339981043584856, 0.339981043584856, 0.861136311594053};
++	static IssmPDouble wgt4[]={0.347854845137454, 0.652145154862546, 0.652145154862546, 0.347854845137454};
++	static IssmPDouble xi4[]={-0.861136311594053,-0.339981043584856, 0.339981043584856, 0.861136311594053};
+ 
+-	static double* wgtp[MAX_LINE_GAUS_PTS]={wgt1 ,wgt2 ,wgt3 ,wgt4 };
+-	static double* xip [MAX_LINE_GAUS_PTS]={xi1  ,xi2  ,xi3  ,xi4  };
++	static IssmPDouble* wgtp[MAX_LINE_GAUS_PTS]={wgt1 ,wgt2 ,wgt3 ,wgt4 };
++	static IssmPDouble* xip [MAX_LINE_GAUS_PTS]={xi1  ,xi2  ,xi3  ,xi4  };
+ 
+-	static int np[MAX_LINE_GAUS_PTS]={sizeof(wgt1 )/sizeof(double),
+-		sizeof(wgt2 )/sizeof(double),
+-		sizeof(wgt3 )/sizeof(double),
+-		sizeof(wgt4 )/sizeof(double)};
++	static int np[MAX_LINE_GAUS_PTS]={sizeof(wgt1 )/sizeof(IssmPDouble),
++		sizeof(wgt2 )/sizeof(IssmPDouble),
++		sizeof(wgt3 )/sizeof(IssmPDouble),
++		sizeof(wgt4 )/sizeof(IssmPDouble)};
+ 
+ 	//	_printf_(true,"Gauss-Legendre recurrence coefficients ngaus=%d\n",ngaus);
+-	*pxgaus = (double *) xmalloc(ngaus*sizeof(double));
+-	*pxwgt  = (double *) xmalloc(ngaus*sizeof(double));
++	*pxgaus = (IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
++	*pxwgt  = (IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
+ 
+ 	/*  check to see if Gauss points need to be calculated  */
+ 	if (ngaus <= MAX_LINE_GAUS_PTS) {
+@@ -69,8 +69,8 @@
+ 	else {
+ 
+ 		/*  calculate the Gauss points using recurrence relations  */
+-		alpha=(double *) xmalloc(ngaus*sizeof(double));
+-		beta =(double *) xmalloc(ngaus*sizeof(double));
++		alpha=(IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
++		beta =(IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
+ 
+ 		/*  calculate the Legendre recurrence coefficients  */
+ 		alpha[0]=0.;
+@@ -88,7 +88,7 @@
+ 	}
+ }/*}}}*/
+ /*FUNCTION GaussLegendreTria{{{*/
+-void GaussLegendreTria( int* pngaus, double** pl1, double** pl2, double** pl3, double** pwgt, int iord ) {
++void GaussLegendreTria( int* pngaus, IssmPDouble** pl1, IssmPDouble** pl2, IssmPDouble** pl3, IssmPDouble** pwgt, int iord ) {
+ 	/*Gauss quadrature points for the triangle.
+ 
+ 	  Higher-order points from D.A. Dunavant, "High Degree Efficient
+@@ -97,118 +97,118 @@
+ 
+ 	/*Intermediaries*/
+ 	int i,j,ipt,nigaus;
+-	double xi,eta;
+-	double *xgaus=NULL,*xwgt=NULL,*egaus,*ewgt;
++	IssmPDouble xi,eta;
++	IssmPDouble *xgaus=NULL,*xwgt=NULL,*egaus,*ewgt;
+ 
+ 	/*Hardcoded Gauss points declaration*/
+ 	/*p= 1, npoint= 1{{{*/
+-	static double wgt1[]={
++	static IssmPDouble wgt1[]={
+ 		1.732050807568877};
+-	static double l11[]={
++	static IssmPDouble l11[]={
+ 		0.333333333333333};
+-	static double l21[]={
++	static IssmPDouble l21[]={
+ 		0.333333333333333};
+-	static double l31[]={
++	static IssmPDouble l31[]={
+ 		0.333333333333333};
+ 	/*}}}*/
+ 	/*p= 2, npoint= 3  {{{*/
+-	static double wgt2[]={
++	static IssmPDouble wgt2[]={
+ 		0.577350269189625, 0.577350269189625, 0.577350269189625};
+-	static double l12[]={
++	static IssmPDouble l12[]={
+ 		0.666666666666667, 0.166666666666667, 0.166666666666667};
+-	static double l22[]={
++	static IssmPDouble l22[]={
+ 		0.166666666666667, 0.666666666666667, 0.166666666666667};
+-	static double l32[]={
++	static IssmPDouble l32[]={
+ 		0.166666666666667, 0.166666666666667, 0.666666666666667};
+ 	/*}}}*/
+ 	/*p= 3, npoint= 4  {{{*/
+-	static double wgt3[]={
++	static IssmPDouble wgt3[]={
+ 		-0.974278579257493, 0.902109795608790, 0.902109795608790, 
+ 		0.902109795608790};
+-	static double l13[]={
++	static IssmPDouble l13[]={
+ 		0.333333333333333, 0.600000000000000, 0.200000000000000, 
+ 		0.200000000000000};
+-	static double l23[]={
++	static IssmPDouble l23[]={
+ 		0.333333333333333, 0.200000000000000, 0.600000000000000, 
+ 		0.200000000000000};
+-	static double l33[]={
++	static IssmPDouble l33[]={
+ 		0.333333333333333, 0.200000000000000, 0.200000000000000, 
+ 		0.600000000000000};
+ 	/*}}}*/
+ 	/*p= 4, npoint= 6  {{{*/
+-	static double wgt4[]={
++	static IssmPDouble wgt4[]={
+ 		0.386908262797819, 0.386908262797819, 0.386908262797819, 
+ 		0.190442006391807, 0.190442006391807, 0.190442006391807};
+-	static double l14[]={
++	static IssmPDouble l14[]={
+ 		0.108103018168070, 0.445948490915965, 0.445948490915965, 
+ 		0.816847572980459, 0.091576213509771, 0.091576213509771};
+-	static double l24[]={
++	static IssmPDouble l24[]={
+ 		0.445948490915965, 0.108103018168070, 0.445948490915965, 
+ 		0.091576213509771, 0.816847572980459, 0.091576213509771};
+-	static double l34[]={
++	static IssmPDouble l34[]={
+ 		0.445948490915965, 0.445948490915965, 0.108103018168070, 
+ 		0.091576213509771, 0.091576213509771, 0.816847572980459};
+ 	/*}}}*/
+ 	/*p= 5, npoint= 7  {{{*/
+-	static double wgt5[]={
++	static IssmPDouble wgt5[]={
+ 		0.389711431702997, 0.229313399254729, 0.229313399254729, 
+ 		0.229313399254729, 0.218133059367230, 0.218133059367230, 
+ 		0.218133059367230};
+-	static double l15[]={
++	static IssmPDouble l15[]={
+ 		0.333333333333333, 0.059715871789770, 0.470142064105115, 
+ 		0.470142064105115, 0.797426985353087, 0.101286507323456, 
+ 		0.101286507323456};
+-	static double l25[]={
++	static IssmPDouble l25[]={
+ 		0.333333333333333, 0.470142064105115, 0.059715871789770, 
+ 		0.470142064105115, 0.101286507323456, 0.797426985353087, 
+ 		0.101286507323456};
+-	static double l35[]={
++	static IssmPDouble l35[]={
+ 		0.333333333333333, 0.470142064105115, 0.470142064105115, 
+ 		0.059715871789770, 0.101286507323456, 0.101286507323456, 
+ 		0.797426985353087};
+ 	/*}}}*/
+ 	/*p= 6, npoint=12  {{{*/
+-	static double wgt6[]={
++	static IssmPDouble wgt6[]={
+ 		0.202279763184836, 0.202279763184836, 0.202279763184836, 
+ 		0.088065961139281, 0.088065961139281, 0.088065961139281, 
+ 		0.143502272432755, 0.143502272432755, 0.143502272432755, 
+ 		0.143502272432755, 0.143502272432755, 0.143502272432755};
+-	static double l16[]={
++	static IssmPDouble l16[]={
+ 		0.501426509658179, 0.249286745170910, 0.249286745170910, 
+ 		0.873821971016996, 0.063089014491502, 0.063089014491502, 
+ 		0.053145049844817, 0.053145049844817, 0.310352451033784, 
+ 		0.636502499121399, 0.310352451033784, 0.636502499121399};
+-	static double l26[]={
++	static IssmPDouble l26[]={
+ 		0.249286745170910, 0.501426509658179, 0.249286745170910, 
+ 		0.063089014491502, 0.873821971016996, 0.063089014491502, 
+ 		0.310352451033784, 0.636502499121399, 0.053145049844817, 
+ 		0.053145049844817, 0.636502499121399, 0.310352451033784};
+-	static double l36[]={
++	static IssmPDouble l36[]={
+ 		0.249286745170910, 0.249286745170910, 0.501426509658179, 
+ 		0.063089014491502, 0.063089014491502, 0.873821971016996, 
+ 		0.636502499121399, 0.310352451033784, 0.636502499121399, 
+ 		0.310352451033784, 0.053145049844817, 0.053145049844817};
+ 	/*}}}*/
+ 	/*p= 7, npoint=13  {{{*/
+-	static double wgt7[]={
++	static IssmPDouble wgt7[]={
+ 		-0.259062916308362, 0.304174548458604, 0.304174548458604, 
+ 		0.304174548458604, 0.092400122517855, 0.092400122517855, 
+ 		0.092400122517855, 0.133564951824643, 0.133564951824643, 
+ 		0.133564951824643, 0.133564951824643, 0.133564951824643, 
+ 		0.133564951824643};
+-	static double l17[]={
++	static IssmPDouble l17[]={
+ 		0.333333333333333, 0.479308067841920, 0.260345966079040, 
+ 		0.260345966079040, 0.869739794195568, 0.065130102902216, 
+ 		0.065130102902216, 0.048690315425316, 0.048690315425316, 
+ 		0.312865496004874, 0.638444188569810, 0.312865496004874, 
+ 		0.638444188569810};
+-	static double l27[]={
++	static IssmPDouble l27[]={
+ 		0.333333333333333, 0.260345966079040, 0.479308067841920, 
+ 		0.260345966079040, 0.065130102902216, 0.869739794195568, 
+ 		0.065130102902216, 0.312865496004874, 0.638444188569810, 
+ 		0.048690315425316, 0.048690315425316, 0.638444188569810, 
+ 		0.312865496004874};
+-	static double l37[]={
++	static IssmPDouble l37[]={
+ 		0.333333333333333, 0.260345966079040, 0.260345966079040, 
+ 		0.479308067841920, 0.065130102902216, 0.065130102902216, 
+ 		0.869739794195568, 0.638444188569810, 0.312865496004874, 
+@@ -216,28 +216,28 @@
+ 		0.048690315425316};
+ 	/*}}}*/
+ 	/*p= 8, npoint=16  {{{*/
+-	static double wgt8[]={
++	static IssmPDouble wgt8[]={
+ 		0.249961964823104, 0.164703541925695, 0.164703541925695, 
+ 		0.164703541925695, 0.178777729989794, 0.178777729989794, 
+ 		0.178777729989794, 0.056219767020733, 0.056219767020733, 
+ 		0.056219767020733, 0.047164287656184, 0.047164287656184, 
+ 		0.047164287656184, 0.047164287656184, 0.047164287656184, 
+ 		0.047164287656184};
+-	static double l18[]={
++	static IssmPDouble l18[]={
+ 		0.333333333333333, 0.081414823414554, 0.459292588292723, 
+ 		0.459292588292723, 0.658861384496480, 0.170569307751760, 
+ 		0.170569307751760, 0.898905543365938, 0.050547228317031, 
+ 		0.050547228317031, 0.008394777409958, 0.008394777409958, 
+ 		0.263112829634638, 0.728492392955404, 0.263112829634638, 
+ 		0.728492392955404};
+-	static double l28[]={
++	static IssmPDouble l28[]={
+ 		0.333333333333333, 0.459292588292723, 0.081414823414554, 
+ 		0.459292588292723, 0.170569307751760, 0.658861384496480, 
+ 		0.170569307751760, 0.050547228317031, 0.898905543365938, 
+ 		0.050547228317031, 0.263112829634638, 0.728492392955404, 
+ 		0.008394777409958, 0.008394777409958, 0.728492392955404, 
+ 		0.263112829634638};
+-	static double l38[]={
++	static IssmPDouble l38[]={
+ 		0.333333333333333, 0.459292588292723, 0.459292588292723, 
+ 		0.081414823414554, 0.170569307751760, 0.170569307751760, 
+ 		0.658861384496480, 0.050547228317031, 0.050547228317031, 
+@@ -246,7 +246,7 @@
+ 		0.008394777409958};
+ 	/*}}}*/
+ 	/*p= 9, npoint=19  {{{*/
+-	static double wgt9[]={
++	static IssmPDouble wgt9[]={
+ 		0.168244134395468, 0.054273292833345, 0.054273292833345, 
+ 		0.054273292833345, 0.134801255248419, 0.134801255248419, 
+ 		0.134801255248419, 0.137953930529909, 0.137953930529909, 
+@@ -254,7 +254,7 @@
+ 		0.044301833780383, 0.074969289332873, 0.074969289332873, 
+ 		0.074969289332873, 0.074969289332873, 0.074969289332873, 
+ 		0.074969289332873};
+-	static double l19[]={
++	static IssmPDouble l19[]={
+ 		0.333333333333333, 0.020634961602525, 0.489682519198738, 
+ 		0.489682519198738, 0.125820817014127, 0.437089591492937, 
+ 		0.437089591492937, 0.623592928761935, 0.188203535619033, 
+@@ -262,7 +262,7 @@
+ 		0.044729513394453, 0.036838412054736, 0.036838412054736, 
+ 		0.221962989160766, 0.741198598784498, 0.221962989160766, 
+ 		0.741198598784498};
+-	static double l29[]={
++	static IssmPDouble l29[]={
+ 		0.333333333333333, 0.489682519198738, 0.020634961602525, 
+ 		0.489682519198738, 0.437089591492937, 0.125820817014127, 
+ 		0.437089591492937, 0.188203535619033, 0.623592928761935, 
+@@ -270,7 +270,7 @@
+ 		0.044729513394453, 0.221962989160766, 0.741198598784498, 
+ 		0.036838412054736, 0.036838412054736, 0.741198598784498, 
+ 		0.221962989160766};
+-	static double l39[]={
++	static IssmPDouble l39[]={
+ 		0.333333333333333, 0.489682519198738, 0.489682519198738, 
+ 		0.020634961602525, 0.437089591492937, 0.437089591492937, 
+ 		0.125820817014127, 0.188203535619033, 0.188203535619033, 
+@@ -280,7 +280,7 @@
+ 		0.036838412054736};
+ 	/*}}}*/
+ 	/*p=10, npoint=25  {{{*/
+-	static double wgt10[]={
++	static IssmPDouble wgt10[]={
+ 		0.157301373584232, 0.063611224790829, 0.063611224790829, 
+ 		0.063611224790829, 0.078498377595183, 0.078498377595183, 
+ 		0.078498377595183, 0.126020408629139, 0.126020408629139, 
+@@ -290,7 +290,7 @@
+ 		0.049064223302117, 0.016318805873179, 0.016318805873179, 
+ 		0.016318805873179, 0.016318805873179, 0.016318805873179, 
+ 		0.016318805873179};
+-	static double l110[]={
++	static IssmPDouble l110[]={
+ 		0.333333333333333, 0.028844733232685, 0.485577633383657, 
+ 		0.485577633383657, 0.781036849029926, 0.109481575485037, 
+ 		0.109481575485037, 0.141707219414880, 0.141707219414880, 
+@@ -300,7 +300,7 @@
+ 		0.728323904597411, 0.009540815400299, 0.009540815400299, 
+ 		0.066803251012200, 0.923655933587500, 0.066803251012200, 
+ 		0.923655933587500};
+-	static double l210[]={
++	static IssmPDouble l210[]={
+ 		0.333333333333333, 0.485577633383657, 0.028844733232685, 
+ 		0.485577633383657, 0.109481575485037, 0.781036849029926, 
+ 		0.109481575485037, 0.307939838764121, 0.550352941820999, 
+@@ -310,7 +310,7 @@
+ 		0.246672560639903, 0.066803251012200, 0.923655933587500, 
+ 		0.009540815400299, 0.009540815400299, 0.923655933587500, 
+ 		0.066803251012200};
+-	static double l310[]={
++	static IssmPDouble l310[]={
+ 		0.333333333333333, 0.485577633383657, 0.485577633383657, 
+ 		0.028844733232685, 0.109481575485037, 0.109481575485037, 
+ 		0.781036849029926, 0.550352941820999, 0.307939838764121, 
+@@ -322,7 +322,7 @@
+ 		0.009540815400299};
+ 	/*}}}*/
+ 	/*p=11, npoint=27  {{{*/
+-	static double wgt11[]={
++	static IssmPDouble wgt11[]={
+ 		0.001605622060698, 0.001605622060698, 0.001605622060698, 
+ 		0.133626914252765, 0.133626914252765, 0.133626914252765, 
+ 		0.102750410879760, 0.102750410879760, 0.102750410879760, 
+@@ -332,7 +332,7 @@
+ 		0.090650537039958, 0.090650537039958, 0.090650537039958, 
+ 		0.035866718600836, 0.035866718600836, 0.035866718600836, 
+ 		0.035866718600836, 0.035866718600836, 0.035866718600836};
+-	static double l111[]={
++	static IssmPDouble l111[]={
+ 		-0.069222096541517, 0.534611048270758, 0.534611048270758, 
+ 		0.202061394068290, 0.398969302965855, 0.398969302965855, 
+ 		0.593380199137435, 0.203309900431282, 0.203309900431282, 
+@@ -342,7 +342,7 @@
+ 		0.593201213428213, 0.356620648261293, 0.593201213428213, 
+ 		0.021022016536166, 0.021022016536166, 0.171488980304042, 
+ 		0.807489003159792, 0.171488980304042, 0.807489003159792};
+-	static double l211[]={
++	static IssmPDouble l211[]={
+ 		0.534611048270758,-0.069222096541517, 0.534611048270758, 
+ 		0.398969302965855, 0.202061394068290, 0.398969302965855, 
+ 		0.203309900431282, 0.593380199137435, 0.203309900431282, 
+@@ -352,7 +352,7 @@
+ 		0.050178138310495, 0.593201213428213, 0.356620648261293, 
+ 		0.171488980304042, 0.807489003159792, 0.021022016536166, 
+ 		0.021022016536166, 0.807489003159792, 0.171488980304042};
+-	static double l311[]={
++	static IssmPDouble l311[]={
+ 		0.534611048270758, 0.534611048270758,-0.069222096541517, 
+ 		0.398969302965855, 0.398969302965855, 0.202061394068290, 
+ 		0.203309900431282, 0.203309900431282, 0.593380199137435, 
+@@ -364,7 +364,7 @@
+ 		0.171488980304042, 0.021022016536166, 0.021022016536166};
+ 	/*}}}*/
+ 	/*p=12, npoint=33  {{{*/
+-	static double wgt12[]={
++	static IssmPDouble wgt12[]={
+ 		0.044567514407799, 0.044567514407799, 0.044567514407799, 
+ 		0.075677707051848, 0.075677707051848, 0.075677707051848, 
+ 		0.108873638018933, 0.108873638018933, 0.108873638018933, 
+@@ -376,7 +376,7 @@
+ 		0.038723067079683, 0.038723067079683, 0.038723067079683, 
+ 		0.029992592075802, 0.029992592075802, 0.029992592075802, 
+ 		0.029992592075802, 0.029992592075802, 0.029992592075802};
+-	static double l112[]={
++	static IssmPDouble l112[]={
+ 		0.023565220452390, 0.488217389773805, 0.488217389773805, 
+ 		0.120551215411079, 0.439724392294460, 0.439724392294460, 
+ 		0.457579229975768, 0.271210385012116, 0.271210385012116, 
+@@ -388,7 +388,7 @@
+ 		0.695836086787803, 0.281325580989940, 0.695836086787803, 
+ 		0.025734050548330, 0.025734050548330, 0.116251915907597, 
+ 		0.858014033544073, 0.116251915907597, 0.858014033544073};
+-	static double l212[]={
++	static IssmPDouble l212[]={
+ 		0.488217389773805, 0.023565220452390, 0.488217389773805, 
+ 		0.439724392294460, 0.120551215411079, 0.439724392294460, 
+ 		0.271210385012116, 0.457579229975768, 0.271210385012116, 
+@@ -400,7 +400,7 @@
+ 		0.022838332222257, 0.695836086787803, 0.281325580989940, 
+ 		0.116251915907597, 0.858014033544073, 0.025734050548330, 
+ 		0.025734050548330, 0.858014033544073, 0.116251915907597};
+-	static double l312[]={
++	static IssmPDouble l312[]={
+ 		0.488217389773805, 0.488217389773805, 0.023565220452390, 
+ 		0.439724392294460, 0.439724392294460, 0.120551215411079, 
+ 		0.271210385012116, 0.271210385012116, 0.457579229975768, 
+@@ -414,7 +414,7 @@
+ 		0.116251915907597, 0.025734050548330, 0.025734050548330};
+ 	/*}}}*/
+ 	/*  p=13, npoint=37  {{{*/
+-	static double wgt13[]={
++	static IssmPDouble wgt13[]={
+ 		0.090968907790622, 0.019537784619314, 0.019537784619314, 
+ 		0.019537784619314, 0.054427130356344, 0.054427130356344, 
+ 		0.054427130356344, 0.081531965976677, 0.081531965976677, 
+@@ -428,7 +428,7 @@
+ 		0.030140218568265, 0.026884523429480, 0.026884523429480, 
+ 		0.026884523429480, 0.026884523429480, 0.026884523429480, 
+ 		0.026884523429480};
+-	static double l113[]={
++	static IssmPDouble l113[]={
+ 		0.333333333333333, 0.009903630120591, 0.495048184939705, 
+ 		0.495048184939705, 0.062566729780852, 0.468716635109574, 
+ 		0.468716635109574, 0.170957326397447, 0.414521336801277, 
+@@ -442,7 +442,7 @@
+ 		0.690169159986905, 0.022233076674090, 0.022233076674090, 
+ 		0.126357385491669, 0.851409537834241, 0.126357385491669, 
+ 		0.851409537834241};
+-	static double l213[]={
++	static IssmPDouble l213[]={
+ 		0.333333333333333, 0.495048184939705, 0.009903630120591, 
+ 		0.495048184939705, 0.468716635109574, 0.062566729780852, 
+ 		0.468716635109574, 0.414521336801277, 0.170957326397447, 
+@@ -456,7 +456,7 @@
+ 		0.291730066734288, 0.126357385491669, 0.851409537834241, 
+ 		0.022233076674090, 0.022233076674090, 0.851409537834241, 
+ 		0.126357385491669};
+-	static double l313[]={
++	static IssmPDouble l313[]={
+ 		0.333333333333333, 0.495048184939705, 0.495048184939705, 
+ 		0.009903630120591, 0.468716635109574, 0.468716635109574, 
+ 		0.062566729780852, 0.414521336801277, 0.414521336801277, 
+@@ -472,7 +472,7 @@
+ 		0.022233076674090};
+ 	/*}}}*/
+ 	/*p=14, npoint=42{{{*/
+-	static double wgt14[]={
++	static IssmPDouble wgt14[]={
+ 		0.037903474783419, 0.037903474783419, 0.037903474783419, 
+ 		0.056791094234956, 0.056791094234956, 0.056791094234956, 
+ 		0.089675379523011, 0.089675379523011, 0.089675379523011, 
+@@ -487,7 +487,7 @@
+ 		0.025004419126360, 0.025004419126360, 0.025004419126360, 
+ 		0.008677970905831, 0.008677970905831, 0.008677970905831, 
+ 		0.008677970905831, 0.008677970905831, 0.008677970905831};
+-	static double l114[]={
++	static IssmPDouble l114[]={
+ 		0.022072179275643, 0.488963910362179, 0.488963910362179, 
+ 		0.164710561319092, 0.417644719340454, 0.417644719340454, 
+ 		0.453044943382323, 0.273477528308839, 0.273477528308839, 
+@@ -502,7 +502,7 @@
+ 		0.686980167808088, 0.298372882136258, 0.686980167808088, 
+ 		0.001268330932872, 0.001268330932872, 0.118974497696957, 
+ 		0.879757171370171, 0.118974497696957, 0.879757171370171};
+-	static double l214[]={
++	static IssmPDouble l214[]={
+ 		0.488963910362179, 0.022072179275643, 0.488963910362179, 
+ 		0.417644719340454, 0.164710561319092, 0.417644719340454, 
+ 		0.273477528308839, 0.453044943382323, 0.273477528308839, 
+@@ -517,7 +517,7 @@
+ 		0.014646950055654, 0.686980167808088, 0.298372882136258, 
+ 		0.118974497696957, 0.879757171370171, 0.001268330932872, 
+ 		0.001268330932872, 0.879757171370171, 0.118974497696957};
+-	static double l314[]={
++	static IssmPDouble l314[]={
+ 		0.488963910362179, 0.488963910362179, 0.022072179275643, 
+ 		0.417644719340454, 0.417644719340454, 0.164710561319092, 
+ 		0.273477528308839, 0.273477528308839, 0.453044943382323, 
+@@ -534,7 +534,7 @@
+ 		0.118974497696957, 0.001268330932872, 0.001268330932872};
+ 	/*}}}*/
+ 	/*p=15, npoint=48{{{*/
+-	static double wgt15[]={
++	static IssmPDouble wgt15[]={
+ 		0.003320126005206, 0.003320126005206, 0.003320126005206, 
+ 		0.076641563419124, 0.076641563419124, 0.076641563419124, 
+ 		0.088657703045151, 0.088657703045151, 0.088657703045151, 
+@@ -551,7 +551,7 @@
+ 		0.037248306609289, 0.037248306609289, 0.037248306609289, 
+ 		0.013291658531346, 0.013291658531346, 0.013291658531346, 
+ 		0.013291658531346, 0.013291658531346, 0.013291658531346};
+-	static double l115[]={
++	static IssmPDouble l115[]={
+ 		-0.013945833716486, 0.506972916858243, 0.506972916858243, 
+ 		0.137187291433955, 0.431406354283023, 0.431406354283023, 
+ 		0.444612710305711, 0.277693644847144, 0.277693644847144, 
+@@ -568,7 +568,7 @@
+ 		0.747556466051838, 0.215599664072284, 0.747556466051838, 
+ 		0.012459809331199, 0.012459809331199, 0.103575616576386, 
+ 		0.883964574092416, 0.103575616576386, 0.883964574092416};
+-	static double l215[]={
++	static IssmPDouble l215[]={
+ 		0.506972916858243,-0.013945833716486, 0.506972916858243, 
+ 		0.431406354283023, 0.137187291433955, 0.431406354283023, 
+ 		0.277693644847144, 0.444612710305711, 0.277693644847144, 
+@@ -585,7 +585,7 @@
+ 		0.036843869875878, 0.747556466051838, 0.215599664072284, 
+ 		0.103575616576386, 0.883964574092416, 0.012459809331199, 
+ 		0.012459809331199, 0.883964574092416, 0.103575616576386};
+-	static double l315[]={
++	static IssmPDouble l315[]={
+ 		0.506972916858243, 0.506972916858243,-0.013945833716486, 
+ 		0.431406354283023, 0.431406354283023, 0.137187291433955, 
+ 		0.277693644847144, 0.277693644847144, 0.444612710305711, 
+@@ -604,7 +604,7 @@
+ 		0.103575616576386, 0.012459809331199, 0.012459809331199};
+ 	/*}}}*/
+ 	/*p=16, npoint=52  {{{*/
+-	static double wgt16[]={
++	static IssmPDouble wgt16[]={
+ 		0.081191089584902, 0.011095307165226, 0.011095307165226, 
+ 		0.011095307165226, 0.072244353151393, 0.072244353151393, 
+ 		0.072244353151393, 0.046577417012049, 0.046577417012049, 
+@@ -623,7 +623,7 @@
+ 		0.033055830705140, 0.011864642509229, 0.011864642509229, 
+ 		0.011864642509229, 0.011864642509229, 0.011864642509229, 
+ 		0.011864642509229};
+-	static double l116[]={
++	static IssmPDouble l116[]={
+ 		0.333333333333333, 0.005238916103123, 0.497380541948438, 
+ 		0.497380541948438, 0.173061122901295, 0.413469438549352, 
+ 		0.413469438549352, 0.059082801866017, 0.470458599066991, 
+@@ -642,7 +642,7 @@
+ 		0.768699721401368, 0.014317320230681, 0.014317320230681, 
+ 		0.085283615682657, 0.900399064086661, 0.085283615682657, 
+ 		0.900399064086661};
+-	static double l216[]={
++	static IssmPDouble l216[]={
+ 		0.333333333333333, 0.497380541948438, 0.005238916103123, 
+ 		0.497380541948438, 0.413469438549352, 0.173061122901295, 
+ 		0.413469438549352, 0.470458599066991, 0.059082801866017, 
+@@ -661,7 +661,7 @@
+ 		0.189358492130623, 0.085283615682657, 0.900399064086661, 
+ 		0.014317320230681, 0.014317320230681, 0.900399064086661, 
+ 		0.085283615682657};
+-	static double l316[]={
++	static IssmPDouble l316[]={
+ 		0.333333333333333, 0.497380541948438, 0.497380541948438, 
+ 		0.005238916103123, 0.413469438549352, 0.413469438549352, 
+ 		0.173061122901295, 0.470458599066991, 0.470458599066991, 
+@@ -682,7 +682,7 @@
+ 		0.014317320230681};
+ 	/*}}}*/
+ 	/*p=17, npoint=61{{{*/
+-	static double wgt17[]={
++	static IssmPDouble wgt17[]={
+ 		0.057914928034477, 0.008822054327014, 0.008822054327014, 
+ 		0.008822054327014, 0.025410682752829, 0.025410682752829, 
+ 		0.025410682752829, 0.042176958517489, 0.042176958517489, 
+@@ -704,7 +704,7 @@
+ 		0.031684053418215, 0.011545213295771, 0.011545213295771, 
+ 		0.011545213295771, 0.011545213295771, 0.011545213295771, 
+ 		0.011545213295771};
+-	static double l117[]={
++	static IssmPDouble l117[]={
+ 		0.333333333333333, 0.005658918886452, 0.497170540556774, 
+ 		0.497170540556774, 0.035647354750751, 0.482176322624625, 
+ 		0.482176322624625, 0.099520061958437, 0.450239969020782, 
+@@ -726,7 +726,7 @@
+ 		0.752351005937729, 0.014663182224828, 0.014663182224828, 
+ 		0.080711313679564, 0.904625504095608, 0.080711313679564, 
+ 		0.904625504095608};
+-	static double l217[]={
++	static IssmPDouble l217[]={
+ 		0.333333333333333, 0.497170540556774, 0.005658918886452, 
+ 		0.497170540556774, 0.482176322624625, 0.035647354750751, 
+ 		0.482176322624625, 0.450239969020782, 0.099520061958437, 
+@@ -748,7 +748,7 @@
+ 		0.180483211648746, 0.080711313679564, 0.904625504095608, 
+ 		0.014663182224828, 0.014663182224828, 0.904625504095608, 
+ 		0.080711313679564};
+-	static double l317[]={
++	static IssmPDouble l317[]={
+ 		0.333333333333333, 0.497170540556774, 0.497170540556774, 
+ 		0.005658918886452, 0.482176322624625, 0.482176322624625, 
+ 		0.035647354750751, 0.450239969020782, 0.450239969020782, 
+@@ -773,7 +773,7 @@
+ 	/*}}}*/
+ 	/*  p=18, npoint=70  {{{*/
+ 
+-	static double wgt18[]={
++	static IssmPDouble wgt18[]={
+ 		0.053364381350150, 0.015713921277179, 0.015713921277179, 
+ 		0.015713921277179, 0.032495554156279, 0.032495554156279, 
+ 		0.032495554156279, 0.033672969465771, 0.033672969465771, 
+@@ -798,7 +798,7 @@
+ 		0.013222699422034, 0.000079999375178, 0.000079999375178, 
+ 		0.000079999375178, 0.000079999375178, 0.000079999375178, 
+ 		0.000079999375178};
+-	static double l118[]={
++	static IssmPDouble l118[]={
+ 		0.333333333333333, 0.013310382738157, 0.493344808630921, 
+ 		0.493344808630921, 0.061578811516086, 0.469210594241957, 
+ 		0.469210594241957, 0.127437208225989, 0.436281395887006, 
+@@ -823,7 +823,7 @@
+ 		0.883962302273467,-0.035222015287949,-0.035222015287949, 
+ 		0.020874755282586, 1.014347260005363, 0.020874755282586, 
+ 		1.014347260005363};
+-	static double l218[]={
++	static IssmPDouble l218[]={
+ 		0.333333333333333, 0.493344808630921, 0.013310382738157, 
+ 		0.493344808630921, 0.469210594241957, 0.061578811516086, 
+ 		0.469210594241957, 0.436281395887006, 0.127437208225989, 
+@@ -848,7 +848,7 @@
+ 		0.101179597136408, 0.020874755282586, 1.014347260005363, 
+ 		-0.035222015287949,-0.035222015287949, 1.014347260005363, 
+ 		0.020874755282586};
+-	static double l318[]={
++	static IssmPDouble l318[]={
+ 		0.333333333333333, 0.493344808630921, 0.493344808630921, 
+ 		0.013310382738157, 0.469210594241957, 0.469210594241957, 
+ 		0.061578811516086, 0.436281395887006, 0.436281395887006, 
+@@ -876,7 +876,7 @@
+ 	/*}}}*/
+ 	/*p=19, npoint=73  {{{*/
+ 
+-	static double wgt19[]={
++	static IssmPDouble wgt19[]={
+ 		0.056995437856306, 0.017893352515055, 0.017893352515055, 
+ 		0.017893352515055, 0.038775849701151, 0.038775849701151, 
+ 		0.038775849701151, 0.052422467754193, 0.052422467754193, 
+@@ -902,7 +902,7 @@
+ 		0.017768353603780, 0.006581669842530, 0.006581669842530, 
+ 		0.006581669842530, 0.006581669842530, 0.006581669842530, 
+ 		0.006581669842530};
+-	static double l119[]={
++	static IssmPDouble l119[]={
+ 		0.333333333333333, 0.020780025853987, 0.489609987073006, 
+ 		0.489609987073006, 0.090926214604215, 0.454536892697893, 
+ 		0.454536892697893, 0.197166638701138, 0.401416680649431, 
+@@ -928,7 +928,7 @@
+ 		0.822931324069857, 0.010161119296278, 0.010161119296278, 
+ 		0.065494628082938, 0.924344252620784, 0.065494628082938, 
+ 		0.924344252620784};
+-	static double l219[]={
++	static IssmPDouble l219[]={
+ 		0.333333333333333, 0.489609987073006, 0.020780025853987, 
+ 		0.489609987073006, 0.454536892697893, 0.090926214604215, 
+ 		0.454536892697893, 0.401416680649431, 0.197166638701138, 
+@@ -954,7 +954,7 @@
+ 		0.142421601113383, 0.065494628082938, 0.924344252620784, 
+ 		0.010161119296278, 0.010161119296278, 0.924344252620784, 
+ 		0.065494628082938};
+-	static double l319[]={
++	static IssmPDouble l319[]={
+ 		0.333333333333333, 0.489609987073006, 0.489609987073006, 
+ 		0.020780025853987, 0.454536892697893, 0.454536892697893, 
+ 		0.090926214604215, 0.401416680649431, 0.401416680649431, 
+@@ -982,7 +982,7 @@
+ 		0.010161119296278};
+ 	/*}}}*/
+ 	/*p=20, npoint=79 {{{*/
+-	static double wgt20[]={
++	static IssmPDouble wgt20[]={
+ 		0.057256499746719, 0.001501721280705, 0.001501721280705, 
+ 		0.001501721280705, 0.020195803723819, 0.020195803723819, 
+ 		0.020195803723819, 0.039624016090841, 0.039624016090841, 
+@@ -1010,7 +1010,7 @@
+ 		0.017515684095300, 0.006190192638113, 0.006190192638113, 
+ 		0.006190192638113, 0.006190192638113, 0.006190192638113, 
+ 		0.006190192638113};
+-	static double l120[]={
++	static IssmPDouble l120[]={
+ 		0.333333333333333,-0.001900928704400, 0.500950464352200, 
+ 		0.500950464352200, 0.023574084130543, 0.488212957934729, 
+ 		0.488212957934729, 0.089726636099435, 0.455136681950283, 
+@@ -1038,7 +1038,7 @@
+ 		0.835586957912363, 0.010547719294141, 0.010547719294141, 
+ 		0.059696109149007, 0.929756171556853, 0.059696109149007, 
+ 		0.929756171556853};
+-	static double l220[]={
++	static IssmPDouble l220[]={
+ 		0.333333333333333, 0.500950464352200,-0.001900928704400, 
+ 		0.500950464352200, 0.488212957934729, 0.023574084130543, 
+ 		0.488212957934729, 0.455136681950283, 0.089726636099435, 
+@@ -1066,7 +1066,7 @@
+ 		0.137726978828923, 0.059696109149007, 0.929756171556853, 
+ 		0.010547719294141, 0.010547719294141, 0.929756171556853, 
+ 		0.059696109149007};
+-	static double l320[]={
++	static IssmPDouble l320[]={
+ 		0.333333333333333, 0.500950464352200, 0.500950464352200, 
+ 		-0.001900928704400, 0.488212957934729, 0.488212957934729, 
+ 		0.023574084130543, 0.455136681950283, 0.455136681950283, 
+@@ -1096,47 +1096,47 @@
+ 		0.010547719294141};
+ 	/*}}}*/
+ 
+-	static double* wgtp[MAX_TRIA_SYM_ORD]={
++	static IssmPDouble* wgtp[MAX_TRIA_SYM_ORD]={
+ 		wgt1 ,wgt2 ,wgt3 ,wgt4 ,wgt5 ,
+ 		wgt6 ,wgt7 ,wgt8 ,wgt9 ,wgt10,
+ 		wgt11,wgt12,wgt13,wgt14,wgt15,
+ 		wgt16,wgt17,wgt18,wgt19,wgt20};
+-	static double* l1p [MAX_TRIA_SYM_ORD]={
++	static IssmPDouble* l1p [MAX_TRIA_SYM_ORD]={
+ 		l11  ,l12  ,l13  ,l14  ,l15  ,
+ 		l16  ,l17  ,l18  ,l19  ,l110 ,
+ 		l111 ,l112 ,l113 ,l114 ,l115 ,
+ 		l116 ,l117 ,l118 ,l119 ,l120 };
+-	static double* l2p [MAX_TRIA_SYM_ORD]={
++	static IssmPDouble* l2p [MAX_TRIA_SYM_ORD]={
+ 		l21  ,l22  ,l23  ,l24  ,l25  ,
+ 		l26  ,l27  ,l28  ,l29  ,l210 ,
+ 		l211 ,l212 ,l213 ,l214 ,l215 ,
+ 		l216 ,l217 ,l218 ,l219 ,l220 };
+-	static double* l3p [MAX_TRIA_SYM_ORD]={
++	static IssmPDouble* l3p [MAX_TRIA_SYM_ORD]={
+ 		l31  ,l32  ,l33  ,l34  ,l35  ,
+ 		l36  ,l37  ,l38  ,l39  ,l310 ,
+ 		l311 ,l312 ,l313 ,l314 ,l315 ,
+ 		l316 ,l317 ,l318 ,l319 ,l320 };
+ 
+-	static int np[MAX_TRIA_SYM_ORD]={sizeof(wgt1 )/sizeof(double),
+-		sizeof(wgt2 )/sizeof(double),
+-		sizeof(wgt3 )/sizeof(double),
+-		sizeof(wgt4 )/sizeof(double),
+-		sizeof(wgt5 )/sizeof(double),
+-		sizeof(wgt6 )/sizeof(double),
+-		sizeof(wgt7 )/sizeof(double),
+-		sizeof(wgt8 )/sizeof(double),
+-		sizeof(wgt9 )/sizeof(double),
+-		sizeof(wgt10)/sizeof(double),
+-		sizeof(wgt11)/sizeof(double),
+-		sizeof(wgt12)/sizeof(double),
+-		sizeof(wgt13)/sizeof(double),
+-		sizeof(wgt14)/sizeof(double),
+-		sizeof(wgt15)/sizeof(double),
+-		sizeof(wgt16)/sizeof(double),
+-		sizeof(wgt17)/sizeof(double),
+-		sizeof(wgt18)/sizeof(double),
+-		sizeof(wgt19)/sizeof(double),
+-		sizeof(wgt20)/sizeof(double)};
++	static int np[MAX_TRIA_SYM_ORD]={sizeof(wgt1 )/sizeof(IssmPDouble),
++		sizeof(wgt2 )/sizeof(IssmPDouble),
++		sizeof(wgt3 )/sizeof(IssmPDouble),
++		sizeof(wgt4 )/sizeof(IssmPDouble),
++		sizeof(wgt5 )/sizeof(IssmPDouble),
++		sizeof(wgt6 )/sizeof(IssmPDouble),
++		sizeof(wgt7 )/sizeof(IssmPDouble),
++		sizeof(wgt8 )/sizeof(IssmPDouble),
++		sizeof(wgt9 )/sizeof(IssmPDouble),
++		sizeof(wgt10)/sizeof(IssmPDouble),
++		sizeof(wgt11)/sizeof(IssmPDouble),
++		sizeof(wgt12)/sizeof(IssmPDouble),
++		sizeof(wgt13)/sizeof(IssmPDouble),
++		sizeof(wgt14)/sizeof(IssmPDouble),
++		sizeof(wgt15)/sizeof(IssmPDouble),
++		sizeof(wgt16)/sizeof(IssmPDouble),
++		sizeof(wgt17)/sizeof(IssmPDouble),
++		sizeof(wgt18)/sizeof(IssmPDouble),
++		sizeof(wgt19)/sizeof(IssmPDouble),
++		sizeof(wgt20)/sizeof(IssmPDouble)};
+ 
+ 	//	_printf_(true,"GaussLegendreTria: iord=%d\n",iord);
+ 
+@@ -1149,10 +1149,10 @@
+ 
+ 		*pngaus=np[iord-1];
+ 
+-		*pl1  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pl2  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pl3  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pwgt = (double *) xmalloc(*pngaus*sizeof(double));
++		*pl1  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl2  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl3  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pwgt = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+ 
+ 		for (i=0; i<*pngaus; i++) {
+ 			(*pl1 )[i]=l1p [iord-1][i];
+@@ -1167,10 +1167,10 @@
+ 		nigaus =iord/2+1;
+ 		*pngaus=nigaus*nigaus;
+ 
+-		*pl1  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pl2  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pl3  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pwgt = (double *) xmalloc(*pngaus*sizeof(double));
++		*pl1  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl2  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl3  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pwgt = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+ 
+ 		/*  get the gauss points in each direction  */
+ 		GaussLegendreLinear(&xgaus, &xwgt, nigaus);
+@@ -1206,7 +1206,7 @@
+ 	return;
+ }/*}}}*/
+ /*FUNCTION GaussLegendreTetra{{{*/
+-void GaussLegendreTetra( int* pngaus, double** pl1, double** pl2, double** pl3, double** pl4, double** pwgt, int iord ) {
++void GaussLegendreTetra( int* pngaus, IssmPDouble** pl1, IssmPDouble** pl2, IssmPDouble** pl3, IssmPDouble** pl4, IssmPDouble** pwgt, int iord ) {
+ 	/* Gauss quadrature points for the tetrahedron.
+ 
+ 		p=2-3 points from Y. Jinyun, "Symmetric Gaussian Quadrature
+@@ -1219,80 +1219,80 @@
+ 
+ 	/*Intermediaries*/
+ 	int i,j,k,ipt,nigaus;
+-	double xi,eta,zeta;
+-	double *xgaus=NULL,*xwgt=NULL,*egaus,*ewgt,*zgaus,*zwgt;
++	IssmPDouble xi,eta,zeta;
++	IssmPDouble *xgaus=NULL,*xwgt=NULL,*egaus,*ewgt,*zgaus,*zwgt;
+ 
+ 	/*Hardcoded Gauss points definition*/
+ 	/*p= 1, npoint= 1  {{{*/
+-	static double wgt1[]={
++	static IssmPDouble wgt1[]={
+ 		1.000000000000000};
+-	static double l11[]={
++	static IssmPDouble l11[]={
+ 		0.250000000000000};
+-	static double l21[]={
++	static IssmPDouble l21[]={
+ 		0.250000000000000};
+-	static double l31[]={
++	static IssmPDouble l31[]={
+ 		0.250000000000000};
+-	static double l41[]={
++	static IssmPDouble l41[]={
+ 		0.250000000000000};
+ 	/*}}}*/
+ 	/*p= 2, npoint= 4  {{{*/
+ 
+-	static double wgt2[]={
++	static IssmPDouble wgt2[]={
+ 		0.250000000000000, 0.250000000000000, 0.250000000000000,
+ 		0.250000000000000};
+-	static double l12[]={
++	static IssmPDouble l12[]={
+ 		0.585410196624969, 0.138196601125011, 0.138196601125011,
+ 		0.138196601125011};
+-	static double l22[]={
++	static IssmPDouble l22[]={
+ 		0.138196601125011, 0.585410196624969, 0.138196601125011,
+ 		0.138196601125011};
+-	static double l32[]={
++	static IssmPDouble l32[]={
+ 		0.138196601125011, 0.138196601125011, 0.585410196624969,
+ 		0.138196601125011};
+-	static double l42[]={
++	static IssmPDouble l42[]={
+ 		0.138196601125011, 0.138196601125011, 0.138196601125011,
+ 		0.585410196624969};
+ 	/*}}}*/
+ 	/*p= 3, npoint= 5  {{{*/
+-	static double wgt3[]={
++	static IssmPDouble wgt3[]={
+ 		-0.800000000000000, 0.450000000000000, 0.450000000000000, 
+ 		0.450000000000000, 0.450000000000000};
+-	static double l13[]={
++	static IssmPDouble l13[]={
+ 		0.250000000000000, 0.500000000000000, 0.166666666666667, 
+ 		0.166666666666667, 0.166666666666667};
+-	static double l23[]={
++	static IssmPDouble l23[]={
+ 		0.250000000000000, 0.166666666666667, 0.500000000000000, 
+ 		0.166666666666667, 0.166666666666667};
+-	static double l33[]={
++	static IssmPDouble l33[]={
+ 		0.250000000000000, 0.166666666666667, 0.166666666666667, 
+ 		0.500000000000000, 0.166666666666667};
+-	static double l43[]={
++	static IssmPDouble l43[]={
+ 		0.250000000000000, 0.166666666666667, 0.166666666666667, 
+ 		0.166666666666667, 0.500000000000000};
+ 	/*}}}*/
+ 	/*p= 4, npoint=11  {{{*/
+ 
+-	static double wgt4[]={
++	static IssmPDouble wgt4[]={
+ 		-0.013155555555556, 0.007622222222222, 0.007622222222222, 
+ 		0.007622222222222, 0.007622222222222, 0.024888888888889,
+ 		0.024888888888889, 0.024888888888889, 0.024888888888889, 
+ 		0.024888888888889, 0.024888888888889};
+-	static double l14[]={
++	static IssmPDouble l14[]={
+ 		0.250000000000000, 0.785714285714286, 0.071428571428571, 
+ 		0.071428571428571, 0.071428571428571, 0.399403576166799,
+ 		0.399403576166799, 0.399403576166799, 0.100596423833201, 
+ 		0.100596423833201, 0.100596423833201};
+-	static double l24[]={
++	static IssmPDouble l24[]={
+ 		0.250000000000000, 0.071428571428571, 0.785714285714286, 
+ 		0.071428571428571, 0.071428571428571, 0.399403576166799,
+ 		0.100596423833201, 0.100596423833201, 0.399403576166799, 
+ 		0.399403576166799, 0.100596423833201};
+-	static double l34[]={
++	static IssmPDouble l34[]={
+ 		0.250000000000000, 0.071428571428571, 0.071428571428571, 
+ 		0.785714285714286, 0.071428571428571, 0.100596423833201, 
+ 		0.399403576166799, 0.100596423833201, 0.399403576166799,
+ 		0.100596423833201, 0.399403576166799};
+-	static double l44[]={
++	static IssmPDouble l44[]={
+ 		0.250000000000000, 0.071428571428571, 0.071428571428571, 
+ 		0.071428571428571, 0.785714285714286, 0.100596423833201, 
+ 		0.100596423833201, 0.399403576166799, 0.100596423833201,
+@@ -1300,31 +1300,31 @@
+ 	/*}}}*/
+ 	/*p= 5, npoint=15  {{{*/
+ 
+-	static double wgt5[]={
++	static IssmPDouble wgt5[]={
+ 		0.030283678097089, 0.006026785714286, 0.006026785714286, 
+ 		0.006026785714286, 0.006026785714286, 0.011645249086029, 
+ 		0.011645249086029, 0.011645249086029, 0.011645249086029,
+ 		0.010949141561386, 0.010949141561386, 0.010949141561386,
+ 		0.010949141561386, 0.010949141561386, 0.010949141561386};
+-	static double l15[]={
++	static IssmPDouble l15[]={
+ 		0.250000000000000, 0.000000000000000, 0.333333333333333, 
+ 		0.333333333333333, 0.333333333333333, 0.727272727272727, 
+ 		0.090909090909091, 0.090909090909091, 0.090909090909091, 
+ 		0.066550153573664, 0.066550153573664, 0.066550153573664, 
+ 		0.433449846426336, 0.433449846426336, 0.433449846426336};
+-	static double l25[]={
++	static IssmPDouble l25[]={
+ 		0.250000000000000, 0.333333333333333, 0.000000000000000, 
+ 		0.333333333333333, 0.333333333333333, 0.090909090909091, 
+ 		0.727272727272727, 0.090909090909091, 0.090909090909091, 
+ 		0.066550153573664, 0.433449846426336, 0.433449846426336, 
+ 		0.066550153573664, 0.066550153573664, 0.433449846426336};
+-	static double l35[]={
++	static IssmPDouble l35[]={
+ 		0.250000000000000, 0.333333333333333, 0.333333333333333, 
+ 		0.000000000000000, 0.333333333333333, 0.090909090909091, 
+ 		0.090909090909091, 0.727272727272727, 0.090909090909091, 
+ 		0.433449846426336, 0.066550153573664, 0.433449846426336, 
+ 		0.066550153573664, 0.433449846426336, 0.066550153573664};
+-	static double l45[]={
++	static IssmPDouble l45[]={
+ 		0.250000000000000, 0.333333333333333, 0.333333333333333, 
+ 		0.333333333333333, 0.000000000000000, 0.090909090909091, 
+ 		0.090909090909091, 0.090909090909091, 0.727272727272727, 
+@@ -1333,7 +1333,7 @@
+ 	/*}}}*/
+ 	/*p= 6, npoint=24  {{{*/
+ 
+-	static double wgt6[]={
++	static IssmPDouble wgt6[]={
+ 		0.006653791709695, 0.006653791709695, 0.006653791709695, 
+ 		0.006653791709695, 0.001679535175887, 0.001679535175887, 
+ 		0.001679535175887, 0.001679535175887, 0.009226196923942, 
+@@ -1342,7 +1342,7 @@
+ 		0.008035714285714, 0.008035714285714, 0.008035714285714, 
+ 		0.008035714285714, 0.008035714285714, 0.008035714285714, 
+ 		0.008035714285714, 0.008035714285714, 0.008035714285714};
+-	static double l16[]={
++	static IssmPDouble l16[]={
+ 		0.356191386222545, 0.214602871259152, 0.214602871259152, 
+ 		0.214602871259152, 0.877978124396166, 0.040673958534611, 
+ 		0.040673958534611, 0.040673958534611, 0.032986329573173, 
+@@ -1352,7 +1352,7 @@
+ 		0.063661001875018, 0.063661001875018, 0.063661001875018, 
+ 		0.269672331458316, 0.603005664791649, 0.269672331458316, 
+ 		0.603005664791649, 0.269672331458316, 0.603005664791649};
+-	static double l26[]={
++	static IssmPDouble l26[]={
+ 		0.214602871259152, 0.356191386222545, 0.214602871259152, 
+ 		0.214602871259152, 0.040673958534611, 0.877978124396166, 
+ 		0.040673958534611, 0.040673958534611, 0.322337890142276, 
+@@ -1362,7 +1362,7 @@
+ 		0.603005664791649, 0.269672331458316, 0.603005664791649, 
+ 		0.063661001875018, 0.063661001875018, 0.063661001875018, 
+ 		0.063661001875018, 0.603005664791649, 0.269672331458316};
+-	static double l36[]={
++	static IssmPDouble l36[]={
+ 		0.214602871259152, 0.214602871259152, 0.356191386222545, 
+ 		0.214602871259152, 0.040673958534611, 0.040673958534611, 
+ 		0.877978124396166, 0.040673958534611, 0.322337890142276, 
+@@ -1372,7 +1372,7 @@
+ 		0.063661001875018, 0.603005664791649, 0.269672331458316, 
+ 		0.063661001875018, 0.063661001875018, 0.603005664791649, 
+ 		0.269672331458316, 0.063661001875018, 0.063661001875018};
+-	static double l46[]={
++	static IssmPDouble l46[]={
+ 		0.214602871259152, 0.214602871259152, 0.214602871259152, 
+ 		0.356191386222545, 0.040673958534611, 0.040673958534611, 
+ 		0.040673958534611, 0.877978124396166, 0.322337890142276, 
+@@ -1384,18 +1384,18 @@
+ 		0.063661001875018, 0.063661001875018, 0.063661001875018};
+ 	/*}}}*/
+ 
+-	static double* wgtp[MAX_TETRA_SYM_ORD]={wgt1,wgt2,wgt3,wgt4,wgt5,wgt6};
+-	static double* l1p [MAX_TETRA_SYM_ORD]={l11 ,l12 ,l13 ,l14 ,l15 ,l16 };
+-	static double* l2p [MAX_TETRA_SYM_ORD]={l21 ,l22 ,l32 ,l24 ,l25 ,l26 };
+-	static double* l3p [MAX_TETRA_SYM_ORD]={l31 ,l32 ,l33 ,l34 ,l35 ,l36 };
+-	static double* l4p [MAX_TETRA_SYM_ORD]={l41 ,l42 ,l43 ,l44 ,l45 ,l46 };
++	static IssmPDouble* wgtp[MAX_TETRA_SYM_ORD]={wgt1,wgt2,wgt3,wgt4,wgt5,wgt6};
++	static IssmPDouble* l1p [MAX_TETRA_SYM_ORD]={l11 ,l12 ,l13 ,l14 ,l15 ,l16 };
++	static IssmPDouble* l2p [MAX_TETRA_SYM_ORD]={l21 ,l22 ,l32 ,l24 ,l25 ,l26 };
++	static IssmPDouble* l3p [MAX_TETRA_SYM_ORD]={l31 ,l32 ,l33 ,l34 ,l35 ,l36 };
++	static IssmPDouble* l4p [MAX_TETRA_SYM_ORD]={l41 ,l42 ,l43 ,l44 ,l45 ,l46 };
+ 
+-	static int np[MAX_TETRA_SYM_ORD]={sizeof(wgt1 )/sizeof(double),
+-		sizeof(wgt2 )/sizeof(double),
+-		sizeof(wgt3 )/sizeof(double),
+-		sizeof(wgt4 )/sizeof(double),
+-		sizeof(wgt5 )/sizeof(double),
+-		sizeof(wgt6 )/sizeof(double)};
++	static int np[MAX_TETRA_SYM_ORD]={sizeof(wgt1 )/sizeof(IssmPDouble),
++		sizeof(wgt2 )/sizeof(IssmPDouble),
++		sizeof(wgt3 )/sizeof(IssmPDouble),
++		sizeof(wgt4 )/sizeof(IssmPDouble),
++		sizeof(wgt5 )/sizeof(IssmPDouble),
++		sizeof(wgt6 )/sizeof(IssmPDouble)};
+ 
+ 	//	_printf_(true,"GaussLegendreTetra: iord=%d\n",iord);
+ 
+@@ -1409,11 +1409,11 @@
+ 
+ 		*pngaus=np[iord-1];
+ 
+-		*pl1  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pl2  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pl3  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pl4  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pwgt = (double *) xmalloc(*pngaus*sizeof(double));
++		*pl1  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl2  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl3  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl4  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pwgt = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+ 
+ 		for (i=0; i<*pngaus; i++) {
+ 			(*pl1 )[i]=l1p [iord-1][i];
+@@ -1429,11 +1429,11 @@
+ 		nigaus =iord/2+1;
+ 		*pngaus=nigaus*nigaus*nigaus;
+ 
+-		*pl1  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pl2  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pl3  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pl4  = (double *) xmalloc(*pngaus*sizeof(double));
+-		*pwgt = (double *) xmalloc(*pngaus*sizeof(double));
++		*pl1  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl2  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl3  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl4  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pwgt = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+ 
+ 		/*  get the gauss points in each direction  */
+ 		GaussLegendreLinear(&xgaus, &xwgt, nigaus);
+@@ -1471,7 +1471,7 @@
+ 	}
+ }/*}}}*/
+ /*FUNCTION GaussLobatto{{{*/
+-void GaussLobatto( double** pxgaus, double** pxwgt, int ngaus ) {
++void GaussLobatto( IssmPDouble** pxgaus, IssmPDouble** pxwgt, int ngaus ) {
+ 	/*Gauss-Lobatto quadrature points.
+ 
+ 	  The recurrence coefficients for Legendre polynomials on (-1,1)
+@@ -1487,42 +1487,42 @@
+ 	  n>=(p+1)/2+1 (one more than Gauss-Legendre).*/
+ 
+ 	int i;
+-	double *alpha,*beta;
+-	double left=-1.,right= 1.;
+-	double p0l=0.,p0r=0.,p1l=1.,p1r=1.,pm1l,pm1r,det;
++	IssmPDouble *alpha,*beta;
++	IssmPDouble left=-1.,right= 1.;
++	IssmPDouble p0l=0.,p0r=0.,p1l=1.,p1r=1.,pm1l,pm1r,det;
+ 
+ 	/*p= 1, npoint= 1 (Gauss-Legendre)*/
+-	static double wgt1[]={2.000000000000000};
+-	static double xi1[]={0.000000000000000};
++	static IssmPDouble wgt1[]={2.000000000000000};
++	static IssmPDouble xi1[]={0.000000000000000};
+ 
+ 	/*p= 1, npoint= 2*/
+-	static double wgt2[]={1.000000000000000, 1.000000000000000};
+-	static double xi2[]={-1.000000000000000, 1.000000000000000};
++	static IssmPDouble wgt2[]={1.000000000000000, 1.000000000000000};
++	static IssmPDouble xi2[]={-1.000000000000000, 1.000000000000000};
+ 
+ 	/*p= 3, npoint= 3*/
+-	static double wgt3[]={0.333333333333333, 1.333333333333333, 0.333333333333333};
+-	static double xi3[]={-1.000000000000000, 0.000000000000000, 1.000000000000000};
++	static IssmPDouble wgt3[]={0.333333333333333, 1.333333333333333, 0.333333333333333};
++	static IssmPDouble xi3[]={-1.000000000000000, 0.000000000000000, 1.000000000000000};
+ 
+ 	/*p= 5, npoint= 4*/
+-	static double wgt4[]={0.166666666666667, 0.833333333333333, 0.833333333333333, 0.166666666666667};
+-	static double xi4[]={-1.000000000000000,-0.447213595499958, 0.447213595499958, 1.000000000000000};
++	static IssmPDouble wgt4[]={0.166666666666667, 0.833333333333333, 0.833333333333333, 0.166666666666667};
++	static IssmPDouble xi4[]={-1.000000000000000,-0.447213595499958, 0.447213595499958, 1.000000000000000};
+ 
+ 	/*p= 7, npoint= 5*/
+-	static double wgt5[]={0.100000000000000, 0.544444444444444, 0.711111111111111, 0.544444444444444, 0.100000000000000};
+-	static double xi5[]={-1.000000000000000,-0.654653670707977, 0.000000000000000, 0.654653670707977, 1.000000000000000};
++	static IssmPDouble wgt5[]={0.100000000000000, 0.544444444444444, 0.711111111111111, 0.544444444444444, 0.100000000000000};
++	static IssmPDouble xi5[]={-1.000000000000000,-0.654653670707977, 0.000000000000000, 0.654653670707977, 1.000000000000000};
+ 
+-	static double* wgtp[MAX_LINE_GLOB_PTS]={wgt1 ,wgt2 ,wgt3 ,wgt4 ,wgt5 };
+-	static double* xip [MAX_LINE_GLOB_PTS]={xi1  ,xi2  ,xi3  ,xi4  ,xi5  };
++	static IssmPDouble* wgtp[MAX_LINE_GLOB_PTS]={wgt1 ,wgt2 ,wgt3 ,wgt4 ,wgt5 };
++	static IssmPDouble* xip [MAX_LINE_GLOB_PTS]={xi1  ,xi2  ,xi3  ,xi4  ,xi5  };
+ 
+-	static int np[MAX_LINE_GLOB_PTS]={sizeof(wgt1 )/sizeof(double),
+-		sizeof(wgt2 )/sizeof(double),
+-		sizeof(wgt3 )/sizeof(double),
+-		sizeof(wgt4 )/sizeof(double),
+-		sizeof(wgt5 )/sizeof(double)};
++	static int np[MAX_LINE_GLOB_PTS]={sizeof(wgt1 )/sizeof(IssmPDouble),
++		sizeof(wgt2 )/sizeof(IssmPDouble),
++		sizeof(wgt3 )/sizeof(IssmPDouble),
++		sizeof(wgt4 )/sizeof(IssmPDouble),
++		sizeof(wgt5 )/sizeof(IssmPDouble)};
+ 
+ 	//	_printf_(true,"Gauss-Lobatto recurrence coefficients ngaus=%d\n",ngaus);
+-	*pxgaus = (double *) xmalloc(ngaus*sizeof(double));
+-	*pxwgt  = (double *) xmalloc(ngaus*sizeof(double));
++	*pxgaus = (IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
++	*pxwgt  = (IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
+ 
+ 	/*  check to see if Gauss points need to be calculated  */
+ 	if (ngaus <= MAX_LINE_GLOB_PTS) {
+@@ -1538,8 +1538,8 @@
+ 	else {
+ 
+ 		/*  calculate the Gauss points using recurrence relations  */
+-		alpha=(double *) xmalloc(ngaus*sizeof(double));
+-		beta =(double *) xmalloc(ngaus*sizeof(double));
++		alpha=(IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
++		beta =(IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
+ 
+ 		/*  calculate the Legendre recurrence coefficients  */
+ 		alpha[0]=0.;
+@@ -1580,7 +1580,7 @@
+ 
+ }/*}}}*/
+ /*FUNCTION GaussRecur{{{*/
+-void GaussRecur( double* zero, double* weight, int n, double* alpha, double* beta ) {
++void GaussRecur( IssmPDouble* zero, IssmPDouble* weight, int n, IssmPDouble* alpha, IssmPDouble* beta ) {
+ 	/*Gauss quadrature points from recursion coefficients.
+ 	 *
+ 	 *The routine uses the algorithm from the ORTHPOL routine GAUSS, which
+@@ -1588,8 +1588,8 @@
+ 
+ 	/*Intermediaries*/
+ 	int i,j,k,l,m,ii,mml,iter;
+-	double p,g,r,s,c,f,b;
+-	double* work;
++	IssmPDouble p,g,r,s,c,f,b;
++	IssmPDouble* work;
+ 
+ 	if (n==1){
+ 		zero[0]  =alpha[0];
+@@ -1597,7 +1597,7 @@
+ 		return;
+ 	}
+ 
+-	work=(double*)xmalloc(n*sizeof(double));
++	work=(IssmPDouble*)xmalloc(n*sizeof(IssmPDouble));
+ 
+ 	zero[0]  =alpha[0];
+ 	weight[0]=1.;
+@@ -1703,7 +1703,7 @@
+ 
+ /*Element Gauss points TO BE REMOVED*/
+ /*FUNCTION gaussQuad{{{*/
+-void gaussQuad( double** pxgaus, double** pxwgt, double** pegaus, double** pewgt, int nigaus, int njgaus ) { 
++void gaussQuad( IssmPDouble** pxgaus, IssmPDouble** pxwgt, IssmPDouble** pegaus, IssmPDouble** pewgt, int nigaus, int njgaus ) {
+ 	/*Gauss quadrature points for the quadrilaterial.*/
+ 
+ 	/*get the gauss points using the product of two line rules  */
+@@ -1711,7 +1711,7 @@
+ 	GaussLegendreLinear(pegaus, pewgt, njgaus);
+ }/*}}}*/
+ /*FUNCTION gaussHexa{{{*/
+-void gaussHexa( double** pxgaus, double** pxwgt, double** pegaus, double** pewgt, double** pzgaus, double** pzwgt, int nigaus, int njgaus, int nkgaus ) {
++void gaussHexa( IssmPDouble** pxgaus, IssmPDouble** pxwgt, IssmPDouble** pegaus, IssmPDouble** pewgt, IssmPDouble** pzgaus, IssmPDouble ** pzwgt, int nigaus, int njgaus, int nkgaus ) {
+ 	/*Gauss quadrature points for the hexahedron.*/
+ 
+ 	/*  get the gauss points using the product of three line rules  */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.h	(revision 12423)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.h	(revision 12424)
+@@ -6,17 +6,17 @@
+ #define _GAUSSPOINTS_H
+ 
+ #define MAX_LINE_GAUS_PTS    4
+-void GaussLegendreLinear( double** pxgaus, double** pxwgt, int ngaus ); 
++void GaussLegendreLinear( IssmPDouble** pxgaus, IssmPDouble** pxwgt, int ngaus );
+ #define MAX_TRIA_SYM_ORD    20
+-void GaussLegendreTria( int* pngaus, double** pl1, double** pl2, double** pl3, double** pwgt, int iord );
++void GaussLegendreTria( int* pngaus, IssmPDouble** pl1, IssmPDouble** pl2, IssmPDouble** pl3, IssmPDouble** pwgt, int iord );
+ #define MAX_TETRA_SYM_ORD    6
+-void GaussLegendreTetra( int* pngaus, double** pl1, double** pl2, double** pl3, double** pl4, double** pwgt, int iord );
++void GaussLegendreTetra( int* pngaus, IssmPDouble** pl1, IssmPDouble** pl2, IssmPDouble** pl3, IssmPDouble** pl4, IssmPDouble** pwgt, int iord );
+ #define MAX_LINE_GLOB_PTS    5
+-void GaussLobatto( double** pxgaus, double** pxwgt, int ngaus ); 
++void GaussLobatto( IssmPDouble** pxgaus, IssmPDouble** pxwgt, int ngaus );
+ #define MAX_GAUS_ITER   30
+-void GaussRecur( double* zero, double* weight, int n, double* alpha, double* beta );
++void GaussRecur( IssmPDouble* zero, IssmPDouble* weight, int n, IssmPDouble* alpha, IssmPDouble* beta );
+ 
+-void gaussQuad( double** pxgaus, double** pxwgt, double** pegaus, double** pewgt, int nigaus, int njgaus );
+-void gaussHexa( double** pxgaus, double** pxwgt, double** pegaus, double** pewgt, double** pzgaus, double** pzwgt, int nigaus, int njgaus, int nkgaus );
++void gaussQuad( IssmPDouble** pxgaus, IssmPDouble** pxwgt, IssmPDouble** pegaus, IssmPDouble** pewgt, int nigaus, int njgaus );
++void gaussHexa( IssmPDouble** pxgaus, IssmPDouble** pxwgt, IssmPDouble** pegaus, IssmPDouble** pewgt, IssmPDouble** pzgaus, IssmPDouble ** pzwgt, int nigaus, int njgaus, int nkgaus );
+ 
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp	(revision 12423)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp	(revision 12424)
+@@ -41,8 +41,8 @@
+ GaussTria::GaussTria(int index1,int index2,int order){
+ 
+ 	/*Intermediaties*/
+-	double *seg_coords  = NULL;
+-	double *seg_weights = NULL;
++	IssmPDouble *seg_coords  = NULL;
++	IssmPDouble *seg_weights = NULL;
+ 	int     i,index3;
+ 
+ 	/*Get Segment gauss points*/
+@@ -50,10 +50,10 @@
+ 	GaussLegendreLinear(&seg_coords,&seg_weights,numgauss);
+ 
+ 	/*Allocate GaussTria fields*/
+-	coords1=(double*)xmalloc(numgauss*sizeof(double));
+-	coords2=(double*)xmalloc(numgauss*sizeof(double));
+-	coords3=(double*)xmalloc(numgauss*sizeof(double));
+-	weights=(double*)xmalloc(numgauss*sizeof(double));
++	coords1=xNew<IssmDouble>(numgauss*sizeof(IssmDouble));
++	coords2=xNew<IssmDouble>(numgauss*sizeof(IssmDouble));
++	coords3=xNew<IssmDouble>(numgauss*sizeof(IssmDouble));
++	weights=xNew<IssmDouble>(numgauss*sizeof(IssmDouble));
+ 
+ 	/*Reverse index1 and 2 if necessary*/
+ 	if (index1>index2){
+@@ -70,7 +70,7 @@
+ 	}
+ 	else if (index1==0 && index2==2){
+ 		for(i=0;i<numgauss;i++) coords1[i]=  0.5*(1-seg_coords[i]);
+-		for(i=0;i<numgauss;i++) coords2[i]=0;
++		for(i=0;i<numgauss;i++) coords2[i]= 0 ;
+ 		for(i=0;i<numgauss;i++) coords3[i]=1-0.5*(1.-seg_coords[i]);
+ 		for(i=0;i<numgauss;i++) weights[i]=seg_weights[i];
+ 	}
+@@ -96,10 +96,10 @@
+ /*}}}*/
+ /*FUNCTION GaussTria::~GaussTria(){{{*/
+ GaussTria::~GaussTria(){
+-	xfree((void**)&weights);
+-	xfree((void**)&coords1);
+-	xfree((void**)&coords2);
+-	xfree((void**)&coords3);
++	xDelete<IssmDouble>(weights);
++	xDelete<IssmDouble>(coords1);
++	xDelete<IssmDouble>(coords2);
++	xDelete<IssmDouble>(coords3);
+ }
+ /*}}}*/
+ 
+@@ -198,11 +198,11 @@
+ }
+ /*}}}*/
+ /*FUNCTION GaussTria::GaussFromCoords{{{*/
+-void GaussTria::GaussFromCoords(double x,double y,double* xyz_list){
++void GaussTria::GaussFromCoords(IssmDouble x,IssmDouble y,IssmDouble* xyz_list){
+ 
+ 	/*Intermediaries*/
+-	double    area = 0;
+-	double    x1,y1,x2,y2,x3,y3;
++	IssmDouble    area = 0;
++	IssmDouble    x1,y1,x2,y2,x3,y3;
+ 
+ 	/*in debugging mode: check that the default constructor has been called*/
+ 	_assert_(numgauss==-1);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.h	(revision 12423)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.h	(revision 12424)
+@@ -14,16 +14,16 @@
+ 
+ 	private:
+ 		int numgauss;
+-		double* weights;
+-		double* coords1;
+-		double* coords2;
+-		double* coords3;
++		IssmDouble* weights;
++		IssmDouble* coords1;
++		IssmDouble* coords2;
++		IssmDouble* coords3;
+ 
+ 	public:
+-		double weight;
+-		double coord1;
+-		double coord2;
+-		double coord3;
++		IssmDouble weight;
++		IssmDouble coord1;
++		IssmDouble coord2;
++		IssmDouble coord3;
+ 		
+ 	public:
+ 
+@@ -37,7 +37,7 @@
+ 		int  begin(void);
+ 		int  end(void);
+ 		void Echo(void);
+-		void GaussFromCoords(double x1,double y1,double* xyz_list);
++		void GaussFromCoords(IssmDouble x1,IssmDouble y1,IssmDouble* xyz_list);
+ 		void GaussPoint(int ig);
+ 		void GaussVertex(int iv);
+ 		void GaussCenter(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.h	(revision 12423)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.h	(revision 12424)
+@@ -26,12 +26,12 @@
+ 		~Friction();
+ 	
+ 		void  Echo(void);
+-		void  GetAlpha2(double* palpha2, GaussTria* gauss,int vxenum,int vyenum,int vzenum);
+-		void  GetAlpha2(double* palpha2, GaussPenta* gauss,int vxenum,int vyenum,int vzenum);
+-		void  GetAlphaComplement(double* alpha_complement, GaussTria* gauss,int vxenum,int vyenum,int vzenum);
+-		void  GetAlphaComplement(double* alpha_complement, GaussPenta* gauss,int vxenum,int vyenum,int vzenum);
+-		void  GetInputValue(double* pvalue,GaussTria* gauss,int enum_type);
+-		void  GetInputValue(double* pvalue,GaussPenta* gauss,int enum_type);
++		void  GetAlpha2(IssmDouble* palpha2, GaussTria* gauss,int vxenum,int vyenum,int vzenum);
++		void  GetAlpha2(IssmDouble* palpha2, GaussPenta* gauss,int vxenum,int vyenum,int vzenum);
++		void  GetAlphaComplement(IssmDouble* alpha_complement, GaussTria* gauss,int vxenum,int vyenum,int vzenum);
++		void  GetAlphaComplement(IssmDouble* alpha_complement, GaussPenta* gauss,int vxenum,int vyenum,int vzenum);
++		void  GetInputValue(IssmDouble* pvalue,GaussTria* gauss,int enum_type);
++		void  GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int enum_type);
+ 
+ };
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12423)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12424)
+@@ -54,21 +54,21 @@
+ 	matpar->Echo();
+ }
+ /*}}}*/
+-/*FUNCTION Friction::GetAlpha2(double* palpha2, GaussTria* gauss,int vxenum,int vyenum,int vzenum){{{*/
+-void Friction::GetAlpha2(double* palpha2, GaussTria* gauss,int vxenum,int vyenum,int vzenum){
++/*FUNCTION Friction::GetAlpha2(IssmDouble* palpha2, GaussTria* gauss,int vxenum,int vyenum,int vzenum){{{*/
++void Friction::GetAlpha2(IssmDouble* palpha2, GaussTria* gauss,int vxenum,int vyenum,int vzenum){
+ 
+ 	/*This routine calculates the basal friction coefficient 
+ 	  alpha2= drag^2 * Neff ^r * vel ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p**/
+ 
+ 	/*diverse: */
+-	double  r,s;
+-	double  drag_p, drag_q;
+-	double  gravity,rho_ice,rho_water;
+-	double  Neff;
+-	double  thickness,bed;
+-	double  vx,vy,vz,vmag;
+-	double  drag_coefficient;
+-	double  alpha2;
++	IssmDouble  r,s;
++	IssmDouble  drag_p, drag_q;
++	IssmDouble  gravity,rho_ice,rho_water;
++	IssmDouble  Neff;
++	IssmDouble  thickness,bed;
++	IssmDouble  vx,vy,vz,vmag;
++	IssmDouble  drag_coefficient;
++	IssmDouble  alpha2;
+ 
+ 	/*Recover parameters: */
+ 	inputs->GetInputValue(&drag_p,FrictionPEnum);
+@@ -118,21 +118,21 @@
+ 	*palpha2=alpha2;
+ }
+ /*}}}*/
+-/*FUNCTION Friction::GetAlpha2(double* palpha2, GaussPenta* gauss,int vxenum,int vyenum,int vzenum){{{*/
+-void Friction::GetAlpha2(double* palpha2, GaussPenta* gauss,int vxenum,int vyenum,int vzenum){
++/*FUNCTION Friction::GetAlpha2(IssmDouble* palpha2, GaussPenta* gauss,int vxenum,int vyenum,int vzenum){{{*/
++void Friction::GetAlpha2(IssmDouble* palpha2, GaussPenta* gauss,int vxenum,int vyenum,int vzenum){
+ 
+ 	/*This routine calculates the basal friction coefficient 
+ 	  alpha2= drag^2 * Neff ^r * vel ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p**/
+ 
+ 	/*diverse: */
+-	double  r,s;
+-	double  drag_p, drag_q;
+-	double  gravity,rho_ice,rho_water;
+-	double  Neff;
+-	double  thickness,bed;
+-	double  vx,vy,vz,vmag;
+-	double  drag_coefficient;
+-	double  alpha2;
++	IssmDouble  r,s;
++	IssmDouble  drag_p, drag_q;
++	IssmDouble  gravity,rho_ice,rho_water;
++	IssmDouble  Neff;
++	IssmDouble  thickness,bed;
++	IssmDouble  vx,vy,vz,vmag;
++	IssmDouble  drag_coefficient;
++	IssmDouble  alpha2;
+ 
+ 	/*Recover parameters: */
+ 	inputs->GetInputValue(&drag_p,FrictionPEnum);
+@@ -182,8 +182,8 @@
+ 	*palpha2=alpha2;
+ }
+ /*}}}*/
+-/*FUNCTION Friction::GetAlphaComplement(double* palpha_complement, GaussTria* gauss,int vxenum,int vyenum,int vzenum) {{{*/
+-void Friction::GetAlphaComplement(double* palpha_complement, GaussTria* gauss,int vxenum,int vyenum,int vzenum){
++/*FUNCTION Friction::GetAlphaComplement(IssmDouble* palpha_complement, GaussTria* gauss,int vxenum,int vyenum,int vzenum) {{{*/
++void Friction::GetAlphaComplement(IssmDouble* palpha_complement, GaussTria* gauss,int vxenum,int vyenum,int vzenum){
+ 
+ 	/* FrictionGetAlpha2 computes alpha2= drag^2 * Neff ^r * vel ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p. 
+ 	 * FrictionGetAlphaComplement is used in control methods on drag, and it computes: 
+@@ -191,14 +191,14 @@
+ 
+ 	/*diverse: */
+ 	int     i;
+-	double  r,s;
+-	double  vx,vy,vz,vmag;
+-	double  drag_p,drag_q;
+-	double  Neff;
+-	double  drag_coefficient;
+-	double  bed,thickness;
+-	double  gravity,rho_ice,rho_water;
+-	double  alpha_complement;
++	IssmDouble  r,s;
++	IssmDouble  vx,vy,vz,vmag;
++	IssmDouble  drag_p,drag_q;
++	IssmDouble  Neff;
++	IssmDouble  drag_coefficient;
++	IssmDouble  bed,thickness;
++	IssmDouble  gravity,rho_ice,rho_water;
++	IssmDouble  alpha_complement;
+ 
+ 	/*Recover parameters: */
+ 	inputs->GetInputValue(&drag_p,FrictionPEnum);
+@@ -248,8 +248,8 @@
+ 	*palpha_complement=alpha_complement;
+ }
+ /*}}}*/
+-/*FUNCTION Friction::GetAlphaComplement(double* palpha_complement, GaussPenta* gauss,int vxenum,int vyenum,int vzenum) {{{*/
+-void Friction::GetAlphaComplement(double* palpha_complement, GaussPenta* gauss,int vxenum,int vyenum,int vzenum){
++/*FUNCTION Friction::GetAlphaComplement(IssmDouble* palpha_complement, GaussPenta* gauss,int vxenum,int vyenum,int vzenum) {{{*/
++void Friction::GetAlphaComplement(IssmDouble* palpha_complement, GaussPenta* gauss,int vxenum,int vyenum,int vzenum){
+ 
+ 	/* FrictionGetAlpha2 computes alpha2= drag^2 * Neff ^r * vel ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p. 
+ 	 * FrictionGetAlphaComplement is used in control methods on drag, and it computes: 
+@@ -257,14 +257,14 @@
+ 
+ 	/*diverse: */
+ 	int     i;
+-	double  r,s;
+-	double  vx,vy,vz,vmag;
+-	double  drag_p,drag_q;
+-	double  Neff;
+-	double  drag_coefficient;
+-	double  bed,thickness;
+-	double  gravity,rho_ice,rho_water;
+-	double  alpha_complement;
++	IssmDouble  r,s;
++	IssmDouble  vx,vy,vz,vmag;
++	IssmDouble  drag_p,drag_q;
++	IssmDouble  Neff;
++	IssmDouble  drag_coefficient;
++	IssmDouble  bed,thickness;
++	IssmDouble  gravity,rho_ice,rho_water;
++	IssmDouble  alpha_complement;
+ 
+ 	/*Recover parameters: */
+ 	inputs->GetInputValue(&drag_p,FrictionPEnum);
+@@ -315,7 +315,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Friction::GetInputValue{{{*/
+-void Friction::GetInputValue(double* pvalue,GaussTria* gauss,int enum_type){
++void Friction::GetInputValue(IssmDouble* pvalue,GaussTria* gauss,int enum_type){
+ 
+ 	Input* input=inputs->GetInput(enum_type);
+ 	if(!input) _error_("input %s not found",EnumToStringx(enum_type));
+@@ -324,7 +324,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Friction::GetInputValue{{{*/
+-void Friction::GetInputValue(double* pvalue,GaussPenta* gauss,int enum_type){
++void Friction::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int enum_type){
+ 
+ 	Input* input=inputs->GetInput(enum_type);
+ 	if(!input) _error_("input %s not found",EnumToStringx(enum_type));
Index: /issm/oecreview/Archive/12321-12677/ISSM-12424-12425.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12424-12425.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12424-12425.diff	(revision 12679)
@@ -0,0 +1,19 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/vim/addons/vim/syntax/c.vim
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/vim/addons/vim/syntax/c.vim	(revision 12424)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/vim/addons/vim/syntax/c.vim	(revision 12425)
+@@ -403,11 +403,11 @@
+ "   please try to keep the alphabetical ordering                                                                    "
+ """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+ "ISSM containers:
+-syn keyword	cType		Constraints DataSet Elements Inputs Loads Materials Nodes Parameters Results Vertices
++syn keyword	cType		Constraints DataSet Elements Inputs Loads Materials Nodes Parameters Results Vertices Options
+ "Petsc
+-syn keyword	cType		Vec Mat
++syn keyword	cType		Vec Mat SeqVec SeqMat
+ "other ISSM's syntax
+-syn keyword	cType		mxArray ErrorException
++syn keyword	cType		mxArray ErrorException QuadtreeBox IssmDouble IssmPDouble
+ 
+ "ISSM's objects begin
+ syn keyword cType objects.h
Index: /issm/oecreview/Archive/12321-12677/ISSM-12425-12426.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12425-12426.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12425-12426.diff	(revision 12679)
@@ -0,0 +1,2164 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12426)
+@@ -17,7 +17,7 @@
+ 
+ 	public:
+ 		int    enum_type;
+-		double value;
++		IssmPDouble value;
+ 
+ 		/*DoubleInput constructors, destructors: {{{*/
+ 		DoubleInput();
+@@ -38,45 +38,45 @@
+ 		Input* PointwiseDivide(Input* inputB);
+ 		Input* PointwiseMin(Input* inputB);
+ 		Input* PointwiseMax(Input* inputB);
+-		ElementResult* SpawnResult(int step, double time);
+-		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
++		ElementResult* SpawnResult(int step, IssmPDouble time);
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue);
+ 		void GetInputValue(int* pvalue);
+-		void GetInputValue(double* pvalue);
+-		void GetInputValue(double* pvalue,GaussTria* gauss);
+-		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss);
+-		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
+-		void GetInputAverage(double* pvalue);
+-		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss);
+-		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss);
+-		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss);
+-		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss);
+-		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss);
+-		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss);
+-		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss);
++		void GetInputValue(IssmPDouble* pvalue);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputAverage(IssmPDouble* pvalue);
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
+ 		void ChangeEnum(int newenumtype);
+-		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(double minimum);
+-		void Scale(double scale_factor);
+-		void ArtificialNoise(double min,double max){_error_("not implemented yet");};
+-		void AXPY(Input* xinput,double scalar);
+-		void Constrain(double cm_min, double cm_max);
+-		double InfinityNorm(void){_error_("not implemented yet");};
+-		double Max(void);
+-		double MaxAbs(void);
+-		double Min(void);
+-		double MinAbs(void);
++		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
++		void ConstrainMin(IssmPDouble minimum);
++		void Scale(IssmPDouble scale_factor);
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
++		void AXPY(Input* xinput,IssmPDouble scalar);
++		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
++		IssmPDouble InfinityNorm(void){_error_("not implemented yet");};
++		IssmPDouble Max(void);
++		IssmPDouble MaxAbs(void);
++		IssmPDouble Min(void);
++		IssmPDouble MinAbs(void);
+ 		void Extrude(void){_error_("not supported yet");};
+ 		void VerticallyIntegrate(Input* thickness_input);
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(double** pvalues,int* pnum_values);
++		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12426)
+@@ -27,8 +27,8 @@
+ 	gradient    = NULL;
+ }
+ /*}}}*/
+-/*FUNCTION ControlInput::ControlInput(int enum_type,int enum_input,double* pvalues,double* pmin,double* pmax,int id){{{*/
+-ControlInput::ControlInput(int in_enum_type,int enum_input,double* pvalues,double* pmin,double* pmax,int id){
++/*FUNCTION ControlInput::ControlInput(int enum_type,int enum_input,IssmPDouble* pvalues,IssmPDouble* pmin,IssmPDouble* pmax,int id){{{*/
++ControlInput::ControlInput(int in_enum_type,int enum_input,IssmPDouble* pvalues,IssmPDouble* pmin,IssmPDouble* pmax,int id){
+ 
+ 	control_id=id;
+ 	enum_type=in_enum_type;
+@@ -135,8 +135,8 @@
+ 	newvalues=this->values->PointwiseMax(minvalues);
+ 	delete values; this->values=newvalues;
+ }/*}}}*/
+-/*FUNCTION ControlInput::Constrain(double min, double max){{{*/
+-void ControlInput::Constrain(double min, double max){
++/*FUNCTION ControlInput::Constrain(IssmPDouble min, IssmPDouble max){{{*/
++void ControlInput::Constrain(IssmPDouble min, IssmPDouble max){
+ 	   values->Constrain(min,max);
+ }/*}}}*/
+ /*FUNCTION ControlInput::Extrude{{{*/
+@@ -150,7 +150,7 @@
+ 	if(gradient) gradient->GetVectorFromInputs(gradient_vec,doflist);
+ }/*}}}*/
+ /*FUNCTION ControlInput::ScaleGradient{{{*/
+-void ControlInput::ScaleGradient(double scaling_factor){
++void ControlInput::ScaleGradient(IssmPDouble scaling_factor){
+ 	if(!gradient) _error_("Gradient of ControlInput %s not found",EnumToStringx(enum_type));
+ 	gradient->Scale(scaling_factor);
+ }/*}}}*/
+@@ -185,7 +185,7 @@
+ 
+ }/*}}}*/
+ /*FUNCTION ControlInput::SpawnResult{{{*/
+-ElementResult* ControlInput::SpawnResult(int step, double time){
++ElementResult* ControlInput::SpawnResult(int step, IssmPDouble time){
+ 	return savedvalues->SpawnResult(step,time);
+ }/*}}}*/
+ /*FUNCTION ControlInput::SpawnTriaInput{{{*/
+@@ -193,7 +193,7 @@
+ 	return values->SpawnTriaInput(indices);
+ }/*}}}*/
+ /*FUNCTION ControlInput::SpawnGradient{{{*/
+-ElementResult* ControlInput::SpawnGradient(int step, double time){
++ElementResult* ControlInput::SpawnGradient(int step, IssmPDouble time){
+ 	_assert_(gradient);
+ 	return gradient->SpawnResult(step,time);
+ }/*}}}*/
+@@ -223,8 +223,8 @@
+ 		 _error_("Data %s not supported yet",data);
+ 	 }
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputAverage(double* pvalue){{{*/
+-void ControlInput::GetInputAverage(double* pvalue){
++/*FUNCTION ControlInput::GetInputAverage(IssmPDouble* pvalue){{{*/
++void ControlInput::GetInputAverage(IssmPDouble* pvalue){
+ 	values->GetInputAverage(pvalue);
+ }/*}}}*/
+ /*FUNCTION ControlInput::GetInputValue(bool* pvalue){{{*/
+@@ -235,24 +235,24 @@
+ void ControlInput::GetInputValue(int* pvalue){
+ 	values->GetInputValue(pvalue);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputValue(double* pvalue){{{*/
+-void ControlInput::GetInputValue(double* pvalue){
++/*FUNCTION ControlInput::GetInputValue(IssmPDouble* pvalue){{{*/
++void ControlInput::GetInputValue(IssmPDouble* pvalue){
+ 	values->GetInputValue(pvalue);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputValue(double* pvalue){{{*/
+-void ControlInput::GetInputValue(double* pvalue,GaussTria* gauss){
++/*FUNCTION ControlInput::GetInputValue(IssmPDouble* pvalue){{{*/
++void ControlInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){
+ 	values->GetInputValue(pvalue,gauss);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputValue(double* pvalue){{{*/
+-void ControlInput::GetInputValue(double* pvalue,GaussPenta* gauss){
++/*FUNCTION ControlInput::GetInputValue(IssmPDouble* pvalue){{{*/
++void ControlInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){
+ 	values->GetInputValue(pvalue,gauss);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{*/
+-void ControlInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){
++/*FUNCTION ControlInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void ControlInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){
+ 	values->GetInputDerivativeValue(derivativevalues,xyz_list,gauss);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{*/
+-void ControlInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){
++/*FUNCTION ControlInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void ControlInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	values->GetInputDerivativeValue(derivativevalues,xyz_list,gauss);
+ }/*}}}*/
+ /*FUNCTION ControlInput::SaveValue{{{*/
+@@ -263,7 +263,7 @@
+ 	this->savedvalues=(Input*)this->values->copy();
+ }/*}}}*/
+ /*FUNCTION ControlInput::UpdateValue{{{*/
+-void ControlInput::UpdateValue(double scalar){
++void ControlInput::UpdateValue(IssmPDouble scalar){
+ 	if(!gradient)    _error_("Gradient of %s not found",EnumToStringx(this->enum_type));
+ 	if(!savedvalues) _error_("Values of %s not found",EnumToStringx(this->enum_type));
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/Input.h	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/Input.h	(revision 12426)
+@@ -24,46 +24,46 @@
+ 		virtual int  InstanceEnum()=0; 
+ 		virtual void GetInputValue(bool* pvalue)=0;
+ 		virtual void GetInputValue(int* pvalue)=0;
+-		virtual void GetInputValue(double* pvalue)=0;
+-		virtual void GetInputValue(double* pvalue,GaussTria* gauss)=0;
+-		virtual void GetInputValue(double* pvalue,GaussTria* gauss,double time)=0;
+-		virtual void GetInputValue(double* pvalue,GaussPenta* gauss)=0;
+-		virtual void GetInputValue(double* pvalue,GaussTria* gauss ,int index)=0;
+-		virtual void GetInputValue(double* pvalue,GaussPenta* gauss,int index)=0;
+-		virtual void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss)=0;
+-		virtual void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetInputAverage(double* pvalue)=0;
+-		virtual void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss)=0;
+-		virtual void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss)=0;
+-		virtual void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetInputValue(IssmPDouble* pvalue)=0;
++		virtual void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss)=0;
++		virtual void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time)=0;
++		virtual void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss)=0;
++		virtual void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index)=0;
++		virtual void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss,int index)=0;
++		virtual void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss)=0;
++		virtual void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetInputAverage(IssmPDouble* pvalue)=0;
++		virtual void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss)=0;
++		virtual void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss)=0;
++		virtual void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
+ 		virtual void ChangeEnum(int newenumtype)=0;
+ 		virtual void Configure(Parameters* parameters)=0;
+ 
+-		virtual void   SquareMin(double* psquaremin, bool process_units,Parameters* parameters)=0;
+-		virtual void   ConstrainMin(double minimum)=0;
+-		virtual double InfinityNorm(void)=0;
+-		virtual double MaxAbs(void)=0;
+-		virtual double MinAbs(void)=0;
+-		virtual double Max(void)=0;
+-		virtual double Min(void)=0;
+-		virtual void   Scale(double scale_factor)=0;
+-		virtual void   ArtificialNoise(double min,double max)=0;
+-		virtual void   AXPY(Input* xinput,double scalar)=0;
+-		virtual void   Constrain(double cm_min, double cm_max)=0;
++		virtual void   SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters)=0;
++		virtual void   ConstrainMin(IssmPDouble minimum)=0;
++		virtual IssmPDouble InfinityNorm(void)=0;
++		virtual IssmPDouble MaxAbs(void)=0;
++		virtual IssmPDouble MinAbs(void)=0;
++		virtual IssmPDouble Max(void)=0;
++		virtual IssmPDouble Min(void)=0;
++		virtual void   Scale(IssmPDouble scale_factor)=0;
++		virtual void   ArtificialNoise(IssmPDouble min,IssmPDouble max)=0;
++		virtual void   AXPY(Input* xinput,IssmPDouble scalar)=0;
++		virtual void   Constrain(IssmPDouble cm_min, IssmPDouble cm_max)=0;
+ 		virtual void   VerticallyIntegrate(Input* thickness_input)=0;
+ 		virtual void   Extrude()=0;
+ 		virtual void   GetVectorFromInputs(Vector* vector,int* doflist)=0;
+-		virtual void   GetValuesPtr(double** pvalues,int* pnum_values)=0;
++		virtual void   GetValuesPtr(IssmPDouble** pvalues,int* pnum_values)=0;
+ 		
+ 		virtual Input* SpawnTriaInput(int* indices)=0;
+ 		virtual Input* PointwiseDivide(Input* inputB)=0;
+ 		virtual Input* PointwiseMax(Input* inputmax)=0;
+ 		virtual Input* PointwiseMin(Input* inputmin)=0;
+-		virtual ElementResult* SpawnResult(int step, double time)=0;
++		virtual ElementResult* SpawnResult(int step, IssmPDouble time)=0;
+ 
+ 		/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12426)
+@@ -26,7 +26,7 @@
+ 
+ 		/*ControlInput constructors, destructors: {{{*/
+ 		ControlInput();
+-		ControlInput(int enum_type,int enum_input,double* pvalues,double* pmin,double* pmax,int id);
++		ControlInput(int enum_type,int enum_input,IssmPDouble* pvalues,IssmPDouble* pmin,IssmPDouble* pmax,int id);
+ 		~ControlInput();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -43,53 +43,53 @@
+ 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+ 		Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
+ 		Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
+-		ElementResult* SpawnResult(int step, double time);
+-		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
++		ElementResult* SpawnResult(int step, IssmPDouble time);
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void SetInput(Input* in_input);
+ 		void GetInputValue(bool* pvalue);
+ 		void GetInputValue(int* pvalue);
+-		void GetInputValue(double* pvalue);
+-		void GetInputValue(double* pvalue,GaussTria* gauss);
+-		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss);
+-		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
+-		void GetInputAverage(double* pvalue);
+-		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputAverage(IssmPDouble* pvalue);
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype){_error_("not implemented yet");};
+-		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters){_error_("not implemented yet");};
+-		void ConstrainMin(double minimum){_error_("not implemented yet");};
+-		void Scale(double scale_factor){_error_("not implemented yet");};
+-		void ArtificialNoise(double min,double max){_error_("not implemented yet");};
+-		void AXPY(Input* xinput,double scalar){_error_("not implemented yet");};
++		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){_error_("not implemented yet");};
++		void ConstrainMin(IssmPDouble minimum){_error_("not implemented yet");};
++		void Scale(IssmPDouble scale_factor){_error_("not implemented yet");};
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
++		void AXPY(Input* xinput,IssmPDouble scalar){_error_("not implemented yet");};
+ 		void Constrain(void);
+-		void Constrain(double min,double max);
+-		double InfinityNorm(void){_error_("not implemented yet");};
+-		double Max(void){_error_("not implemented yet");};
+-		double MaxAbs(void){_error_("not implemented yet");};
+-		double Min(void){_error_("not implemented yet");};
+-		double MinAbs(void){_error_("not implemented yet");};
++		void Constrain(IssmPDouble min,IssmPDouble max);
++		IssmPDouble InfinityNorm(void){_error_("not implemented yet");};
++		IssmPDouble Max(void){_error_("not implemented yet");};
++		IssmPDouble MaxAbs(void){_error_("not implemented yet");};
++		IssmPDouble Min(void){_error_("not implemented yet");};
++		IssmPDouble MinAbs(void){_error_("not implemented yet");};
+ 		void Extrude(void);
+ 		void VerticallyIntegrate(Input* thickness_input);
+ 		void GetVectorFromInputs(Vector* vector,int* doflist,const char* data);
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(double** pvalues,int* pnum_values){_error_("not implemented yet");};
+-		ElementResult* SpawnGradient(int step, double time);
++		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){_error_("not implemented yet");};
++		ElementResult* SpawnGradient(int step, IssmPDouble time);
+ 		void GetGradient(Vector* gradient_vec,int* doflist);
+-		void ScaleGradient(double scale);
++		void ScaleGradient(IssmPDouble scale);
+ 		void SetGradient(Input* gradient_in);
+-		void UpdateValue(double scalar);
++		void UpdateValue(IssmPDouble scalar);
+ 		void SaveValue(void);
+ 		/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp	(revision 12426)
+@@ -110,8 +110,8 @@
+ 	/*do nothing: */
+ }
+ /*}}}*/
+-/*FUNCTION DatasetInput::GetInputValue(double* pvalue,GaussTria* gauss,int index){{{*/
+-void DatasetInput::GetInputValue(double* pvalue,GaussTria* gauss,int index){
++/*FUNCTION DatasetInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,int index){{{*/
++void DatasetInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,int index){
+ 
+ 	/*Get requested input within dataset*/
+ 	if(index<0 || index > inputs->Size()-1) _error_("index requested (%i) exceeds dataset size (%i)",index,inputs->Size());
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12426)
+@@ -39,51 +39,51 @@
+ 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+ 		Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
+ 		Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
+-		ElementResult* SpawnResult(int step, double time){_error_("not implemented yet");};
+-		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
++		ElementResult* SpawnResult(int step, IssmPDouble time){_error_("not implemented yet");};
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numeriics: {{{*/
+ 		void GetInputValue(bool* pvalue){_error_("not implemented yet");};
+ 		void GetInputValue(int* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussTria* gauss){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussTria* gauss ,int index);
+-		void GetInputValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetInputAverage(double* pvalue){_error_("not implemented yet");};
+-		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index);
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputAverage(IssmPDouble* pvalue){_error_("not implemented yet");};
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype){_error_("not implemented yet");};
+-		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters){_error_("not implemented yet");};
+-		void ConstrainMin(double minimum){_error_("not implemented yet");};
+-		void Scale(double scale_factor){_error_("not implemented yet");};
+-		void ArtificialNoise(double min,double max){_error_("not implemented yet");};
+-		void AXPY(Input* xinput,double scalar){_error_("not implemented yet");};
++		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){_error_("not implemented yet");};
++		void ConstrainMin(IssmPDouble minimum){_error_("not implemented yet");};
++		void Scale(IssmPDouble scale_factor){_error_("not implemented yet");};
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
++		void AXPY(Input* xinput,IssmPDouble scalar){_error_("not implemented yet");};
+ 		void Constrain(void){_error_("not implemented yet");};
+-		void Constrain(double min,double max){_error_("not implemented yet");};
+-		double InfinityNorm(void){_error_("not implemented yet");};
+-		double Max(void){_error_("not implemented yet");};
+-		double MaxAbs(void){_error_("not implemented yet");};
+-		double Min(void){_error_("not implemented yet");};
+-		double MinAbs(void){_error_("not implemented yet");};
++		void Constrain(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
++		IssmPDouble InfinityNorm(void){_error_("not implemented yet");};
++		IssmPDouble Max(void){_error_("not implemented yet");};
++		IssmPDouble MaxAbs(void){_error_("not implemented yet");};
++		IssmPDouble Min(void){_error_("not implemented yet");};
++		IssmPDouble MinAbs(void){_error_("not implemented yet");};
+ 		void Extrude(void){_error_("not implemented yet");};
+ 		void VerticallyIntegrate(Input* thickness_input){_error_("not implemented yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist){_error_("not implemented yet");};
+-		void GetValuesPtr(double** pvalues,int* pnum_values){_error_("not implemented yet");};
+-		ElementResult* SpawnGradient(int step, double time){_error_("not implemented yet");};
++		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){_error_("not implemented yet");};
++		ElementResult* SpawnGradient(int step, IssmPDouble time){_error_("not implemented yet");};
+ 		void GetGradient(Vector* gradient_vec,int* doflist){_error_("not implemented yet");};
+-		void ScaleGradient(double scale){_error_("not implemented yet");};
++		void ScaleGradient(IssmPDouble scale){_error_("not implemented yet");};
+ 		void SetGradient(Input* gradient_in){_error_("not implemented yet");};
+-		void UpdateValue(double scalar){_error_("not implemented yet");};
++		void UpdateValue(IssmPDouble scalar){_error_("not implemented yet");};
+ 		void SaveValue(void){_error_("not implemented yet");};
+ 		/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12426)
+@@ -22,7 +22,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::IntInput(double* values){{{*/
++/*FUNCTION IntInput::IntInput(IssmPDouble* values){{{*/
+ IntInput::IntInput(int in_enum_type,IssmInt in_value){
+ 
+ 	enum_type=in_enum_type;
+@@ -96,7 +96,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::SpawnResult{{{*/
+-ElementResult* IntInput::SpawnResult(int step, double time){
++ElementResult* IntInput::SpawnResult(int step, IssmPDouble time){
+ 	
+ 	_error_(" not supported yet!");
+ 
+@@ -112,22 +112,22 @@
+ 	*pvalue=value;
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputValue(double* pvalue){{{*/
+-void IntInput::GetInputValue(double* pvalue){
+-	_error_("IntInput cannot return a double in parallel");
++/*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue){{{*/
++void IntInput::GetInputValue(IssmPDouble* pvalue){
++	_error_("IntInput cannot return a IssmPDouble in parallel");
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputValue(double* pvalue,GaussTria* gauss){{{*/
+-void IntInput::GetInputValue(double* pvalue,GaussTria* gauss){_error_(" not supported yet!");}
++/*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
++void IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputValue(double* pvalue,GaussPenta* gauss){{{*/
+-void IntInput::GetInputValue(double* pvalue,GaussPenta* gauss){_error_(" not supported yet!");}
++/*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
++void IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{*/
+-void IntInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
++/*FUNCTION IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{*/
+-void IntInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
++/*FUNCTION IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION IntInput::ChangeEnum{{{*/
+ void IntInput::ChangeEnum(int newenumtype){
+@@ -135,22 +135,22 @@
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::SquareMin{{{*/
+-void IntInput::SquareMin(double* psquaremin, bool process_units,Parameters* parameters){
++void IntInput::SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){
+ 
+ 	/*square min of an integer is the square of the integer itself: */
+-	*psquaremin=pow((double)value,2);
++	*psquaremin=pow((IssmPDouble)value,2);
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::Scale{{{*/
+-void IntInput::Scale(double scale_factor){
+-	double dvalue=(double)value*scale_factor;
++void IntInput::Scale(IssmPDouble scale_factor){
++	IssmPDouble dvalue=(IssmPDouble)value*scale_factor;
+ 	value=(int)dvalue;
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::AXPY{{{*/
+-void IntInput::AXPY(Input* xinput,double scalar){
++void IntInput::AXPY(Input* xinput,IssmPDouble scalar){
+ 
+-	double dvalue;
++	IssmPDouble dvalue;
+ 	IntInput*  xintinput=NULL;
+ 
+ 	/*xinput is of the same type, so cast it: */
+@@ -160,7 +160,7 @@
+ 	switch(xinput->ObjectEnum()){
+ 
+ 		case IntInputEnum:
+-			dvalue=(double)this->value+scalar*(double)xintinput->value;
++			dvalue=(IssmPDouble)this->value+scalar*(IssmPDouble)xintinput->value;
+ 			this->value=(int)dvalue;
+ 			return;
+ 
+@@ -171,7 +171,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::Constrain{{{*/
+-void IntInput::Constrain(double cm_min, double cm_max){
++void IntInput::Constrain(IssmPDouble cm_min, IssmPDouble cm_max){
+ 
+ 	if(!isnan(cm_min)) if (this->value<cm_min)this->value=(int)cm_min;
+ 	if(!isnan(cm_max)) if (this->value>cm_max)this->value=(int)cm_max;
+@@ -186,7 +186,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::GetValuesPtr{{{*/
+-void IntInput::GetValuesPtr(double** pvalues,int* pnum_values){
++void IntInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
+ 
+ 	_error_(" not supported yet!");
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12426)
+@@ -22,7 +22,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::BoolInput(double* values){{{*/
++/*FUNCTION BoolInput::BoolInput(IssmPDouble* values){{{*/
+ BoolInput::BoolInput(int in_enum_type,IssmBool in_value){
+ 
+ 	enum_type=in_enum_type;
+@@ -97,7 +97,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::SpawnResult{{{*/
+-ElementResult* BoolInput::SpawnResult(int step, double time){
++ElementResult* BoolInput::SpawnResult(int step, IssmPDouble time){
+ 	
+ 	return new BoolElementResult(this->enum_type,this->value,step,time);
+ 
+@@ -113,20 +113,20 @@
+ /*FUNCTION BoolInput::GetInputValue(int* pvalue){{{*/
+ void BoolInput::GetInputValue(int* pvalue){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputValue(double* pvalue){{{*/
+-void BoolInput::GetInputValue(double* pvalue){_error_(" not supported yet!");}
++/*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue){{{*/
++void BoolInput::GetInputValue(IssmPDouble* pvalue){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputValue(double* pvalue,GaussTria* gauss){{{*/
+-void BoolInput::GetInputValue(double* pvalue,GaussTria* gauss){_error_(" not supported yet!");}
++/*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
++void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputValue(double* pvalue,GaussPenta* gauss){{{*/
+-void BoolInput::GetInputValue(double* pvalue,GaussPenta* gauss){_error_(" not supported yet!");}
++/*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
++void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{*/
+-void BoolInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
++/*FUNCTION BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{*/
+-void BoolInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
++/*FUNCTION BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::ChangeEnum{{{*/
+ void BoolInput::ChangeEnum(int newenumtype){
+@@ -134,18 +134,18 @@
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::SquareMin{{{*/
+-void BoolInput::SquareMin(double* psquaremin, bool process_units,Parameters* parameters){
++void BoolInput::SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){
+ 	/*square of a bool is the bool itself: */
+ 	*psquaremin=value;
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::Scale{{{*/
+-void BoolInput::Scale(double scale_factor){
++void BoolInput::Scale(IssmPDouble scale_factor){
+ 	/*a bool cannot be scaled: */
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::AXPY{{{*/
+-void BoolInput::AXPY(Input* xinput,double scalar){
++void BoolInput::AXPY(Input* xinput,IssmPDouble scalar){
+ 
+ 	BoolInput*  xboolinput=NULL;
+ 
+@@ -166,7 +166,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::Constrain{{{*/
+-void BoolInput::Constrain(double cm_min, double cm_max){
++void BoolInput::Constrain(IssmPDouble cm_min, IssmPDouble cm_max){
+ 
+ 	if(!isnan(cm_min)) if (this->value<cm_min)this->value=cm_min;
+ 	if(!isnan(cm_max)) if (this->value>cm_max)this->value=cm_max;
+@@ -188,7 +188,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::GetValuesPtr{{{*/
+-void BoolInput::GetValuesPtr(double** pvalues,int* pnum_values){
++void BoolInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
+ 
+ 	_error_(" not supported yet!");
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12426)
+@@ -39,45 +39,45 @@
+ 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+ 		Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
+ 		Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
+-		ElementResult* SpawnResult(int step, double time);
+-		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
++		ElementResult* SpawnResult(int step, IssmPDouble time);
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue);
+ 		void GetInputValue(int* pvalue);
+-		void GetInputValue(double* pvalue);
+-		void GetInputValue(double* pvalue,GaussTria* gauss);
+-		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss);
+-		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
+-		void GetInputAverage(double* pvalue){_error_("not implemented yet");};
+-		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputAverage(IssmPDouble* pvalue){_error_("not implemented yet");};
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+-		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(double minimum){_error_("not implemented yet");};
+-		void Scale(double scale_factor);
+-		void ArtificialNoise(double min,double max){_error_("not implemented yet");};
+-		void AXPY(Input* xinput,double scalar);
+-		void Constrain(double cm_min, double cm_max);
+-		double InfinityNorm(void){_error_("InfinityNorm not implemented for integers");};
+-		double Max(void){_error_("Max not implemented for integers");};
+-		double MaxAbs(void){_error_("Max not implemented for integers");};
+-		double Min(void){_error_("Min not implemented for integers");};
+-		double MinAbs(void){_error_("Min not implemented for integers");};
++		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
++		void ConstrainMin(IssmPDouble minimum){_error_("not implemented yet");};
++		void Scale(IssmPDouble scale_factor);
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
++		void AXPY(Input* xinput,IssmPDouble scalar);
++		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
++		IssmPDouble InfinityNorm(void){_error_("InfinityNorm not implemented for integers");};
++		IssmPDouble Max(void){_error_("Max not implemented for integers");};
++		IssmPDouble MaxAbs(void){_error_("Max not implemented for integers");};
++		IssmPDouble Min(void){_error_("Min not implemented for integers");};
++		IssmPDouble MinAbs(void){_error_("Min not implemented for integers");};
+ 		void Extrude(void){_error_("not supported yet");};
+ 		void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(double** pvalues,int* pnum_values);
++		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12426)
+@@ -39,45 +39,45 @@
+ 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+ 		Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
+ 		Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
+-		ElementResult* SpawnResult(int step, double time);
++		ElementResult* SpawnResult(int step, IssmPDouble time);
+ 		void Configure(Parameters* parameters);
+-		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue);
+ 		void GetInputValue(int* pvalue);
+-		void GetInputValue(double* pvalue);
+-		void GetInputValue(double* pvalue,GaussTria* gauss);
+-		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss);
+-		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
+-		void GetInputAverage(double* pvalue){_error_("not implemented yet");};
+-		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputAverage(IssmPDouble* pvalue){_error_("not implemented yet");};
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+-		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(double minimum){_error_("not implemented yet");};
+-		double InfinityNorm(void){_error_("InfinityNorm not implemented for booleans");};
+-		double Max(void){_error_("Max not implemented for booleans");};
+-		double MaxAbs(void){_error_("Max not implemented for booleans");};
+-		double Min(void){_error_("Min not implemented for booleans");};
+-		double MinAbs(void){_error_("Min not implemented for booleans");};
+-		void Scale(double scale_factor);
+-		void ArtificialNoise(double min,double max){_error_("not implemented yet");};
+-		void AXPY(Input* xinput,double scalar);
+-		void Constrain(double cm_min, double cm_max);
++		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
++		void ConstrainMin(IssmPDouble minimum){_error_("not implemented yet");};
++		IssmPDouble InfinityNorm(void){_error_("InfinityNorm not implemented for booleans");};
++		IssmPDouble Max(void){_error_("Max not implemented for booleans");};
++		IssmPDouble MaxAbs(void){_error_("Max not implemented for booleans");};
++		IssmPDouble Min(void){_error_("Min not implemented for booleans");};
++		IssmPDouble MinAbs(void){_error_("Min not implemented for booleans");};
++		void Scale(IssmPDouble scale_factor);
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
++		void AXPY(Input* xinput,IssmPDouble scalar);
++		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
+ 		void Extrude(void);
+ 		void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(double** pvalues,int* pnum_values);
++		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12426)
+@@ -22,8 +22,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::TriaP1Input(int in_enum_type,double* values){{{*/
+-TriaP1Input::TriaP1Input(int in_enum_type,double* in_values)
++/*FUNCTION TriaP1Input::TriaP1Input(int in_enum_type,IssmPDouble* values){{{*/
++TriaP1Input::TriaP1Input(int in_enum_type,IssmPDouble* in_values)
+ 	:TriaRef(1)
+ {
+ 
+@@ -107,7 +107,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::SpawnResult{{{*/
+-ElementResult* TriaP1Input::SpawnResult(int step, double time){
++ElementResult* TriaP1Input::SpawnResult(int step, IssmPDouble time){
+ 
+ 	return new TriaP1ElementResult(this->enum_type,this->values,step,time);
+ 
+@@ -115,29 +115,29 @@
+ /*}}}*/
+ 
+ /*Object functions*/
+-/*FUNCTION TriaP1Input::GetInputValue(double* pvalue,GaussTria* gauss){{{*/
+-void TriaP1Input::GetInputValue(double* pvalue,GaussTria* gauss){
++/*FUNCTION TriaP1Input::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
++void TriaP1Input::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){
+ 
+ 	/*Call TriaRef function*/
+ 	TriaRef::GetInputValue(pvalue,&values[0],gauss);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::GetInputDerivativeValue(double* p, double* xyz_list, GaussTria* gauss){{{*/
+-void TriaP1Input::GetInputDerivativeValue(double* p, double* xyz_list, GaussTria* gauss){
++/*FUNCTION TriaP1Input::GetInputDerivativeValue(IssmPDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void TriaP1Input::GetInputDerivativeValue(IssmPDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*Call TriaRef function*/
+ 	TriaRef::GetInputDerivativeValue(p,&values[0],xyz_list,gauss);
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::GetVxStrainRate2d{{{*/
+-void TriaP1Input::GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){
++void TriaP1Input::GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*Intermediary*/
+ 	int       i;
+ 	const int numnodes=3;
+-	double B[3][NDOF2*numnodes];
+-	double velocity[3][NDOF2];
++	IssmPDouble B[3][NDOF2*numnodes];
++	IssmPDouble velocity[3][NDOF2];
+ 
+ 	/*Get B matrix: */
+ 	GetBMacAyeal(&B[0][0], xyz_list, gauss);
+@@ -154,13 +154,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::GetVyStrainRate2d{{{*/
+-void TriaP1Input::GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){
++void TriaP1Input::GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*Intermediary*/
+ 	int       i;
+ 	const int numnodes=3;
+-	double B[3][NDOF2*numnodes];
+-	double velocity[3][NDOF2];
++	IssmPDouble B[3][NDOF2*numnodes];
++	IssmPDouble velocity[3][NDOF2];
+ 
+ 	/*Get B matrix: */
+ 	GetBMacAyeal(&B[0][0], xyz_list, gauss);
+@@ -182,19 +182,19 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::GetInputAverage{{{*/
+-void TriaP1Input::GetInputAverage(double* pvalue){
++void TriaP1Input::GetInputAverage(IssmPDouble* pvalue){
+ 	*pvalue=1./3.*(values[0]+values[1]+values[2]);
+ }
+ /*}}}*/
+ 
+ /*Intermediary*/
+ /*FUNCTION TriaP1Input::SquareMin{{{*/
+-void TriaP1Input::SquareMin(double* psquaremin, bool process_units,Parameters* parameters){
++void TriaP1Input::SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){
+ 
+ 	int i;
+ 	const int numnodes=3;
+-	double valuescopy[numnodes];
+-	double squaremin;
++	IssmPDouble valuescopy[numnodes];
++	IssmPDouble squaremin;
+ 
+ 	/*First,  copy values, to process units if requested: */
+ 	for(i=0;i<numnodes;i++)valuescopy[i]=this->values[i];
+@@ -212,7 +212,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::ContrainMin{{{*/
+-void TriaP1Input::ConstrainMin(double minimum){
++void TriaP1Input::ConstrainMin(IssmPDouble minimum){
+ 	
+ 	int i;
+ 	const int numnodes=3;
+@@ -221,10 +221,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::InfinityNorm{{{*/
+-double TriaP1Input::InfinityNorm(void){
++IssmPDouble TriaP1Input::InfinityNorm(void){
+ 
+ 	/*Output*/
+-	double norm=0;
++	IssmPDouble norm=0;
+ 	const int numnodes=3;
+ 
+ 	for(int i=0;i<numnodes;i++) if(fabs(values[i])>norm) norm=fabs(values[i]);
+@@ -232,10 +232,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::Max{{{*/
+-double TriaP1Input::Max(void){
++IssmPDouble TriaP1Input::Max(void){
+ 
+ 	const int numnodes=3;
+-	double    max=values[0];
++	IssmPDouble    max=values[0];
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(values[i]>max) max=values[i];
+@@ -244,10 +244,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::MaxAbs{{{*/
+-double TriaP1Input::MaxAbs(void){
++IssmPDouble TriaP1Input::MaxAbs(void){
+ 
+ 	const int numnodes=3;
+-	double    max=fabs(values[0]);
++	IssmPDouble    max=fabs(values[0]);
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(fabs(values[i])>max) max=fabs(values[i]);
+@@ -256,10 +256,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::Min{{{*/
+-double TriaP1Input::Min(void){
++IssmPDouble TriaP1Input::Min(void){
+ 
+ 	const int numnodes=3;
+-	double    min=values[0];
++	IssmPDouble    min=values[0];
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(values[i]<min) min=values[i];
+@@ -268,10 +268,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::MinAbs{{{*/
+-double TriaP1Input::MinAbs(void){
++IssmPDouble TriaP1Input::MinAbs(void){
+ 
+ 	const int numnodes=3;
+-	double    min=fabs(values[0]);
++	IssmPDouble    min=fabs(values[0]);
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(fabs(values[i])<min) min=fabs(values[i]);
+@@ -280,7 +280,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::Scale{{{*/
+-void TriaP1Input::Scale(double scale_factor){
++void TriaP1Input::Scale(IssmPDouble scale_factor){
+ 	
+ 	int i;
+ 	const int numnodes=3;
+@@ -289,23 +289,23 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::ArtificialNoise{{{*/
+-void TriaP1Input::ArtificialNoise(double min,double max){
++void TriaP1Input::ArtificialNoise(IssmPDouble min,IssmPDouble max){
+ 
+ 	int i;
+ 	const int numnodes=3;
+-	double noise;
++	IssmPDouble noise;
+ 
+ 	/*Compute random number between bounds:
+ 	 * rand() outputs an integer in [0 RAND_MAX]
+-	 * (double)rand()/RAND_MAX is in [0 1]
++	 * (IssmPDouble)rand()/RAND_MAX is in [0 1]
+ 	 */
+-	 noise=min+(max-min)*(double)rand()/RAND_MAX;
++	 noise=min+(max-min)*(IssmPDouble)rand()/RAND_MAX;
+ 
+ 	for(i=0;i<numnodes;i++)values[i]=values[i]+noise;
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::AXPY{{{*/
+-void TriaP1Input::AXPY(Input* xinput,double scalar){
++void TriaP1Input::AXPY(Input* xinput,IssmPDouble scalar){
+ 
+ 	int i;
+ 	const int numnodes=3;
+@@ -328,7 +328,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::Constrain{{{*/
+-void TriaP1Input::Constrain(double cm_min, double cm_max){
++void TriaP1Input::Constrain(IssmPDouble cm_min, IssmPDouble cm_max){
+ 
+ 	int i;
+ 	const int numnodes=3;
+@@ -346,7 +346,7 @@
+ 
+ } /*}}}*/
+ /*FUNCTION TriaP1Input::GetValuesPtr{{{*/
+-void TriaP1Input::GetValuesPtr(double** pvalues,int* pnum_values){
++void TriaP1Input::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
+ 
+ 	*pvalues=this->values;
+ 	if(pnum_values)*pnum_values=3;
+@@ -364,7 +364,7 @@
+ 	TriaP1Input *xinputB     = NULL;
+ 	int               B_numvalues;
+ 	const int         numnodes    = 3;
+-	double            minvalues[numnodes];
++	IssmPDouble            minvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (inputB->ObjectEnum()!=TriaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
+@@ -395,7 +395,7 @@
+ 	TriaP1Input *xinputB     = NULL;
+ 	int               B_numvalues;
+ 	const int         numnodes    = 3;
+-	double            maxvalues[numnodes];
++	IssmPDouble            maxvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (inputB->ObjectEnum()!=TriaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12426)
+@@ -18,11 +18,11 @@
+ 	public:
+ 		/*just hold 3 values for 3 vertices: */
+ 		int    enum_type;
+-		double values[3];
++		IssmPDouble values[3];
+ 
+ 		/*TriaP1Input constructors, destructors: {{{*/
+ 		TriaP1Input();
+-		TriaP1Input(int enum_type,double* values);
++		TriaP1Input(int enum_type,IssmPDouble* values);
+ 		~TriaP1Input();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -39,46 +39,46 @@
+ 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+ 		Input* PointwiseMin(Input* inputB);
+ 		Input* PointwiseMax(Input* inputB);
+-		ElementResult* SpawnResult(int step, double time);
+-		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
++		ElementResult* SpawnResult(int step, IssmPDouble time);
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue){_error_("not implemented yet");}
+ 		void GetInputValue(int* pvalue){_error_("not implemented yet");}
+-		void GetInputValue(double* pvalue){_error_("not implemented yet");}
+-		void GetInputValue(double* pvalue,GaussTria* gauss);
+-		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss,int index){_error_("not implemented yet");};
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetInputAverage(double* pvalue);
+-		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss);
+-		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss);
+-		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue){_error_("not implemented yet");}
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss,int index){_error_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputAverage(IssmPDouble* pvalue);
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+ 
+-		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(double minimum);
+-		void Scale(double scale_factor);
+-		void ArtificialNoise(double min,double max);
+-		void AXPY(Input* xinput,double scalar);
+-		void Constrain(double cm_min, double cm_max);
+-		double InfinityNorm(void);
+-		double Max(void);
+-		double MaxAbs(void);
+-		double Min(void);
+-		double MinAbs(void);
++		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
++		void ConstrainMin(IssmPDouble minimum);
++		void Scale(IssmPDouble scale_factor);
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max);
++		void AXPY(Input* xinput,IssmPDouble scalar);
++		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
++		IssmPDouble InfinityNorm(void);
++		IssmPDouble Max(void);
++		IssmPDouble MaxAbs(void);
++		IssmPDouble Min(void);
++		IssmPDouble MinAbs(void);
+ 		void Extrude(void){_error_("not supported yet");};
+ 		void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(double** pvalues,int* pnum_values);
++		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12426)
+@@ -99,8 +99,8 @@
+ 	output = new TransientInput();
+ 	output->enum_type=this->enum_type;
+ 	output->numtimesteps=this->numtimesteps;
+-	output->timesteps=(double*)xmalloc(this->numtimesteps*sizeof(double));
+-   memcpy(output->timesteps,this->timesteps,this->numtimesteps*sizeof(double));
++	output->timesteps=(IssmPDouble*)xmalloc(this->numtimesteps*sizeof(IssmPDouble));
++   memcpy(output->timesteps,this->timesteps,this->numtimesteps*sizeof(IssmPDouble));
+ 	output->inputs=(Inputs*)this->inputs->Copy();
+ 	output->parameters=this->parameters;
+ 
+@@ -127,8 +127,8 @@
+ 	outinput=new TransientInput();
+ 	outinput->enum_type=this->enum_type;
+ 	outinput->numtimesteps=this->numtimesteps;
+-	outinput->timesteps=(double*)xmalloc(this->numtimesteps*sizeof(double));
+-	memcpy(outinput->timesteps,this->timesteps,this->numtimesteps*sizeof(double));
++	outinput->timesteps=(IssmPDouble*)xmalloc(this->numtimesteps*sizeof(IssmPDouble));
++	memcpy(outinput->timesteps,this->timesteps,this->numtimesteps*sizeof(IssmPDouble));
+ 	outinput->inputs=(Inputs*)this->inputs->SpawnTriaInputs(indices);
+ 	outinput->parameters=this->parameters;
+ 
+@@ -138,7 +138,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::SpawnResult{{{*/
+-ElementResult* TransientInput::SpawnResult(int step, double time){
++ElementResult* TransientInput::SpawnResult(int step, IssmPDouble time){
+ 
+ 	ElementResult* elementresult=NULL;
+ 
+@@ -155,9 +155,9 @@
+ /*}}}*/
+ 
+ /*Object functions*/
+-/*FUNCTION TransientInput::GetInputValue(double* pvalue,GaussTria* gauss){{{*/
+-void TransientInput::GetInputValue(double* pvalue,GaussTria* gauss){
+-	double time;
++/*FUNCTION TransientInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
++void TransientInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){
++	IssmPDouble time;
+ 
+ 	/*First, recover current time from parameters: */
+ 	this->parameters->FindParam(&time,TimeEnum);
+@@ -171,8 +171,8 @@
+ 	delete input;
+ }
+ /*}}}*/
+-/*FUNCTION TransientInput::GetInputValue(double* pvalue,GaussTria* gauss,double time){{{*/
+-void TransientInput::GetInputValue(double* pvalue,GaussTria* gauss,double time){
++/*FUNCTION TransientInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){{{*/
++void TransientInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){
+ 
+ 	/*Retrieve interpolated values for this time step: */
+ 	Input* input=GetTimeInput(time);
+@@ -183,10 +183,10 @@
+ 	delete input;
+ }
+ /*}}}*/
+-/*FUNCTION TransientInput::GetInputDerivativeValue(double* p, double* xyz_list, GaussTria* gauss){{{*/
+-void TransientInput::GetInputDerivativeValue(double* p, double* xyz_list, GaussTria* gauss){
++/*FUNCTION TransientInput::GetInputDerivativeValue(IssmPDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void TransientInput::GetInputDerivativeValue(IssmPDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){
+ 
+-	double time;
++	IssmPDouble time;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -207,9 +207,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::GetInputAverage{{{*/
+-void TransientInput::GetInputAverage(double* pvalue){
++void TransientInput::GetInputAverage(IssmPDouble* pvalue){
+ 	
+-	double time;
++	IssmPDouble time;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -227,25 +227,25 @@
+ 
+ /*Intermediary*/
+ /*FUNCTION TransientInput::AddTimeInput{{{*/
+-void TransientInput::AddTimeInput(Input* input,double time){
++void TransientInput::AddTimeInput(Input* input,IssmPDouble time){
+ 
+ 	/*insert values at time step: */
+ 	if (this->numtimesteps>0 && time<=this->timesteps[this->numtimesteps-1]) _assert_("timestep values must increase sequentially");
+ 
+ 	//copy timesteps, add the new time, delete previous timesteps, and add the new input: inputs->AddObject(input);
+-	double* old_timesteps=NULL;
++	IssmPDouble* old_timesteps=NULL;
+ 
+ 	if (this->numtimesteps > 0){
+-		old_timesteps=(double*)xmalloc(this->numtimesteps*sizeof(double));
+-		memcpy(old_timesteps,this->timesteps,this->numtimesteps*sizeof(double));
++		old_timesteps=(IssmPDouble*)xmalloc(this->numtimesteps*sizeof(IssmPDouble));
++		memcpy(old_timesteps,this->timesteps,this->numtimesteps*sizeof(IssmPDouble));
+ 		xfree((void**)&this->timesteps); 
+ 	}
+ 
+ 	this->numtimesteps=this->numtimesteps+1;
+-	this->timesteps=(double*)xmalloc(this->numtimesteps*sizeof(double));
++	this->timesteps=(IssmPDouble*)xmalloc(this->numtimesteps*sizeof(IssmPDouble));
+ 
+ 	if (this->numtimesteps > 1){
+-		memcpy(this->timesteps,old_timesteps,(this->numtimesteps-1)*sizeof(double));
++		memcpy(this->timesteps,old_timesteps,(this->numtimesteps-1)*sizeof(IssmPDouble));
+ 		xfree((void**)&old_timesteps);
+ 	}
+ 
+@@ -256,9 +256,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::SquareMin{{{*/
+-void TransientInput::SquareMin(double* psquaremin, bool process_units,Parameters* parameters){
++void TransientInput::SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){
+ 
+-	double time;
++	IssmPDouble time;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -274,10 +274,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::InfinityNorm{{{*/
+-double TransientInput::InfinityNorm(void){
++IssmPDouble TransientInput::InfinityNorm(void){
+ 
+-	double time;
+-	double infnorm;
++	IssmPDouble time;
++	IssmPDouble infnorm;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -294,10 +294,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::Max{{{*/
+-double TransientInput::Max(void){
++IssmPDouble TransientInput::Max(void){
+ 
+-	double time;
+-	double max;
++	IssmPDouble time;
++	IssmPDouble max;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -314,10 +314,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::MaxAbs{{{*/
+-double TransientInput::MaxAbs(void){
++IssmPDouble TransientInput::MaxAbs(void){
+ 
+-	double time;
+-	double maxabs;
++	IssmPDouble time;
++	IssmPDouble maxabs;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -335,10 +335,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::Min{{{*/
+-double TransientInput::Min(void){
++IssmPDouble TransientInput::Min(void){
+ 
+-	double time;
+-	double min;
++	IssmPDouble time;
++	IssmPDouble min;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -356,10 +356,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::MinAbs{{{*/
+-double TransientInput::MinAbs(void){
++IssmPDouble TransientInput::MinAbs(void){
+ 
+-	double time;
+-	double minabs;
++	IssmPDouble time;
++	IssmPDouble minabs;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -378,7 +378,7 @@
+ /*FUNCTION TransientInput::GetVectorFromInputs{{{*/
+ void TransientInput::GetVectorFromInputs(Vector* vector,int* doflist){
+ 
+-	double time;
++	IssmPDouble time;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -393,11 +393,11 @@
+ 
+ } /*}}}*/
+ /*FUNCTION TransientInput::GetTimeInput{{{*/
+-Input* TransientInput::GetTimeInput(double intime){
++Input* TransientInput::GetTimeInput(IssmPDouble intime){
+ 
+ 	int     i,j;
+-	double  deltat;
+-	double  alpha1,alpha2;
++	IssmPDouble  deltat;
++	IssmPDouble  alpha1,alpha2;
+ 	bool    found=false;
+ 	Input*  input=NULL;
+ 	Input*  input1=NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12426)
+@@ -22,8 +22,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::PentaP1Input(int in_enum_type,double* values){{{*/
+-PentaP1Input::PentaP1Input(int in_enum_type,double* in_values)
++/*FUNCTION PentaP1Input::PentaP1Input(int in_enum_type,IssmPDouble* values){{{*/
++PentaP1Input::PentaP1Input(int in_enum_type,IssmPDouble* in_values)
+ 		:PentaRef(1)
+ {
+ 
+@@ -97,7 +97,7 @@
+ 
+ 	/*output*/
+ 	TriaP1Input* outinput=NULL;
+-	double newvalues[3];
++	IssmPDouble newvalues[3];
+ 
+ 	/*Loop over the new indices*/
+ 	for(int i=0;i<3;i++){
+@@ -118,7 +118,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::SpawnResult{{{*/
+-ElementResult* PentaP1Input::SpawnResult(int step, double time){
++ElementResult* PentaP1Input::SpawnResult(int step, IssmPDouble time){
+ 
+ 	return new PentaP1ElementResult(this->enum_type,this->values,step,time);
+ 
+@@ -126,30 +126,30 @@
+ /*}}}*/
+ 
+ /*Object functions*/
+-/*FUNCTION PentaP1Input::GetInputValue(double* pvalue,GaussPenta* gauss){{{*/
+-void PentaP1Input::GetInputValue(double* pvalue,GaussPenta* gauss){
++/*FUNCTION PentaP1Input::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
++void PentaP1Input::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){
+ 
+ 	/*Call PentaRef function*/
+ 	PentaRef::GetInputValue(pvalue,&values[0],gauss);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::GetInputDerivativeValue(double* p, double* xyz_list, GaussPenta* gauss){{{*/
+-void PentaP1Input::GetInputDerivativeValue(double* p, double* xyz_list, GaussPenta* gauss){
++/*FUNCTION PentaP1Input::GetInputDerivativeValue(IssmPDouble* p, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void PentaP1Input::GetInputDerivativeValue(IssmPDouble* p, IssmPDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	/*Call PentaRef function*/
+ 	PentaRef::GetInputDerivativeValue(p,&values[0],xyz_list,gauss);
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVxStrainRate3d{{{*/
+-void PentaP1Input::GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	int i,j;
+ 
+ 	const int numnodes=6;
+ 	const int DOFVELOCITY=3;
+-	double B[8][27];
+-	double B_reduced[6][DOFVELOCITY*numnodes];
+-	double velocity[numnodes][DOFVELOCITY];
++	IssmPDouble B[8][27];
++	IssmPDouble B_reduced[6][DOFVELOCITY*numnodes];
++	IssmPDouble velocity[numnodes][DOFVELOCITY];
+ 
+ 	/*Get B matrix: */
+ 	GetBStokes(&B[0][0], xyz_list, gauss);
+@@ -187,14 +187,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVyStrainRate3d{{{*/
+-void PentaP1Input::GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	int i,j;
+ 
+ 	const int numnodes=6;
+ 	const int DOFVELOCITY=3;
+-	double B[8][27];
+-	double B_reduced[6][DOFVELOCITY*numnodes];
+-	double velocity[numnodes][DOFVELOCITY];
++	IssmPDouble B[8][27];
++	IssmPDouble B_reduced[6][DOFVELOCITY*numnodes];
++	IssmPDouble velocity[numnodes][DOFVELOCITY];
+ 
+ 	/*Get B matrix: */
+ 	GetBStokes(&B[0][0], xyz_list, gauss);
+@@ -232,14 +232,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVzStrainRate3d{{{*/
+-void PentaP1Input::GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	int i,j;
+ 
+ 	const int numnodes=6;
+ 	const int DOFVELOCITY=3;
+-	double B[8][27];
+-	double B_reduced[6][DOFVELOCITY*numnodes];
+-	double velocity[numnodes][DOFVELOCITY];
++	IssmPDouble B[8][27];
++	IssmPDouble B_reduced[6][DOFVELOCITY*numnodes];
++	IssmPDouble velocity[numnodes][DOFVELOCITY];
+ 
+ 	/*Get B matrix: */
+ 	GetBStokes(&B[0][0], xyz_list, gauss);
+@@ -278,12 +278,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVxStrainRate3dPattyn{{{*/
+-void PentaP1Input::GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	int i;
+ 	const int numnodes=6;
+-	double B[5][NDOF2*numnodes];
+-	double velocity[numnodes][NDOF2];
++	IssmPDouble B[5][NDOF2*numnodes];
++	IssmPDouble velocity[numnodes][NDOF2];
+ 
+ 	/*Get B matrix: */
+ 	GetBPattyn(&B[0][0], xyz_list, gauss);
+@@ -302,12 +302,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVyStrainRate3dPattyn{{{*/
+-void PentaP1Input::GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	int i;
+ 	const int numnodes=6;
+-	double B[5][NDOF2*numnodes];
+-	double velocity[numnodes][NDOF2];
++	IssmPDouble B[5][NDOF2*numnodes];
++	IssmPDouble velocity[numnodes][NDOF2];
+ 
+ 	/*Get B matrix: */
+ 	GetBPattyn(&B[0][0], xyz_list, gauss);
+@@ -331,19 +331,19 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetInputAverage{{{*/
+-void PentaP1Input::GetInputAverage(double* pvalue){
++void PentaP1Input::GetInputAverage(IssmPDouble* pvalue){
+ 	*pvalue=1./6.*(values[0]+values[1]+values[2]+values[3]+values[4]+values[5]);
+ }
+ /*}}}*/
+ 
+ /*Intermediary*/
+ /*FUNCTION PentaP1Input::SquareMin{{{*/
+-void PentaP1Input::SquareMin(double* psquaremin, bool process_units,Parameters* parameters){
++void PentaP1Input::SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){
+ 
+ 	int i;
+ 	const int numnodes=6;
+-	double valuescopy[numnodes];
+-	double squaremin;
++	IssmPDouble valuescopy[numnodes];
++	IssmPDouble squaremin;
+ 
+ 	/*First,  copy values, to process units if requested: */
+ 	for(i=0;i<numnodes;i++)valuescopy[i]=this->values[i];
+@@ -361,7 +361,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::ConstrainMin{{{*/
+-void PentaP1Input::ConstrainMin(double minimum){
++void PentaP1Input::ConstrainMin(IssmPDouble minimum){
+ 	
+ 	int i;
+ 	const int numnodes=6;
+@@ -370,21 +370,21 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::InfinityNorm{{{*/
+-double PentaP1Input::InfinityNorm(void){
++IssmPDouble PentaP1Input::InfinityNorm(void){
+ 
+ 	/*Output*/
+ 	const int numnodes=6;
+-	double norm=0;
++	IssmPDouble norm=0;
+ 
+ 	for(int i=0;i<numnodes;i++) if(fabs(values[i])>norm) norm=fabs(values[i]);
+ 	return norm;
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::Max{{{*/
+-double PentaP1Input::Max(void){
++IssmPDouble PentaP1Input::Max(void){
+ 
+ 	const int numnodes=6;
+-	double    max=values[0];
++	IssmPDouble    max=values[0];
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(values[i]>max) max=values[i];
+@@ -393,10 +393,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::MaxAbs{{{*/
+-double PentaP1Input::MaxAbs(void){
++IssmPDouble PentaP1Input::MaxAbs(void){
+ 
+ 	const int numnodes=6;
+-	double    max=fabs(values[0]);
++	IssmPDouble    max=fabs(values[0]);
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(fabs(values[i])>max) max=fabs(values[i]);
+@@ -405,10 +405,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::Min{{{*/
+-double PentaP1Input::Min(void){
++IssmPDouble PentaP1Input::Min(void){
+ 
+ 	const int numnodes=6;
+-	double    min=values[0];
++	IssmPDouble    min=values[0];
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(values[i]<min) min=values[i];
+@@ -417,10 +417,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::MinAbs{{{*/
+-double PentaP1Input::MinAbs(void){
++IssmPDouble PentaP1Input::MinAbs(void){
+ 
+ 	const int numnodes=6;
+-	double    min=fabs(values[0]);
++	IssmPDouble    min=fabs(values[0]);
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(fabs(values[i])<min) min=fabs(values[i]);
+@@ -429,7 +429,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::Scale{{{*/
+-void PentaP1Input::Scale(double scale_factor){
++void PentaP1Input::Scale(IssmPDouble scale_factor){
+ 	
+ 	int i;
+ 	const int numnodes=6;
+@@ -438,7 +438,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::AXPY{{{*/
+-void PentaP1Input::AXPY(Input* xinput,double scalar){
++void PentaP1Input::AXPY(Input* xinput,IssmPDouble scalar){
+ 
+ 	int i;
+ 	const int numnodes=6;
+@@ -465,7 +465,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::Constrain{{{*/
+-void PentaP1Input::Constrain(double cm_min, double cm_max){
++void PentaP1Input::Constrain(IssmPDouble cm_min, IssmPDouble cm_max){
+ 
+ 	int i;
+ 	const int numnodes=6;
+@@ -491,7 +491,7 @@
+ 	int i;
+ 	const int  numnodes = 6;
+ 	int        num_thickness_values;
+-	double    *thickness_values = NULL;
++	IssmPDouble    *thickness_values = NULL;
+ 
+ 	/*Check that input provided is a thickness*/
+ 	if (thickness_input->InstanceEnum()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is %s)",EnumToStringx(thickness_input->InstanceEnum()));
+@@ -525,7 +525,7 @@
+ 	PentaP1Input *xinputB     = NULL;
+ 	int               B_numvalues;
+ 	const int         numnodes    = 6;
+-	double            AdotBvalues[numnodes];
++	IssmPDouble            AdotBvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (inputB->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
+@@ -556,7 +556,7 @@
+ 	PentaP1Input *xinputB     = NULL;
+ 	int               B_numvalues;
+ 	const int         numnodes    = 6;
+-	double            minvalues[numnodes];
++	IssmPDouble            minvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (inputB->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
+@@ -587,7 +587,7 @@
+ 	PentaP1Input *xinputB     = NULL;
+ 	int               B_numvalues;
+ 	const int         numnodes    = 6;
+-	double            maxvalues[numnodes];
++	IssmPDouble            maxvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (inputB->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
+@@ -615,7 +615,7 @@
+ 
+ } /*}}}*/
+ /*FUNCTION PentaP1Input::GetValuesPtr{{{*/
+-void PentaP1Input::GetValuesPtr(double** pvalues,int* pnum_values){
++void PentaP1Input::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
+ 
+ 	*pvalues=this->values;
+ 	*pnum_values=6;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12426)
+@@ -22,7 +22,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::DoubleInput(double value){{{*/
++/*FUNCTION DoubleInput::DoubleInput(IssmPDouble value){{{*/
+ DoubleInput::DoubleInput(int in_enum_type,IssmDouble in_value){
+ 
+ 	enum_type=in_enum_type;
+@@ -97,7 +97,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::SpawnResult{{{*/
+-ElementResult* DoubleInput::SpawnResult(int step, double time){
++ElementResult* DoubleInput::SpawnResult(int step, IssmPDouble time){
+ 
+ 	return new DoubleElementResult(this->enum_type,this->value,step,time);
+ 
+@@ -117,63 +117,63 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputValue(double* pvalue){{{*/
+-void DoubleInput::GetInputValue(double* pvalue){
++/*FUNCTION DoubleInput::GetInputValue(IssmPDouble* pvalue){{{*/
++void DoubleInput::GetInputValue(IssmPDouble* pvalue){
+ 
+ 	/*return value*/
+ 	*pvalue=value;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputValue(double* pvalue,GaussTria* gauss){{{*/
+-void DoubleInput::GetInputValue(double* pvalue,GaussTria* gauss){*pvalue=this->value;}
++/*FUNCTION DoubleInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
++void DoubleInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){*pvalue=this->value;}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputValue(double* pvalue,GaussPenta* gauss){{{*/
+-void DoubleInput::GetInputValue(double* pvalue,GaussPenta* gauss){*pvalue=this->value;}
++/*FUNCTION DoubleInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
++void DoubleInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){*pvalue=this->value;}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){{{*/
+-void DoubleInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
++/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
++/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){{{*/
+-void DoubleInput::GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){
++/*FUNCTION DoubleInput::GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void DoubleInput::GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){
+ 	/*Epsilon is zero as vx is constant over the element*/
+ 	for(int i=0;i<3;i++) epsilonvx[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){{{*/
+-void DoubleInput::GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){
++/*FUNCTION DoubleInput::GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void DoubleInput::GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){
+ 	/*Epsilon is zero as vy is constant over the element*/
+ 	for(int i=0;i<3;i++) epsilonvy[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vx is constant over the element*/
+ 	for(int i=0;i<6;i++) epsilonvx[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vy is constant over the element*/
+ 	for(int i=0;i<6;i++) epsilonvy[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vz is constant over the element*/
+ 	for(int i=0;i<6;i++) epsilonvz[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vx is constant over the element*/
+ 	for(int i=0;i<5;i++) epsilonvx[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vy is constant over the element*/
+ 	for(int i=0;i<5;i++) epsilonvy[i]=0;
+ }
+@@ -184,35 +184,35 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::SquareMin{{{*/
+-void DoubleInput::SquareMin(double* psquaremin, bool process_units,Parameters* parameters){
++void DoubleInput::SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){
+ 
+-	/*square min of a double is the square of the double itself: */
++	/*square min of a IssmPDouble is the square of the IssmPDouble itself: */
+ 	*psquaremin=pow(value,2);
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::Scale{{{*/
+-void DoubleInput::Scale(double scale_factor){
++void DoubleInput::Scale(IssmPDouble scale_factor){
+ 	value=value*scale_factor;
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::ConstrainMin{{{*/
+-void DoubleInput::ConstrainMin(double minimum){
++void DoubleInput::ConstrainMin(IssmPDouble minimum){
+ 	if (value<minimum) value=minimum;
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::AXPY{{{*/
+-void DoubleInput::AXPY(Input* xinput,double scalar){
++void DoubleInput::AXPY(Input* xinput,IssmPDouble scalar){
+ 
+-	DoubleInput*  xdoubleinput=NULL;
++	DoubleInput*  xIssmPDoubleinput=NULL;
+ 
+ 	/*xinput is of the same type, so cast it: */
+-	xdoubleinput=(DoubleInput*)xinput;
++	xIssmPDoubleinput=(DoubleInput*)xinput;
+ 
+ 	/*Carry out the AXPY operation depending on type:*/
+ 	switch(xinput->ObjectEnum()){
+ 
+ 		case DoubleInputEnum:
+-			this->value=this->value+scalar*xdoubleinput->value;
++			this->value=this->value+scalar*xIssmPDoubleinput->value;
+ 			return;
+ 
+ 		default:
+@@ -222,7 +222,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::Constrain{{{*/
+-void DoubleInput::Constrain(double cm_min, double cm_max){
++void DoubleInput::Constrain(IssmPDouble cm_min, IssmPDouble cm_max){
+ 
+ 	if(!isnan(cm_min)) if (this->value<cm_min)this->value=cm_min;
+ 	if(!isnan(cm_max)) if (this->value>cm_max)this->value=cm_max;
+@@ -230,22 +230,22 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::Max{{{*/
+-double DoubleInput::Max(void){
++IssmPDouble DoubleInput::Max(void){
+ 	return this->value;
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::MaxAbs{{{*/
+-double DoubleInput::MaxAbs(void){
++IssmPDouble DoubleInput::MaxAbs(void){
+ 	return fabs(this->value);
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::Min{{{*/
+-double DoubleInput::Min(void){
++IssmPDouble DoubleInput::Min(void){
+ 	return this->value;
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::MinAbs{{{*/
+-double DoubleInput::MinAbs(void){
++IssmPDouble DoubleInput::MinAbs(void){
+ 	return fabs(this->value);
+ }
+ /*}}}*/
+@@ -257,14 +257,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetValuesPtr{{{*/
+-void DoubleInput::GetValuesPtr(double** pvalues,int* pnum_values){
++void DoubleInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
+ 
+ 	_error_(" not supported yet!");
+ 
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetInputAverage{{{*/
+-void DoubleInput::GetInputAverage(double* pvalue){
++void DoubleInput::GetInputAverage(IssmPDouble* pvalue){
+ 	*pvalue=value;
+ }
+ /*}}}*/
+@@ -272,7 +272,7 @@
+ void DoubleInput::VerticallyIntegrate(Input* thickness_input){
+ 
+ 	/*Intermediaries*/
+-	double thickness_value;
++	IssmPDouble thickness_value;
+ 
+ 	/*Check that input provided is a thickness*/
+ 	if (thickness_input->InstanceEnum()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is %s)",EnumToStringx(thickness_input->InstanceEnum()));
+@@ -297,7 +297,7 @@
+ 	DoubleInput* outinput=NULL;
+ 
+ 	/*Intermediaries*/
+-	double       Bvalue;
++	IssmPDouble       Bvalue;
+ 
+ 	/*Check that inputB is of the same type*/
+ 	inputB->GetInputAverage(&Bvalue);
+@@ -317,7 +317,7 @@
+ 	DoubleInput* outinput=NULL;
+ 
+ 	/*Intermediaries*/
+-	double       min;
++	IssmPDouble       min;
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (input->Min() < this->Min()) min=input->Min();
+@@ -338,7 +338,7 @@
+ 	DoubleInput* outinput=NULL;
+ 
+ 	/*Intermediaries*/
+-	double       max;
++	IssmPDouble       max;
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (input->Max() > this->Max()) max=input->Max();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12426)
+@@ -19,14 +19,14 @@
+ 		int     enum_type;
+ 		int     numtimesteps;
+ 		Inputs* inputs;
+-		double* timesteps;
++		IssmPDouble* timesteps;
+ 		Parameters* parameters; //to find current time.
+ 
+ 		/*TransientInput constructors, destructors: {{{*/
+ 		TransientInput();
+ 		TransientInput(int enum_type);
+ 		~TransientInput();
+-		void AddTimeInput(Input* input,double time);
++		void AddTimeInput(Input* input,IssmPDouble time);
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+@@ -42,47 +42,47 @@
+ 		Input* PointwiseDivide(Input* forcingB){_error_("not implemented yet");};
+ 		Input* PointwiseMin(Input* forcingB){_error_("not implemented yet");};
+ 		Input* PointwiseMax(Input* forcingB){_error_("not implemented yet");};
+-		ElementResult* SpawnResult(int step, double time);
++		ElementResult* SpawnResult(int step, IssmPDouble time);
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue){_error_("not implemented yet");};
+ 		void GetInputValue(int* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussTria* gauss);
+-		void GetInputValue(double* pvalue,GaussTria* gauss,double time);
+-		void GetInputValue(double* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetInputAverage(double* pvalue);
+-		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time);
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputAverage(IssmPDouble* pvalue);
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+ 
+-		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(double minimum){_error_("not implemented yet");};
+-		void Scale(double scale_factor){_error_("not implemented yet");};
+-		void ArtificialNoise(double min,double max){_error_("not implemented yet");};
+-		void AXPY(Input* xforcing,double scalar){_error_("not implemented yet");};
+-		void Constrain(double cm_min, double cm_max){_error_("not implemented yet");};
+-		double InfinityNorm(void);
+-		double Max(void);
+-		double MaxAbs(void);
+-		double Min(void);
+-		double MinAbs(void);
++		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
++		void ConstrainMin(IssmPDouble minimum){_error_("not implemented yet");};
++		void Scale(IssmPDouble scale_factor){_error_("not implemented yet");};
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
++		void AXPY(Input* xforcing,IssmPDouble scalar){_error_("not implemented yet");};
++		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max){_error_("not implemented yet");};
++		IssmPDouble InfinityNorm(void);
++		IssmPDouble Max(void);
++		IssmPDouble MaxAbs(void);
++		IssmPDouble Min(void);
++		IssmPDouble MinAbs(void);
+ 		void Extrude(void){_error_("not supported yet");}
+ 		void VerticallyIntegrate(Input* thickness_forcing){_error_("not supported yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(double** pvalues,int* pnum_values){_error_("not supported yet");};
+-      void GetTimeValues(double* values,double time){_error_("not implemented yet");};
+-		Input* GetTimeInput(double time);
++		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){_error_("not supported yet");};
++      void GetTimeValues(IssmPDouble* values,IssmPDouble time){_error_("not implemented yet");};
++		Input* GetTimeInput(IssmPDouble time);
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12425)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12426)
+@@ -18,11 +18,11 @@
+ 	public:
+ 		/*just hold 6 values for 6 vertices: */
+ 		int    enum_type;
+-		double values[6];
++		IssmPDouble values[6];
+ 
+ 		/*PentaP1Input constructors, destructors: {{{*/
+ 		PentaP1Input();
+-		PentaP1Input(int enum_type,double* values);
++		PentaP1Input(int enum_type,IssmPDouble* values);
+ 		~PentaP1Input();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -39,46 +39,46 @@
+ 		Input* PointwiseDivide(Input* inputB);
+ 		Input* PointwiseMin(Input* inputB);
+ 		Input* PointwiseMax(Input* inputB);
+-		ElementResult* SpawnResult(int step, double time);
+-		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
++		ElementResult* SpawnResult(int step, IssmPDouble time);
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue){_error_("not implemented yet");};
+ 		void GetInputValue(int* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussTria* gauss){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussTria* gauss,double time){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss);
+-		void GetInputValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetInputDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
+-		void GetInputAverage(double* pvalue);
+-		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss);
+-		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss);
+-		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss);
+-		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss);
+-		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss);
++		void GetInputValue(IssmPDouble* pvalue){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputAverage(IssmPDouble* pvalue);
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
+ 		void ChangeEnum(int newenumtype);
+ 
+-		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(double minimum);
+-		void Scale(double scale_factor);
+-		void ArtificialNoise(double min,double max){_error_("not implemented yet");};
+-		void AXPY(Input* xinput,double scalar);
+-		void Constrain(double cm_min, double cm_max);
+-		double InfinityNorm(void);
+-		double Max(void);
+-		double MaxAbs(void);
+-		double Min(void);
+-		double MinAbs(void);
++		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
++		void ConstrainMin(IssmPDouble minimum);
++		void Scale(IssmPDouble scale_factor);
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
++		void AXPY(Input* xinput,IssmPDouble scalar);
++		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
++		IssmPDouble InfinityNorm(void);
++		IssmPDouble Max(void);
++		IssmPDouble MaxAbs(void);
++		IssmPDouble Min(void);
++		IssmPDouble MinAbs(void);
+ 		void Extrude(void);
+ 		void VerticallyIntegrate(Input* thickness_input);
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(double** pvalues,int* pnum_values);
++		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
+ 		/*}}}*/
+ 
+ };
Index: /issm/oecreview/Archive/12321-12677/ISSM-12426-12427.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12426-12427.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12426-12427.diff	(revision 12679)
@@ -0,0 +1,30 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/typedefs.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/typedefs.h	(revision 12426)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/typedefs.h	(revision 12427)
+@@ -16,7 +16,6 @@
+ #define NDOF3 3
+ #define NDOF4 4
+ 
+-
+ #define DIM2 2
+ #define DIM3 3
+ 
+@@ -39,7 +38,4 @@
+ 	
+ #endif
+ 
+-
+-
+-
+ #endif //ifndef _ISSMTYPEDEFS_H_
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/types.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/types.h	(revision 12426)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/types.h	(revision 12427)
+@@ -40,5 +40,4 @@
+ 
+ typedef bool IssmBool;
+ 
+-
+ #endif //ifndef _TYPES_H_
Index: /issm/oecreview/Archive/12321-12677/ISSM-12427-12428.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12427-12428.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12427-12428.diff	(revision 12679)
@@ -0,0 +1,29 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp	(revision 12427)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp	(revision 12428)
+@@ -24,7 +24,7 @@
+ 	while(true){
+ 
+ 		/*allocate buffer for given string size*/
+-		buffer=(char*)xmalloc(size*sizeof(char));
++		buffer=xNew<char>(size);
+ 
+ 		/* Try to print in the allocated space. */
+ 		va_start(args, format);
+@@ -44,13 +44,13 @@
+ 		else       /* glibc 2.0 */
+ 		 size*=2;  /* twice the old size */
+ 
+-		xfree((void**)&buffer);
++		xDelete<char>(buffer);
+ 	}
+ 
+ 	/*Ok, if we are running in parallel, get node 0 to print*/
+ 	if(my_rank==0)printf(buffer);
+ 
+ 	/*Clean up and return*/
+-	xfree((void**)&buffer);
++	xDelete<char>(buffer);
+ 	return 1;
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12428-12429.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12428-12429.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12428-12429.diff	(revision 12679)
@@ -0,0 +1,217 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp	(revision 12428)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp	(revision 12429)
+@@ -12,7 +12,7 @@
+ 	/*Our interface originates in the Metis 4.0 version, hence identical calls*/
+ 	METIS_PartMeshNodal(pnumberofelements,pnumberofnodes, index, petype, pnumflag, pnum_procs, pedgecut, epart, npart); 
+ 	#elif _METIS_VERSION_ == 5
+-	/*This interface is heavily changed. More options, different way of meshing, etc ...: */ 
++	/*This interface is heavily changed. More options, different ways of meshing, etc ...: */ 
+ 	int i;
+ 
+ 	idx_t options[METIS_NOPTIONS];
+@@ -21,8 +21,6 @@
+ 	idx_t  k=0;
+ 	real_t* tpwgts=NULL;
+ 
+-
+-
+ 	/*setup options: */
+ 	METIS_SetDefaultOptions(options);
+ 
+@@ -39,27 +37,22 @@
+ 	options[METIS_OPTION_NITER]   = 10;
+ 	options[METIS_OPTION_NCUTS]   = 1;
+ 
+-
+ 	/*create eptr: */
+-	eptr=(idx_t*)xmalloc((*pnumberofelements+1)*sizeof(idx_t));
++	eptr=xNew<idx_t>((*pnumberofelements+1));
+ 	eptr[0]=0;
+ 	for(i=0;i<*pnumberofelements;i++){
+ 		k+=3;
+ 		eptr[i+1]=k;
+ 	}
+ 
+-
+ 	/*create tpwgts: */
+-	tpwgts=(real_t*)xmalloc(*pnum_procs*sizeof(real_t));
++	tpwgts=xNew<real_t>(*pnum_procs);
+ 	for(i=0;i<*pnum_procs;i++){
+ 		tpwgts[i]=1.0/(*pnum_procs);
+ 	}
+ 
+-
+ 	METIS_PartMeshNodal(pnumberofelements,pnumberofnodes, eptr, index,
+-			NULL, NULL, pnum_procs, tpwgts, options, &objval,
+-			epart, npart);
+-	
++			NULL, NULL, pnum_procs, tpwgts, options, &objval,epart, npart);
+ 
+ 	#else
+ 	_error_("METIS version not supported yet");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/mpi/patches/MPI_Boundariesfromrange.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/mpi/patches/MPI_Boundariesfromrange.cpp	(revision 12428)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/mpi/patches/MPI_Boundariesfromrange.cpp	(revision 12429)
+@@ -19,10 +19,9 @@
+ 	int* allranges=NULL;
+ 
+ 	/*Gather all range values into allranges, for all nodes*/
+-	allranges=(int*)xmalloc(num_procs*sizeof(int));
++	allranges=xNew<int>(num_procs);
+ 	MPI_Allgather(&range,1,MPI_INT,allranges,1,MPI_INT,MPI_COMM_WORLD);
+ 
+-
+ 	/*From all ranges, get lower row and upper row*/
+ 	lower_row=0;
+ 	upper_row=lower_row+allranges[0];
+@@ -30,13 +29,10 @@
+ 		lower_row=lower_row+allranges[i-1];
+ 		upper_row=upper_row+allranges[i];
+ 	}
+-	
+-	/*free: */
+-	xfree((void**)&allranges);
+ 
+ 	/*Assign output pointers: */
++	xDelete<double>(allranges);
+ 	*plower_row=lower_row;
+ 	*pupper_row=upper_row;
+-
+ 	return 1;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp	(revision 12428)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp	(revision 12429)
+@@ -4,8 +4,6 @@
+ 
+ #include <stdio.h>
+ #include <math.h>
+-
+-
+ #include "../../../shared/shared.h"
+ 
+ int DetermineLocalSize(int global_size){
+@@ -23,10 +21,9 @@
+ 	extern int my_rank;
+ 	
+ 	/*We are  not bound by any library, just use what seems most logical*/
+-	num_local_rows=(int*)xmalloc(num_procs*sizeof(int));    
++	num_local_rows=xNew<int>(num_procs);    
+ 
+ 	for (i=0;i<num_procs;i++){
+-
+ 		/*Here, we use floor. We under distribute rows. The rows 
+ 		  left  are then redistributed, therefore resulting in a 
+ 		  more even distribution.*/
+@@ -38,11 +35,10 @@
+ 	for (i=0;i<row_rest;i++){
+ 		num_local_rows[i]++;
+ 	}
+-
+ 	local_size=num_local_rows[my_rank];
+ 	
+ 	/*free ressources: */
+-	xfree((void**)&num_local_rows);
++	xDelete<double>(num_local_rows);
+ 
+ 	/*return size: */
+ 	return local_size;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12428)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12429)
+@@ -30,7 +30,7 @@
+ 
+ 	this->M=pM;
+ 	this->vector=NULL;
+-	if(this->M) this->vector=(double*)xcalloc(pM,sizeof(double));
++	if(this->M) this->vector=xNewInit<double>(pM,0.0);
+ }
+ /*}}}*/
+ /*FUNCTION SeqVec::SeqVec(double* serial_vec,int M){{{*/
+@@ -41,14 +41,14 @@
+ 	this->M=pM;
+ 	this->vector=NULL;
+ 	if(this->M){
+-		this->vector=(double*)xcalloc(pM,sizeof(double));
++		this->vector=xNewInit<double>(pM,0.0);
+ 		memcpy(this->vector,buffer,pM*sizeof(double));
+ 	}
+ }
+ /*}}}*/
+ 		/*FUNCTION SeqVec::~SeqVec(){{{*/
+ SeqVec::~SeqVec(){
+-	xfree((void**)&this->vector);
++	xDelete<double>(this->vector);
+ 	M=0;
+ }
+ /*}}}*/
+@@ -169,7 +169,7 @@
+ 	double* buffer=NULL;
+ 
+ 	if(this->M){
+-		buffer=(double*)xmalloc(this->M*sizeof(double));
++		buffer=xNew<double>(this->M);
+ 		memcpy(buffer,this->vector,this->M*sizeof(double));
+ 	}
+ 	return buffer;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12428)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12429)
+@@ -32,7 +32,7 @@
+ 	this->M=pM;
+ 	this->N=pN;
+ 	this->matrix=NULL;
+-	if(M*N) this->matrix=(double*)xcalloc(pM*pN,sizeof(double));
++	if(M*N) this->matrix=xNewInit<double>(pM*pN,0.0);
+ }
+ /*}}}*/
+ /*FUNCTION SeqMat::SeqMat(int M,int N, double sparsity){{{*/
+@@ -41,7 +41,7 @@
+ 	this->M=pM;
+ 	this->N=pN;
+ 	this->matrix=NULL;
+-	if(M*N) this->matrix=(double*)xcalloc(pM*pN,sizeof(double));
++	if(M*N) this->matrix=xNewInit<double>(pM*pN,0.0);
+ }
+ /*}}}*/
+ /*FUNCTION SeqMat(double* serial_mat,int M,int N,double sparsity){{{*/
+@@ -53,7 +53,7 @@
+ 	this->N=pN;
+ 	this->matrix=NULL;
+ 	if(M*N){
+-		this->matrix=(double*)xcalloc(pM*pN,sizeof(double));
++		this->matrix=xNewInit<double>(pM*pN,0.0);
+ 		memcpy(this->matrix,serial_mat,pM*pN*sizeof(double));
+ 	}
+ 
+@@ -65,13 +65,13 @@
+ 	this->M=pM;
+ 	this->N=pN;
+ 	this->matrix=NULL;
+-	if(M*N)this->matrix=(double*)xcalloc(pM*pN,sizeof(double));
++	if(M*N) this->matrix=xNewInit<double>(pM*pN,0.0);
+ }
+ /*}}}*/
+ /*FUNCTION SeqMat::~SeqMat(){{{*/
+ SeqMat::~SeqMat(){
+ 
+-	xfree((void**)&this->matrix);
++	xDelete<double>(this->matrix);
+ 	M=0;
+ 	N=0;
+ }
+@@ -177,7 +177,7 @@
+ 	double* buffer=NULL;
+ 
+ 	if(this->M*this->N){
+-		buffer=(double*)xmalloc(this->M*this->N*sizeof(double));
++		buffer=xNew<double>(this->M*this->N);
+ 		memcpy(buffer,this->matrix,this->M*this->N*sizeof(double));
+ 	}
+ 	return buffer;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12429-12430.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12429-12430.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12429-12430.diff	(revision 12679)
@@ -0,0 +1,26 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/mpi/patches/MPI_Boundariesfromrange.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/mpi/patches/MPI_Boundariesfromrange.cpp	(revision 12429)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/mpi/patches/MPI_Boundariesfromrange.cpp	(revision 12430)
+@@ -31,7 +31,7 @@
+ 	}
+ 
+ 	/*Assign output pointers: */
+-	xDelete<double>(allranges);
++	xDelete<int>(allranges);
+ 	*plower_row=lower_row;
+ 	*pupper_row=upper_row;
+ 	return 1;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp	(revision 12429)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp	(revision 12430)
+@@ -38,7 +38,7 @@
+ 	local_size=num_local_rows[my_rank];
+ 	
+ 	/*free ressources: */
+-	xDelete<double>(num_local_rows);
++	xDelete<int>(num_local_rows);
+ 
+ 	/*return size: */
+ 	return local_size;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12430-12431.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12430-12431.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12430-12431.diff	(revision 12679)
@@ -0,0 +1,474 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/CyclicalFactorization.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/CyclicalFactorization.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/CyclicalFactorization.cpp	(revision 12431)
+@@ -43,7 +43,7 @@
+ 	int prime_factor;
+ 	int i;
+ 
+-	decomp=xmalloc(input*sizeof(int));
++	decomp=xNew<int>(input);
+ 	*decomp=input;
+ 	for (i=0;i<input;i++){
+ 		SmallestPrimeFactor(&prime_factor,*(decomp+i));
+@@ -56,7 +56,6 @@
+ 			*(decomp+i)=prime_factor;
+ 		}
+ 	}
+-
+ 	*pdecomp=decomp;
+ }
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp	(revision 12431)
+@@ -12,15 +12,13 @@
+ /* Some fortran routines: */
+ #include "../../scalapack/FortranMapping.h"
+ 
+-void PlapackInvertMatrixLocalCleanup(PLA_Obj* pa,PLA_Template* ptempl,double** parrayA,
+-		int** pidxnA,MPI_Comm* pcomm_2d);
++void PlapackInvertMatrixLocalCleanup(PLA_Obj* pa,PLA_Template* ptempl,double** parrayA,int** pidxnA,MPI_Comm* pcomm_2d);
+ 	
+ int PlapackInvertMatrix(Mat* A,Mat* inv_A,int status,int con){ 
+-	/*inv_A does not yet exist, inv_A was just xmalloced, that's all*/
++	/*inv_A does not yet exist, inv_A was just allocated, that's all*/
+ 
+ 	/*Error management*/
+ 	int i,j;
+-	
+ 
+ 	/*input*/
+ 	int mA,nA;
+@@ -93,7 +91,6 @@
+ 
+ 	/* Set the datatype */
+ 	datatype = MPI_DOUBLE;
+-
+ 	
+ 	/* Copy A into a*/
+ 	PLA_Matrix_create(datatype,mA,nA,templ,PLA_ALIGN_FIRST,PLA_ALIGN_FIRST,&a);  
+@@ -103,8 +100,8 @@
+ 	MatGetOwnershipRange(*A,&lower_row,&upper_row);
+ 	upper_row--; 
+ 	range=upper_row-lower_row+1;
+-	arrayA=xmalloc(nA*sizeof(double));
+-	idxnA=xmalloc(nA*sizeof(int));
++	arrayA = xNew<double>(nA);
++	idxnA  = xNew<int>(nA);
+ 	for (i=0;i<nA;i++){
+ 		*(idxnA+i)=i;
+ 	}
+@@ -127,11 +124,10 @@
+ 	/*Free ressources:*/
+ 	PLA_Obj_free(&a);
+ 	PLA_Temp_free(&templ);
+-	xfree((void**)&arrayA);
+-	xfree((void**)&idxnA);
++	xDelete<double>(arrayA);
++	xDelete<int>(idxnA);
+ 	
+ 	/*Finalize PLAPACK*/
+ 	PLA_Finalize();
+ 	MPI_Comm_free(&comm_2d);
+-
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/PlapackToPetsc.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/PlapackToPetsc.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/PlapackToPetsc.cpp	(revision 12431)
+@@ -44,8 +44,8 @@
+ 	  matrix into a Petsc Matrix.*/
+ 	
+ 	/*Vector physically based block cyclic distribution: */
+-	row_nodes=xmalloc(mA*sizeof(int));
+-	col_nodes=xmalloc(nA*sizeof(int));
++	row_nodes=xNew<int>(mA);
++	col_nodes=xNew<int>(nA);
+ 	for (i=0;i<mA;i++){
+ 		i0=i/nb;
+ 		*(row_nodes+i)=i0%nprows;
+@@ -59,7 +59,7 @@
+ 	PLA_Temp_comm_row_rank(templ,&mycol);
+ 	PLA_Temp_comm_col_rank(templ,&myrow);
+ 
+-	idxm=xmalloc(mA*sizeof(int));
++	idxm=xNew<int>(mA);
+ 	count=0;
+ 	for (i=0;i<mA;i++){
+ 		if(*(row_nodes+i)==myrow){
+@@ -69,7 +69,7 @@
+ 	}
+ 	idxm_count=count;
+ 
+-	idxn=xmalloc(nA*sizeof(int));
++	idxn=xNew<int>(nA);
+ 	count=0;
+ 	for (i=0;i<nA;i++){
+ 		if(*(col_nodes+i)==mycol){
+@@ -91,8 +91,8 @@
+ 	MatAssemblyEnd(*A,MAT_FINAL_ASSEMBLY);
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&row_nodes);
+-	xfree((void**)&col_nodes);
+-	xfree((void**)&idxm);
+-	xfree((void**)&idxn);
++	xDelete<int>(row_nodes);
++	xDelete<int>(col_nodes);
++	xDelete<int>(idxm);
++	xDelete<int>(idxn);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatMultPatch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatMultPatch.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatMultPatch.cpp	(revision 12431)
+@@ -63,7 +63,7 @@
+ 		result=0;
+ 	}
+ 	else{
+-		result=1;\
++		result=1;
+ 	}
+ 	return result;
+ }
+@@ -88,8 +88,8 @@
+ 	upper_row--;
+ 	range=upper_row-lower_row+1;
+ 	if (range){
+-		index=(int*)xmalloc(range*sizeof(int));
+-		values=(double*)xmalloc(range*sizeof(double));
++		index=xNew<int>(range);
++		values=xNew<double>(range);
+ 		for (int i=0;i<range;i++){
+ 			*(index+i)=lower_row+i;
+ 		}
+@@ -102,8 +102,8 @@
+ 	VecAssemblyEnd(outvector);; 
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&index);
+-	xfree((void**)&values);	
++	xDelete<int>(index);
++	xDelete<double>(values);	
+ 
+ 	/*Assign output pointers:*/
+ 	*poutvector=outvector;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecPartition.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecPartition.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecPartition.cpp	(revision 12431)
+@@ -55,7 +55,7 @@
+ 		range=upper_row-lower_row+1;
+ 
+ 		if (range){
+-			node_rows=(int*)xmalloc(range*sizeof(int)); //this is the maximum number of rows one node can extract.
++			node_rows=xNew<int>(range); //this is the maximum number of rows one node can extract.
+ 		
+ 			count=0;
+ 			for (i=0;i<row_partition_vector_size;i++){
+@@ -70,10 +70,10 @@
+ 		}
+ 					
+      	if (count){
+-			values=(double*)xmalloc(count*sizeof(double)); //holder for the values to be extracted from vectorA
++			values=xNew<double>(count); //holder for the values to be extracted from vectorA
+ 		}
+ 		else{
+-			xfree((void**)&node_rows); //count=0 means no values was condensed out for this node. null node_rows for use in VecGetValues.
++			xDelete<int>(node_rows); //count=0 means no values was condensed out for this node. null node_rows for use in VecGetValues.
+ 			values=NULL;
+ 		}
+ 
+@@ -109,14 +109,10 @@
+ 		/*Assemble vector*/
+ 		VecAssemblyBegin(outvector);
+ 		VecAssemblyEnd(outvector);
+-		
+ 	}
+ 	
+ 	/*Assign output pointers:*/
+ 	*poutvector=outvector;
+-
+-	/*Free ressources:*/
+-	xfree((void**)&node_rows);
+-	xfree((void**)&values);
+-
++	xDelete<int>(node_rows);
++	xDelete<double>(values);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatPartition.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatPartition.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatPartition.cpp	(revision 12431)
+@@ -76,7 +76,7 @@
+ 
+ 		count=0;
+ 		if (range){
+-			node_rows=(int*)xmalloc(range*sizeof(int)); //this is the maximum number of rows one node can extract.
++			node_rows=xNew<int>(range); //this is the maximum number of rows one node can extract.
+ 		
+ 			for (i=0;i<row_partition_vector_size;i++){
+ 				if ( ((int)(*(row_partition_vector+i))>=(lower_row+1)) && ((int)(*(row_partition_vector+i))<=(upper_row+1)) ){
+@@ -97,7 +97,7 @@
+ 		#endif
+ 		
+ 		/*Same deal for columns*/
+-		node_cols=(int*)xmalloc(col_partition_vector_size*sizeof(int));
++		node_cols=xNew<int>(col_partition_vector_size);
+ 		for (i=0;i<col_partition_vector_size;i++){
+ 			*(node_cols+i)=(int)*(col_partition_vector+i)-1;
+ 		}
+@@ -127,8 +127,8 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&node_rows);
+-	xfree((void**)&node_cols);
++	xDelete<int>(node_rows);
++	xDelete<int>(node_cols);
+ 	ISFree(&col_index);
+ 	ISFree(&row_index);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecTranspose.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecTranspose.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecTranspose.cpp	(revision 12431)
+@@ -32,13 +32,13 @@
+ 	range=upper_row-lower_row+1;    
+ 
+ 	if (range){
+-		idxm=(int*)xmalloc(range*sizeof(int)); 
+-		tidxm=(int*)xmalloc(range*sizeof(int)); 
++		idxm=xNew<int>(range); 
++		tidxm=xNew<int>(range); 
+ 		for (i=0;i<range;i++){
+ 			*(idxm+i)=lower_row+i;
+ 		} 
+-		values=(double*)xmalloc(range*sizeof(double));
+-		tvalues=(double*)xmalloc(range*sizeof(double));
++		values=xNew<double>(range);
++		tvalues=xNew<double>(range);
+ 		
+ 		VecGetValues(vector,range,idxm,values);
+ 		
+@@ -55,10 +55,10 @@
+ 	VecAssemblyEnd(tvector);
+ 
+ 	/*Free ressources: */
+-	xfree((void**)&idxm);
+-	xfree((void**)&values);
+-	xfree((void**)&tidxm);
+-	xfree((void**)&tvalues);
++	xDelete<int>(idxm);
++	xDelete<double>(values);
++	xDelete<int>(tidxm);
++	xDelete<double>(tvalues);
+ 
+ 	/*Assign output pointers: */
+ 	*ptvector=tvector;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/SerialToVec.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/SerialToVec.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/SerialToVec.cpp	(revision 12431)
+@@ -37,8 +37,8 @@
+ 	range=upper_row-lower_row+1;    
+ 
+ 	if (range){
+-		idxn=(int*)xmalloc(range*sizeof(int)); 
+-		values=(double*)xmalloc(range*sizeof(double));
++		idxn=xNew<int>(range); 
++		values=xNew<double>(range);
+ 		for (i=0;i<range;i++){
+ 			idxn[i]=lower_row+i;
+ 			values[i]=vector[idxn[i]];
+@@ -53,8 +53,8 @@
+ 	VecAssemblyEnd(outvector);
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&idxn);
+-	xfree((void**)&values);
++	xDelete<int>(idxn);
++	xDelete<double>(values);
+ 
+ 	return outvector;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/PetscVectorToDoubleVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/PetscVectorToDoubleVector.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/PetscVectorToDoubleVector.cpp	(revision 12431)
+@@ -27,11 +27,11 @@
+ 	if(petsc_vector){
+ 		VecGetSize(petsc_vector,&rows);
+ 		if(rows){
+-			idxm=(int*)xmalloc(rows*sizeof(int));
+-			vector=(double*)xmalloc(rows*sizeof(double));
++			idxm=xNew<int>(rows);
++			vector=xNew<double>(rows);
+ 			for(i=0;i<rows;i++)idxm[i]=i;
+-
+ 			VecGetValues(petsc_vector,rows,idxm,vector);
++			xDelete<int>(idxm);
+ 		}
+ 	}
+ 	else{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatToSerial.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatToSerial.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatToSerial.cpp	(revision 12431)
+@@ -31,7 +31,6 @@
+ 	/*Output*/
+ 	double* outmatrix=NULL;
+ 	
+-	
+ 	/*get matrix size: */
+ 	MatGetSize(matrix,&M,&N);
+ 
+@@ -41,12 +40,12 @@
+ 	range=upper_row-lower_row+1;
+ 	
+ 	/*Local and global allocation*/
+-	if (my_rank==0)outmatrix=(double*)xmalloc(M*N*sizeof(double));
++	if (my_rank==0)outmatrix=xNew<double>(M*N);
+ 	
+ 	if (range){
+-		local_matrix=(double*)xmalloc(N*range*sizeof(double));
+-		idxm=(int*)xmalloc(range*sizeof(int));  
+-		idxn=(int*)xmalloc(N*sizeof(int));  
++		local_matrix=xNew<double>(N*range);
++		idxm=xNew<int>(range);  
++		idxn=xNew<int>(N);  
+ 	 
+ 		for (i=0;i<N;i++){
+ 			*(idxn+i)=i;
+@@ -77,14 +76,11 @@
+ 	if (my_rank==0){ 
+ 		//Still have the local_matrix on node 0 to take care of.
+ 		memcpy(outmatrix,local_matrix,N*range*sizeof(double));
+-
+ 	} 
+ 	
+ 	/*Assign output pointer: */
+ 	*poutmatrix=outmatrix;
+-	
+-	xfree((void**)&idxm);
+-	xfree((void**)&idxn);
+-	xfree((void**)&local_matrix);
+-
++	xDelete<int>(idxm);
++	xDelete<int>(idxn);
++	xDelete<double>(local_matrix);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/PetscMatrixToDoubleMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/PetscMatrixToDoubleMatrix.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/PetscMatrixToDoubleMatrix.cpp	(revision 12431)
+@@ -35,15 +35,18 @@
+ 	/*Some needed information: */
+ 	MatGetSize(petsc_matrix,&rows,&cols);
+ 
+-	idxm=(int*)xmalloc(rows*sizeof(int));
+-	idxn=(int*)xmalloc(cols*sizeof(int));
++	idxm=xNew<int>(rows);
++	idxn=xNew<int>(cols);
+ 
+ 	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));
++	matrix=xNew<double>(rows*cols);
+ 	MatGetValues(petsc_matrix,rows,idxm,cols,idxn,matrix);
+ 
++	xDelete<int>(idxm);
++	xDelete<int>(idxn);
++
+ 	/*Assign output pointers: */
+ 	*pmatrix=matrix;
+ 	*prows=rows;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecToMPISerial.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecToMPISerial.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecToMPISerial.cpp	(revision 12431)
+@@ -41,7 +41,7 @@
+ 	}
+ 
+ 	/*Allocate gathered vector on all nodes .*/
+-	gathered_vector=(double*)xmalloc(vector_size*sizeof(double));
++	gathered_vector=xNew<double>(vector_size);
+ 	
+ 	/*Allocate local vectors*/
+ 	VecGetOwnershipRange(vector,&lower_row,&upper_row);
+@@ -49,11 +49,11 @@
+ 	range=upper_row-lower_row+1;    
+ 
+ 	if (range){
+-		idxn=(int*)xmalloc(range*sizeof(int)); 
++		idxn=xNew<int>(range); 
+ 		for (i=0;i<range;i++){
+ 			*(idxn+i)=lower_row+i;
+ 		} 
+-		local_vector=(double*)xmalloc(range*sizeof(double));
++		local_vector=xNew<double>(range);
+ 		/*Extract values from MPI vector to serial local_vector on each node*/
+ 		VecGetValues(vector,range,idxn,local_vector); 
+ 	}
+@@ -86,8 +86,8 @@
+ 	*pgathered_vector=gathered_vector;
+ 	
+ 	/*free ressources: */
+-	xfree((void**)&idxn);
+-	xfree((void**)&local_vector);
++	xDelete<int>(idxn);
++	xDelete<double>(local_vector);
+ 	
+ 	return 1;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/GetOwnershipBoundariesFromRange.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/GetOwnershipBoundariesFromRange.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/GetOwnershipBoundariesFromRange.cpp	(revision 12431)
+@@ -27,7 +27,7 @@
+ 	int* allranges=NULL;
+ 
+ 	/*Gather all range values into allranges, for all nodes*/
+-	allranges=(int*)xmalloc(num_procs*sizeof(int));
++	allranges=xNew<int>(num_procs);
+ 	MPI_Allgather(&range,1,MPI_INT,allranges,1,MPI_INT,MPI_COMM_WORLD);
+ 
+ 	/*From all ranges, get lower row and upper row*/
+@@ -41,8 +41,5 @@
+ 	/*Assign output*/
+ 	*plower_row=lower_row;
+ 	*pupper_row=upper_row;
+-
+-	/*Free ressources:*/
+-	xfree((void**)&allranges);
+-
++	xDelete<int>(allranges);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecMerge.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecMerge.cpp	(revision 12430)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecMerge.cpp	(revision 12431)
+@@ -44,8 +44,8 @@
+ 
+ 	if (range){
+ 		/*This node owns rows of vector B, get them*/
+-		idxm=(int*)xmalloc(range*sizeof(int));
+-		values=(double*)xmalloc(range*sizeof(double));
++		idxm=xNew<int>(range);
++		values=xNew<double>(range);
+ 		for (i=0;i<range;i++){
+ 			*(idxm+i)=lower_row+i;
+ 		}
+@@ -62,7 +62,6 @@
+ 	VecAssemblyEnd(A);
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&idxm);
+-	xfree((void**)&values);
+-
++	xDelete<int>(idxm);
++	xDelete<double>(values);
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12431-12432.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12431-12432.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12431-12432.diff	(revision 12679)
@@ -0,0 +1,34 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.h	(revision 12431)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.h	(revision 12432)
+@@ -2,21 +2,22 @@
+  * \brief
+  */ 
+ 
++#include "../../include/types.h"
+ #ifndef _GAUSSPOINTS_H
+ #define _GAUSSPOINTS_H
+ 
+ #define MAX_LINE_GAUS_PTS    4
+-void GaussLegendreLinear( IssmPDouble** pxgaus, IssmPDouble** pxwgt, int ngaus );
++void GaussLegendreLinear(IssmPDouble** pxgaus, IssmPDouble** pxwgt, int ngaus);
+ #define MAX_TRIA_SYM_ORD    20
+-void GaussLegendreTria( int* pngaus, IssmPDouble** pl1, IssmPDouble** pl2, IssmPDouble** pl3, IssmPDouble** pwgt, int iord );
++void GaussLegendreTria(int* pngaus, IssmPDouble** pl1, IssmPDouble** pl2, IssmPDouble** pl3, IssmPDouble** pwgt, int iord);
+ #define MAX_TETRA_SYM_ORD    6
+-void GaussLegendreTetra( int* pngaus, IssmPDouble** pl1, IssmPDouble** pl2, IssmPDouble** pl3, IssmPDouble** pl4, IssmPDouble** pwgt, int iord );
++void GaussLegendreTetra(int* pngaus, IssmPDouble** pl1, IssmPDouble** pl2, IssmPDouble** pl3, IssmPDouble** pl4, IssmPDouble** pwgt, int iord);
+ #define MAX_LINE_GLOB_PTS    5
+-void GaussLobatto( IssmPDouble** pxgaus, IssmPDouble** pxwgt, int ngaus );
++void GaussLobatto(IssmPDouble** pxgaus, IssmPDouble** pxwgt, int ngaus);
+ #define MAX_GAUS_ITER   30
+-void GaussRecur( IssmPDouble* zero, IssmPDouble* weight, int n, IssmPDouble* alpha, IssmPDouble* beta );
++void GaussRecur(IssmPDouble* zero, IssmPDouble* weight, int n, IssmPDouble* alpha, IssmPDouble* beta);
+ 
+-void gaussQuad( IssmPDouble** pxgaus, IssmPDouble** pxwgt, IssmPDouble** pegaus, IssmPDouble** pewgt, int nigaus, int njgaus );
+-void gaussHexa( IssmPDouble** pxgaus, IssmPDouble** pxwgt, IssmPDouble** pegaus, IssmPDouble** pewgt, IssmPDouble** pzgaus, IssmPDouble ** pzwgt, int nigaus, int njgaus, int nkgaus );
++void gaussQuad(IssmPDouble** pxgaus, IssmPDouble** pxwgt, IssmPDouble** pegaus, IssmPDouble** pewgt, int nigaus, int njgaus);
++void gaussHexa(IssmPDouble** pxgaus, IssmPDouble** pxwgt, IssmPDouble** pegaus, IssmPDouble** pewgt, IssmPDouble** pzgaus, IssmPDouble ** pzwgt, int nigaus, int njgaus, int nkgaus);
+ 
+ #endif
Index: /issm/oecreview/Archive/12321-12677/ISSM-12432-12433.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12432-12433.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12432-12433.diff	(revision 12679)
@@ -0,0 +1,77 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Dofs/dofsetgen.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Dofs/dofsetgen.cpp	(revision 12432)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Dofs/dofsetgen.cpp	(revision 12433)
+@@ -1,42 +0,0 @@
+-/*!\file:  dofsetgen.cpp
+- * \brief  create list of dofs.
+- */ 
+-
+-#ifdef HAVE_CONFIG_H
+-	#include <config.h>
+-#else
+-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+-#endif
+-
+-#include "../Alloc/alloc.h"
+-#include "../../include/include.h"
+-#include <stdio.h>
+-
+-double* dofsetgen(int numdofs,int* doflist,int dofspernode,int totaldofs){
+-
+-	int i,j;
+-	int count=0;
+-
+-	/*output: */
+-	double* outdoflist=NULL;
+-
+-	/*number of nodes :*/
+-	int numberofnodes;
+-
+-	/*allocate: */
+-	numberofnodes=(int)totaldofs/dofspernode;
+-	outdoflist=(double*)xmalloc(numberofnodes*numdofs*sizeof(double));
+-
+-	count=0;
+-	for(i=0;i<numberofnodes;i++){
+-		for(j=0;j<numdofs;j++){
+-			outdoflist[numdofs*i+j]=count+doflist[j] + 1 ;//-1 because dofs vector comes from Matlab, where indices start at 1.
+-		}
+-		count+=dofspernode;
+-	}
+-
+-	/*Assign output pointers:*/
+-	return outdoflist;
+-
+-}
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Dofs/dofs.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Dofs/dofs.h	(revision 12432)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Dofs/dofs.h	(revision 12433)
+@@ -1,12 +0,0 @@
+-/*!\file: dofs.h
+- * \brief prototypes for dofs.h
+- */ 
+-
+-#ifndef _DOFS_H_
+-#define  _DOFS_H_
+-
+-double* dofsetgen(int numdofs,int* doflist,int dofspernode,int totaldofs);
+-
+-
+-#endif //ifndef _DOFS_H_
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12432)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12433)
+@@ -179,8 +179,6 @@
+ 					./shared/MemOps/xMemCpy.h\
+ 					./shared/Matrix/matrix.h\
+ 					./shared/Matrix/MatrixUtils.cpp\
+-					./shared/Dofs/dofs.h\
+-					./shared/Dofs/dofsetgen.cpp\
+ 					./shared/Numerics/numerics.h\
+ 					./shared/Numerics/Verbosity.h\
+ 					./shared/Numerics/Verbosity.cpp\
Index: /issm/oecreview/Archive/12321-12677/ISSM-12433-12434.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12433-12434.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12433-12434.diff	(revision 12679)
@@ -0,0 +1,543 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12433)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12434)
+@@ -21,14 +21,13 @@
+ 
+ 	/*check and parse the name  */
+ 	odouble=new OptionDouble;
+-	odouble->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
++	odouble->name =xNew<char>(strlen(name)+1);
+ 	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);
+@@ -40,14 +39,13 @@
+ 
+ 	/*check and parse the name  */
+ 	ological=new OptionLogical;
+-	ological->name =(char*)xmalloc((strlen(name)+1)*sizeof(char));
++	ological->name =xNew<char>(strlen(name)+1);
+ 	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);
+@@ -59,14 +57,13 @@
+ 
+ 	/*check and parse the name  */
+ 	ochar=new OptionChar();
+-	ochar->name =(char*)xmalloc((strlen(name)+1)*sizeof(char));
++	ochar->name =xNew<char>(strlen(name)+1);
+ 	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);
+@@ -84,20 +81,19 @@
+ 
+ 	/*check and parse the name  */
+ 	ostruct=new OptionStruct;
+-	ostruct->name =(char*)xmalloc((strlen(name)+1)*sizeof(char));
++	ostruct->name =xNew<char>(strlen(name)+1);
+ 	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));
++	ostruct->size =xNew<int>(ostruct->ndims);
+ 	for (i=0; i<ostruct->ndims; i++) ostruct->size[i]=(int)ipt[i];
+-	if (ostruct->numel) ostruct->values=(Options**) xmalloc(ostruct->numel*sizeof(Options *));
++	if (ostruct->numel) ostruct->values=xNew<Options*>(ostruct->numel);
+ 
+ 	/*loop through and process each element of the struct array  */
+ 	for (sindex=0; sindex<ostruct->numel; sindex++) {
+@@ -131,7 +127,7 @@
+ 
+ 	/*check and parse the name  */
+ 	ocell=new OptionCell;
+-	ocell->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
++	ocell->name =xNew<char>(strlen(name)+1);
+ 	memcpy(ocell->name,name,(strlen(name)+1)*sizeof(char));
+ 
+ 	/*check and parse the value  */
+@@ -142,12 +138,12 @@
+ 	ocell->numel=mxGetNumberOfElements(prhs[0]);
+ 	ocell->ndims=mxGetNumberOfDimensions(prhs[0]);
+ 	ipt         =mxGetDimensions(prhs[0]);
+-	ocell->size =(int *) xmalloc(ocell->ndims*sizeof(int));
++	ocell->size =xNew<int>(ocell->ndims);
+ 	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));
++	dims=xNew<int>(ocell->ndims);
+ 	for (cindex=0; cindex<ocell->numel; cindex++) {
+ 		ColumnWiseDimsFromIndex(dims,(int)cindex,ocell->size,ocell->ndims);
+ 		StringFromDims(cstr,dims,ocell->ndims);
+@@ -162,7 +158,7 @@
+ 		ocell->values->AddObject((Object*)option);
+ 		option=NULL;
+ 	}
+-	xfree((void**)&dims);
++	xDelete<int>(dims);
+ 
+ 	return(ocell);
+ }/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12433)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12434)
+@@ -92,7 +92,7 @@
+ 	if (pnumel)*pnumel=outmatrix_numel;
+ 	if (pndims)*pndims=outmatrix_ndims;
+ 	if (psize )*psize =outmatrix_size;
+-	else xfree((void**)&outmatrix_size);
++	else xDelete<int>(outmatrix_size);
+ 
+ }
+ /*}}}*/
+@@ -123,7 +123,7 @@
+ 			MatlabMatrixToDoubleMatrix(&doublematrix,&outmatrix_rows,&outmatrix_cols,dataref);
+ 
+ 			/*Convert double matrix into integer matrix: */
+-			outmatrix=(int*)xmalloc(outmatrix_rows*outmatrix_cols*sizeof(int));
++			outmatrix=xNew<int>(outmatrix_rows*outmatrix_cols);
+ 			for(i=0;i<outmatrix_rows*outmatrix_cols;i++)outmatrix[i]=(int)doublematrix[i];
+ 		}
+ 	}
+@@ -165,7 +165,7 @@
+ 			MatlabMatrixToDoubleMatrix(&doublematrix,&outmatrix_rows,&outmatrix_cols,dataref);
+ 
+ 			/*Convert double matrix into integer matrix: */
+-			outmatrix=(bool*)xmalloc(outmatrix_rows*outmatrix_cols*sizeof(bool));
++			outmatrix=xNew<bool>(outmatrix_rows*outmatrix_cols);
+ 			for(i=0;i<outmatrix_rows;i++)outmatrix[i]=(bool)doublematrix[i];
+ 		}
+ 	}
+@@ -226,9 +226,9 @@
+ 			MatlabNArrayToNArray(&doublematrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
+ 
+ 			/*Convert double matrix into bool matrix: */
+-			outmatrix=(bool*)xmalloc(outmatrix_numel*sizeof(bool));
++			outmatrix=xNew<bool>(outmatrix_numel);
+ 			for(i=0;i<outmatrix_numel;i++)outmatrix[i]=(bool)doublematrix[i];
+-			xfree((void**)&doublematrix);
++			xDelete<double>(doublematrix);
+ 		}
+ 	}
+ 	else{
+@@ -241,7 +241,7 @@
+ 	if (pnumel)*pnumel=outmatrix_numel;
+ 	if (pndims)*pndims=outmatrix_ndims;
+ 	if (psize )*psize =outmatrix_size;
+-	else xfree((void**)&outmatrix_size);
++	else xDelete<int>(outmatrix_size);
+ 
+ }
+ /*}}}*/
+@@ -291,7 +291,7 @@
+ 		MatlabVectorToDoubleVector(&doublevector,&outvector_rows,dataref);
+ 
+ 		/*Convert double vector into integer vector: */
+-		outvector=(int*)xmalloc(outvector_rows*sizeof(int));
++		outvector=xNew<int>(outvector_rows);
+ 		for(i=0;i<outvector_rows;i++)outvector[i]=(int)doublevector[i];
+ 	}
+ 	else{
+@@ -323,7 +323,7 @@
+ 		MatlabVectorToDoubleVector(&doublevector,&outvector_rows,dataref);
+ 
+ 		/*Convert double vector into integer vector: */
+-		outvector=(bool*)xmalloc(outvector_rows*sizeof(bool));
++		outvector=xNew<bool>(outvector_rows);
+ 		for(i=0;i<outvector_rows;i++)outvector[i]=(bool)doublevector[i];
+ 	}
+ 	else{
+@@ -355,7 +355,7 @@
+ 		MatlabVectorToDoubleVector(&doublevector,&outvector_rows,dataref);
+ 
+ 		/*Convert double vector into float vector: */
+-		outvector=(float*)xmalloc(outvector_rows*sizeof(float));
++		outvector=xNew<float>(outvector_rows);
+ 		for(i=0;i<outvector_rows;i++)outvector[i]=(float)doublevector[i];
+ 	}
+ 	else{
+@@ -383,7 +383,7 @@
+ 		int stringlen;
+ 		
+ 		stringlen = mxGetM(dataref)*mxGetN(dataref)+1;
+-		outstring = (char*)xmalloc(sizeof(mxChar)*stringlen);
++		outstring =xNew<char>(stringlen);
+ 		mxGetString(dataref,outstring,stringlen);
+ 	}
+ 
+@@ -419,7 +419,7 @@
+ 	if (pnumel)*pnumel=outmatrix_numel;
+ 	if (pndims)*pndims=outmatrix_ndims;
+ 	if (psize )*psize =outmatrix_size;
+-	else xfree((void**)&outmatrix_size);
++	else xDelete<int>(outmatrix_size);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp	(revision 12433)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp	(revision 12434)
+@@ -50,7 +50,7 @@
+ 		nz=(int)((double)nnz/(double)rows);
+ 
+ 		if(rows){
+-			vector=(double*)xcalloc(rows,sizeof(double));
++			vector=xNewInit<double>(rows,0.0);
+ 
+ 			/*Now, get ir,jc and pr: */
+ 			pr=mxGetPr(mxvector);
+@@ -80,7 +80,7 @@
+ 
+ 		/*allocate and memcpy*/
+ 		if(rows){
+-			vector=(double*)xmalloc(rows*sizeof(double));
++			vector=xNew<double>(rows);
+ 			memcpy(vector,mxvector_ptr,rows*sizeof(double));
+ 		}
+ 		else{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12433)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12434)
+@@ -248,7 +248,7 @@
+ 		mxSetPr(dataref,tmatrix_ptr);
+ 
+ 		/*Free ressources:*/
+-		xfree((void**)&matrix_ptr);
++		xDelete<double>(matrix_ptr);
+ 
+ 	}
+ 	else{
+@@ -289,7 +289,7 @@
+ 	}
+ 
+ 	/*Clean-up and return*/
+-	xfree((void**)&vector_ptr);
++	xDelete<double>(vector_ptr);
+ 	*pdataref=dataref;
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp	(revision 12433)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp	(revision 12434)
+@@ -38,7 +38,7 @@
+ 		cols=mxGetN(mxmatrix);
+ 		
+ 		if(rows*cols){
+-			matrix=(double*)xcalloc(rows*cols,sizeof(double));
++			matrix=xNewInit<double>(rows*cols,0.0);
+ 
+ 			/*Now, get ir,jc and pr: */
+ 			ir=mxGetIr(mxmatrix);
+@@ -63,7 +63,7 @@
+ 		
+ 		/*Create serial matrix: */
+ 		if(rows*cols){
+-			matrix=(double*)xcalloc(rows*cols,sizeof(double));
++			matrix=xNewInit<double>(rows*cols,0.0);
+ 
+ 			for(i=0;i<rows;i++){
+ 				for(j=0;j<cols;j++){
+@@ -80,7 +80,7 @@
+ 
+ 		/*Create serial matrix: */
+ 		if(rows*cols){
+-			matrix=(double*)xcalloc(rows*cols,sizeof(double));
++			matrix=xNewInit<double>(rows*cols,0.0);
+ 
+ 			for(i=0;i<rows;i++){
+ 				for(j=0;j<cols;j++){
+@@ -97,7 +97,7 @@
+ 
+ 		/*Create serial matrix: */
+ 		if(rows*cols){
+-			matrix=(double*)xcalloc(rows*cols,sizeof(double));
++			matrix=xNewInit<double>(rows*cols,0.0);
+ 
+ 			for(i=0;i<rows;i++){
+ 				for(j=0;j<cols;j++){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp	(revision 12433)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp	(revision 12434)
+@@ -78,7 +78,7 @@
+ 		ierr=VecCreateSeq(PETSC_COMM_SELF,rows,&vector);CHKERRQ(ierr);
+ 
+ 		/*Insert mxvector_ptr values into petsc vector: */
+-		idxm=(int*)xmalloc(rows*sizeof(int));
++		idxm=xNew<int>(rows);
+ 
+ 		for(i=0;i<rows;i++)idxm[i]=i;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/PrintfFunction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/PrintfFunction.cpp	(revision 12433)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/PrintfFunction.cpp	(revision 12434)
+@@ -26,7 +26,7 @@
+ 	while(true){
+ 
+ 		/*allocate buffer for given string size*/
+-		buffer=(char*)xmalloc(size*sizeof(char));
++		buffer=xNew<char>(size);
+ 
+ 		/* Try to print in the allocated space. */
+ 		va_start(args, format);
+@@ -46,13 +46,13 @@
+ 		else       /* glibc 2.0 */
+ 		 size*=2;  /* twice the old size */
+ 
+-		xfree((void**)&buffer);
++		xDelete<char>(buffer);
+ 	}
+ 
+ 	/*Ok, if we are running in parallel, get node 0 to print*/
+ 	if(my_rank==0)printf(buffer);
+ 
+ 	/*Clean up and return*/
+-	xfree((void**)&buffer);
++	xDelete<char>(buffer);
+ 	return 1;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp	(revision 12433)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp	(revision 12434)
+@@ -8,8 +8,8 @@
+ #else
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
++#include "../../shared/shared.h"
+ 
+-
+ /*Petsc includes: */
+ #include "petscmat.h"
+ #include "petscvec.h"
+@@ -18,30 +18,28 @@
+ /*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;
++	double *mxmatrix_ptr = NULL;
++	double *tmatrix      = NULL;
+ 	int ierr;
+ 	int i,j;
+ 
+ 	/*output: */
+-	Mat matrix=NULL;
++	Mat matrix = NULL;
+ 
+ 	/*matlab indices: */
+-	mwIndex*    ir=NULL;
+-	mwIndex*    jc=NULL;
+-	double* pr=NULL;
++	mwIndex *ir = NULL;
++	mwIndex *jc = NULL;
++	double  *pr = NULL;
+ 	int     count;
+ 	int     nnz;
+ 	int     nz;
+ 
+ 	/*petsc indices: */
+-	int* idxm=NULL;
+-	int* idxn=NULL;
++	int *idxm = NULL;
++	int *idxn = NULL;
+ 	
+ 	/*Ok, first check if we are dealing with a sparse or full matrix: */
+ 	if (mxIsSparse(mxmatrix)){
+@@ -73,17 +71,15 @@
+ 				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));
++		tmatrix=xNew<double>(rows*cols);
+ 		for(i=0;i<cols;i++){
+ 			for(j=0;j<rows;j++){
+ 				*(tmatrix+rows*i+j)=*(mxmatrix_ptr+cols*j+i);
+@@ -94,23 +90,21 @@
+ 		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));
++		idxm=xNew<int>(rows);
++		idxn=xNew<int>(cols);
+ 
+ 		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);
+-
++		xDelete<double>(tmatrix);
+ 	}
+ 
+ 	/*Assemble matrix: */
+ 	MatAssemblyBegin(matrix,MAT_FINAL_ASSEMBLY); 
+ 	MatAssemblyEnd(matrix,MAT_FINAL_ASSEMBLY);
+ 
+-
+ 	/*Assign output pointer: */
+ 	*pmatrix=matrix;
+ 	if(pmatrix_rows) *pmatrix_rows=rows;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp	(revision 12433)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp	(revision 12434)
+@@ -38,8 +38,8 @@
+ 	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];
++	size =xNew<int>(ndims);
++	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)){
+@@ -50,7 +50,7 @@
+ 		nnz=mxGetNzmax(mxmatrix);
+ 		nz=(int)((double)nnz/(double)rows);
+ 
+-		matrix=(double*)xcalloc(rows*cols,sizeof(double));
++		matrix=xNewInit<double>(rows*cols,0.0);
+ 
+ 		/*Now, get ir,jc and pr: */
+ 		ir=mxGetIr(mxmatrix);
+@@ -73,15 +73,15 @@
+ 		mxmatrix_ptr=(double*)mxGetPr(mxmatrix);
+ 		
+ 		/*Create serial matrix: */
+-		matrix=(double*)xcalloc(numel,sizeof(double));
++		matrix=xNewInit<double>(numel,0.0);
+ 
+-		dims=(int *) xcalloc(ndims,sizeof(int));
++		dims=xNew<int>(ndims);
+ 		for(i=0;i<numel;i++){
+ 			ColumnWiseDimsFromIndex(dims,i,size,ndims);
+ 			j=IndexFromRowWiseDims(dims,size,ndims);
+ 			*(matrix+j)=*(mxmatrix_ptr+i);
+ 		}
+-		xfree((void**)&dims);
++		xDelete<int>(dims);
+ 		
+ 	}
+ 
+@@ -118,8 +118,8 @@
+ 	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];
++	size =xNew<int>(ndims);
++	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)){
+@@ -130,7 +130,7 @@
+ 		nnz=mxGetNzmax(mxmatrix);
+ 		nz=(int)((double)nnz/(double)rows);
+ 
+-		matrix=(bool*)xcalloc(rows*cols,sizeof(bool));
++		matrix=xNewInit<bool>(rows*cols,false);
+ 
+ 		/*Now, get ir,jc and pm: */
+ 		ir=mxGetIr(mxmatrix);
+@@ -153,16 +153,14 @@
+ 		mxmatrix_ptr=(bool*)mxGetData(mxmatrix);
+ 		
+ 		/*Create serial matrix: */
+-		matrix=(bool*)xcalloc(numel,sizeof(bool));
+-
+-		dims=(int *) xcalloc(ndims,sizeof(int));
++		matrix=xNew<bool>(numel);
++		dims=xNew<int>(ndims);
+ 		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);
+-		
++		xDelete<int>(dims);
+ 	}
+ 
+ 	/*Assign output pointer: */
+@@ -198,8 +196,8 @@
+ 	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];
++	size =xNew<int>(ndims);
++	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)){
+@@ -210,7 +208,7 @@
+ 		nnz=mxGetNzmax(mxmatrix);
+ 		nz=(int)((double)nnz/(double)rows);
+ 
+-		matrix=(char*)xcalloc(rows*cols,sizeof(double));
++		matrix=xNew<char>(rows*cols);
+ 
+ 		/*Now, get ir,jc and pm: */
+ 		ir=mxGetIr(mxmatrix);
+@@ -233,7 +231,7 @@
+ 		mxmatrix_ptr=mxGetChars(mxmatrix);
+ 		
+ 		/*Create serial matrix: */
+-		matrix=(char*)xcalloc(numel+1,sizeof(mxChar));
++		matrix=xNew<char>(numel+1);
+ 
+ 		/*looping code adapted from Matlab example explore.c: */
+ 		int elements_per_page = size[0] * size[1];
Index: /issm/oecreview/Archive/12321-12677/ISSM-12434-12435.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12434-12435.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12434-12435.diff	(revision 12679)
@@ -0,0 +1,232 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Threads/LaunchThread.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Threads/LaunchThread.cpp	(revision 12434)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Threads/LaunchThread.cpp	(revision 12435)
+@@ -19,7 +19,7 @@
+ #endif
+ 
+ #include "./issm_threads.h"
+-#include "../Alloc/alloc.h"
++#include "../Alloc/xNewDelete.h"
+ #include "../Exceptions/exceptions.h"
+ #include "../../include/include.h"
+ 
+@@ -27,21 +27,19 @@
+ 
+ 	#ifdef _MULTITHREADING_
+ 	int i;
+-	int* status=NULL;
+-
+-	pthread_t* threads=NULL;
+-	pthread_handle* handles=NULL;
++	int            *status  = NULL;
++	pthread_t      *threads = NULL;
++	pthread_handle *handles = NULL;
+ 	
+ 	/*dynamically allocate: */
+-	threads=(pthread_t*)xmalloc(num_threads*sizeof(pthread_t));
+-	handles=(pthread_handle*)xmalloc(num_threads*sizeof(pthread_handle));
++	threads=xNew<pthread_t>(num_threads);
++	handles=xNew<pthread_handle>(num_threads);
+ 
+ 	for(i=0;i<num_threads;i++){
+ 		handles[i].gate=gate;
+ 		handles[i].id=i;
+ 		handles[i].num=num_threads;
+ 	}
+-	
+ 	for(i=0;i<num_threads;i++){
+ 
+ 		if(pthread_create(threads+i,NULL,function,(void*)(handles+i))){
+@@ -55,8 +53,8 @@
+ 	}
+ 	
+ 	/*Free ressources:*/
+-	xfree((void**)&threads);
+-	xfree((void**)&handles);
++	xDelete<pthread_t>(threads);
++	xDelete<pthread_handle>(handles);
+ 
+ 	#else
+ 	pthread_handle handle;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp	(revision 12434)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp	(revision 12435)
+@@ -26,7 +26,7 @@
+ 	}
+ 
+ 	/*Allocate and initialize transform matrix*/
+-	transform=(double*)xmalloc(numdofs*numdofs*sizeof(double));
++	transform=xNew<double>(numdofs*numdofs);
+ 	for(i=0;i<numdofs*numdofs;i++) transform[i]=0.0;
+ 
+ 	/*Create transform matrix for all nodes (x,y for 2d and x,y,z for 3d). It is a block matrix
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp	(revision 12434)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp	(revision 12435)
+@@ -8,14 +8,14 @@
+ 	int* cs_array=NULL;
+ 
+ 	/*All nodes have the same Coordinate System*/
+-	cs_array=(int*)xmalloc(numnodes*sizeof(int));
++	cs_array=xNew<int>(numnodes);
+ 	for(int i=0;i<numnodes;i++) cs_array[i]=cs_enum;
+ 
+ 	/*Call core*/
+ 	TransformInvStiffnessMatrixCoord(Ke,nodes,numnodes,cs_array);
+ 
+ 	/*Clean-up*/
+-	xfree((void**)&cs_array);
++	xDelete<int>(cs_array);
+ }
+ 
+ void TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int* cs_array){
+@@ -35,7 +35,7 @@
+ 	}
+ 
+ 	/*Copy current stiffness matrix*/
+-	values=(double*)xmalloc(Ke->nrows*Ke->ncols*sizeof(double));
++	values=xNew<double>(Ke->nrows*Ke->ncols);
+ 	for(i=0;i<Ke->nrows;i++) for(j=0;j<Ke->ncols;j++) values[i*Ke->ncols+j]=Ke->values[i*Ke->ncols+j];
+ 
+ 	/*Get Coordinate Systems transform matrix*/
+@@ -48,6 +48,6 @@
+ 				&Ke->values[0],0);
+ 
+ 	/*Free Matrix*/
+-	xfree((void**)&transform);
+-	xfree((void**)&values);
++	xDelete<double>(transform);
++	xDelete<double>(values);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp	(revision 12434)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp	(revision 12435)
+@@ -8,14 +8,14 @@
+ 	int* cs_array=NULL;
+ 
+ 	/*All nodes have the same Coordinate System*/
+-	cs_array=(int*)xmalloc(numnodes*sizeof(int));
++	cs_array=xNew<int>(numnodes);
+ 	for(int i=0;i<numnodes;i++) cs_array[i]=cs_enum;
+ 
+ 	/*Call core*/
+ 	TransformStiffnessMatrixCoord(Ke,nodes,numnodes,cs_array);
+ 
+ 	/*Clean-up*/
+-	xfree((void**)&cs_array);
++	xDelete<int>(cs_array);
+ }
+ 
+ void TransformStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int* cs_array){
+@@ -35,7 +35,7 @@
+ 	}
+ 
+ 	/*Copy current stiffness matrix*/
+-	values=(double*)xmalloc(Ke->nrows*Ke->ncols*sizeof(double));
++	values=xNew<double>(Ke->nrows*Ke->ncols);
+ 	for(i=0;i<Ke->nrows;i++) for(j=0;j<Ke->ncols;j++) values[i*Ke->ncols+j]=Ke->values[i*Ke->ncols+j];
+ 
+ 	/*Get Coordinate Systems transform matrix*/
+@@ -48,6 +48,6 @@
+ 				&Ke->values[0],0);
+ 
+ 	/*Free Matrix*/
+-	xfree((void**)&transform);
+-	xfree((void**)&values);
++	xDelete<double>(transform);
++	xDelete<double>(values);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 12434)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 12435)
+@@ -18,22 +18,22 @@
+ 	int i,counter;
+ 
+ 	/*I/O: */
+-	FILE* fid=NULL;
+-	char chardummy[256];
++	FILE   *fid = NULL;
++	char    chardummy[256];
+ 	double  ddummy;
+ 
+ 	/*output: */
+-	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
++	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
+ 
+ 	/*For each profile: */
+-	int n;
+-	double* x=NULL;
+-	double* y=NULL;
+-	bool cl;
++	int     n;
++	double *x  = NULL;
++	double *y  = NULL;
++	bool    cl;
+ 
+ 	/*open domain outline file for reading: */
+ 	if ((fid=fopen(domainname,"r"))==NULL){
+@@ -60,14 +60,14 @@
+ 	}
+ 	
+ 	/*Allocate and initialize all the profiles: */
+-	profnvertices=(int*)xmalloc(nprof*sizeof(int));
+-	pprofx=(double**)xmalloc(nprof*sizeof(double*));
+-	pprofy=(double**)xmalloc(nprof*sizeof(double*));
++	profnvertices=xNew<int>(nprof);
++	pprofx=xNew<double*>(nprof);
++	pprofy=xNew<double*>(nprof);
+ 	for (i=0;i<nprof;i++){
+ 		pprofx[i]=NULL;
+ 		pprofy[i]=NULL;
+ 	}
+-	closed=(bool*)xmalloc(nprof*sizeof(bool));
++	closed=xNew<bool>(nprof);
+ 
+ 	/*Reaset file pointer to beginning of file: */
+ 	fseek(fid,0,SEEK_SET);
+@@ -90,7 +90,6 @@
+ 		x=(double*)xmalloc(n*sizeof(double));
+ 		y=(double*)xmalloc(n*sizeof(double));
+ 		
+-
+ 		/*Read vertices: */
+ 		for (i=0;i<n;i++){
+ 			fscanf(fid,"%20lf %20lf\n",&x[i],&y[i]);
+@@ -117,8 +116,10 @@
+ 	*pprofnvertices=profnvertices;
+ 	*ppprofx=pprofx;
+ 	*ppprofy=pprofy;
+-	if(pclosed)*pclosed=closed;
+-	else       xfree((void**)&closed);
++	if(pclosed)
++	 *pclosed=closed;
++	else
++	 xDelete<bool>(closed);
+ }
+ 
+ DataSet* DomainOutlineRead(char* domainname){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/shared.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/shared.h	(revision 12434)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/shared.h	(revision 12435)
+@@ -16,7 +16,6 @@
+ #include "Elements/elements.h"
+ #include "Matrix/matrix.h"
+ #include "Numerics/numerics.h"
+-#include "Dofs/dofs.h"
+ #include "Threads/issm_threads.h"
+ #include "Bamg/shared.h"
+ #include "Wrapper/wrappershared.h"
Index: /issm/oecreview/Archive/12321-12677/ISSM-12435-12436.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12435-12436.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12435-12436.diff	(revision 12679)
@@ -0,0 +1,547 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12435)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12436)
+@@ -51,8 +51,8 @@
+ 		sizeof(wgt4 )/sizeof(IssmPDouble)};
+ 
+ 	//	_printf_(true,"Gauss-Legendre recurrence coefficients ngaus=%d\n",ngaus);
+-	*pxgaus = (IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
+-	*pxwgt  = (IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
++	*pxgaus =xNew<IssmPDouble>(ngaus);
++	*pxwgt  =xNew<IssmPDouble>(ngaus);
+ 
+ 	/*  check to see if Gauss points need to be calculated  */
+ 	if (ngaus <= MAX_LINE_GAUS_PTS) {
+@@ -69,8 +69,8 @@
+ 	else {
+ 
+ 		/*  calculate the Gauss points using recurrence relations  */
+-		alpha=(IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
+-		beta =(IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
++		alpha=xNew<IssmPDouble>(ngaus);
++		beta =xNew<IssmPDouble>(ngaus);
+ 
+ 		/*  calculate the Legendre recurrence coefficients  */
+ 		alpha[0]=0.;
+@@ -83,8 +83,8 @@
+ 
+ 		/*  calculate the Gauss points  */
+ 		GaussRecur(*pxgaus, *pxwgt, ngaus, alpha, beta );
+-		xfree((void **)&beta );
+-		xfree((void **)&alpha);
++		xDelete<IssmPDouble>(beta);
++		xDelete<IssmPDouble>(alpha);
+ 	}
+ }/*}}}*/
+ /*FUNCTION GaussLegendreTria{{{*/
+@@ -1149,10 +1149,10 @@
+ 
+ 		*pngaus=np[iord-1];
+ 
+-		*pl1  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pl2  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pl3  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pwgt = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl1  =xNew<IssmPDouble>(*pngaus);
++		*pl2  =xNew<IssmPDouble>(*pngaus);
++		*pl3  =xNew<IssmPDouble>(*pngaus);
++		*pwgt =xNew<IssmPDouble>(*pngaus);
+ 
+ 		for (i=0; i<*pngaus; i++) {
+ 			(*pl1 )[i]=l1p [iord-1][i];
+@@ -1167,10 +1167,10 @@
+ 		nigaus =iord/2+1;
+ 		*pngaus=nigaus*nigaus;
+ 
+-		*pl1  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pl2  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pl3  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pwgt = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl1  =xNew<IssmPDouble>(*pngaus);
++		*pl2  =xNew<IssmPDouble>(*pngaus);
++		*pl3  =xNew<IssmPDouble>(*pngaus);
++		*pwgt =xNew<IssmPDouble>(*pngaus);
+ 
+ 		/*  get the gauss points in each direction  */
+ 		GaussLegendreLinear(&xgaus, &xwgt, nigaus);
+@@ -1194,8 +1194,8 @@
+ 				ipt++;
+ 			}
+ 		}
+-		xfree((void **)&xwgt );
+-		xfree((void **)&xgaus);
++		xDelete<IssmPDouble>(xwgt );
++		xDelete<IssmPDouble>(xgaus);
+ 	}
+ 
+ 	//	_printf_(true,"GaussLegendreTria - ngaus=%d\n",*pngaus);
+@@ -1409,11 +1409,11 @@
+ 
+ 		*pngaus=np[iord-1];
+ 
+-		*pl1  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pl2  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pl3  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pl4  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pwgt = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl1  =xNew<IssmPDouble>(*pngaus);
++		*pl2  =xNew<IssmPDouble>(*pngaus);
++		*pl3  =xNew<IssmPDouble>(*pngaus);
++		*pl4  =xNew<IssmPDouble>(*pngaus);
++		*pwgt =xNew<IssmPDouble>(*pngaus);
+ 
+ 		for (i=0; i<*pngaus; i++) {
+ 			(*pl1 )[i]=l1p [iord-1][i];
+@@ -1429,11 +1429,11 @@
+ 		nigaus =iord/2+1;
+ 		*pngaus=nigaus*nigaus*nigaus;
+ 
+-		*pl1  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pl2  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pl3  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pl4  = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
+-		*pwgt = (IssmPDouble *) xmalloc(*pngaus*sizeof(IssmPDouble));
++		*pl1  =xNew<IssmPDouble>(*pngaus);
++		*pl2  =xNew<IssmPDouble>(*pngaus);
++		*pl3  =xNew<IssmPDouble>(*pngaus);
++		*pl4  =xNew<IssmPDouble>(*pngaus);
++		*pwgt =xNew<IssmPDouble>(*pngaus);
+ 
+ 		/*  get the gauss points in each direction  */
+ 		GaussLegendreLinear(&xgaus, &xwgt, nigaus);
+@@ -1466,8 +1466,8 @@
+ 				}
+ 			}
+ 		}
+-		xfree((void **)&xwgt );
+-		xfree((void **)&xgaus);
++		xDelete<IssmPDouble>(xwgt );
++		xDelete<IssmPDouble>(xgaus);
+ 	}
+ }/*}}}*/
+ /*FUNCTION GaussLobatto{{{*/
+@@ -1521,8 +1521,8 @@
+ 		sizeof(wgt5 )/sizeof(IssmPDouble)};
+ 
+ 	//	_printf_(true,"Gauss-Lobatto recurrence coefficients ngaus=%d\n",ngaus);
+-	*pxgaus = (IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
+-	*pxwgt  = (IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
++	*pxgaus =xNew<IssmPDouble>(ngaus);
++	*pxwgt  =xNew<IssmPDouble>(ngaus);
+ 
+ 	/*  check to see if Gauss points need to be calculated  */
+ 	if (ngaus <= MAX_LINE_GLOB_PTS) {
+@@ -1538,8 +1538,8 @@
+ 	else {
+ 
+ 		/*  calculate the Gauss points using recurrence relations  */
+-		alpha=(IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
+-		beta =(IssmPDouble *) xmalloc(ngaus*sizeof(IssmPDouble));
++		alpha=xNew<IssmPDouble>(ngaus);
++		beta =xNew<IssmPDouble>(ngaus);
+ 
+ 		/*  calculate the Legendre recurrence coefficients  */
+ 		alpha[0]=0.;
+@@ -1574,8 +1574,8 @@
+ 
+ 		/*  calculate the Gauss points  */
+ 		GaussRecur(*pxgaus, *pxwgt, ngaus, alpha, beta );
+-		xfree((void **)&beta );
+-		xfree((void **)&alpha);
++		xDelete<IssmPDouble>(beta );
++		xDelete<IssmPDouble>(alpha);
+ 	}
+ 
+ }/*}}}*/
+@@ -1597,7 +1597,7 @@
+ 		return;
+ 	}
+ 
+-	work=(IssmPDouble*)xmalloc(n*sizeof(IssmPDouble));
++	work=xNew<IssmPDouble>(n);
+ 
+ 	zero[0]  =alpha[0];
+ 	weight[0]=1.;
+@@ -1668,7 +1668,7 @@
+ 			work[m]=0.;
+ 		} while (iter < MAX_GAUS_ITER);
+ 		if (iter >= MAX_GAUS_ITER) {
+-			xfree((void **)&work);
++			xDelete<IssmPDouble>(work);
+ 			_error_("%s%i"," Max iterations exceeded for l=",MAX_GAUS_ITER);
+ 		}
+ 	}
+@@ -1697,7 +1697,7 @@
+ 	}
+ 
+ 	/*Cleanup*/
+-	xfree((void **)&work);
++	xDelete<IssmPDouble>(work);
+ 
+ }/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/alloc.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/alloc.cpp	(revision 12435)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/alloc.cpp	(revision 12436)
+@@ -83,7 +83,6 @@
+ 	}
+ }
+ 
+-
+ void* xrealloc( void* pv, int size){
+ 	
+ 	register void* value=NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12435)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12436)
+@@ -6,6 +6,7 @@
+ 
+ #include "./trimesh.h"
+ #include "../Exceptions/exceptions.h"
++#include "../Alloc/xNewDelete.h"
+ #include "../Alloc/alloc.h"
+ #include "../../include/include.h"
+ 
+@@ -52,7 +53,7 @@
+ 
+ 	current_size=max_number_elements;
+ 	NumGridElements=0;
+-	GridElements=(int*)xmalloc(max_number_elements*sizeof(int));
++	GridElements=xNew<int>(max_number_elements);
+ 
+ 	for (i=0;i<nel;i++){
+ 		for (j=0;j<3;j++){
+@@ -80,7 +81,7 @@
+ 	}
+ 	cleanup_and_return:
+ 	if(!noerr){
+-		xfree((void**)&GridElements);
++		xDelete<int>(GridElements);
+ 	}
+ 	/*Allocate return pointers: */
+ 	*pGridElements=GridElements;
+@@ -164,7 +165,7 @@
+ 	}
+ 
+ 	/*Compress riftsegments_uncompressed:*/
+-	riftsegments=(int*)xmalloc(nriftsegs*4*sizeof(int));
++	riftsegments=xNew<int>(nriftsegs*4);
+ 	counter=0;
+ 	for (i=0;i<nsegs;i++){
+ 		if (*(riftsegments_uncompressed+5*i+0)){
+@@ -176,7 +177,7 @@
+ 		}
+ 	}
+ 
+-	xfree((void**)&riftsegments_uncompressed);
++	xDelete<int>(riftsegments_uncompressed);
+ 	
+ 	/*Assign output pointers: */
+ 	*priftsegments=riftsegments;
+@@ -201,7 +202,7 @@
+ 
+ 	/*Figure out the list of elements  that are on the same side of the rift. To do so, we start from one 
+ 	 * side of the rift and keep rotating in the same direction:*/
+-	GridElementListOnOneSideOfRift=(int*)xmalloc(NumGridElements*sizeof(int));
++	GridElementListOnOneSideOfRift=xNew<int>(NumGridElements);
+ 	//bootstrap the GridElementListOnOneSideOfRift by filling elements from riftsegments: */
+ 	GridElementListOnOneSideOfRift[0]=*(riftsegments+4*segmentnumber+0); /*this one does not belong to the same side, but is just there 
+ 															   for a rotation direction, we 'll take it out when we are 
+@@ -240,7 +241,7 @@
+ 	}// for (;;)
+ 
+ 	/*Free ressources: */
+-	xfree((void**)&GridElements);
++	xDelete<int>(GridElements);
+ 	/*Assign output pointers: */
+ 	*pNumGridElementListOnOneSideOfRift=NumGridElementListOnOneSideOfRift;
+ 	*pGridElementListOnOneSideOfRift=GridElementListOnOneSideOfRift;
+@@ -379,16 +380,16 @@
+ 	int i,j,counter;
+ 
+ 	/*input: */
+-	double* segments=NULL;
+-	double* segmentmarkerlist=NULL;
++	double *segments          = NULL;
++	double *segmentmarkerlist = NULL;
+ 	int numsegs;
+ 	
+ 	/*output: */
+-	int* riftsnumsegs=NULL;
+-	double** riftssegments=NULL;
+-	int new_numsegs;
+-	double* new_segments=NULL;
+-	double* new_segmentmarkers=NULL;
++	int      new_numsegs;
++	int     *riftsnumsegs       = NULL;
++	double **riftssegments      = NULL;
++	double  *new_segments       = NULL;
++	double  *new_segmentmarkers = NULL;
+ 
+ 	/*intermediary: */
+ 	double* riftsegment=NULL;
+@@ -405,8 +406,8 @@
+ 	}
+ 	/*Allocate new segments: */
+ 	new_numsegs=counter;
+-	new_segments=(double*)xmalloc(new_numsegs*3*sizeof(double));
+-	new_segmentmarkers=(double*)xmalloc(new_numsegs*sizeof(double));
++	new_segments=xNew<double>(new_numsegs*3);
++	new_segmentmarkers=xNew<double>(new_numsegs);
+ 
+ 	/*Copy new segments info : */
+ 	counter=0;
+@@ -421,8 +422,8 @@
+ 	}
+ 
+ 	/*Now deal with rift segments: */
+-	riftsnumsegs=(int*)xmalloc(numrifts*sizeof(int));
+-	riftssegments=(double**)xmalloc(numrifts*sizeof(double*));
++	riftsnumsegs=xNew<int>(numrifts);
++	riftssegments=xNew<double*>(numrifts);
+ 	for (i=0;i<numrifts;i++){
+ 		/*Figure out how many segments for rift i: */
+ 		counter=0;
+@@ -430,7 +431,7 @@
+ 			if (segmentmarkerlist[j]==2+i)counter++;
+ 		}
+ 		riftsnumsegs[i]=counter;
+-		riftsegment=(double*)xmalloc(counter*3*sizeof(double));
++		riftsegment=xNew<double>(counter*3);
+ 		/*Copy new segments info :*/
+ 		counter=0;
+ 		for (j=0;j<numsegs;j++){
+@@ -445,7 +446,7 @@
+ 	}
+ 
+ 	/*Free ressources: */
+-	xfree((void**)&segments);
++	xDelete<double>(segments);
+ 
+ 	/*Assign output pointers: */
+ 	*psegments=new_segments;
+@@ -464,8 +465,8 @@
+ 	int i,j,k;
+ 
+ 	/*output: */
+-	int* riftsnumpairs=NULL;
+-	double** riftspairs=NULL;
++	int     *riftsnumpairs = NULL;
++	double **riftspairs    = NULL;
+ 
+ 	/*intermediary :*/
+ 	int     numsegs;
+@@ -473,13 +474,13 @@
+ 	double* pairs=NULL;
+ 	int     node1,node2,node3,node4;
+ 
+-	riftsnumpairs=(int*)xmalloc(numrifts*sizeof(int));
+-	riftspairs=(double**)xmalloc(numrifts*sizeof(double*));
++	riftsnumpairs=xNew<int>(numrifts);
++	riftspairs=xNew<double*>(numrifts);
+ 	for (i=0;i<numrifts;i++){
+ 		segments=riftssegments[i];
+ 		numsegs=riftsnumsegments[i];
+ 		riftsnumpairs[i]=numsegs;
+-		pairs=(double*)xmalloc(2*numsegs*sizeof(double));
++		pairs=xNew<double>(2*numsegs);
+ 		for (j=0;j<numsegs;j++){
+ 			*(pairs+2*j+0)=*(segments+3*j+2); //retrieve element to which this segment belongs.
+ 			node1=(int)*(segments+3*j+0)-1; node2=(int)*(segments+3*j+1)-1;
+@@ -499,11 +500,9 @@
+ 		riftspairs[i]=pairs;
+ 	}
+ 
+-
+ 	/*Assign output pointers: */
+ 	*priftsnumpairs=riftsnumpairs;
+ 	*priftspairs=riftspairs;
+-
+ 	return noerr;
+ }/*}}}*/
+ /*FUNCTION RemoveRifts{{{*/
+@@ -521,20 +520,19 @@
+ 	int     numsegs;
+ 
+ 	/*intermediary: */
+-	double* riftsegments=NULL;
+-	double* riftpairs=NULL;
++	double *riftsegments = NULL;
++	double *riftpairs    = NULL;
+ 	int     node1,node2,node3,node4,temp_node;
+ 	double  el2;
+ 	int     newnods; //temporary # node counter.
+ 	double  xmin,ymin;
+-	double* xreal=NULL;
+-	double* yreal=NULL;
+-	int* nodes=NULL;
+-	int* mergingnodes=NULL;
++	double *xreal        = NULL;
++	double *yreal        = NULL;
++	int    *nodes        = NULL;
++	int    *mergingnodes = NULL;
+ 	int     max_size;
+ 	int     redundant;
+ 
+-
+ 	/*Recover input: */
+ 	index=*pindex;
+ 	x=*px;
+@@ -561,8 +559,8 @@
+ 	for (i=0;i<numrifts1;i++){
+ 		max_size+=rifts1numsegs[i];
+ 	}
+-	nodes=(int*)xmalloc(max_size*sizeof(int));
+-	mergingnodes=(int*)xmalloc(max_size*sizeof(int));
++	nodes=xNew<int>(max_size);
++	mergingnodes=xNew<int>(max_size);
+ 
+ 	/*Go through the rifts segments, and identify which node we are going to merge with its counterpart on the other side 
+ 	 *of the rift. The way we identify this node is by looking at the element pairs, and the corresponding nodes: */
+@@ -677,8 +675,8 @@
+ 			counter2++;
+ 		}
+ 	}
+-	xfree((void**)&x); x=xreal;
+-	xfree((void**)&y); y=yreal;
++	xDelete<double>(x); x=xreal;
++	xDelete<double>(y); y=yreal;
+ 
+ 	/*Assign output pointers:*/
+ 	*pindex=index;
+@@ -687,7 +685,6 @@
+ 	*pnods=newnods;
+ 	*psegments=segments;
+ 	*pnumsegs=numsegs;
+-
+ 	return noerr;
+ }/*}}}*/
+ /*FUNCTION IsRiftPresent{{{*/
+@@ -715,7 +712,6 @@
+ 	/*Assign output pointers:*/
+ 	*priftflag=riftflag;
+ 	*pnumrifts=numrifts;
+-
+ 	return noerr;
+ }/*}}}*/
+ /*FUNCTION OrderRifts{{{*/
+@@ -725,14 +721,14 @@
+ 	int i,j,k,counter;
+ 
+ 	/*intermediary: */
+-	double* riftsegments=NULL;
+-	double* riftpairs=NULL;
++	double *riftsegments = NULL;
++	double *riftpairs    = NULL;
+ 	int numsegs;
+ 
+ 	/*ordering and copy: */
+-	int*    order=NULL;
+-	double* riftsegments_copy=NULL;
+-	double* riftpairs_copy=NULL;
++	int    *order             = NULL;
++	double *riftsegments_copy = NULL;
++	double *riftpairs_copy    = NULL;
+ 
+ 	/*node and element manipulation: */
+ 	int     node1,node2,node3,node4,temp_node,tip1,tip2,node;
+@@ -743,7 +739,7 @@
+ 	double* riftstips=NULL;
+ 
+ 	/*Allocate byproduct of this routine, riftstips: */
+-	riftstips=(double*)xmalloc(numrifts*2*sizeof(double));
++	riftstips=xNew<double>(numrifts*2);
+ 
+ 	/*Go through all rifts: */
+ 	for (i=0;i<numrifts;i++){
+@@ -753,9 +749,9 @@
+ 	
+ 		/*Allocate copy of riftsegments and riftpairs, 
+ 		 *as well as ordering vector: */
+-		riftsegments_copy=(double*)xmalloc(numsegs*3*sizeof(double));
+-		riftpairs_copy=(double*)xmalloc(numsegs*2*sizeof(double));
+-		order=(int*)xmalloc(numsegs*sizeof(int));
++		riftsegments_copy=xNew<double>(numsegs*3);
++		riftpairs_copy=xNew<double>(numsegs*2);
++		order=xNew<int>(numsegs);
+ 
+ 		/*First find the tips, using the pairs. If a pair of elements has one node in common, this node is a rift tip: */
+ 		tip1=-1;
+@@ -814,7 +810,6 @@
+ 		*(riftstips+2*i+0)=(double)tip1;
+ 		*(riftstips+2*i+1)=(double)tip2;
+ 
+-
+ 		/*We have the two tips for this rift.  Go from tip1 to tip2, and figure out the order in which segments are sequential. 
+ 		 *Because two elements are connected to tip1, we chose one first, which defines the direction we are rotating along the rift. */
+ 		node=tip1;
+@@ -864,9 +859,9 @@
+ 			*(riftpairs+2*j+1)=*(riftpairs_copy+2*j+1);
+ 		}
+ 
+-		xfree((void**)&order);
+-		xfree((void**)&riftsegments_copy);
+-		xfree((void**)&riftpairs_copy);
++		xDelete<int>(order);
++		xDelete<double>(riftsegments_copy);
++		xDelete<double>(riftpairs_copy);
+ 
+ 	}
+ 
+@@ -886,9 +881,9 @@
+ 	double temp_node;
+ 
+ 	/*output: */
+-	double** riftspenaltypairs=NULL;
+-	double*  riftpenaltypairs=NULL;
+-	int*     riftsnumpenaltypairs=NULL;
++	double **riftspenaltypairs    = NULL;
++	double  *riftpenaltypairs     = NULL;
++	int     *riftsnumpenaltypairs = NULL;
+ 
+ 	/*intermediary: */
+ 	int numsegs;
+@@ -900,8 +895,8 @@
+ 	int    k1,k2;
+ 
+ 	/*Allocate: */
+-	riftspenaltypairs=(double**)xmalloc(numrifts*sizeof(double*));
+-	riftsnumpenaltypairs=(int*)xmalloc(numrifts*sizeof(int));
++	riftspenaltypairs=xNew<double*>(numrifts);
++	riftsnumpenaltypairs=xNew<int>(numrifts);
+ 
+ 	for(i=0;i<numrifts;i++){
+ 		numsegs=riftsnumsegs[i];
+@@ -909,7 +904,7 @@
+ 		riftpairs=riftspairs[i];
+ 
+ 		/*allocate riftpenaltypairs, and riftnumpenaltypairs: */
+-		if((numsegs/2-1)!=0)riftpenaltypairs=(double*)xcalloc((numsegs/2-1)*RIFTPENALTYPAIRSWIDTH,sizeof(double));
++		if((numsegs/2-1)!=0)riftpenaltypairs=xNewInit<double>((numsegs/2-1)*RIFTPENALTYPAIRSWIDTH,0.0);
+ 		
+ 		/*Go through only one flank of the rifts, not counting the tips: */
+ 		counter=0;
+@@ -1005,13 +1000,10 @@
+ 		riftspenaltypairs[i]=riftpenaltypairs;
+ 		riftsnumpenaltypairs[i]=(numsegs/2-1);
+ 	}
+-			
+ 
+-
+ 	/*Assign output pointers: */
+ 	*priftspenaltypairs=riftspenaltypairs;
+ 	*priftsnumpenaltypairs=riftsnumpenaltypairs;
+-
+ 	return noerr;
+ }
+ 
+@@ -1142,6 +1134,5 @@
+ 	*px=x;
+ 	*py=y;
+ 	*pnods=nods;
+-
+ 	return noerr;
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12436-12437.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12436-12437.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12436-12437.diff	(revision 12679)
@@ -0,0 +1,296 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp	(revision 12436)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp	(revision 12437)
+@@ -8,7 +8,7 @@
+ 
+ #include <stdarg.h>
+ #include <stdio.h>
+-#include "../Alloc/alloc.h"
++#include "../Alloc/xNewDelete.h"
+ 
+ char* exprintf(const char* format,...){
+ 
+@@ -16,7 +16,7 @@
+ 	char* string=NULL;
+ 
+ 	/*Assum nobody will print more that 1024 characters!*/
+-	string=(char*)xmalloc(1024*sizeof(char));//assume that nobody will print more than 1024 characters at once.
++	string=xNew<char>(1024);//assume that nobody will print more than 1024 characters at once.
+                                                                                                                                                                                                      
+ 	//variable list of arguments
+ 	va_list ap;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12436)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12437)
+@@ -68,31 +68,21 @@
+ /*  multiply (a*b)*c+d  */
+ 
+ 	if (idima*idimc*(idimb+idimd) <= idimb*idimd*(idima+idimc)) {
+-		dtemp=(double *) xmalloc(idima*idimc*sizeof(double));
++		dtemp=xNew<double>(idima*idimc);
+ 
+-		MatrixMultiply(a    ,nrowa,ncola,itrna,
+-				   b    ,nrowb,ncolb,itrnb,
+-				   dtemp,0);
+-		MatrixMultiply(dtemp,idima,idimc,0    ,
+-				   c    ,nrowc,ncolc,itrnc,
+-				   d    ,iaddd);
+-
+-		xfree((void **)&dtemp);
++		MatrixMultiply(a,nrowa,ncola,itrna,b,nrowb,ncolb,itrnb,dtemp,0);
++		MatrixMultiply(dtemp,idima,idimc,0,c,nrowc,ncolc,itrnc,d,iaddd);
++		xDelete<double>(dtemp);
+ 	}
+ 
+ /*  multiply a*(b*c)+d  */
+ 
+ 	else {
+-		dtemp=(double *) xmalloc(idimb*idimd*sizeof(double));
++		dtemp=xNew<double>(idimb*idimd);
+ 
+-		MatrixMultiply(b    ,nrowb,ncolb,itrnb,
+-				   c    ,nrowc,ncolc,itrnc,
+-				   dtemp,0);
+-		MatrixMultiply(a    ,nrowa,ncola,itrna,
+-				   dtemp,idimb,idimd,0    ,
+-				   d    ,iaddd);
+-
+-		xfree((void **)&dtemp);
++		MatrixMultiply(b,nrowb,ncolb,itrnb,c,nrowc,ncolc,itrnc,dtemp,0);
++		MatrixMultiply(a,nrowa,ncola,itrna,dtemp,idimb,idimd,0,d,iaddd);
++		xDelete<double>(dtemp);
+ 	}
+ 
+ 	return 1;
+@@ -197,10 +187,9 @@
+ 
+ 	ncol=nrow;
+ 	det=1.;
++	pivrc =(int(*)[2])xNew<int>(nrow*2);
++	pindx =xNew<int>(nrow);
+ 
+-	pivrc = (int (*)[2]) xmalloc((nrow*2)*sizeof(int));
+-	pindx = (int (*)   ) xcalloc( nrow   ,sizeof(int));
+-
+ /*  loop over the rows/columns of the matrix  */
+ 
+ 	for (i=0; i<nrow; i++) {
+@@ -220,8 +209,8 @@
+ 						}
+ 
+ 		if (fabs(pivot) < DBL_EPSILON) {
+-			xfree((void **)&pivrc);
+-			xfree((void **)&pindx);
++			xfree((void**)&pivrc);
++			xDelete<int>(pindx);
+ 			_error_("Pivot %f less than machine epsilon",pivot);
+ 			noerr=0;
+ 			return noerr;
+@@ -338,8 +327,8 @@
+ 	if (pdet)
+ 		*pdet=det;
+ 
+-	xfree((void **)&pivrc);
+-	xfree((void **)&pindx);
++	xfree((void**)&pivrc);
++	xDelete<int>(pindx);
+ 
+ 	return noerr;
+ }/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/PetscOptionsFromAnalysis.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/PetscOptionsFromAnalysis.cpp	(revision 12436)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/PetscOptionsFromAnalysis.cpp	(revision 12437)
+@@ -38,5 +38,5 @@
+ 	#endif
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&options);
++	xDelete<char>(options);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12436)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12437)
+@@ -64,13 +64,11 @@
+ 	strcpy(outstring,strings[found]);
+ 
+ 	/*Free ressources*/
+-	xfree((void**)&analyses);
++	xDelete<double>(analyses);
+ 	for(i=0;i<numanalyses;i++){
+ 		string=strings[i];
+-		xfree((void**)&string);
++		xDelete<char>(string);
+ 	}
+-	xfree((void**)&strings);
+-
+-
++	xDelete<char*>(strings);
+ 	return outstring;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/GetLocalDofList.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/GetLocalDofList.cpp	(revision 12436)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/GetLocalDofList.cpp	(revision 12437)
+@@ -12,8 +12,8 @@
+ 
+ 	if(numnodes){
+ 		/*allocate: */
+-		ndof_list=(int*)xmalloc(numnodes*sizeof(int));
+-		ngdof_list_cumulative=(int*)xmalloc(numnodes*sizeof(int));
++		ndof_list=xNew<int>(numnodes);
++		ngdof_list_cumulative=xNew<int>(numnodes);
+ 
+ 
+ 		/*Get number of dofs per node, and total for this given set*/
+@@ -32,7 +32,7 @@
+ 
+ 		if(numdof){
+ 			/*Allocate: */
+-			doflist=(int*)xmalloc(numdof*sizeof(int));
++			doflist=xNew<int>(numdof);
+ 
+ 			/*Populate: */
+ 			count=0;
+@@ -54,8 +54,8 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&ndof_list);
+-	xfree((void**)&ngdof_list_cumulative);
++	xDelete<int>(ndof_list);
++	xDelete<int>(ngdof_list_cumulative);
+ 
+ 	/*CLean-up and return*/
+ 	return doflist;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp	(revision 12436)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp	(revision 12437)
+@@ -8,14 +8,14 @@
+ 	int* cs_array=NULL;
+ 
+ 	/*All nodes have the same Coordinate System*/
+-	cs_array=(int*)xmalloc(numnodes*sizeof(int));
++	cs_array=xNew<int>(numnodes);
+ 	for(int i=0;i<numnodes;i++) cs_array[i]=cs_enum;
+ 
+ 	/*Call core*/
+ 	TransformSolutionCoord(solution,nodes,numnodes,cs_array);
+ 
+ 	/*Clean-up*/
+-	xfree((void**)&cs_array);
++	xDelete<int>(cs_array);
+ }
+ 
+ void TransformSolutionCoord(double* solution,Node** nodes,int numnodes,int* cs_array){
+@@ -35,7 +35,7 @@
+ 	}
+ 
+ 	/*Copy current solution vector*/
+-	values=(double*)xmalloc(numdofs*sizeof(double));
++	values=xNew<double>(numdofs);
+ 	for(i=0;i<numdofs;i++) values[i]=solution[i];
+ 
+ 	/*Get Coordinate Systems transform matrix*/
+@@ -46,7 +46,7 @@
+ 				values,numdofs,1,0,
+ 				&solution[0],0);
+ 
+-	/*Free Matrix*/
+-	xfree((void**)&transform);
+-	xfree((void**)&values);
++	/*Free Matrices*/
++	xDelete<double>(transform);
++	xDelete<double>(values);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/GetGlobalDofList.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/GetGlobalDofList.cpp	(revision 12436)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/GetGlobalDofList.cpp	(revision 12437)
+@@ -13,7 +13,7 @@
+ 	if(numnodes){
+ 
+ 		/*Allocate:*/
+-		ndof_list=(int*)xmalloc(numnodes*sizeof(int));
++		ndof_list=xNew<int>(numnodes);
+ 
+ 		/*First, figure out size of doflist: */
+ 		numdof=0;
+@@ -24,7 +24,7 @@
+ 
+ 		if(numdof){
+ 			/*Allocate: */
+-			doflist=(int*)xmalloc(numdof*sizeof(int));
++			doflist=xNew<int>(numdof);
+ 
+ 			/*Populate: */
+ 			count=0;
+@@ -36,7 +36,7 @@
+ 		else doflist=NULL;
+ 	}
+ 	/*Free ressources:*/
+-	xfree((void**)&ndof_list);
++	xDelete<int>(ndof_list);
+ 
+ 	return doflist;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp	(revision 12436)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp	(revision 12437)
+@@ -7,14 +7,14 @@
+ 	int* cs_array=NULL;
+ 
+ 	/*All nodes have the same Coordinate System*/
+-	cs_array=(int*)xmalloc(numnodes*sizeof(int));
++	cs_array=xNew<int>(numnodes);
+ 	for(int i=0;i<numnodes;i++) cs_array[i]=cs_enum;
+ 
+ 	/*Call core*/
+ 	TransformLoadVectorCoord(pe,nodes,numnodes,cs_array);
+ 
+ 	/*Clean-up*/
+-	xfree((void**)&cs_array);
++	xDelete<int>(cs_array);
+ }
+ 
+ void TransformLoadVectorCoord(ElementVector* pe,Node** nodes,int numnodes,int* cs_array){
+@@ -34,7 +34,7 @@
+ 	}
+ 
+ 	/*Copy current load vector*/
+-	values=(double*)xmalloc(pe->nrows*sizeof(double));
++	values=xNew<double>(pe->nrows);
+ 	for(i=0;i<pe->nrows;i++) values[i]=pe->values[i];
+ 
+ 	/*Get Coordinate Systems transform matrix*/
+@@ -45,7 +45,7 @@
+ 				values,pe->nrows,1,0,
+ 				&pe->values[0],0);
+ 
+-	/*Free Matrix*/
+-	xfree((void**)&transform);
+-	xfree((void**)&values);
++	/*Free Matrices*/
++	xDelete<double>(transform);
++	xDelete<double>(values);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 12436)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 12437)
+@@ -87,8 +87,8 @@
+ 		fscanf(fid,"%256s %256s %256s %256s %256s\n",chardummy,chardummy,chardummy,chardummy,chardummy);
+ 
+ 		/*Allocate vertices: */
+-		x=(double*)xmalloc(n*sizeof(double));
+-		y=(double*)xmalloc(n*sizeof(double));
++		x=xNew<double>(n);
++		y=xNew<double>(n);
+ 		
+ 		/*Read vertices: */
+ 		for (i=0;i<n;i++){
Index: /issm/oecreview/Archive/12321-12677/ISSM-12437-12438.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12437-12438.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12437-12438.diff	(revision 12679)
@@ -0,0 +1,22 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp	(revision 12437)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp	(revision 12438)
+@@ -8,7 +8,7 @@
+ 
+ #include <stdarg.h>
+ #include <stdio.h>
+-#include "../Alloc/xNewDelete.h"
++#include "../Alloc/alloc.h"
+ 
+ char* exprintf(const char* format,...){
+ 
+@@ -16,7 +16,7 @@
+ 	char* string=NULL;
+ 
+ 	/*Assum nobody will print more that 1024 characters!*/
+-	string=xNew<char>(1024);//assume that nobody will print more than 1024 characters at once.
++	string=(char*)xmalloc(1024*sizeof(char));//assume that nobody will print more than 1024 characters at once.
+                                                                                                                                                                                                      
+ 	//variable list of arguments
+ 	va_list ap;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12438-12439.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12438-12439.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12438-12439.diff	(revision 12679)
@@ -0,0 +1,312 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystate_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystate_core.cpp	(revision 12438)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystate_core.cpp	(revision 12439)
+@@ -92,5 +92,5 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&requested_outputs);
++	xDelete<int>(requested_outputs);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/ProcessArguments.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/ProcessArguments.cpp	(revision 12438)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/ProcessArguments.cpp	(revision 12439)
+@@ -20,10 +20,10 @@
+ 	*solution_type=StringToEnumx(argv[1]);
+ 	if(argc<3)_error_("Usage error: missing model name");
+ 	modelname=argv[3];
+-	binfilename    = (char*)xmalloc((strlen(modelname)+strlen(".bin")   +1)*sizeof(char)); sprintf(binfilename,   "%s%s",modelname,".bin");
+-	outbinfilename = (char*)xmalloc((strlen(modelname)+strlen(".outbin")+1)*sizeof(char)); sprintf(outbinfilename,"%s%s",modelname,".outbin");
+-	petscfilename  = (char*)xmalloc((strlen(modelname)+strlen(".petsc") +1)*sizeof(char)); sprintf(petscfilename, "%s%s",modelname,".petsc");
+-	lockfilename   = (char*)xmalloc((strlen(modelname)+strlen(".lock")  +1)*sizeof(char)); sprintf(lockfilename,  "%s%s",modelname,".lock");
++	binfilename    = xNew<char>(strlen(modelname)+strlen(".bin")   +1); sprintf(binfilename,   "%s%s",modelname,".bin");
++	outbinfilename = xNew<char>(strlen(modelname)+strlen(".outbin")+1); sprintf(outbinfilename,"%s%s",modelname,".outbin");
++	petscfilename  = xNew<char>(strlen(modelname)+strlen(".petsc") +1); sprintf(petscfilename, "%s%s",modelname,".petsc");
++	lockfilename   = xNew<char>(strlen(modelname)+strlen(".lock")  +1); sprintf(lockfilename,  "%s%s",modelname,".lock");
+ 
+ 	/*Clean up and assign output pointer*/
+ 	*pbinfilename=binfilename;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp	(revision 12438)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp	(revision 12439)
+@@ -47,5 +47,5 @@
+ 	ControlInputScaleGradientx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,norm_list,step);
+ 
+ 	/*Clean up and return*/
+-	xfree((void**)&norm_list);
++	xDelete<double>(norm_list);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp	(revision 12438)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp	(revision 12439)
+@@ -28,7 +28,7 @@
+ 	
+ 		case DiagnosticSolutionEnum:
+ 			numanalyses=5;
+-			analyses=(int*)xmalloc(numanalyses*sizeof(int));
++			analyses=xNew<int>(numanalyses);
+ 			analyses[0]=DiagnosticHorizAnalysisEnum;
+ 			analyses[1]=DiagnosticVertAnalysisEnum;
+ 			analyses[2]=DiagnosticHutterAnalysisEnum;
+@@ -38,7 +38,7 @@
+ 
+ 		case SteadystateSolutionEnum:
+ 			numanalyses=8;
+-			analyses=(int*)xmalloc(numanalyses*sizeof(int));
++			analyses=xNew<int>(numanalyses);
+ 			analyses[0]=DiagnosticHorizAnalysisEnum;
+ 			analyses[1]=DiagnosticVertAnalysisEnum;
+ 			analyses[2]=DiagnosticHutterAnalysisEnum;
+@@ -51,20 +51,20 @@
+ 
+ 		case ThermalSolutionEnum:
+ 			numanalyses=2;
+-			analyses=(int*)xmalloc(numanalyses*sizeof(int));
++			analyses=xNew<int>(numanalyses);
+ 			analyses[0]=ThermalAnalysisEnum;
+ 			analyses[1]=MeltingAnalysisEnum;
+ 			break;
+ 		
+ 		case EnthalpySolutionEnum:
+ 			numanalyses=1;
+-			analyses=(int*)xmalloc(numanalyses*sizeof(int));
++			analyses=xNew<int>(numanalyses);
+ 			analyses[0]=EnthalpyAnalysisEnum;
+ 			break;
+ 		
+ 		case HydrologySolutionEnum:
+ 			numanalyses=3;
+-			analyses=(int*)xmalloc(numanalyses*sizeof(int));
++			analyses=xNew<int>(numanalyses);
+ 			analyses[0]=HydrologyAnalysisEnum;
+ 			analyses[1]=SurfaceSlopeAnalysisEnum;
+ 			analyses[2]=BedSlopeAnalysisEnum;
+@@ -72,31 +72,31 @@
+ 
+ 		case PrognosticSolutionEnum:
+ 			numanalyses=1;
+-			analyses=(int*)xmalloc(numanalyses*sizeof(int));
++			analyses=xNew<int>(numanalyses);
+ 			analyses[0]=PrognosticAnalysisEnum;
+ 			break;
+ 
+ 		case BalancethicknessSolutionEnum:
+ 			numanalyses=1;
+-			analyses=(int*)xmalloc(numanalyses*sizeof(int));
++			analyses=xNew<int>(numanalyses);
+ 			analyses[0]=BalancethicknessAnalysisEnum;
+ 			break;
+ 
+ 		case SurfaceSlopeSolutionEnum:
+ 			numanalyses=1;
+-			analyses=(int*)xmalloc(numanalyses*sizeof(int));
++			analyses=xNew<int>(numanalyses);
+ 			analyses[0]=SurfaceSlopeAnalysisEnum;
+ 			break;
+ 
+ 		case BedSlopeSolutionEnum:
+ 			numanalyses=1;
+-			analyses=(int*)xmalloc(numanalyses*sizeof(int));
++			analyses=xNew<int>(numanalyses);
+ 			analyses[0]=BedSlopeAnalysisEnum;
+ 			break;
+ 
+ 		case TransientSolutionEnum:
+ 			numanalyses=9;
+-			analyses=(int*)xmalloc(numanalyses*sizeof(int));
++			analyses=xNew<int>(numanalyses);
+ 			analyses[0]=DiagnosticHorizAnalysisEnum;
+ 			analyses[1]=DiagnosticVertAnalysisEnum;
+ 			analyses[2]=DiagnosticHutterAnalysisEnum;
+@@ -116,5 +116,5 @@
+ 	/*Assign output pointers:*/
+ 	if(pnumanalyses) *pnumanalyses=numanalyses;
+ 	if(panalyses)    *panalyses=analyses;
+-	else              xfree((void**)&analyses);
++	else              xDelete<int>(analyses);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12438)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12439)
+@@ -143,11 +143,11 @@
+ 	}
+ 
+ 	/*Free ressources */
+-	xfree((void**)&analyses);
+-	xfree((void**)&lockfilename);
+-	xfree((void**)&binfilename);
+-	xfree((void**)&outbinfilename);
+-	xfree((void**)&petscfilename);
++	xDelete<int>(analyses);
++	xDelete<char>(lockfilename);
++	xDelete<char>(binfilename);
++	xDelete<char>(outbinfilename);
++	xDelete<char>(petscfilename);
+ 	delete femmodel;
+ 
+ 	/*Get finish time and close*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp	(revision 12438)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp	(revision 12439)
+@@ -146,5 +146,5 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&requested_outputs);
++	xDelete<int>(requested_outputs);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlrestart.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlrestart.cpp	(revision 12438)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlrestart.cpp	(revision 12439)
+@@ -32,5 +32,5 @@
+ 	}
+ 
+ 	/*Clean up and return*/
+-	xfree((void**)&control_type);
++	xDelete<int>(control_type);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/control_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/control_core.cpp	(revision 12438)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/control_core.cpp	(revision 12439)
+@@ -69,8 +69,8 @@
+ 	if(isstokes) solutioncore(femmodel);
+ 
+ 	/*Initialize responses: */
+-	J=(double*)xmalloc(nsteps*sizeof(double));
+-	step_responses=(int*)xmalloc(num_responses*sizeof(int));
++	J=xNew<double>(nsteps);
++	step_responses=xNew<int>(num_responses);
+ 		
+ 	/*Initialize some of the BrentSearch arguments: */
+ 	optargs.femmodel=femmodel;
+@@ -119,10 +119,10 @@
+ 
+ 	cleanup_and_return:
+ 	/*Free ressources: */
+-	xfree((void**)&control_type);
+-	xfree((void**)&responses);
+-	xfree((void**)&step_responses);
+-	xfree((void**)&maxiter);
+-	xfree((void**)&cm_jump);
+-	xfree((void**)&J);
++	xDelete<int>(control_type);
++	xDelete<int>(step_responses);
++	xDelete<double>(maxiter);
++	xDelete<double>(responses);
++	xDelete<double>(cm_jump);
++	xDelete<double>(J);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12438)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12439)
+@@ -85,16 +85,16 @@
+ 	WriteLockFile(lockfilename);
+ 
+ 	/*Free ressources */
+-	xfree((void**)&lockfilename);
+-	xfree((void**)&binfilename);
+-	xfree((void**)&outbinfilename);
+-	xfree((void**)&x);
+-	xfree((void**)&y);
+-	xfree((void**)&data);
+-	xfree((void**)&x_interp);
+-	xfree((void**)&y_interp);
+-	xfree((void**)&predictions);
+-	xfree((void**)&error);
++	xDelete<char>(lockfilename);
++	xDelete<char>(binfilename);
++	xDelete<char>(outbinfilename);
++	xDelete<double>(x);
++	xDelete<double>(y);
++	xDelete<double>(data);
++	xDelete<double>(x_interp);
++	xDelete<double>(y_interp);
++	xDelete<double>(predictions);
++	xDelete<double>(error);
+ 	delete options;
+ 	delete results;
+ 
+@@ -123,9 +123,9 @@
+ 
+ 	if(argc<2)_error_("Usage error: missing model name");
+ 	modelname=argv[2];
+-	binfilename    = (char*)xmalloc((strlen(modelname)+strlen(".bin")   +1)*sizeof(char)); sprintf(binfilename,   "%s%s",modelname,".bin");
+-	outbinfilename = (char*)xmalloc((strlen(modelname)+strlen(".outbin")+1)*sizeof(char)); sprintf(outbinfilename,"%s%s",modelname,".outbin");
+-	lockfilename   = (char*)xmalloc((strlen(modelname)+strlen(".lock")  +1)*sizeof(char)); sprintf(lockfilename,  "%s%s",modelname,".lock");
++	binfilename    = xNew<char>((strlen(modelname)+strlen(".bin")   +1)); sprintf(binfilename,   "%s%s",modelname,".bin");
++	outbinfilename = xNew<char>((strlen(modelname)+strlen(".outbin")+1)); sprintf(outbinfilename,"%s%s",modelname,".outbin");
++	lockfilename   = xNew<char>((strlen(modelname)+strlen(".lock")  +1)); sprintf(lockfilename,  "%s%s",modelname,".lock");
+ 
+ 	/*Clean up and assign output pointer*/
+ 	*pbinfilename=binfilename;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/diagnostic_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/diagnostic_core.cpp	(revision 12438)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/diagnostic_core.cpp	(revision 12439)
+@@ -104,5 +104,5 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&requested_outputs);
++	xDelete<int>(requested_outputs);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12438)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12439)
+@@ -49,7 +49,7 @@
+ 	femmodel->parameters->FindParam(&nsteps,InversionNstepsEnum);
+ 	femmodel->parameters->FindParam(&dummy,NULL,NULL,InversionMaxiterPerStepEnum);
+ 	femmodel->parameters->SetParam(false,SaveResultsEnum);
+-	maxiter=nsteps*(int)dummy[0]; xfree((void**)&dummy);
++	maxiter=nsteps*(int)dummy[0]; xDelete<double>(dummy);
+ 
+ 	/*Initialize TAO*/
+ 	_printf_(VerboseControl(),"%s\n","   Initializing the Toolkit for Advanced Optimization (TAO)");
+@@ -94,7 +94,7 @@
+ 	solutioncore(femmodel);
+ 
+ 	/*Clean up and return*/
+-	xfree((void**)&control_list);
++	xDelete<int>(control_list);
+ 	xdelete(&X);
+ 	TaoDestroy(&tao);
+ 	TaoFinalize();
+@@ -124,7 +124,7 @@
+ 	femmodel->parameters->FindParam(&cost_functionsd,NULL,NULL,InversionCostFunctionsEnum);
+ 
+ 	/*Prepare objective function*/
+-	cost_functions=(int*)xmalloc(num_cost_functions*sizeof(int));
++	cost_functions=xNew<int>(num_cost_functions);
+ 	for(int i=0;i<num_cost_functions;i++) cost_functions[i]=(int)cost_functionsd[i]; //FIXME
+ 	femmodel->parameters->SetParam(cost_functions,1,num_cost_functions,StepResponsesEnum);
+ 
+@@ -145,8 +145,8 @@
+ 	VecScale(G,-1.);
+ 
+ 	/*Clean-up and return*/
+-	xfree((void**)&cost_functions);
+-	xfree((void**)&cost_functionsd);
++	xDelete<int>(cost_functions);
++	xDelete<double>(cost_functionsd);
+ 	return 0;
+ }
+ int IssmMonitor(TaoSolver tao, void *userCtx){
+@@ -174,7 +174,7 @@
+ 	_printf_(true,"\n");
+ 
+ 	/*Clean-up and return*/
+-	xfree((void**)&responses);
++	xDelete<int>(responses);
+ 	return 0;
+ }
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12439-12440.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12439-12440.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12439-12440.diff	(revision 12679)
@@ -0,0 +1,93 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12439)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12440)
+@@ -170,7 +170,7 @@
+ 	intended for small matrices.  */
+ 	int noerr=1;
+ 	int i,j,k,ipt,jpt,irow,icol,ipiv,ncol;
+-	int (*pivrc)[2],*pindx;
++	int *pivrc1,*pivrc2,*pindx;
+ 	double pivot,det,dtemp;
+ 
+ 	if (!b && nvec) {
+@@ -216,8 +216,8 @@
+ 			return noerr;
+ 		}
+ 
+-		pivrc[i][0]=irow;
+-		pivrc[i][1]=icol;
++		pivrc1[i]=irow;
++		pivrc2[i]=icol;
+ 
+ 		ipiv=icol;
+ 		pindx[ipiv]++;
+@@ -307,9 +307,9 @@
+ 	for (i=0; i<nrow; i++) {
+ 		j=(nrow-1)-i;
+ 
+-		if (pivrc[j][0] != pivrc[j][1]) {
+-			irow=pivrc[j][0];
+-			icol=pivrc[j][1];
++		if (pivrc1[j] != pivrc2[j]) {
++			irow=pivrc1[j];
++			icol=pivrc2[j];
+ 
+ //			_printf_(true,"column switch back for j=%d: irow=%d, icol=%d\n",
+ //					 j,irow,icol);
+@@ -329,7 +329,6 @@
+ 
+ 	xfree((void**)&pivrc);
+ 	xDelete<int>(pindx);
+-
+ 	return noerr;
+ }/*}}}*/
+ /*FUNCTION Matrix2x2Determinant(double* Adet,double* A) {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12439)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12440)
+@@ -60,7 +60,7 @@
+ 	}
+ 
+ 	/*ok, grab the option string: */
+-	outstring=(char*)xmalloc((strlen(strings[found])+1)*sizeof(char));
++	outstring=xNew<char>(strlen(strings[found])+1);
+ 	strcpy(outstring,strings[found]);
+ 
+ 	/*Free ressources*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp	(revision 12439)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp	(revision 12440)
+@@ -2,7 +2,7 @@
+  * SplitMeshForRifts.c:
+  */
+ #include "./trimesh.h"
+-
++#include "../Alloc/xNewDelete.h"
+ #include "../Alloc/alloc.h"
+ 
+ int SplitMeshForRifts(int* pnel,double** pindex,int* pnods,double** px,double** py,int* pnsegs,double** psegments,double** psegmentmarkerlist){
+@@ -51,7 +51,7 @@
+ 	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!
++	flags=xNewInit<int>(nods,0); //to make sure we don't split the same nodes twice!
+ 	for (i=0;i<nriftsegs;i++){
+ 		for (j=0;j<2;j++){
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12439)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12440)
+@@ -128,7 +128,7 @@
+ 	double element_nodes[3];
+ 
+ 	/*Allocate segmentflags: */
+-	riftsegments_uncompressed=(int*)xcalloc(nsegs*5,sizeof(int));
++	riftsegments_uncompressed=xNewInit<int>(nsegs*5,0);
+ 
+ 	/*Find the segments that belong to a rift: they are the ones that see two elements. The other ones belong to a boundary 
+ 	 *or a hole: */
Index: /issm/oecreview/Archive/12321-12677/ISSM-12440-12441.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12440-12441.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12440-12441.diff	(revision 12679)
@@ -0,0 +1,479 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12440)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12441)
+@@ -187,7 +187,8 @@
+ 
+ 	ncol=nrow;
+ 	det=1.;
+-	pivrc =(int(*)[2])xNew<int>(nrow*2);
++	pivrc1 =xNew<int>(nrow);
++	pivrc2 =xNew<int>(nrow);
+ 	pindx =xNew<int>(nrow);
+ 
+ /*  loop over the rows/columns of the matrix  */
+@@ -209,7 +210,8 @@
+ 						}
+ 
+ 		if (fabs(pivot) < DBL_EPSILON) {
+-			xfree((void**)&pivrc);
++			xDelete<int>(pivrc1);
++			xDelete<int>(pivrc2);
+ 			xDelete<int>(pindx);
+ 			_error_("Pivot %f less than machine epsilon",pivot);
+ 			noerr=0;
+@@ -324,10 +326,9 @@
+ 		}
+ 	}
+ 
+-	if (pdet)
+-		*pdet=det;
+-
+-	xfree((void**)&pivrc);
++	if (pdet) *pdet=det;
++	xDelete<int>(pivrc1);
++	xDelete<int>(pivrc2);
+ 	xDelete<int>(pindx);
+ 	return noerr;
+ }/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12440)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12441)
+@@ -77,7 +77,7 @@
+ 	if(!Ke1->dofsymmetrical || !Ke2->dofsymmetrical) _error_("merging 2 non dofsymmetrical matrices not implemented yet");
+ 
+ 	/*Initialize itransformation matrix Ke[P[i]] = Ke2[i]*/
+-	P=(int*)xmalloc(Ke2->nrows*sizeof(int));
++	P=xNew<int>(Ke2->nrows);
+ 
+ 	/*1: Get the new numbering of Ke2 and get size of the new matrix*/
+ 	gsize=Ke1->nrows;
+@@ -99,8 +99,8 @@
+ 	this->dofsymmetrical=true;
+ 
+ 	/*Gset and values*/
+-	this->gglobaldoflist=(int*)xmalloc(this->nrows*sizeof(int));
+-	this->values=(double*)xcalloc(this->nrows*this->ncols,sizeof(double));
++	this->gglobaldoflist=xNew<int>(this->nrows);
++	this->values=xNewInit<double>(this->nrows*this->ncols,0.0);
+ 	for(i=0;i<Ke1->nrows;i++){
+ 		for(j=0;j<Ke1->ncols;j++){
+ 			this->values[i*this->ncols+j] += Ke1->values[i*Ke1->ncols+j];
+@@ -121,8 +121,8 @@
+ 	}
+ 	this->row_fsize=fsize;
+ 	if(fsize){
+-		this->row_flocaldoflist =(int*)xmalloc(fsize*sizeof(int));
+-		this->row_fglobaldoflist=(int*)xmalloc(fsize*sizeof(int));
++		this->row_flocaldoflist =xNew<int>(fsize);
++		this->row_fglobaldoflist=xNew<int>(fsize);
+ 		for(i=0;i<Ke1->row_fsize;i++){
+ 			this->row_flocaldoflist[i] =Ke1->row_flocaldoflist[i];
+ 			this->row_fglobaldoflist[i]=Ke1->row_fglobaldoflist[i];
+@@ -148,8 +148,8 @@
+ 	}
+ 	this->row_ssize=ssize;
+ 	if(ssize){
+-		this->row_slocaldoflist =(int*)xmalloc(ssize*sizeof(int));
+-		this->row_sglobaldoflist=(int*)xmalloc(ssize*sizeof(int));
++		this->row_slocaldoflist =xNew<int>(ssize);
++		this->row_sglobaldoflist=xNew<int>(ssize);
+ 		for(i=0;i<Ke1->row_ssize;i++){
+ 			this->row_slocaldoflist[i] =Ke1->row_slocaldoflist[i];
+ 			this->row_sglobaldoflist[i]=Ke1->row_sglobaldoflist[i];
+@@ -177,7 +177,7 @@
+ 	this->col_sglobaldoflist=NULL;
+ 
+ 	/*clean-up*/
+-	xfree((void**)&P);
++	xDelete<int>(P);
+ }
+ /*}}}*/
+ /*FUNCTION ElementMatrix::ElementMatrix(ElementMatrix* Ke1, ElementMatrix* Ke2,ElementMatrix* Ke3){{{*/
+@@ -204,7 +204,7 @@
+ 	this->ncols=this->nrows;
+ 
+ 	/*fill values with 0: */
+-	this->values=(double*)xcalloc(this->nrows*this->ncols,sizeof(double));
++	this->values=xNewInit<double>(this->nrows*this->ncols,0.0);
+ 
+ 	/*g list*/
+ 	this->gglobaldoflist=GetGlobalDofList(nodes,numnodes,GsetEnum,approximation);
+@@ -230,16 +230,16 @@
+ /*FUNCTION ElementMatrix::~ElementMatrix(){{{*/
+ ElementMatrix::~ElementMatrix(){
+ 	
+-	xfree((void**)&this->values);
+-	xfree((void**)&this->gglobaldoflist);
+-	xfree((void**)&this->row_flocaldoflist);
+-	xfree((void**)&this->row_fglobaldoflist);
+-	xfree((void**)&this->row_slocaldoflist);
+-	xfree((void**)&this->row_sglobaldoflist);
+-	xfree((void**)&this->col_flocaldoflist);
+-	xfree((void**)&this->col_fglobaldoflist);
+-	xfree((void**)&this->col_slocaldoflist);
+-	xfree((void**)&this->col_sglobaldoflist);
++	xDelete<double>(this->values);
++	xDelete<int>(this->gglobaldoflist);
++	xDelete<int>(this->row_flocaldoflist);
++	xDelete<int>(this->row_fglobaldoflist);
++	xDelete<int>(this->row_slocaldoflist);
++	xDelete<int>(this->row_sglobaldoflist);
++	xDelete<int>(this->col_flocaldoflist);
++	xDelete<int>(this->col_fglobaldoflist);
++	xDelete<int>(this->col_slocaldoflist);
++	xDelete<int>(this->col_sglobaldoflist);
+ }
+ /*}}}*/
+ 
+@@ -264,7 +264,7 @@
+ 
+ 		if(this->row_fsize){
+ 			/*first, retrieve values that are in the f-set from the g-set values matrix: */
+-			localvalues=(double*)xmalloc(this->row_fsize*this->row_fsize*sizeof(double));
++			localvalues=xNew<double>(this->row_fsize*this->row_fsize);
+ 			for(i=0;i<this->row_fsize;i++){
+ 				for(j=0;j<this->row_fsize;j++){
+ 					*(localvalues+this->row_fsize*i+j)=*(this->values+this->ncols*this->row_flocaldoflist[i]+this->row_flocaldoflist[j]);
+@@ -274,13 +274,13 @@
+ 			Kff->SetValues(this->row_fsize,this->row_fglobaldoflist,this->row_fsize,this->row_fglobaldoflist,localvalues,ADD_VAL);
+ 
+ 			/*Free ressources:*/
+-			xfree((void**)&localvalues);
++			xDelete<double>(localvalues);
+ 		}
+ 
+ 
+ 		if((this->row_ssize!=0) && (this->row_fsize!=0)){
+ 			/*first, retrieve values that are in the f and s-set from the g-set values matrix: */
+-			localvalues=(double*)xmalloc(this->row_fsize*this->row_ssize*sizeof(double));
++			localvalues=xNew<double>(this->row_fsize*this->row_ssize);
+ 			for(i=0;i<this->row_fsize;i++){
+ 				for(j=0;j<this->row_ssize;j++){
+ 					*(localvalues+this->row_ssize*i+j)=*(this->values+this->ncols*this->row_flocaldoflist[i]+this->row_slocaldoflist[j]);
+@@ -290,7 +290,7 @@
+ 			Kfs->SetValues(this->row_fsize,this->row_fglobaldoflist,this->row_ssize,this->row_sglobaldoflist,localvalues,ADD_VAL);
+ 
+ 			/*Free ressources:*/
+-			xfree((void**)&localvalues);
++			xDelete<double>(localvalues);
+ 		}
+ 	}
+ 	else{
+@@ -316,7 +316,7 @@
+ 
+ 		if(this->row_fsize){
+ 			/*first, retrieve values that are in the f-set from the g-set values matrix: */
+-			localvalues=(double*)xmalloc(this->row_fsize*this->row_fsize*sizeof(double));
++			localvalues=xNew<double>(this->row_fsize*this->row_fsize);
+ 			for(i=0;i<this->row_fsize;i++){
+ 				for(j=0;j<this->row_fsize;j++){
+ 					*(localvalues+this->row_fsize*i+j)=*(this->values+this->ncols*this->row_flocaldoflist[i]+this->row_flocaldoflist[j]);
+@@ -326,7 +326,7 @@
+ 			Jff->SetValues(this->row_fsize,this->row_fglobaldoflist,this->row_fsize,this->row_fglobaldoflist,localvalues,ADD_VAL);
+ 
+ 			/*Free ressources:*/
+-			xfree((void**)&localvalues);
++			xDelete<double>(localvalues);
+ 		}
+ 
+ 	}
+@@ -427,17 +427,17 @@
+ 	this->ncols =Ke->ncols;
+ 	this->dofsymmetrical=Ke->dofsymmetrical;
+ 
+-	this->values=(double*)xmalloc(this->nrows*this->ncols*sizeof(double));
++	this->values=xNew<double>(this->nrows*this->ncols);
+ 	memcpy(this->values,Ke->values,this->nrows*this->ncols*sizeof(double));
+ 
+-	this->gglobaldoflist=(int*)xmalloc(this->nrows*sizeof(int));
++	this->gglobaldoflist=xNew<int>(this->nrows);
+ 	memcpy(this->gglobaldoflist,Ke->gglobaldoflist,this->nrows*sizeof(int));
+ 
+ 	this->row_fsize=Ke->row_fsize;
+ 	if(this->row_fsize){
+-		this->row_flocaldoflist=(int*)xmalloc(this->row_fsize*sizeof(int));
++		this->row_flocaldoflist=xNew<int>(this->row_fsize);
+ 		memcpy(this->row_flocaldoflist,Ke->row_flocaldoflist,this->row_fsize*sizeof(int));
+-		this->row_fglobaldoflist=(int*)xmalloc(this->row_fsize*sizeof(int));
++		this->row_fglobaldoflist=xNew<int>(this->row_fsize);
+ 		memcpy(this->row_fglobaldoflist,Ke->row_fglobaldoflist,this->row_fsize*sizeof(int));
+ 	}
+ 	else{
+@@ -447,9 +447,9 @@
+ 
+ 	this->row_ssize=Ke->row_ssize;
+ 	if(this->row_ssize){
+-		this->row_slocaldoflist=(int*)xmalloc(this->row_ssize*sizeof(int));
++		this->row_slocaldoflist=xNew<int>(this->row_ssize);
+ 		memcpy(this->row_slocaldoflist,Ke->row_slocaldoflist,this->row_ssize*sizeof(int));
+-		this->row_sglobaldoflist=(int*)xmalloc(this->row_ssize*sizeof(int));
++		this->row_sglobaldoflist=xNew<int>(this->row_ssize);
+ 		memcpy(this->row_sglobaldoflist,Ke->row_sglobaldoflist,this->row_ssize*sizeof(int));
+ 	}
+ 	else{
+@@ -459,9 +459,9 @@
+ 
+ 	this->col_fsize=Ke->col_fsize;
+ 	if(this->col_fsize){
+-		this->col_flocaldoflist=(int*)xmalloc(this->col_fsize*sizeof(int));
++		this->col_flocaldoflist=xNew<int>(this->col_fsize);
+ 		memcpy(this->col_flocaldoflist,Ke->col_flocaldoflist,this->col_fsize*sizeof(int));
+-		this->col_fglobaldoflist=(int*)xmalloc(this->col_fsize*sizeof(int));
++		this->col_fglobaldoflist=xNew<int>(this->col_fsize);
+ 		memcpy(this->col_fglobaldoflist,Ke->col_fglobaldoflist,this->col_fsize*sizeof(int));
+ 	}
+ 	else{
+@@ -471,9 +471,9 @@
+ 
+ 	this->col_ssize=Ke->col_ssize;
+ 	if(this->col_ssize){
+-		this->col_slocaldoflist=(int*)xmalloc(this->col_ssize*sizeof(int));
++		this->col_slocaldoflist=xNew<int>(this->col_ssize);
+ 		memcpy(this->col_slocaldoflist,Ke->col_slocaldoflist,this->col_ssize*sizeof(int));
+-		this->col_sglobaldoflist=(int*)xmalloc(this->col_ssize*sizeof(int));
++		this->col_sglobaldoflist=xNew<int>(this->col_ssize);
+ 		memcpy(this->col_sglobaldoflist,Ke->col_sglobaldoflist,this->col_ssize*sizeof(int));
+ 	}
+ 	else{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.cpp	(revision 12440)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.cpp	(revision 12441)
+@@ -43,7 +43,7 @@
+ 	this->vector=new SeqVec(pM,fromlocalsize);
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	this->avector=(adouble*)xmalloc(pM*sizeof(adouble));
++	this->avector=xNew<adouble>(pM);
+ 	#endif
+ }
+ /*}}}*/
+@@ -51,7 +51,7 @@
+ Vector::Vector(double* serial_vec,int M){
+ 
+ 	#ifdef _HAVE_PETSC_
+-		int* idxm=(int*)xmalloc(M*sizeof(int));
++		int* idxm=xNew<int>(M);
+ 		for(int i=0;i<M;i++) idxm[i]=i;
+ 
+ 		this->vector=NewVec(M);
+@@ -59,12 +59,12 @@
+ 		VecAssemblyBegin(this->vector);
+ 		VecAssemblyEnd(this->vector);
+ 
+-		xfree((void**)&idxm);
++		xDelete<int>(idxm);
+ 	#else
+ 		this->vector=new SeqVec(serial_vec,M);
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-		this->avector=(adouble*)xmalloc(M*sizeof(adouble));
++		this->avector=xNew<adouble>(M);
+ 	#endif
+ }
+ /*}}}*/
+@@ -108,7 +108,7 @@
+ 	delete this->vector;
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	xfree((void**)&this->avector);
++	xDelete<adouble>(this->avector);
+ 	#endif
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12440)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12441)
+@@ -44,7 +44,7 @@
+ 	this->matrix=new SeqMat(M,N);
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	this->amatrix=(adouble*)xmalloc(M*N*sizeof(adouble));
++	this->amatrix=xNew<adouble>(M*N);
+ 	#endif
+ }
+ /*}}}*/
+@@ -57,7 +57,7 @@
+ 	this->matrix=new SeqMat(M,N,sparsity);
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	this->amatrix=(adouble*)xmalloc(M*N*sizeof(adouble));
++	this->amatrix=xNew<adouble>;
+ 	#endif
+ }
+ /*}}}*/
+@@ -68,8 +68,8 @@
+ 	int     i;
+ 
+ 
+-	int* idxm=(int*)xmalloc(M*sizeof(int));
+-	int* idxn=(int*)xmalloc(N*sizeof(int));
++	int* idxm=xNew<int>(M);
++	int* idxn=xNew<int>(N);
+ 	for(i=0;i<M;i++)idxm[i]=i;
+ 	for(i=0;i<N;i++)idxn[i]=i;
+ 
+@@ -78,13 +78,13 @@
+ 	MatAssemblyBegin(this->matrix,MAT_FINAL_ASSEMBLY);
+ 	MatAssemblyEnd(this->matrix,MAT_FINAL_ASSEMBLY);
+ 
+-	xfree((void**)&idxm);
+-	xfree((void**)&idxn);
++	xDelete<int>(idxm);
++	xDelete<int>(idxn);
+ 	#else
+ 	this->matrix=new SeqMat(serial_mat,M,N,sparsity);
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	this->amatrix=(adouble*)xmalloc(M*N*sizeof(adouble));
++	this->amatrix=xNew<adouble>(M*N);
+ 	#endif
+ }
+ /*}}}*/
+@@ -97,7 +97,7 @@
+ 	this->matrix=new SeqMat(M,N,connectivity,numberofdofspernode);
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	this->amatrix=(adouble*)xmalloc(M*N*sizeof(adouble));
++	this->amatrix=xNew<adouble>(M*N);
+ 	#endif
+ }
+ /*}}}*/
+@@ -110,7 +110,7 @@
+ 	delete this->matrix;
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	xfree((void**)&this->amatrix);
++	xDelete<adouble>(this->amatrix);
+ 	#endif
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12440)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12441)
+@@ -53,7 +53,7 @@
+ 	}
+ 
+ 	/*Initialize itransformation matrix pe[P[i]] = pe2[i]*/
+-	P=(int*)xmalloc(pe2->nrows*sizeof(int));
++	P=xNew<int>(pe2->nrows);
+ 
+ 	/*1: Get the new numbering of pe2 and get size of the new matrix*/
+ 	gsize=pe1->nrows;
+@@ -73,8 +73,8 @@
+ 	this->nrows=gsize;
+ 
+ 	/*Gset and values*/
+-	this->gglobaldoflist=(int*)xmalloc(this->nrows*sizeof(int));
+-	this->values=(double*)xcalloc(this->nrows,sizeof(double));
++	this->gglobaldoflist=xNew<int>(this->nrows);
++	this->values=xNewInit<double>(this->nrows,0.0);
+ 	for(i=0;i<pe1->nrows;i++){
+ 		this->values[i] += pe1->values[i];
+ 		this->gglobaldoflist[i]=pe1->gglobaldoflist[i];
+@@ -91,8 +91,8 @@
+ 	}
+ 	this->fsize=fsize;
+ 	if(fsize){
+-		this->flocaldoflist =(int*)xmalloc(fsize*sizeof(int));
+-		this->fglobaldoflist=(int*)xmalloc(fsize*sizeof(int));
++		this->flocaldoflist =xNew<int>(fsize);
++		this->fglobaldoflist=xNew<int>(fsize);
+ 		for(i=0;i<pe1->fsize;i++){
+ 			this->flocaldoflist[i] =pe1->flocaldoflist[i];
+ 			this->fglobaldoflist[i]=pe1->fglobaldoflist[i];
+@@ -112,7 +112,7 @@
+ 	}
+ 
+ 	/*clean-up*/
+-	xfree((void**)&P);
++	xDelete<int>(P);
+ }
+ /*}}}*/
+ /*FUNCTION ElementVector::ElementVector(ElementVector* pe1, ElementVector* pe2,ElementVector* pe3){{{*/
+@@ -137,7 +137,7 @@
+ 	this->nrows=GetNumberOfDofs(nodes,numnodes,GsetEnum,approximation);
+ 
+ 	/*fill values with 0: */
+-	this->values=(double*)xcalloc(this->nrows,sizeof(double));
++	this->values=xNewInit<double>(this->nrows,0.0);
+ 	
+ 	/*g list*/
+ 	this->gglobaldoflist=GetGlobalDofList(nodes,numnodes,GsetEnum,approximation);
+@@ -151,10 +151,10 @@
+ /*FUNCTION ElementVector::~ElementVector(){{{*/
+ ElementVector::~ElementVector(){
+ 	
+-	xfree((void**)&this->values);
+-	xfree((void**)&this->gglobaldoflist);
+-	xfree((void**)&this->flocaldoflist);
+-	xfree((void**)&this->fglobaldoflist);
++	xDelete<double>(this->values);
++	xDelete<int>(this->gglobaldoflist);
++	xDelete<int>(this->flocaldoflist);
++	xDelete<int>(this->fglobaldoflist);
+ }
+ /*}}}*/
+ 
+@@ -170,7 +170,7 @@
+ 
+ 	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));
++		localvalues=xNew<double>(this->fsize);
+ 		for(i=0;i<this->fsize;i++){
+ 			localvalues[i]=this->values[this->flocaldoflist[i]];
+ 		}
+@@ -178,7 +178,7 @@
+ 		pf->SetValues(this->fsize,this->fglobaldoflist,localvalues,ADD_VAL);
+ 
+ 		/*Free ressources:*/
+-		xfree((void**)&localvalues);
++		xDelete<double>(localvalues);
+ 	}
+ 	
+ }
+@@ -191,7 +191,7 @@
+ 
+ 	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));
++		localvalues=xNew<double>(this->fsize);
+ 		for(i=0;i<this->fsize;i++){
+ 			localvalues[i]=this->values[this->flocaldoflist[i]];
+ 		}
+@@ -199,7 +199,7 @@
+ 		pf->SetValues(this->fsize,this->fglobaldoflist,localvalues,INS_VAL);
+ 
+ 		/*Free ressources:*/
+-		xfree((void**)&localvalues);
++		xDelete<double>(localvalues);
+ 	}
+ 
+ }
+@@ -244,17 +244,17 @@
+ 
+ 	this->nrows =pe->nrows;
+ 
+-	this->values=(double*)xmalloc(this->nrows*sizeof(double));
++	this->values=xNew<double>(this->nrows);
+ 	memcpy(this->values,pe->values,this->nrows*sizeof(double));
+ 
+-	this->gglobaldoflist=(int*)xmalloc(this->nrows*sizeof(int));
++	this->gglobaldoflist=xNew<int>(this->nrows);
+ 	memcpy(this->gglobaldoflist,pe->gglobaldoflist,this->nrows*sizeof(int));
+ 
+ 	this->fsize=pe->fsize;
+ 	if(this->fsize){
+-		this->flocaldoflist=(int*)xmalloc(this->fsize*sizeof(int));
++		this->flocaldoflist=xNew<int>(this->fsize);
+ 		memcpy(this->flocaldoflist,pe->flocaldoflist,this->fsize*sizeof(int));
+-		this->fglobaldoflist=(int*)xmalloc(this->fsize*sizeof(int));
++		this->fglobaldoflist=xNew<int>(this->fsize);
+ 		memcpy(this->fglobaldoflist,pe->fglobaldoflist,this->fsize*sizeof(int));
+ 	}
+ 	else{
Index: /issm/oecreview/Archive/12321-12677/ISSM-12441-12442.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12441-12442.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12441-12442.diff	(revision 12679)
@@ -0,0 +1,1068 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp	(revision 12441)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp	(revision 12442)
+@@ -83,8 +83,8 @@
+ 		incontour=vec_incontour->ToMPISerial();
+ 	}
+ 	else{
+-		 incontour=(double*)xmalloc(nods_prime*sizeof(double));
+-		 for (i=0;i<nods_prime;i++) incontour[i]=1;
++		 incontour=xNew<double>(nods_prime);
++		 for (i=0;i<nods_prime;i++) incontour[i]=1.0;
+ 	}
+ 
+ 	/*initialize thread parameters: */
+@@ -111,6 +111,6 @@
+ 	LaunchThread(InterpFromMesh2dxt,(void*)&gate,num);
+ 
+ 	/*Assign output pointers:*/
+-	 xfree((void**)&incontour);
++	 xDelete<double>(incontour);
+ 	*pdata_prime=data_prime;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12441)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12442)
+@@ -10,31 +10,24 @@
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ #include "../modules.h"
+ 
+-int Exp2Kmlx(char* filexp,char* filkml,
+-			 int sgn,
+-			 bool holes){
++int Exp2Kmlx(char* filexp,char* filkml,int sgn,bool holes){
+ 
+ 	double  cm,sp;
+ 
+ 	Xy2lldef(&cm,&sp,sgn);
+-
+-	return(Exp2Kmlx(filexp,filkml,
+-					sgn,cm,sp,
+-					holes));
++	return(Exp2Kmlx(filexp,filkml,sgn,cm,sp,holes));
+ }
+ 
+-int Exp2Kmlx(char* filexp,char* filkml,
+-			 int sgn,double cm,double sp,
+-			 bool holes){
++int Exp2Kmlx(char* filexp,char* filkml,int sgn,double cm,double sp,bool holes){
+ 
+-	int     i,j,iret=0;
+-	int     lwidth=1;
+-	double  popac=0.50;
+-	int     nprof;
+-	int     *pnvert=NULL;
+-	double  **pprofx=NULL,**pprofy=NULL;
+-	bool    *closed=NULL;
+-	double  *lat=NULL,*lon=NULL;
++	int      i        ,j,iret=0;
++	int      lwidth = 1;
++	double   popac  = 0.50;
++	int      nprof;
++	int     *pnvert = NULL;
++	double **pprofx = NULL,**pprofy=NULL;
++	bool    *closed = NULL;
++	double  *lat    = NULL, *lon=NULL;
+ 
+ 	char    indent[81]="";
+ 	KML_File*          kfile =NULL;
+@@ -58,7 +51,7 @@
+ 	time0 =time(NULL);
+ 	_printf_(true,"\nExp2Kmlx Module -- %s",ctime(&time0));
+ 
+-/*  read exp file  */
++	/*read exp file  */
+ 
+ 	if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp))
+ 		_error_("Error reading exp file.");
+@@ -142,17 +135,17 @@
+ 		kring =new KML_LinearRing();
+ 
+ 		kring->ncoord    =pnvert[i]-1;
+-		lat=(double *) xmalloc(kring->ncoord*sizeof(double));
+-		lon=(double *) xmalloc(kring->ncoord*sizeof(double));
++		lat=xNew<double>(kring->ncoord);
++		lon=xNew<double>(kring->ncoord);
+ 		Xy2llx(lat,lon,pprofx[i],pprofy[i],kring->ncoord,sgn,cm,sp);
+-		kring->coords    =(double (*)[3]) xmalloc(kring->ncoord*3*sizeof(double));
++		kring->coords=xNew<double>(kring->ncoord*3);
+ 		for (j=0; j<kring->ncoord; j++) {
+-			kring->coords[j][0]=lon[j];
+-			kring->coords[j][1]=lat[j];
+-			kring->coords[j][2]=0.;
++			kring->coords[3*j+0]=lon[j];
++			kring->coords[3*j+1]=lat[j];
++			kring->coords[3*j+2]=0.;
+ 		}
+-		xfree((void**)&lon);
+-		xfree((void**)&lat);
++		xDelete<double>(lon);
++		xDelete<double>(lat);
+ 
+ 		(kpoly ->outer     )->AddObject((Object*)kring);
+ 		kring =NULL;
+@@ -166,17 +159,17 @@
+ 			kring =new KML_LinearRing();
+ 
+ 			kring->ncoord    =pnvert[i]-1;
+-			lat=(double *) xmalloc(kring->ncoord*sizeof(double));
+-			lon=(double *) xmalloc(kring->ncoord*sizeof(double));
++			lat=xNew<double>(kring->ncoord);
++			lon=xNew<double>(kring->ncoord);
+ 			Xy2llx(lat,lon,pprofx[i],pprofy[i],kring->ncoord,sgn,cm,sp);
+-			kring->coords    =(double (*)[3]) xmalloc(kring->ncoord*3*sizeof(double));
++			kring->coords    =xNew<double>(kring->ncoord*3);
+ 			for (j=0; j<kring->ncoord; j++) {
+-				kring->coords[j][0]=lon[j];
+-				kring->coords[j][1]=lat[j];
+-				kring->coords[j][2]=0.;
++				kring->coords[3*j+0]=lon[j];
++				kring->coords[3*j+1]=lat[j];
++				kring->coords[3*j+2]=0.;
+ 			}
+-			xfree((void**)&lon);
+-			xfree((void**)&lat);
++			xDelete<double>(lon);
++			xDelete<double>(lat);
+ 
+ 			(kpoly ->inner     )->AddObject((Object*)kring);
+ 			kring =NULL;
+@@ -203,17 +196,17 @@
+ 				kring =new KML_LinearRing();
+ 
+ 				kring->ncoord    =pnvert[i]-1;
+-				lat=(double *) xmalloc(kring->ncoord*sizeof(double));
+-				lon=(double *) xmalloc(kring->ncoord*sizeof(double));
++				lat=xNew<double>(kring->ncoord);
++				lon=xNew<double>(kring->ncoord);
+ 				Xy2llx(lat,lon,pprofx[i],pprofy[i],kring->ncoord,sgn,cm,sp);
+-				kring->coords    =(double (*)[3]) xmalloc(kring->ncoord*3*sizeof(double));
++				kring->coords    =xNew<double>(kring->ncoord*3);
+ 				for (j=0; j<kring->ncoord; j++) {
+-					kring->coords[j][0]=lon[j];
+-					kring->coords[j][1]=lat[j];
+-					kring->coords[j][2]=0.;
++					kring->coords[3*j+0]=lon[j];
++					kring->coords[3*j+1]=lat[j];
++					kring->coords[3*j+2]=0.;
+ 				}
+-				xfree((void**)&lon);
+-				xfree((void**)&lat);
++				xDelete<double>(lon);
++				xDelete<double>(lat);
+ 
+ 				(kpoly ->outer     )->AddObject((Object*)kring);
+ 				kring =NULL;
+@@ -230,17 +223,17 @@
+ 				kline =new KML_LineString();
+ 
+ 				kline->ncoord    =pnvert[i];
+-				lat=(double *) xmalloc(kline->ncoord*sizeof(double));
+-				lon=(double *) xmalloc(kline->ncoord*sizeof(double));
++				lat=xNew<double>(kline->ncoord);
++				lon=xNew<double>(kline->ncoord);
+ 				Xy2llx(lat,lon,pprofx[i],pprofy[i],kline->ncoord,sgn,cm,sp);
+-				kline->coords    =(double (*)[3]) xmalloc(kline->ncoord*3*sizeof(double));
++				kline->coords    =xNew<double>(kline->ncoord*3);
+ 				for (j=0; j<kline->ncoord; j++) {
+-					kline->coords[j][0]=lon[j];
+-					kline->coords[j][1]=lat[j];
+-					kline->coords[j][2]=0.;
++					kline->coords[3*j+0]=lon[j];
++					kline->coords[3*j+1]=lat[j];
++					kline->coords[3*j+2]=0.;
+ 				}
+-				xfree((void**)&lon);
+-				xfree((void**)&lat);
++				xDelete<double>(lon);
++				xDelete<double>(lat);
+ 
+ 				(kplace->geometry  )->AddObject((Object*)kline);
+ 				kline =NULL;
+@@ -250,17 +243,18 @@
+ 				sprintf(kplace->name      ,"Point %d",i+1);
+ 				kplace->visibility=true;
+ 				sprintf(kplace->styleurl  ,"#RandomLineEmptyPoly");
++				int one=1;
+ 
+ 				kpoint=new KML_Point();
+ 
+-				lat=(double *) xmalloc(sizeof(double));
+-				lon=(double *) xmalloc(sizeof(double));
++				lat=xNew<double>(one);
++				lon=xNew<double>(one);
+ 				Xy2llx(lat,lon,pprofx[i],pprofy[i],1,sgn,cm,sp);
+ 				kpoint->coords[0]=lon[0];
+ 				kpoint->coords[1]=lat[0];
+ 				kpoint->coords[2]=0.;
+-				xfree((void**)&lon);
+-				xfree((void**)&lat);
++				xDelete<double>(lon);
++				xDelete<double>(lat);
+ 
+ 				(kplace->geometry  )->AddObject((Object*)kpoint);
+ 				kpoint =NULL;
+@@ -288,10 +282,10 @@
+ 
+ 	delete kfile;
+ 	for (i=nprof-1; i>=0; i--) {
+-		xfree((void**)&(pprofy[i]));
+-		xfree((void**)&(pprofx[i]));
++		xDelete<double>(pprofy[i]);
++		xDelete<double>(pprofx[i]);
+ 	}
+-	xfree((void**)&pnvert);
++	xDelete<int>(pnvert);
+ 
+ 	clock1=clock();
+ 	time1 =time(NULL);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12441)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12442)
+@@ -36,8 +36,8 @@
+ 	observations=new Observations(obs_list,obs_x,obs_y,obs_length,options);
+ 
+ 	/*Allocate output*/
+-	predictions =(double*)xcalloc(n_interp,sizeof(double));
+-	error       =(double*)xcalloc(n_interp,sizeof(double));
++	predictions =xNewInit<double>(n_interp,0.0);
++	error       =xNewInit<double>(n_interp,0.0);
+ 
+ 	/*Get output*/
+ 	options->Get(&output,"output","prediction");
+@@ -61,12 +61,12 @@
+ 		_printf_(true,"\r      interpolation progress: %5.2lf%%\n",100.);
+ 
+ #ifdef _HAVE_MPI_
+-		double *sumpredictions =(double*)xmalloc(n_interp*sizeof(double));
+-		double *sumerror       =(double*)xmalloc(n_interp*sizeof(double));
++		double *sumpredictions =xNew<double>(n_interp);
++		double *sumerror       =xNew<double>(n_interp);
+ 		MPI_Allreduce(predictions,sumpredictions,n_interp,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
+ 		MPI_Allreduce(error,sumerror,n_interp,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
+-		xfree((void**)&error); error=sumerror;
+-		xfree((void**)&predictions); predictions=sumpredictions;
++		xDelete<double>(error); error=sumerror;
++		xDelete<double>(predictions); predictions=sumpredictions;
+ #endif
+ 	}
+ 	else if(strcmp(output,"nearestneighbor")==0){
+@@ -79,9 +79,9 @@
+ 		_printf_(true,"\r      interpolation progress: %5.2lf%%\n",100.);
+ 
+ #ifdef _HAVE_MPI_
+-		double *sumpredictions =(double*)xmalloc(n_interp*sizeof(double));
++		double *sumpredictions =xNew<double>(n_interp);
+ 		MPI_Allreduce(predictions,sumpredictions,n_interp,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
+-		xfree((void**)&predictions); predictions=sumpredictions;
++		xDelete<double>(predictions); predictions=sumpredictions;
+ #endif
+ 	}
+ 	else if(strcmp(output,"idw")==0){
+@@ -96,9 +96,9 @@
+ 		_printf_(true,"\r      interpolation progress: %5.2lf%%\n",100.);
+ 
+ #ifdef _HAVE_MPI_
+-		double *sumpredictions =(double*)xmalloc(n_interp*sizeof(double));
++		double *sumpredictions =xNew<double>(n_interp);
+ 		MPI_Allreduce(predictions,sumpredictions,n_interp,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
+-		xfree((void**)&predictions); predictions=sumpredictions;
++		xDelete<double>(predictions); predictions=sumpredictions;
+ #endif
+ 	}
+ 	else{
+@@ -108,7 +108,7 @@
+ 	/*clean-up and Assign output pointer*/
+ 	delete variogram;
+ 	delete observations;
+-	xfree((void**)&output);
++	xDelete<char>(output);
+ 	*ppredictions = predictions;
+ 	*perror       = error;
+ 	return 1;
+@@ -130,6 +130,6 @@
+ 	else variogram = new GaussianVariogram(options);
+ 
+ 	/*Assign output pointer*/
+-	xfree((void**)&model);
++	xDelete<char>(model);
+ 	*pvariogram = variogram;
+ }/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12441)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12442)
+@@ -8,30 +8,20 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 
+-void KMLMeshWritex(int* ierror,
+-				   char* name,
+-				   char* notes,
+-				   int* elem,int melem,int nelem,
+-				   int* nodecon,int mncon,int nncon,
+-				   double* lat, double* lng,
+-				   int* part,
+-				   double* data, int mdata, int ndata,
+-				   double* cmap, int mcmap, int ncmap,
+-				   FILE* fid){
++void KMLMeshWritex(int* ierror,char* name,char* notes,int* elem,int melem,int nelem,int* nodecon,int mncon,int nncon,double* lat, double* lng,int* part,double* data, int mdata, int ndata,double* cmap, int mcmap, int ncmap,FILE* fid){
+ 
+-	int     i,j,k,ipt=0,jpt=0,nnodes;
+-	int     mxepg=25;
+-	int     lwidth=1;
+-	double  popac=0.50;
+-	char    indent[81]="  ";
+-	char    cstr[81];
+-	double* edata=NULL;
+-	bool    ncfree=false,
+-			edfree=false;
+-	KML_Document*  kdoc=NULL;
+-	KML_Style*     kstyle;
+-	KML_LineStyle* klsty;
+-	KML_PolyStyle* kpsty;
++	int                 i,j,k,ipt=0,jpt=0,nnodes;
++	int                 mxepg      = 25;
++	int                 lwidth     = 1;
++	double              popac      = 0.50;
++	char                indent[81] = " ";
++	char                cstr[81];
++	double             *edata = NULL;
++	bool ncfree=false, edfree=false;
++	KML_Document       *kdoc = NULL;
++	KML_Style          *kstyle;
++	KML_LineStyle      *klsty;
++	KML_PolyStyle      *kpsty;
+ 
+ 	clock_t clock0,clock1,clock0a,clock0b,clock0c;
+ 	time_t  time0, time1, time0a, time0b, time0c;
+@@ -129,7 +119,7 @@
+ 	if (!nodecon) {
+ 		_printf_(true,"Creating the node connectivity table.\n");
+ 		nncon=mxepg+1;
+-		nodecon=(int *) xcalloc(mncon*nncon,sizeof(int));
++		nodecon=xNewInit<int>(mncon*nncon,0);
+ 		ncfree=true;
+ 
+ 		jpt=0;
+@@ -159,7 +149,7 @@
+ 
+ 		else if (mdata == mncon) {
+ 			_printf_(true,"Averaging nodal data to element data.\n");
+-			edata=(double *) xcalloc(melem*ndata,sizeof(double));
++			edata=xNewInit<double>(melem*ndata,0);
+ 			edfree=true;
+ 
+ 			ipt=0;
+@@ -193,8 +183,8 @@
+ 														edata,
+ 														cmap,mcmap,ncmap));
+ 
+-	if (edfree) xfree((void**)&edata);
+-	if (ncfree) xfree((void**)&nodecon);
++	if(edfree) xfree((void**)&edata);
++	if(ncfree) xfree((void**)&nodecon);
+ 	clock0a=clock();
+ 	time0a =time(NULL);
+ 	_printf_(true,"  Constructed kml document -- %f CPU seconds; %f elapsed seconds.\n\n",
+@@ -343,26 +333,26 @@
+ 
+ 		kring=new KML_LinearRing();
+ 		kring->ncoord    =nelem+1;
+-		kring->coords    =(double (*)[3]) xmalloc((nelem+1)*3*sizeof(double));
++		kring->coords =xNew<double>((nelem+1)*3);
+ 
+ /*  write the nodal coordinates as a linear ring  */
+ 
+ 		for (j=0; j<nelem; j++) {
+-			kring->coords[j][0]=lng[elem[ipt]-1];
+-			kring->coords[j][1]=lat[elem[ipt]-1];
+-			kring->coords[j][2]=alt;
++			kring->coords[3*j+0]=lng[elem[ipt]-1];
++			kring->coords[3*j+1]=lat[elem[ipt]-1];
++			kring->coords[3*j+2]=alt;
+ 			ipt++;
+ 		}
+-		kring->coords[nelem][0]=kring->coords[0][0];
+-		kring->coords[nelem][1]=kring->coords[0][1];
+-		kring->coords[nelem][2]=kring->coords[0][2];
++		kring->coords[3*nelem+0]=kring->coords[3*0+0];
++		kring->coords[3*nelem+1]=kring->coords[3*0+1];
++		kring->coords[3*nelem+2]=kring->coords[3*0+2];
+ //		kring->DeepEcho();
+ 
+ /*  assemble the linear ring into polygon into placemark into folder  */
+ 
+-		(kpoly ->outer     )->AddObject((Object*)kring);
+-		(kplace->geometry  )->AddObject((Object*)kpoly);
+-		(kfold ->feature   )->AddObject((Object*)kplace);
++		(kpoly ->outer   )->AddObject((Object*)kring);
++		(kplace->geometry)->AddObject((Object*)kpoly);
++		(kfold ->feature )->AddObject((Object*)kplace);
+ 
+ //		if (!(int)fmod((double)(i+1),1000))
+ //			_printf_(true,"  %d tria elements written.\n",(i+1));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 12441)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 12442)
+@@ -56,7 +56,7 @@
+ 	in.numberofpointattributes=1;
+ 
+ 	/*fill in the point list: */
+-	in.pointlist = (REAL *) xmalloc(in.numberofpoints * 2 * sizeof(REAL));
++	in.pointlist = xNew<REAL>(in.numberofpoints*2);
+ 
+ 	counter=0;
+ 	for (i=0;i<domain->Size();i++){
+@@ -77,11 +77,11 @@
+ 	}
+ 	
+ 	/*fill in the point attribute list: */
+-	in.pointattributelist = (REAL*)xmalloc(in.numberofpoints*in.numberofpointattributes*sizeof(REAL));
++	in.pointattributelist = xNew<REAL>(in.numberofpoints*in.numberofpointattributes);
+ 	for (i=0;i<in.numberofpoints;i++) in.pointattributelist[i] = 0.0;
+ 	
+ 	/*fill in the point marker list: */
+-	in.pointmarkerlist = (int *) xmalloc(in.numberofpoints * sizeof(int));
++	in.pointmarkerlist = xNew<int>(in.numberofpoints);
+ 	for(i=0;i<in.numberofpoints;i++) in.pointmarkerlist[i] = 0;
+ 
+ 	/*Build segments. First figure out number of segments: holes and closed outlines have as many segments as vertices: */
+@@ -96,8 +96,8 @@
+ 		in.numberofsegments+=contour->nods-1;
+ 	}
+ 	
+-	in.segmentlist = (int *) xmalloc(in.numberofsegments * 2 * sizeof(int));
+-	in.segmentmarkerlist = (int *) xcalloc(in.numberofsegments,sizeof(int));
++	in.segmentlist = xNew<int>(in.numberofsegments*2);
++	in.segmentmarkerlist = (int*)xcalloc(in.numberofsegments,sizeof(int));
+ 	counter=0;
+ 	backcounter=0;
+ 	for (i=0;i<domain->Size();i++){
+@@ -134,7 +134,7 @@
+ 	/*Build holes: */
+ 	in.numberofholes = domain->Size()-1; /*everything is a hole, but for the first profile.*/
+ 	if(in.numberofholes){
+-		in.holelist = (REAL *) xmalloc(in.numberofholes * 2 * sizeof(REAL));
++		in.holelist = xNew<REAL>(in.numberofholes*2);
+ 		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-1,contour->x,contour->y);
+@@ -163,11 +163,11 @@
+ 	/*report(&out, 0, 1, 1, 1, 1, 0);*/
+ 
+ 	/*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=xNew<double>(3*out.numberoftriangles);
++	x=xNew<double>(out.numberofpoints);
++	y=xNew<double>(out.numberofpoints);
++	segments=xNew<double>(3*out.numberofsegments);
++	segmentmarkerlist=xNew<double>(out.numberofsegments);
+ 
+ 	for (i = 0; i< out.numberoftriangles; i++) {
+ 		for (j = 0; j < out.numberofcorners; j++) {
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp	(revision 12441)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp	(revision 12442)
+@@ -38,9 +38,9 @@
+ 	double  popac=0.50;
+ 	int     nshape,ncoord;
+ 	double  cpsum;
+-	int     *pstype=NULL,*pnpart=NULL,**ppstrt=NULL,**pptype=NULL,*pnvert=NULL;
+-	double  **pshapx=NULL,**pshapy=NULL,**pshapz=NULL,**pshapm=NULL;
+-	double  *lat=NULL,*lon=NULL;
++	int     *pstype = NULL, *pnpart=NULL,**ppstrt=NULL,**pptype=NULL,*pnvert=NULL;
++	double **pshapx = NULL,**pshapy=NULL,**pshapz=NULL,**pshapm=NULL;
++	double  *lat    = NULL, *lon=NULL;
+ 
+ 	SHPHandle   hSHP;
+ 	int     nShapeType, nEntities, iPart, bValidate = 0,nInvalidCount=0;
+@@ -48,21 +48,20 @@
+ 	double  adfMinBound[4], adfMaxBound[4];
+ 
+ 	char    indent[81]="";
+-	KML_File*             kfile =NULL;
+-	KML_Document*         kdoc  =NULL;
+-	KML_Style*            kstyle=NULL;
+-	KML_LineStyle*        klsty =NULL;
+-	KML_PolyStyle*        kpsty =NULL;
+-	KML_Folder*           kfold =NULL;
+-	KML_Placemark*        kplace=NULL;
+-	KML_MultiGeometry*    kmulti=NULL;
+-	KML_Polygon*          kpoly =NULL;
+-	KML_LinearRing*       kring =NULL;
+-	KML_LineString*       kline =NULL;
+-	KML_Point*            kpoint=NULL;
++	KML_File          *kfile  = NULL;
++	KML_Document      *kdoc   = NULL;
++	KML_Style         *kstyle = NULL;
++	KML_LineStyle     *klsty  = NULL;
++	KML_PolyStyle     *kpsty  = NULL;
++	KML_Folder        *kfold  = NULL;
++	KML_Placemark     *kplace = NULL;
++	KML_MultiGeometry *kmulti = NULL;
++	KML_Polygon       *kpoly  = NULL;
++	KML_LinearRing    *kring  = NULL;
++	KML_LineString    *kline  = NULL;
++	KML_Point         *kpoint = NULL;
++	FILE              *fid    = NULL;
+ 
+-	FILE*   fid=NULL;
+-
+ 	clock_t clock0,clock1;
+ 	time_t  time0, time1;
+ 
+@@ -96,15 +95,15 @@
+ 			adfMaxBound[3] );
+ 
+ 	nshape=nEntities;
+-	pstype=(int *) xmalloc(nshape*sizeof(int));
+-	pnpart=(int *) xmalloc(nshape*sizeof(int));
+-	ppstrt=(int **) xmalloc(nshape*sizeof(int *));
+-	pptype=(int **) xmalloc(nshape*sizeof(int *));
+-	pnvert=(int *) xmalloc(nshape*sizeof(int));
+-	pshapx=(double **) xmalloc(nshape*sizeof(double *));
+-	pshapy=(double **) xmalloc(nshape*sizeof(double *));
+-	pshapz=(double **) xmalloc(nshape*sizeof(double *));
+-	pshapm=(double **) xmalloc(nshape*sizeof(double *));
++	pstype=xNew<int>(nshape);
++	pnpart=xNew<int>(nshape);
++	ppstrt=xNew<int*>(nshape);
++	pptype=xNew<int*>(nshape);
++	pnvert=xNew<int>(nshape);
++	pshapx=xNew<double*>(nshape);
++	pshapy=xNew<double*>(nshape);
++	pshapz=xNew<double*>(nshape);
++	pshapm=xNew<double*>(nshape);
+ 
+ /*  loop over the list of shapes  */
+ 
+@@ -128,8 +127,8 @@
+ 	pstype[i]=psShape->nSHPType;
+ 	pnpart[i]=psShape->nParts;
+ 	if (pnpart[i]) {
+-		ppstrt[i]=(int *) xmalloc(pnpart[i]*sizeof(int));
+-		pptype[i]=(int *) xmalloc(pnpart[i]*sizeof(int));
++		ppstrt[i]=xNew<int>(pnpart[i]);
++		pptype[i]=xNew<int>(pnpart[i]);
+ 	}
+ 	else {
+ 		ppstrt[i]=NULL;
+@@ -137,10 +136,10 @@
+ 	}
+ 	pnvert[i]=psShape->nVertices;
+ 	if (pnvert[i]) {
+-		pshapx[i]=(double *) xmalloc(pnvert[i]*sizeof(double));
+-		pshapy[i]=(double *) xmalloc(pnvert[i]*sizeof(double));
+-		pshapz[i]=(double *) xmalloc(pnvert[i]*sizeof(double));
+-		pshapm[i]=(double *) xmalloc(pnvert[i]*sizeof(double));
++		pshapx[i]=xNew<double>(pnvert[i]);
++		pshapy[i]=xNew<double>(pnvert[i]);
++		pshapz[i]=xNew<double>(pnvert[i]);
++		pshapm[i]=xNew<double>(pnvert[i]);
+ 	}
+ 	else {
+ 		pshapx[i]=NULL;
+@@ -295,8 +294,8 @@
+ 
+ 			kpoint=new KML_Point();
+ 
+-			lat=(double *) xmalloc(pnvert[i]*sizeof(double));
+-			lon=(double *) xmalloc(pnvert[i]*sizeof(double));
++			lat=xNew<double>(pnvert[i]);
++			lon=xNew<double>(pnvert[i]);
+ 			if (sgn) {
+ 				Xy2llx(lat,lon,pshapx[i],pshapy[i],pnvert[i],sgn,cm,sp);
+ 			}
+@@ -309,8 +308,8 @@
+ 			kpoint->coords[1]=lat      [0];
+ 			kpoint->coords[2]=pshapz[i][0];
+ 
+-			xfree((void**)&lon);
+-			xfree((void**)&lat);
++			xDelete<double>(lon);
++			xDelete<double>(lat);
+ 
+ 			(kplace->geometry  )->AddObject((Object*)kpoint);
+ 			kpoint=NULL;
+@@ -336,8 +335,8 @@
+ 
+ /*  convert to lat/lon, if necessary  */
+ 
+-			lat=(double *) xmalloc(pnvert[i]*sizeof(double));
+-			lon=(double *) xmalloc(pnvert[i]*sizeof(double));
++			lat=xNew<double>(pnvert[i]);
++			lon=xNew<double>(pnvert[i]);
+ 			if (sgn) {
+ 				Xy2llx(lat,lon,pshapx[i],pshapy[i],pnvert[i],sgn,cm,sp);
+ 			}
+@@ -352,23 +351,22 @@
+ 				kline =new KML_LineString();
+ 
+ 				kline->ncoord    =(j<pnpart[i]-1 ? ppstrt[i][j+1]-ppstrt[i][j] : pnvert[i]-ppstrt[i][j]);
+-				kline->coords    =(double (*)[3]) xmalloc(kline->ncoord*3*sizeof(double));
++				kline->coords    =xNew<double>(kline->ncoord*3);
+ 				for (k=0; k<kline->ncoord; k++) {
+-					kline->coords[k][0]=lon      [ppstrt[i][j]+k];
+-					kline->coords[k][1]=lat      [ppstrt[i][j]+k];
+-					kline->coords[k][2]=pshapz[i][ppstrt[i][j]+k];
++					kline->coords[3*k+0]=lon      [ppstrt[i][j]+k];
++					kline->coords[3*k+1]=lat      [ppstrt[i][j]+k];
++					kline->coords[3*k+2]=pshapz[i][ppstrt[i][j]+k];
+ 				}
+-
+ 				(kmulti->geometry  )->AddObject((Object*)kline);
+-				kline =NULL;
++				kline = NULL;
+ 			}
+ 
+-			xfree((void**)&lon);
+-			xfree((void**)&lat);
++			xDelete<double>(lon);
++			xDelete<double>(lat);
+ 
+-			(kplace->geometry  )->AddObject((Object*)kmulti);
++			(kplace->geometry)->AddObject((Object*)kmulti);
+ 			kmulti=NULL;
+-			(kfold ->feature   )->AddObject((Object*)kplace);
++			(kfold ->feature )->AddObject((Object*)kplace);
+ 			kplace=NULL;
+ 		}
+ 
+@@ -400,8 +398,8 @@
+ 
+ /*  convert to lat/lon, if necessary  */
+ 
+-			lat=(double *) xmalloc(pnvert[i]*sizeof(double));
+-			lon=(double *) xmalloc(pnvert[i]*sizeof(double));
++			lat=xNew<double>(pnvert[i]);
++			lon=xNew<double>(pnvert[i]);
+ 			if (sgn) {
+ 				Xy2llx(lat,lon,pshapx[i],pshapy[i],pnvert[i],sgn,cm,sp);
+ 			}
+@@ -437,18 +435,18 @@
+ 					kring =new KML_LinearRing();
+ 
+ 					kring->ncoord    =(j<pnpart[i]-1 ? ppstrt[i][j+1]-ppstrt[i][j] : pnvert[i]-ppstrt[i][j]);
+-					kring->coords    =(double (*)[3]) xmalloc(kring->ncoord*3*sizeof(double));
++					kring->coords    =xNew<double>(kring->ncoord*3);
+ 					if (cpsum < 0)
+ 						for (k=0; k<kring->ncoord; k++) {
+-							kring->coords[kring->ncoord-1-k][0]=lon      [ppstrt[i][j]+k];
+-							kring->coords[kring->ncoord-1-k][1]=lat      [ppstrt[i][j]+k];
+-							kring->coords[kring->ncoord-1-k][2]=pshapz[i][ppstrt[i][j]+k];
++							kring->coords[3*(kring->ncoord-1-k)+0]=lon      [ppstrt[i][j]+k];
++							kring->coords[3*(kring->ncoord-1-k)+1]=lat      [ppstrt[i][j]+k];
++							kring->coords[3*(kring->ncoord-1-k)+2]=pshapz[i][ppstrt[i][j]+k];
+ 						}
+ 					else
+ 						for (k=0; k<kring->ncoord; k++) {
+-							kring->coords[k                ][0]=lon      [ppstrt[i][j]+k];
+-							kring->coords[k                ][1]=lat      [ppstrt[i][j]+k];
+-							kring->coords[k                ][2]=pshapz[i][ppstrt[i][j]+k];
++							kring->coords[3*k+0]=lon      [ppstrt[i][j]+k];
++							kring->coords[3*k+1]=lat      [ppstrt[i][j]+k];
++							kring->coords[3*k+2]=pshapz[i][ppstrt[i][j]+k];
+ 						}
+ 
+ 					(kpoly ->outer     )->AddObject((Object*)kring);
+@@ -469,11 +467,11 @@
+ 					kring =new KML_LinearRing();
+ 
+ 					kring->ncoord    =(j<pnpart[i]-1 ? ppstrt[i][j+1]-ppstrt[i][j] : pnvert[i]-ppstrt[i][j]);
+-					kring->coords    =(double (*)[3]) xmalloc(kring->ncoord*3*sizeof(double));
++					kring->coords    =xNew<double>(kring->ncoord*3);
+ 					for (k=0; k<kring->ncoord; k++) {
+-						kring->coords[k][0]=lon      [ppstrt[i][j]+k];
+-						kring->coords[k][1]=lat      [ppstrt[i][j]+k];
+-						kring->coords[k][2]=pshapz[i][ppstrt[i][j]+k];
++						kring->coords[3*k+0]=lon      [ppstrt[i][j]+k];
++						kring->coords[3*k+1]=lat      [ppstrt[i][j]+k];
++						kring->coords[3*k+2]=pshapz[i][ppstrt[i][j]+k];
+ 					}
+ 
+ 					(kpoly ->inner     )->AddObject((Object*)kring);
+@@ -486,8 +484,8 @@
+ 				kpoly =NULL;
+ 			}
+ 
+-			xfree((void**)&lon);
+-			xfree((void**)&lat);
++			xDelete<double>(lon);
++			xDelete<double>(lat);
+ 
+ 			(kplace->geometry  )->AddObject((Object*)kmulti);
+ 			kmulti=NULL;
+@@ -517,8 +515,8 @@
+ 
+ /*  convert to lat/lon, if necessary  */
+ 
+-			lat=(double *) xmalloc(pnvert[i]*sizeof(double));
+-			lon=(double *) xmalloc(pnvert[i]*sizeof(double));
++			lat=xNew<double>(pnvert[i]);
++			lon=xNew<double>(pnvert[i]);
+ 			if (sgn) {
+ 				Xy2llx(lat,lon,pshapx[i],pshapy[i],pnvert[i],sgn,cm,sp);
+ 			}
+@@ -540,8 +538,8 @@
+ 				kpoint=NULL;
+ 			}
+ 
+-			xfree((void**)&lon);
+-			xfree((void**)&lat);
++			xDelete<double>(lon);
++			xDelete<double>(lat);
+ 
+ 			(kplace->geometry  )->AddObject((Object*)kmulti);
+ 			kmulti=NULL;
+@@ -582,24 +580,24 @@
+ 
+ 	delete kfile;
+ 	for (i=nshape-1; i>=0; i--) {
+-		xfree((void**)&(pshapm[i]));
+-		xfree((void**)&(pshapz[i]));
+-		xfree((void**)&(pshapy[i]));
+-		xfree((void**)&(pshapx[i]));
++		xDelete<double>((pshapm[i]));
++		xDelete<double>((pshapz[i]));
++		xDelete<double>((pshapy[i]));
++		xDelete<double>((pshapx[i]));
+ 	}
+-	xfree((void**)&pshapm);
+-	xfree((void**)&pshapz);
+-	xfree((void**)&pshapy);
+-	xfree((void**)&pshapx);
+-	xfree((void**)&pnvert);
++	xDelete<double*>(pshapm);
++	xDelete<double*>(pshapz);
++	xDelete<double*>(pshapy);
++	xDelete<double*>(pshapx);
++	xDelete<int>(pnvert);
+ 	for (i=nshape-1; i>=0; i--) {
+-		xfree((void**)&(pptype[i]));
+-		xfree((void**)&(ppstrt[i]));
++		xDelete<int>((pptype[i]));
++		xDelete<int>((ppstrt[i]));
+ 	}
+-	xfree((void**)&pptype);
+-	xfree((void**)&ppstrt);
+-	xfree((void**)&pnpart);
+-	xfree((void**)&pstype);
++	xDelete<int*>(pptype);
++	xDelete<int*>(ppstrt);
++	xDelete<int>(pnpart);
++	xDelete<int>(pstype);
+ 
+ 	clock1=clock();
+ 	time1 =time(NULL);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12441)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12442)
+@@ -68,7 +68,7 @@
+ 		count=0;
+ 
+ 		/*figure out times: */
+-		times=(double*)xmalloc(N*sizeof(double));
++		times=xNew<double>(N);
+ 		for(j=0;j<N;j++){
+ 			times[j]=doublevector[(M-1)*N+j];
+ 		}
+@@ -82,7 +82,7 @@
+ 			if((iomodel->my_vertices[i])){
+ 
+ 				/*figure out times and values: */
+-				values=(double*)xmalloc(N*sizeof(double));
++				values=xNew<double>(N);
+ 				spcpresent=false;
+ 				for(j=0;j<N;j++){
+ 					values[j]=doublevector[i*N+j];
+@@ -93,7 +93,7 @@
+ 					constraints->AddObject(new SpcTransient(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,N,times,values,analysis_type));
+ 					count++;
+ 				}
+-				xfree((void**)&values);
++				xDelete<double>(values);
+ 			}
+ 		}
+ 	}
+@@ -102,7 +102,7 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doublevector);
+-	xfree((void**)&times);
+-	xfree((void**)&values);
++	xDelete<double>(doublevector);
++	xDelete<double>(times);
++	xDelete<double>(values);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.h	(revision 12441)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.h	(revision 12442)
+@@ -20,11 +20,11 @@
+ 
+ 	public:
+ 
+-		bool  extrude;
+-		bool  tessellate;
+-		char  altmode[KML_LINEARRING_ALTMODE_LENGTH+1];
+-        int   ncoord;
+-		double (*coords)[3];
++		bool     extrude;
++		bool     tessellate;
++		char     altmode[KML_LINEARRING_ALTMODE_LENGTH+1];
++		int      ncoord;
++		double  *coords;
+ 
+ 		/*KML_LinearRing constructors, destructors {{{*/
+ 		KML_LinearRing();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.h	(revision 12441)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.h	(revision 12442)
+@@ -20,11 +20,11 @@
+ 
+ 	public:
+ 
+-		bool  extrude;
+-		bool  tessellate;
+-		char  altmode[KML_LINESTRING_ALTMODE_LENGTH+1];
+-        int   ncoord;
+-		double (*coords)[3];
++		bool    extrude;
++		bool    tessellate;
++		char    altmode[KML_LINESTRING_ALTMODE_LENGTH+1];
++		int     ncoord;
++		double *coords;
+ 
+ 		/*KML_LineString constructors, destructors {{{*/
+ 		KML_LineString();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp	(revision 12441)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp	(revision 12442)
+@@ -36,7 +36,7 @@
+ /*FUNCTION KML_LinearRing::~KML_LinearRing(){{{*/
+ KML_LinearRing::~KML_LinearRing(){
+ 
+-	if (coords) xfree((void**)&coords);
++	if (coords) xDelete<double>(coords);
+ 
+ 	coords    =NULL;
+ 	ncoord    =0;
+@@ -61,7 +61,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_LinearRing::DeepEcho {{{*/
+ void  KML_LinearRing::DeepEcho(){
+ 
+@@ -72,7 +71,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_LinearRing::DeepEcho {{{*/
+ void  KML_LinearRing::DeepEcho(const char* indent){
+ 
+@@ -88,12 +86,11 @@
+ 	_printf_(flag,"%s        coords: (ncoord=%d)\n" ,indent,ncoord);
+ 	for (i=0; i<ncoord; i++)
+ 		_printf_(flag,"%s                (%g,%g,%g)\n" ,indent,
+-				coords[i][0],coords[i][1],coords[i][2]);
++				coords[3*i+0],coords[3*i+1],coords[3*i+2]);
+ 
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_LinearRing::Write {{{*/
+ void  KML_LinearRing::Write(FILE* filout,const char* indent){
+ 
+@@ -114,8 +111,7 @@
+ /*  loop over the coordinates for the linearring  */
+ 
+ 	for (i=0; i<ncoord; i++)
+-		fprintf(filout,"%s    %0.16g,%0.16g,%0.16g\n",indent,
+-				coords[i][0],coords[i][1],coords[i][2]);
++		fprintf(filout,"%s    %0.16g,%0.16g,%0.16g\n",indent,coords[3*i+0],coords[3*i+1],coords[3*i+2]);
+ 
+ 	fprintf(filout,"%s  </coordinates>\n",indent);
+ 	fprintf(filout,"%s</LinearRing>\n",indent);
+@@ -123,26 +119,22 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_LinearRing::Read {{{*/
+ void  KML_LinearRing::Read(FILE* fid,char* kstr){
+ 
+-	char*        kstri;
+-	int          ncom=0;
+-	char**       pcom=NULL;
++	char  *kstri = NULL;
++	int    ncom  = 0;
++	char **pcom  = NULL;
+ 
+ /*  get object attributes and check for solo tag  */
+ 
+-	if (KMLFileTagAttrib(this,
+-						 kstr))
+-		return;
++	if (KMLFileTagAttrib(this,kstr)) return;
+ 
+ /*  loop over and process fields within opening and closing tags  */
+ 
+-	while (kstri=KMLFileToken(fid,
+-							  &ncom,&pcom)) {
+-		if      (!strncmp(kstri,"</LinearRing",12)) {
+-			xfree((void**)&kstri);
++	while (kstri=KMLFileToken(fid,&ncom,&pcom)){
++		if (!strncmp(kstri,"</LinearRing",12)){
++			xDelete<char>(kstri);
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+@@ -151,38 +143,27 @@
+ 			_error_("KML_LinearRing::Read -- Unexpected field \"%s\".\n",kstri);
+ 
+ 		else if (!strcmp(kstri,"<extrude>"))
+-			KMLFileTokenParse(&extrude   ,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse(&extrude,kstri,fid);
+ 		else if (!strcmp(kstri,"<tessellate>"))
+-			KMLFileTokenParse(&tessellate,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse(&tessellate,kstri,fid);
+ 		else if (!strcmp(kstri,"<altitudeMode>"))
+-			KMLFileTokenParse( altmode   ,NULL,KML_LINEARRING_ALTMODE_LENGTH,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse(altmode,NULL,KML_LINEARRING_ALTMODE_LENGTH,kstri,fid);
+ 		else if (!strcmp(kstri,"<coordinates>"))
+-			KMLFileTokenParse(&coords    ,&ncoord    ,0,
+-							  kstri,
+-							  fid);
+-
++			KMLFileTokenParse(&coords,&ncoord,0,kstri,fid);
+ 		else if (!strncmp(kstri,"<",1))
+ 			KML_Geometry::Read(fid,kstri);
+ 
+-		xfree((void**)&kstri);
++		xDelete<char>(kstri);
+ 	}
+ 
+ 	this->AddCommnt(ncom,pcom);
+ 
+-	for (ncom; ncom>0; ncom--)
+-		xfree((void**)&(pcom[ncom-1]));
+-	xfree((void**)&pcom);
++	for(ncom;ncom>0;ncom--) xDelete<char>((pcom[ncom-1]));
++	xDelete<char*>(pcom);
+ 
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_LinearRing::WriteExp {{{*/
+ void  KML_LinearRing::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){
+ 
+@@ -192,17 +173,17 @@
+ 
+ /*  extract latitude and longitude into vectors  */
+ 
+-	lat=(double *) xmalloc(ncoord*sizeof(double));
+-	lon=(double *) xmalloc(ncoord*sizeof(double));
++	lat=xNew<double>(ncoord);
++	lon=xNew<double>(ncoord);
+ 	for (i=0; i<ncoord; i++) {
+-		lon[i]=coords[i][0];
+-		lat[i]=coords[i][1];
++		lon[i]=coords[3*i+0];
++		lat[i]=coords[3*i+1];
+ 	}
+ 
+ /*  convert latitude and longitude to x and y  */
+ 
+-	x  =(double *) xmalloc(ncoord*sizeof(double));
+-	y  =(double *) xmalloc(ncoord*sizeof(double));
++	x  =xNew<double>(ncoord);
++	y  =xNew<double>(ncoord);
+ 	Ll2xyx(x,y,lat,lon,ncoord,sgn,cm,sp);
+ 
+ /*  write header  */
+@@ -232,12 +213,11 @@
+ 
+ 	fprintf(fid,"\n");
+ 
+-	xfree((void**)&y);
+-	xfree((void**)&x);
+-	xfree((void**)&lon);
+-	xfree((void**)&lat);
++	xDelete<double>(y);
++	xDelete<double>(x);
++	xDelete<double>(lon);
++	xDelete<double>(lat);
+ 
+ 	return;
+ }
+ /*}}}*/
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp	(revision 12441)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp	(revision 12442)
+@@ -36,7 +36,7 @@
+ /*FUNCTION KML_LineString::~KML_LineString(){{{*/
+ KML_LineString::~KML_LineString(){
+ 
+-	if (coords) xfree((void**)&coords);
++	if (coords) xDelete<double>(coords);
+ 
+ 	coords    =NULL;
+ 	ncoord    =0;
+@@ -85,8 +85,7 @@
+ 	_printf_(flag,"%s       altmode: \"%s\"\n"      ,indent,altmode);
+ 	_printf_(flag,"%s        coords: (ncoord=%d)\n" ,indent,ncoord);
+ 	for (i=0; i<ncoord; i++)
+-		_printf_(flag,"%s                (%g,%g,%g)\n" ,indent,
+-				coords[i][0],coords[i][1],coords[i][2]);
++		_printf_(flag,"%s                (%g,%g,%g)\n" ,indent,coords[3*i+0],coords[3*i+1],coords[3*i+2]);
+ 
+ 	return;
+ }
+@@ -111,8 +110,7 @@
+ /*  loop over the coordinates for the linestring  */
+ 
+ 	for (i=0; i<ncoord; i++)
+-		fprintf(filout,"%s    %0.16g,%0.16g,%0.16g\n",indent,
+-				coords[i][0],coords[i][1],coords[i][2]);
++		fprintf(filout,"%s    %0.16g,%0.16g,%0.16g\n",indent, coords[3*i+0],coords[3*i+1],coords[3*i+2]);
+ 
+ 	fprintf(filout,"%s  </coordinates>\n",indent);
+ 	fprintf(filout,"%s</LineString>\n",indent);
+@@ -190,8 +188,8 @@
+ 	lat=(double *) xmalloc(ncoord*sizeof(double));
+ 	lon=(double *) xmalloc(ncoord*sizeof(double));
+ 	for (i=0; i<ncoord; i++) {
+-		lon[i]=coords[i][0];
+-		lat[i]=coords[i][1];
++		lon[i]=coords[3*i+0];
++		lat[i]=coords[3*i+1];
+ 	}
+ 
+ /*  convert latitude and longitude to x and y  */
Index: /issm/oecreview/Archive/12321-12677/ISSM-12442-12443.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12442-12443.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12442-12443.diff	(revision 12679)
@@ -0,0 +1,238 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model.py	(revision 12442)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model.py	(revision 12443)
+@@ -1,114 +0,0 @@
+-#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"))
+-		return string;
+-		 #}}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.py	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.py	(revision 12443)
+@@ -0,0 +1,114 @@
++#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"))
++		return string;
++		 #}}}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12443-12444.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12443-12444.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12443-12444.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12443)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12444)
+@@ -2,6 +2,8 @@
+  * \brief Gsl implementation of solver
+  */
+ 
++#include <cstring>
++
+ #include "./Solverx.h"
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
Index: /issm/oecreview/Archive/12321-12677/ISSM-12444-12445.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12444-12445.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12444-12445.diff	(revision 12679)
@@ -0,0 +1,31 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12444)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12445)
+@@ -2,20 +2,19 @@
+  * \brief Gsl implementation of solver
+  */
+ 
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
+ #include <cstring>
++#include <gsl/gsl_linalg.h>
+ 
+ #include "./Solverx.h"
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
+ #include "../../io/io.h"
+ 
+-#ifdef HAVE_CONFIG_H
+-	#include <config.h>
+-#else
+-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+-#endif
+-#include <gsl/gsl_linalg.h>
+-
+ void SolverxGsl(SeqVec** puf,SeqMat* Kff, SeqVec* pf){/*{{{*/
+ 
+ 	/*Intermediaries*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12445-12446.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12445-12446.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12445-12446.diff	(revision 12679)
@@ -0,0 +1,367 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp	(revision 12445)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp	(revision 12446)
+@@ -50,7 +50,7 @@
+ 		nz=(int)((double)nnz/(double)rows);
+ 
+ 		if(rows){
+-			vector=xNewInit<double>(rows,0.0);
++			vector=xNewZeroInit<double>(rows);
+ 
+ 			/*Now, get ir,jc and pr: */
+ 			pr=mxGetPr(mxvector);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp	(revision 12445)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp	(revision 12446)
+@@ -38,7 +38,7 @@
+ 		cols=mxGetN(mxmatrix);
+ 		
+ 		if(rows*cols){
+-			matrix=xNewInit<double>(rows*cols,0.0);
++			matrix=xNewZeroInit<double>(rows*cols);
+ 
+ 			/*Now, get ir,jc and pr: */
+ 			ir=mxGetIr(mxmatrix);
+@@ -63,7 +63,7 @@
+ 		
+ 		/*Create serial matrix: */
+ 		if(rows*cols){
+-			matrix=xNewInit<double>(rows*cols,0.0);
++			matrix=xNewZeroInit<double>(rows*cols);
+ 
+ 			for(i=0;i<rows;i++){
+ 				for(j=0;j<cols;j++){
+@@ -80,7 +80,7 @@
+ 
+ 		/*Create serial matrix: */
+ 		if(rows*cols){
+-			matrix=xNewInit<double>(rows*cols,0.0);
++			matrix=xNewZeroInit<double>(rows*cols);
+ 
+ 			for(i=0;i<rows;i++){
+ 				for(j=0;j<cols;j++){
+@@ -97,7 +97,7 @@
+ 
+ 		/*Create serial matrix: */
+ 		if(rows*cols){
+-			matrix=xNewInit<double>(rows*cols,0.0);
++			matrix=xNewZeroInit<double>(rows*cols);
+ 
+ 			for(i=0;i<rows;i++){
+ 				for(j=0;j<cols;j++){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp	(revision 12445)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp	(revision 12446)
+@@ -50,7 +50,7 @@
+ 		nnz=mxGetNzmax(mxmatrix);
+ 		nz=(int)((double)nnz/(double)rows);
+ 
+-		matrix=xNewInit<double>(rows*cols,0.0);
++		matrix=xNewZeroInit<double>(rows*cols);
+ 
+ 		/*Now, get ir,jc and pr: */
+ 		ir=mxGetIr(mxmatrix);
+@@ -73,7 +73,7 @@
+ 		mxmatrix_ptr=(double*)mxGetPr(mxmatrix);
+ 		
+ 		/*Create serial matrix: */
+-		matrix=xNewInit<double>(numel,0.0);
++		matrix=xNewZeroInit<double>(numel);
+ 
+ 		dims=xNew<int>(ndims);
+ 		for(i=0;i<numel;i++){
+@@ -130,7 +130,7 @@
+ 		nnz=mxGetNzmax(mxmatrix);
+ 		nz=(int)((double)nnz/(double)rows);
+ 
+-		matrix=xNewInit<bool>(rows*cols,false);
++		matrix=xNewZeroInit<bool>(rows*cols);
+ 
+ 		/*Now, get ir,jc and pm: */
+ 		ir=mxGetIr(mxmatrix);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/xNewDelete.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/xNewDelete.h	(revision 12445)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/xNewDelete.h	(revision 12446)
+@@ -7,28 +7,71 @@
+ 
+ #include <cassert>
+ 
++
++// memory management of types 
++// T with non-trivial constructors require 
++// C++ style memory management
++#define USE_CXX_MEMORY_MANAGMENT_FOR_NON_POD_TYPES
++// but for speed on may alternatively use C memory managment
++// but can do so safely only for T that are at most 
++// plain old data structures (POD)
++#ifndef USE_CXX_MEMORY_MANAGMENT_FOR_NON_POD_TYPES
++#include <cstdlib>
++#endif 
++
+ template <class T> 
+ T* xNew(unsigned int size) {
++#ifdef USE_CXX_MEMORY_MANAGMENT_FOR_NON_POD_TYPES
+   T* aT_p=new T[size];
+   assert(aT_p);
+   return aT_p;
+-};
++#else
++  T* aT_p=(T*)malloc(size*sizeof(T));
++  assert(aT_p);
++  return aT_p;
++#endif  
++}
+ 
+ template <class T> 
+-T* xNewInit(unsigned int size, const T initVal) {
+-  T* aT_p=new T[size];
++T* xNewZeroInit(unsigned int size) {
++#ifdef USE_CXX_MEMORY_MANAGMENT_FOR_NON_POD_TYPES
++  T* aT_p=xNew<T>(size);
++  for (unsigned int i=0; i<size;++i) 
++    aT_p[i]=(T)0;
++  return aT_p;
++#else
++  T* aT_p=(T*)calloc(size,sizeof(T));
+   assert(aT_p);
+-  for (int i=0; i<size;++i) 
+-    aT_p[i]=initVal;
+   return aT_p;
+-};
++#endif
++}
+ 
+ template <class T>
+ void xDelete(T*& aT_p) { 
+   if (aT_p) 
++#ifdef USE_CXX_MEMORY_MANAGMENT_FOR_NON_POD_TYPES
+     delete []aT_p;
++#else
++    free((void*)aT_p);
++#endif
+   aT_p=0;
+-};
++}
+ 
++template <class T> 
++T* xReNew(T* old, unsigned int size) {
++#ifdef USE_CXX_MEMORY_MANAGMENT_FOR_NON_POD_TYPES
++  assert(old);
++  T* aT_p=xNew<T>(size);
++  for (unsigned int i=0; i<size;++i) 
++    aT_p[i]=old[i];
++  xDelete<T>(old);
++  return aT_p;
++#else 
++  T* aT_p=(T*)realloc((void*)old,size*sizeof(T));
++  assert(aT_p);
++  return aT_p;
++#endif 
++}
++
+ #endif
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp	(revision 12445)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp	(revision 12446)
+@@ -51,7 +51,7 @@
+ 	RiftSegmentsFromSegments(&nriftsegs,&riftsegments,nel,index,nsegs,segments);
+ 
+ 	/*Go through all nodes of the rift segments, and start splitting the mesh: */
+-	flags=xNewInit<int>(nods,0); //to make sure we don't split the same nodes twice!
++	flags=xNewZeroInit<int>(nods); //to make sure we don't split the same nodes twice!
+ 	for (i=0;i<nriftsegs;i++){
+ 		for (j=0;j<2;j++){
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12445)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12446)
+@@ -65,7 +65,7 @@
+ 				}
+ 				else{
+ 					/*Reallocate another max_number_elements slots in the GridElements: */
+-					GridElementsRealloc=(int*)xrealloc(GridElements,(current_size+max_number_elements)*sizeof(int));
++					GridElementsRealloc=xReNew<int>(GridElements,(current_size+max_number_elements));
+ 					if (!GridElementsRealloc){
+ 						noerr=0;
+ 						goto cleanup_and_return;
+@@ -128,7 +128,7 @@
+ 	double element_nodes[3];
+ 
+ 	/*Allocate segmentflags: */
+-	riftsegments_uncompressed=xNewInit<int>(nsegs*5,0);
++	riftsegments_uncompressed=xNewZeroInit<int>(nsegs*5);
+ 
+ 	/*Find the segments that belong to a rift: they are the ones that see two elements. The other ones belong to a boundary 
+ 	 *or a hole: */
+@@ -904,7 +904,7 @@
+ 		riftpairs=riftspairs[i];
+ 
+ 		/*allocate riftpenaltypairs, and riftnumpenaltypairs: */
+-		if((numsegs/2-1)!=0)riftpenaltypairs=xNewInit<double>((numsegs/2-1)*RIFTPENALTYPAIRSWIDTH,0.0);
++		if((numsegs/2-1)!=0)riftpenaltypairs=xNewZeroInit<double>((numsegs/2-1)*RIFTPENALTYPAIRSWIDTH);
+ 		
+ 		/*Go through only one flank of the rifts, not counting the tips: */
+ 		counter=0;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12445)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12446)
+@@ -36,8 +36,8 @@
+ 	observations=new Observations(obs_list,obs_x,obs_y,obs_length,options);
+ 
+ 	/*Allocate output*/
+-	predictions =xNewInit<double>(n_interp,0.0);
+-	error       =xNewInit<double>(n_interp,0.0);
++	predictions =xNewZeroInit<double>(n_interp);
++	error       =xNewZeroInit<double>(n_interp);
+ 
+ 	/*Get output*/
+ 	options->Get(&output,"output","prediction");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12445)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12446)
+@@ -119,7 +119,7 @@
+ 	if (!nodecon) {
+ 		_printf_(true,"Creating the node connectivity table.\n");
+ 		nncon=mxepg+1;
+-		nodecon=xNewInit<int>(mncon*nncon,0);
++		nodecon=xNewZeroInit<int>(mncon*nncon);
+ 		ncfree=true;
+ 
+ 		jpt=0;
+@@ -149,7 +149,7 @@
+ 
+ 		else if (mdata == mncon) {
+ 			_printf_(true,"Averaging nodal data to element data.\n");
+-			edata=xNewInit<double>(melem*ndata,0);
++			edata=xNewZeroInit<double>(melem*ndata);
+ 			edfree=true;
+ 
+ 			ipt=0;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12445)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12446)
+@@ -30,7 +30,7 @@
+ 
+ 	this->M=pM;
+ 	this->vector=NULL;
+-	if(this->M) this->vector=xNewInit<double>(pM,0.0);
++	if(this->M) this->vector=xNewZeroInit<double>(pM);
+ }
+ /*}}}*/
+ /*FUNCTION SeqVec::SeqVec(double* serial_vec,int M){{{*/
+@@ -41,7 +41,7 @@
+ 	this->M=pM;
+ 	this->vector=NULL;
+ 	if(this->M){
+-		this->vector=xNewInit<double>(pM,0.0);
++		this->vector=xNewZeroInit<double>(pM);
+ 		memcpy(this->vector,buffer,pM*sizeof(double));
+ 	}
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12445)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12446)
+@@ -32,7 +32,7 @@
+ 	this->M=pM;
+ 	this->N=pN;
+ 	this->matrix=NULL;
+-	if(M*N) this->matrix=xNewInit<double>(pM*pN,0.0);
++	if(M*N) this->matrix=xNewZeroInit<double>(pM*pN);
+ }
+ /*}}}*/
+ /*FUNCTION SeqMat::SeqMat(int M,int N, double sparsity){{{*/
+@@ -41,7 +41,7 @@
+ 	this->M=pM;
+ 	this->N=pN;
+ 	this->matrix=NULL;
+-	if(M*N) this->matrix=xNewInit<double>(pM*pN,0.0);
++	if(M*N) this->matrix=xNewZeroInit<double>(pM*pN);
+ }
+ /*}}}*/
+ /*FUNCTION SeqMat(double* serial_mat,int M,int N,double sparsity){{{*/
+@@ -53,7 +53,7 @@
+ 	this->N=pN;
+ 	this->matrix=NULL;
+ 	if(M*N){
+-		this->matrix=xNewInit<double>(pM*pN,0.0);
++		this->matrix=xNewZeroInit<double>(pM*pN);
+ 		memcpy(this->matrix,serial_mat,pM*pN*sizeof(double));
+ 	}
+ 
+@@ -65,7 +65,7 @@
+ 	this->M=pM;
+ 	this->N=pN;
+ 	this->matrix=NULL;
+-	if(M*N) this->matrix=xNewInit<double>(pM*pN,0.0);
++	if(M*N) this->matrix=xNewZeroInit<double>(pM*pN);
+ }
+ /*}}}*/
+ /*FUNCTION SeqMat::~SeqMat(){{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12445)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12446)
+@@ -100,7 +100,7 @@
+ 
+ 	/*Gset and values*/
+ 	this->gglobaldoflist=xNew<int>(this->nrows);
+-	this->values=xNewInit<double>(this->nrows*this->ncols,0.0);
++	this->values=xNewZeroInit<double>(this->nrows*this->ncols);
+ 	for(i=0;i<Ke1->nrows;i++){
+ 		for(j=0;j<Ke1->ncols;j++){
+ 			this->values[i*this->ncols+j] += Ke1->values[i*Ke1->ncols+j];
+@@ -204,7 +204,7 @@
+ 	this->ncols=this->nrows;
+ 
+ 	/*fill values with 0: */
+-	this->values=xNewInit<double>(this->nrows*this->ncols,0.0);
++	this->values=xNewZeroInit<double>(this->nrows*this->ncols);
+ 
+ 	/*g list*/
+ 	this->gglobaldoflist=GetGlobalDofList(nodes,numnodes,GsetEnum,approximation);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12445)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12446)
+@@ -74,7 +74,7 @@
+ 
+ 	/*Gset and values*/
+ 	this->gglobaldoflist=xNew<int>(this->nrows);
+-	this->values=xNewInit<double>(this->nrows,0.0);
++	this->values=xNewZeroInit<double>(this->nrows);
+ 	for(i=0;i<pe1->nrows;i++){
+ 		this->values[i] += pe1->values[i];
+ 		this->gglobaldoflist[i]=pe1->gglobaldoflist[i];
+@@ -137,7 +137,7 @@
+ 	this->nrows=GetNumberOfDofs(nodes,numnodes,GsetEnum,approximation);
+ 
+ 	/*fill values with 0: */
+-	this->values=xNewInit<double>(this->nrows,0.0);
++	this->values=xNewZeroInit<double>(this->nrows);
+ 	
+ 	/*g list*/
+ 	this->gglobaldoflist=GetGlobalDofList(nodes,numnodes,GsetEnum,approximation);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DakotaPlugin.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DakotaPlugin.cpp	(revision 12445)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DakotaPlugin.cpp	(revision 12446)
+@@ -84,7 +84,7 @@
+ 	}
+ 
+ 	/*Initialize responses: */
+-	responses=xNewInit<IssmDouble>(numFns,0.0);
++	responses=xNewZeroInit<IssmDouble>(numFns);
+ 
+ 	/*run core solution: */
+ 	SpawnCore(responses,numFns, variables,variable_descriptors,numACV,femmodel,counter);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12446-12447.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12446-12447.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12446-12447.diff	(revision 12679)
@@ -0,0 +1,51 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/xNewDelete.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/xNewDelete.h	(revision 12446)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/xNewDelete.h	(revision 12447)
+@@ -58,13 +58,27 @@
+ }
+ 
+ template <class T> 
+-T* xReNew(T* old, unsigned int size) {
++T* xReNew(T* old, unsigned int old_size, unsigned int size) {
+ #ifdef USE_CXX_MEMORY_MANAGMENT_FOR_NON_POD_TYPES
+-  assert(old);
+-  T* aT_p=xNew<T>(size);
+-  for (unsigned int i=0; i<size;++i) 
+-    aT_p[i]=old[i];
+-  xDelete<T>(old);
++  T* aT_p=NULL;
++  if (!old) { // no old memory
++    if (size)  
++      aT_p=xNew<T>(size);
++  }
++  else { // have old memory
++    if (!size)  // but 0 size
++      xDelete<T>(old);
++    else { // non-zero size
++      if (size>old_size) { // do something only if it is bigger
++	aT_p=xNew<T>(size);
++	for (unsigned int i=0; i<old_size;++i) 
++	  aT_p[i]=old[i]; // copy the items
++	xDelete<T>(old);
++      }
++      else // size is equal or less than old size
++	aT_p=old; // do nothing
++    }
++  }
+   return aT_p;
+ #else 
+   T* aT_p=(T*)realloc((void*)old,size*sizeof(T));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12446)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12447)
+@@ -65,7 +65,7 @@
+ 				}
+ 				else{
+ 					/*Reallocate another max_number_elements slots in the GridElements: */
+-					GridElementsRealloc=xReNew<int>(GridElements,(current_size+max_number_elements));
++					GridElementsRealloc=xReNew<int>(GridElements,current_size,(current_size+max_number_elements));
+ 					if (!GridElementsRealloc){
+ 						noerr=0;
+ 						goto cleanup_and_return;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12447-12448.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12447-12448.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12447-12448.diff	(revision 12679)
@@ -0,0 +1,53 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/xNewDelete.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/xNewDelete.h	(revision 12447)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/xNewDelete.h	(revision 12448)
+@@ -60,29 +60,35 @@
+ template <class T> 
+ T* xReNew(T* old, unsigned int old_size, unsigned int size) {
+ #ifdef USE_CXX_MEMORY_MANAGMENT_FOR_NON_POD_TYPES
+-  T* aT_p=NULL;
++  T* aT_p=0;
+   if (!old) { // no old memory
+     if (size)  
+-      aT_p=xNew<T>(size);
++      aT_p=xNew<T>(size); // according to realloc behavior in manual page 
+   }
+   else { // have old memory
+     if (!size)  // but 0 size
+-      xDelete<T>(old);
++      xDelete<T>(old); // according to realloc behavior in manual page
+     else { // non-zero size
+-      if (size>old_size) { // do something only if it is bigger
+-	aT_p=xNew<T>(size);
+-	for (unsigned int i=0; i<old_size;++i) 
+-	  aT_p[i]=old[i]; // copy the items
+-	xDelete<T>(old);
++      assert(old_size); // have old memory - need to have old_size set or this call is bad
++      // allocate new, delete old; ; even for the case when size is 
++      // less than old_size we can't just keep the memory unchanged 
++      // because otherwise classes that have ctors/dtors with side-effects 
++      // may misbehave, for example classes with static instance/operations counters. 
++      aT_p=xNew<T>(size);
++      unsigned int iMax=(old_size<size)?old_size:size;
++      for (unsigned int i=0; i<iMax;++i) { 
++	// we need to copy the items by explicit assignments
++	aT_p[i]=old[i];
+       }
+-      else // size is equal or less than old size
+-	aT_p=old; // do nothing
++      xDelete<T>(old);
+     }
+   }
+   return aT_p;
+-#else 
+-  T* aT_p=(T*)realloc((void*)old,size*sizeof(T));
+-  assert(aT_p);
++#else
++  T* aT_p=0;
++  aT_p=(T*)realloc((void*)old,size*sizeof(T));
++  if (size) 
++    assert(aT_p); // according to realloc behavior in manual page
+   return aT_p;
+ #endif 
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12448-12449.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12448-12449.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12448-12449.diff	(revision 12679)
@@ -0,0 +1,22 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.py	(revision 12448)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.py	(revision 12449)
+@@ -15,7 +15,7 @@
+ from verbose import verbose
+ from settings import settings
+ from solver import solver
+-from none import none
++from generic import generic
+ from balancethickness import balancethickness
+ from diagnostic import diagnostic
+ from groundingline import groundingline
+@@ -53,7 +53,7 @@
+ 		self.verbose          = verbose()
+ 		self.settings         = settings()
+ 		self.solver           = solver()
+-		self.cluster          = none()
++		self.cluster          = generic()
+ 
+ 		self.balancethickness = balancethickness()
+ 		self.diagnostic       = diagnostic()
Index: /issm/oecreview/Archive/12321-12677/ISSM-12449-12450.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12449-12450.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12449-12450.diff	(revision 12679)
@@ -0,0 +1,1807 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12450)
+@@ -47,7 +47,7 @@
+ 	int   len = 0;
+ 
+ 	len=strlen(EnumToStringx(enum_in));
+-	string=(char*)xmalloc((len+1)*sizeof(char));
++	string=xNew<char>(len+1);
+ 	memcpy(string,EnumToStringx(enum_in),(len+1)*sizeof(char));
+ 
+ 	/*Assign output pointer*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp	(revision 12450)
+@@ -37,8 +37,8 @@
+ 	InputUpdateFromVectorx(elements,nodes,vertices,loads,materials,parameters,vz,VzMeshEnum,VertexEnum);
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&thickness);
+-	xfree((void**)&bed);
++	xDelete<double>(thickness);
++	xDelete<double>(bed);
+ 	xdelete(&vz);
+ 	return 1;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ControlInputSetGradientx/ControlInputSetGradientx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ControlInputSetGradientx/ControlInputSetGradientx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ControlInputSetGradientx/ControlInputSetGradientx.cpp	(revision 12450)
+@@ -26,7 +26,7 @@
+ 	}
+ 
+ 	/*Clean up and return*/
+-	xfree((void**)&control_type);
++	xDelete<int>(control_type);
+ 
+ }
+ void ControlInputSetGradientx(Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Vector* gradient){
+@@ -38,5 +38,5 @@
+ 	ControlInputSetGradientx(elements,nodes,vertices, loads, materials, parameters,serial_gradient);
+ 
+ 	/*Clean up and return*/
+-	xfree((void**)&serial_gradient);
++	xDelete<double>(serial_gradient);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12450)
+@@ -465,7 +465,7 @@
+ 	int   len = 0;
+ 
+ 	len=strlen(EnumToStringx(enum_in));
+-	string=(char*)xmalloc((len+1)*sizeof(char));
++	string=xNew<char>(len+1);
+ 	memcpy(string,EnumToStringx(enum_in),(len+1)*sizeof(char));
+ 
+ 	/*Assign output pointer*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp	(revision 12450)
+@@ -64,7 +64,7 @@
+ 	average=vec_average->ToMPISerial();
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&qmu_part);
++	xDelete<int>(qmu_part);
+ 	xdelete(&partition_contributions);
+ 	xdelete(&partition_areas);
+ 	xdelete(&vec_average);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 12450)
+@@ -54,7 +54,7 @@
+ 
+ 	/*Initialize output*/
+ 	if (verbose) printf("Initializing output vector\n");
+-	data_interp=(double*)xmalloc(nods_interp*data_cols*sizeof(double));
++	data_interp=xNew<double>(nods_interp*data_cols);
+ 
+ 	// read background mesh 
+ 	if (verbose) printf("Reading mesh\n");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp	(revision 12450)
+@@ -17,7 +17,7 @@
+ 	InputUpdateFromVectorx( elements,nodes, vertices, loads, materials, parameters,serial_vector,name, type);
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&serial_vector);
++	xDelete<double>(serial_vector);
+ }
+ 
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp	(revision 12450)
+@@ -50,7 +50,7 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&ug_serial);
++	xDelete<double>(ug_serial);
+ 
+ 	/*Assign output pointers:*/
+ 	*puf=uf;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 12450)
+@@ -44,9 +44,9 @@
+ 	}
+ 
+ 	/*First, allocate pointers: */
+-	griddata=(double*)xcalloc(nlines*ncols,sizeof(double));
+-	x_grid=(double*)xcalloc(ncols,sizeof(double));
+-	y_grid=(double*)xcalloc(nlines,sizeof(double));
++	griddata=xNewZeroInit<double>(nlines*ncols);
++	x_grid=xNewZeroInit<double>(ncols);
++	y_grid=xNewZeroInit<double>(nlines);
+ 
+ 	/*Set debug to 1 if there are lots of elements*/
+ 	debug=(bool)((double)ncols*nlines*nels >= 5*pow(10.,10.));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12450)
+@@ -48,9 +48,9 @@
+ 
+ 	/*free ressouces: */
+ 	xdelete(&vec_old_floatingice);
+-	xfree((void**)&vertices_potentially_ungrounding);
+-	xfree((void**)&vertices_ungrounding);
+-	xfree((void**)&old_floatingice);
++	xDelete<double>(vertices_potentially_ungrounding);
++	xDelete<double>(vertices_ungrounding);
++	xDelete<double>(old_floatingice);
+ }
+ 
+ /*FUNCTION CreateNodesOnFloatingIce {{{*/
+@@ -163,8 +163,8 @@
+ 		#endif
+ 
+ 		/*Avoid leaks: */
+-		xfree((void**)&elements_neighboring_floatingce);
+-		xfree((void**)&nodes_on_floatingice);
++		xDelete<double>(elements_neighboring_floatingce);
++		xDelete<double>(nodes_on_floatingice);
+ 
+ 		/*Assemble and serialize:*/
+ 		xdelete(&vec_elements_neighboring_floatingice);
+@@ -173,7 +173,7 @@
+ 
+ 	/*Free ressources:*/
+ 	xdelete(&vec_nodes_on_floatingice);
+-	xfree((void**)&elements_neighboring_floatingce);
++	xDelete<double>(elements_neighboring_floatingce);
+ 
+ 	return nodes_on_floatingice;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.cpp	(revision 12450)
+@@ -31,7 +31,7 @@
+ 	vector->Assemble();
+ 
+ 	/*Assign output pointers:*/
+-	xfree((void**)&control_type);
++	xDelete<int>(control_type);
+ 	*pvector=vector;
+ }
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DakotaFree.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DakotaFree.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DakotaFree.cpp	(revision 12450)
+@@ -21,10 +21,10 @@
+ 	int i;
+ 	extern int my_rank;
+ 	
+-	double* variables=NULL;
+-	char**  variables_descriptors=NULL;
+-	char**  responses_descriptors=NULL;
+-	char*   string=NULL;
++	double  *variables             = NULL;
++	char   **variables_descriptors = NULL;
++	char   **responses_descriptors = NULL;
++	char    *string                = NULL;
+ 
+ 	/*recover pointers: */
+ 	variables=*pvariables;
+@@ -34,25 +34,24 @@
+ 
+ 	/*Free variables and variables_descriptors only on cpu !=0*/
+ 	if(my_rank!=0){
+-		xfree((void**)&variables);
++		xDelete<double>(variables);
+ 		for(i=0;i<numvariables;i++){
+ 			string=variables_descriptors[i];
+-			xfree((void**)&string);
++			xDelete<char>(string);
+ 		}
+-		xfree((void**)&variables_descriptors);
++		xDelete<char*>(variables_descriptors);
+ 	}
+ 	
+ 	//responses descriptors on every cpu
+ 	for(i=0;i<numresponses;i++){
+ 		string=responses_descriptors[i];
+-		xfree((void**)&string);
++		xDelete<char>(string);
+ 	}
+ 	//rest of dynamic allocations.
+-	xfree((void**)&responses_descriptors);
++	xDelete<char*>(responses_descriptors);
+ 
+ 	/*Assign output pointers:*/
+ 	*pvariables=variables;
+ 	*pvariables_descriptors=variables_descriptors;
+ 	*presponses_descriptors=responses_descriptors;
+ }
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DakotaMPI_Bcast.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DakotaMPI_Bcast.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DakotaMPI_Bcast.cpp	(revision 12450)
+@@ -37,12 +37,12 @@
+ 	MPI_Bcast(&numvariables,1,MPI_INT,0,MPI_COMM_WORLD); 
+ 	
+ 	/*variables:*/
+-	if(my_rank!=0)variables=(double*)xmalloc(numvariables*sizeof(double));
++	if(my_rank!=0)variables=xNew<double>(numvariables);
+ 	MPI_Bcast(variables,numvariables,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+ 
+ 	/*variables_descriptors: */
+ 	if(my_rank!=0){
+-		variables_descriptors=(char**)xmalloc(numvariables*sizeof(char*));
++		variables_descriptors=xNew<char*>(numvariables);
+ 	}
+ 	for(i=0;i<numvariables;i++){
+ 		if(my_rank==0){
+@@ -50,7 +50,7 @@
+ 			string_length=(strlen(string)+1)*sizeof(char);
+ 		}
+ 		MPI_Bcast(&string_length,1,MPI_INT,0,MPI_COMM_WORLD); 
+-		if(my_rank!=0)string=(char*)xmalloc(string_length);
++		if(my_rank!=0)string=xNew<char>(string_length);
+ 		MPI_Bcast(string,string_length,MPI_CHAR,0,MPI_COMM_WORLD); 
+ 		if(my_rank!=0)variables_descriptors[i]=string;
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp	(revision 12450)
+@@ -120,9 +120,9 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&dakota_input_file);
+-	xfree((void**)&dakota_error_file);
+-	xfree((void**)&dakota_output_file);
++	xDelete<char>(dakota_input_file);
++	xDelete<char>(dakota_error_file);
++	xDelete<char>(dakota_output_file);
+ 
+ 	#endif //#ifdef _HAVE_DAKOTA_
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshProfileIntersectionx/MeshSegmentsIntersection.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshProfileIntersectionx/MeshSegmentsIntersection.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshProfileIntersectionx/MeshSegmentsIntersection.cpp	(revision 12450)
+@@ -31,7 +31,7 @@
+ 
+ 	/*Using the segments_dataset dataset, create segments: */
+ 	numsegs=segments_dataset->Size();
+-	segments=(double*)xmalloc(5*numsegs*sizeof(double));
++	segments=xNew<double>(5*numsegs);
+ 	for(i=0;i<numsegs;i++){
+ 		Segment* segment=(Segment*)segments_dataset->GetObjectByOffset(i);
+ 		
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp	(revision 12450)
+@@ -5,7 +5,6 @@
+ 
+ void MeshProfileIntersectionx( double** psegments, int* pnumsegs, int* index, double* x, double* y, int nel, int nods,  Contour** contours,int numcontours){
+ 
+-
+ 	int i,j,k;
+ 	int m,n;
+ 
+@@ -27,8 +26,8 @@
+ 	int     count;
+ 
+ 	/*Allocate: */
+-	allsegments=(double**)xmalloc(numcontours*sizeof(double*));
+-	allnumsegs=(int*)xmalloc(numcontours*sizeof(int));
++	allsegments=xNew<double*>(numcontours);
++	allnumsegs=xNew<int>(numcontours);
+ 
+ 	/*Loop through all contours: */
+ 	for (i=0;i<numcontours;i++){
+@@ -52,7 +51,7 @@
+ 	for(i=0;i<numcontours;i++)numsegs+=allnumsegs[i];
+ 
+ 	/*Out of all segments, create one common array of segments: */
+-	segments=(double*)xmalloc(5*numsegs*sizeof(double));
++	segments=xNew<double>(5*numsegs);
+ 	count=0;
+ 	for(i=0;i<numcontours;i++){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 12450)
+@@ -20,9 +20,9 @@
+ 	int     npart;
+ 	double *qmu_part  = NULL;
+ 
+-	double* distributed_values=NULL;
+-	double* parameter=NULL;
+-	char*   descriptor=NULL;
++	double *distributed_values = NULL;
++	double *parameter          = NULL;
++	char   *descriptor         = NULL;
+ 	char    root[50]; //root name of variable, ex: DragCoefficent, RhoIce, etc ...
+ 
+ 	/*retrieve parameters: */
+@@ -48,7 +48,7 @@
+ 			*strstr(root,"_")='\0';
+ 
+ 
+-			distributed_values=(double*)xmalloc(npart*sizeof(double));
++			distributed_values=xNew<double>(npart);
+ 			for(j=0;j<npart;j++){
+ 				distributed_values[j]=variables[i+j];
+ 			}
+@@ -90,8 +90,8 @@
+ 			i+=npart-1; //careful, the for loop will add 1.
+ 
+ 			/*Free allocations: */
+-			xfree((void**)&parameter);
+-			xfree((void**)&distributed_values);
++			xDelete<double>(parameter);
++			xDelete<double>(distributed_values);
+ 		}
+ 		else if (strncmp(descriptor,"indexed_",8)==0){
+ 			_error_(" indexed variables not supported yet!");
+@@ -106,6 +106,5 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&qmu_part);
+-
++	xDelete<double>(qmu_part);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12450)
+@@ -39,8 +39,8 @@
+   double* pds=NULL; 
+   Element* element = NULL;
+   
+-  pdds=(double*)xmalloc(NPDMAX*sizeof(double)+1); 
+-  pds=(double*)xmalloc(NPDCMAX*sizeof(double)+1); 
++  pdds=xNew<double>(NPDMAX+1); 
++  pds=xNew<double>(NPDCMAX+1); 
+   
+   // initialize PDD (creation of a lookup table)
+   tstep = 0.1;
+@@ -105,7 +105,7 @@
+     element->PositiveDegreeDay(pdds,pds,signorm);
+   }
+   /*free ressouces: */
+-  xfree((void**)&pdds);
+-  xfree((void**)&pds);
++  xDelete<double>(pdds);
++  xDelete<double>(pds);
+   
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/AverageFilterx/AverageFilterx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/AverageFilterx/AverageFilterx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/AverageFilterx/AverageFilterx.cpp	(revision 12450)
+@@ -17,9 +17,9 @@
+ 	int         pix1, pix2;
+ 
+ 	/*output: */
+-	double*         imageout=NULL;
++	double* imageout=NULL;
+ 
+-	imageout=(double*)xmalloc(samps*lines*sizeof(double));
++	imageout=xNew<double>(samps*lines);
+ 
+   	for ( i = 0; i < lines; i++ ){
+   		for ( j = 0; j < samps; j++ ){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp	(revision 12450)
+@@ -45,7 +45,7 @@
+ 		parameters->FindParam(&solutiontype,SolutionTypeEnum);
+ 		EnumToStringx(&solutiontypestring,solutiontype);
+ 		results->AddObject(new StringExternalResult(results->Size()+1,SolutionTypeEnum,solutiontypestring,1,0));
+-		xfree((void**)&solutiontypestring);
++		xDelete<char>(solutiontypestring);
+ 	}
+ 
+ 	/*Now, open file for writing, if not already done: */
+@@ -67,7 +67,7 @@
+ 			sprintf(cpu_outputfilename,"%s.%i",outputfilename,my_rank);
+ 			fid=pfopen(cpu_outputfilename ,"wb");
+ 		}
+-		xfree((void**)&outputfilename);
++		xDelete<char>(outputfilename);
+ 		
+ 		/*Add file pointer in parameters for further calls to OutputResultsx: */
+ 		parameters->SetParam(fid,OutputFilePointerEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp	(revision 12450)
+@@ -19,8 +19,7 @@
+ 	InputUpdateFromSolutionx( elements, nodes,  vertices,  loads,  materials,  parameters,serial_solution);
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&serial_solution);
+-
++	xDelete<double>(serial_solution);
+ }
+ 
+ 
+@@ -35,5 +34,4 @@
+ 		element=(Element*)elements->GetObjectByOffset(i);
+ 		element->InputUpdateFromSolution(solution);
+ 	}
+-
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp	(revision 12450)
+@@ -42,7 +42,7 @@
+ 	int             imageoutsize;
+ 
+ 	 /*^^^^^^^^^^^^^  Remove pixels close to the holes ^^^^^^^^^^^^^*/
+-	image2 = (double*) xmalloc( lines*samps*sizeof(double));
++	image2 = xNew<double>(lines*samps);
+ 	memcpy(image2,image,lines*samps*sizeof(double));
+ 	
+   	for ( i = 0; i < lines; i++ ){
+@@ -63,7 +63,7 @@
+ 		}
+ 	}
+ 
+-	image3 = (double*) xmalloc( lines*samps*sizeof(double));
++	image3 = xNew<double>(lines*samps);
+ 	memcpy(image3,image2,lines*samps*sizeof(double));
+ 
+ 	#ifdef _DEBUG2_
+@@ -303,7 +303,7 @@
+ 		
+ /************************ SMOOTH THE RESULT ***********************/		
+ 		
+-	image4 = (double*) xmalloc( lines*samps*sizeof(double));
++	image4 = xNew<double>(lines*samps);
+ 	memcpy(image4,image3,lines*samps*sizeof(double));
+ 
+ 
+@@ -347,7 +347,7 @@
+ 
+ 
+ 	/*Allocate output image: */
+-	imageout=(double*)xmalloc(samps*lines*sizeof(double));
++	imageout=xNew<double>(samps*lines);
+ 	memcpy(imageout,image3,lines*samps*sizeof(double));
+ 
+ 	time(&t2);	
+@@ -362,7 +362,5 @@
+ 
+ 	/*Assign output pointers: */
+ 	*pimageout=imageout;
+-
+ 	return 1;
+-	
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 12450)
+@@ -30,9 +30,9 @@
+ 	int  edgecut=1;
+ 
+ 	if(dim==2){
+-		epart=(int*)xmalloc(numberofelements*sizeof(int));
+-		npart=(int*)xmalloc(numberofnodes*sizeof(int));
+-		index=(int*)xmalloc(elements_width*numberofelements*sizeof(int));
++		epart=xNew<int>(numberofelements);
++		npart=xNew<int>(numberofnodes);
++		index=xNew<int>(elements_width*numberofelements);
+ 		for (i=0;i<numberofelements;i++){
+ 			for (j=0;j<elements_width;j++){
+ 				*(index+elements_width*i+j)=(int)*(elements+elements_width*i+j)-1; //-1 for C indexing in Metis
+@@ -56,9 +56,9 @@
+ 		/*We have a 3d mesh, made of a regularly extruded 2d mesh. We first partition the 2d mesh, then we extrude the partition: */
+ 
+ 		/*First build concatenated 2d mesh  from 2d_coll and 2d_noncoll: */
+-		epart2d=(int*)xmalloc(numberofelements2d*sizeof(int));
+-		npart2d=(int*)xmalloc(numberofnodes2d*sizeof(int)); 
+-		index2d=(int*)xmalloc(3*numberofelements2d*sizeof(int));
++		epart2d=xNew<int>(numberofelements2d);
++		npart2d=xNew<int>(numberofnodes2d); 
++		index2d=xNew<int>(3*numberofelements2d);
+ 
+ 		for (i=0;i<numberofelements2d;i++){
+ 			for (j=0;j<3;j++){
+@@ -80,7 +80,7 @@
+ 		else _error_("At least one processor is required");
+ 
+ 		/*Extrude epart2d to epart, using numlayers: */
+-		epart=(int*)xmalloc(numberofelements*sizeof(int));
++		epart=xNew<int>(numberofelements);
+ 		
+ 		count=0;
+ 		for(i=0;i<(numlayers-1);i++){
+@@ -91,7 +91,7 @@
+ 		}
+ 
+ 		/*Extrude npart2d to npart, using numlayers: */
+-		npart=(int*)xmalloc(numberofnodes*sizeof(int));
++		npart=xNew<int>(numberofnodes);
+ 		
+ 		count=0;
+ 		for(i=0;i<(numlayers);i++){
+@@ -107,11 +107,9 @@
+ 	*pnpart=npart;
+ 
+ 	/*Free ressources: */
+-	xfree((void**)&index);
+-	xfree((void**)&epart2d);
+-	xfree((void**)&npart2d);
+-	xfree((void**)&index2d);
+-
++	xDelete<int>(index);
++	xDelete<int>(epart2d);
++	xDelete<int>(npart2d);
++	xDelete<int>(index2d);
+ 	return noerr;
+-
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Reducevectorgtosx/Reducevectorgtosx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Reducevectorgtosx/Reducevectorgtosx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Reducevectorgtosx/Reducevectorgtosx.cpp	(revision 12450)
+@@ -50,7 +50,7 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&yg_serial);
++	xDelete<double>(yg_serial);
+ 
+ 	/*Assign output pointers:*/
+ 	*pys=ys;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ElementConnectivityx/ElementConnectivityx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ElementConnectivityx/ElementConnectivityx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ElementConnectivityx/ElementConnectivityx.cpp	(revision 12450)
+@@ -35,7 +35,7 @@
+ 	/*maxels: */
+ 	maxels=width-1;
+ 	/*Allocate connectivity: */
+-	elementconnectivity=(double*)xcalloc(nel*3,sizeof(double));
++	elementconnectivity=xNewZeroInit<double>(nel*3);
+ 
+ 	/*Go through all elements, and for each element, go through its nodes, to get the neighbouring elements. 
+ 	 * Once we get the neighbouring elements, figure out if they share a segment with the current element. If so, 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12450)
+@@ -43,8 +43,8 @@
+ 	observations=new Observations(obs_list,obs_x,obs_y,obs_length,options);
+ 
+ 	/*Allocate output*/
+-	predictions =(double*)xcalloc(n_interp,sizeof(double));
+-	error       =(double*)xcalloc(n_interp,sizeof(double));
++	predictions =xNewZeroInit<double>(n_interp);
++	error       =xNewZeroInit<double>(n_interp);
+ 
+ 	/*Get output*/
+ 	options->Get(&output,"output","prediction");
+@@ -67,17 +67,17 @@
+ 
+ 		printf("Generation Delaunay Triangulation\n");
+ 		BamgTriangulatex(&index,&nel,x,y,nobs);
+-		indexd =(double*)xcalloc(nel*3,sizeof(double));
++		indexd =xNewZeroInit<double>(nel*3);
+ 		for(int i=0;i<nel*3;i++) indexd[i]=(double)index[i];
+-		xfree((void**)&index);
++		xDelete<int>(index);
+ 
+ 		printf("Interpolating\n");
+-		xfree((void**)&predictions);
++		xDelete<double>(predictions);
+ 		InterpFromMeshToMesh2dx(&predictions,indexd,x,y,nobs,nel,data,nobs,1,x_interp,y_interp,n_interp,NULL,0,new DataSet());
+-		xfree((void**)&x);
+-		xfree((void**)&y);
+-		xfree((void**)&index);
+-		xfree((void**)&data);
++		xDelete<double>(x);
++		xDelete<double>(y);
++		xDelete<double>(data);
++		xDelete<int>(index);
+ 	}
+ 	else if(strcmp(output,"nearestneighbor")==0){
+ 		/*initialize thread parameters: */
+@@ -91,12 +91,12 @@
+ 		gate.observations = observations;
+ 		gate.predictions  = predictions;
+ 		gate.error        = error;
+-		gate.percent      = (double*)xcalloc(num,sizeof(double));
++		gate.percent      = xNewZeroInit<double>(num);
+ 
+ 		/*launch the thread manager with Krigingxt as a core: */
+ 		LaunchThread(NearestNeighbort,(void*)&gate,num);
+ 		printf("\r      interpolation progress:  100.00%%\n");
+-		xfree((void**)&gate.percent);
++		xDelete<double>(gate.percent);
+ 	}
+ 	else if(strcmp(output,"idw")==0){ //Inverse distance weighting
+ 		/*initialize thread parameters: */
+@@ -110,12 +110,12 @@
+ 		gate.observations = observations;
+ 		gate.predictions  = predictions;
+ 		gate.error        = error;
+-		gate.percent      = (double*)xcalloc(num,sizeof(double));
++		gate.percent      = xNewZeroInit<double>(num);
+ 
+ 		/*launch the thread manager with Krigingxt as a core: */
+ 		LaunchThread(idwt,(void*)&gate,num);
+ 		printf("\r      interpolation progress:  100.00%%\n");
+-		xfree((void**)&gate.percent);
++		xDelete<double>(gate.percent);
+ 	}
+ 	else if(strcmp(output,"prediction")==0){
+ 
+@@ -130,12 +130,12 @@
+ 		gate.observations = observations;
+ 		gate.predictions  = predictions;
+ 		gate.error        = error;
+-		gate.percent      = (double*)xcalloc(num,sizeof(double));
++		gate.percent      = xNewZeroInit<double>(num);
+ 
+ 		/*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);
++		xDelete<double>(gate.percent);
+ 	}
+ 	else{
+ 		_error_("output '%s' not supported yet",output);
+@@ -144,7 +144,7 @@
+ 	/*clean-up and Assign output pointer*/
+ 	delete variogram;
+ 	delete observations;
+-	xfree((void**)&output);
++	xDelete<char>(output);
+ 	*ppredictions = predictions;
+ 	*perror       = error;
+ 	return 1;
+@@ -310,6 +310,6 @@
+ 	else variogram = new GaussianVariogram(options);
+ 
+ 	/*Assign output pointer*/
+-	xfree((void**)&model);
++	xDelete<char>(model);
+ 	*pvariogram = variogram;
+ }/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp	(revision 12450)
+@@ -17,7 +17,7 @@
+ 	InputUpdateFromVectorDakotax( elements,nodes, vertices, loads, materials, parameters,serial_vector,name, type);
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&serial_vector);
++	xDelete<double>(serial_vector);
+ }
+ 
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 12450)
+@@ -42,7 +42,7 @@
+ 	_assert_(elements);
+ 
+ 	/*Allocate ouput*/
+-	connectivity=(int*)xcalloc(numberofvertices,sizeof(int));
++	connectivity=xNewZeroInit<int>(numberofvertices);
+ 
+ 	/*Get element width (3 or 6)*/
+ 	if (dim==2){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp	(revision 12450)
+@@ -62,11 +62,11 @@
+ 		parameters->AddObject(new DoubleVecParam(InversionStepThresholdEnum,cm_jump,nsteps));
+ 		parameters->AddObject(new DoubleVecParam(InversionMaxiterPerStepEnum,maxiter,nsteps));
+ 
+-		xfree((void**)&control_type);
+-		xfree((void**)&cm_responses);
+-		xfree((void**)&cm_jump);
+-		xfree((void**)&optscal);
+-		xfree((void**)&maxiter);
++		xDelete<int>(control_type);
++		xDelete<double>(cm_responses);
++		xDelete<double>(cm_jump);
++		xDelete<double>(optscal);
++		xDelete<double>(maxiter);
+ 	}
+ 
+ 	/*Assign output pointer: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12450)
+@@ -23,7 +23,7 @@
+ void  NodesPartitioning(bool** pmy_nodes,bool* my_elements, int* my_vertices, IoModel* iomodel, bool continuous){
+ 	
+ 	/*First thing, this is a new partition for a new analysis_type, therefore, to avoid a leak, erase the nodes partition that might come through pmy_nodes: */
+-	xfree((void**)pmy_nodes);
++	xDelete<bool>(*pmy_nodes);
+ 
+ 	/*Now, depending on whether we are running galerkin discontinous or continuous elements, carry out a different partition of the nodes: */
+ 	if(continuous==true)
+@@ -43,8 +43,8 @@
+ 	/*Fetch parameters: */
+ 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
+ 
+-	my_nodes=(bool*)xmalloc(numberofvertices*sizeof(bool));
+-	memcpy(my_nodes,my_vertices,numberofvertices*sizeof(bool));
++	my_nodes=xNew<bool>(numberofvertices);
++	for(int i=0;i<numberofvertices;i++) my_nodes[i]=(bool)my_vertices[i];
+ 
+ 	/*Assign output pointers:*/
+ 	*pmy_nodes=my_nodes;
+@@ -89,15 +89,15 @@
+ 	 */
+ 
+ 	/*Allocate*/
+-	my_nodes=(bool*)xcalloc(3*numberofelements,sizeof(int));
++	my_nodes=xNewZeroInit<bool>(3*numberofelements);
+ 
+ 	/*First: add all the nodes of all the elements belonging to this cpu*/
+ 	if (dim==2){
+ 		for (i=0;i<numberofelements;i++){
+ 			if (my_elements[i]){
+-				my_nodes[3*i+0]=1;
+-				my_nodes[3*i+1]=1;
+-				my_nodes[3*i+2]=1;
++				my_nodes[3*i+0]=true;
++				my_nodes[3*i+1]=true;
++				my_nodes[3*i+2]=true;
+ 			}
+ 		}
+ 	}
+@@ -139,16 +139,16 @@
+ 			/*3: We have the id of the elements and the position of the vertices in the index
+ 			 * we can now create the corresponding nodes:*/
+ 			if (pos==0){
+-				my_nodes[(int)e2*3+0]=1;
+-				my_nodes[(int)e2*3+2]=1;
++				my_nodes[(int)e2*3+0]=true;
++				my_nodes[(int)e2*3+2]=true;
+ 			}
+ 			else if(pos==1){
+-				my_nodes[(int)e2*3+1]=1;
+-				my_nodes[(int)e2*3+0]=1;
++				my_nodes[(int)e2*3+1]=true;
++				my_nodes[(int)e2*3+0]=true;
+ 			}
+ 			else if (pos==2){
+-				my_nodes[(int)e2*3+2]=1;
+-				my_nodes[(int)e2*3+1]=1;
++				my_nodes[(int)e2*3+2]=true;
++				my_nodes[(int)e2*3+1]=true;
+ 			}
+ 			else{
+ 				_error_("Problem in edges creation");
+@@ -157,8 +157,8 @@
+ 	}
+ 
+ 	/*Free data: */
+-	xfree((void**)&elements);
+-	xfree((void**)&edges);
++	xDelete<double>(elements);
++	xDelete<double>(edges);
+ 
+ 	/*Assign output pointers:*/
+ 	*pmy_nodes=my_nodes;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp	(revision 12450)
+@@ -64,7 +64,7 @@
+ 	}
+ 
+ 	/*Free data: */
+-	xfree((void**)&spctemperature);
++	xDelete<double>(spctemperature);
+ 	
+ 	/*Assign output pointer: */
+ 	*pconstraints=constraints;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp	(revision 12450)
+@@ -89,10 +89,9 @@
+ 	}
+ 
+ 	/*free ressources: */
+-	xfree((void**)&vertex_pairing);
+-	xfree((void**)&nodeonbed);
++	xDelete<double>(vertex_pairing);
++	xDelete<double>(nodeonbed);
+ 
+-
+ 	/*Assign output pointer: */
+ 	*ploads=loads;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp	(revision 12450)
+@@ -34,7 +34,7 @@
+ 		}
+ 		else if (vertices_type[0]==MacAyealPattynApproximationEnum){
+ 			numdofs=4;
+-			doftype=(int*)xmalloc(numdofs*sizeof(int));
++			doftype=xNew<int>(numdofs);
+ 			doftype[0]=MacAyealApproximationEnum;
+ 			doftype[1]=MacAyealApproximationEnum;
+ 			doftype[2]=PattynApproximationEnum;
+@@ -42,7 +42,7 @@
+ 		}
+ 		else if (vertices_type[0]==PattynStokesApproximationEnum){
+ 			numdofs=6;
+-			doftype=(int*)xmalloc(numdofs*sizeof(int));
++			doftype=xNew<int>(numdofs);
+ 			doftype[0]=PattynApproximationEnum;
+ 			doftype[1]=PattynApproximationEnum;
+ 			doftype[2]=StokesApproximationEnum;
+@@ -52,7 +52,7 @@
+ 		}
+ 		else if (vertices_type[0]==MacAyealStokesApproximationEnum){
+ 			numdofs=6;
+-			doftype=(int*)xmalloc(numdofs*sizeof(int));
++			doftype=xNew<int>(numdofs);
+ 			doftype[0]=MacAyealApproximationEnum;
+ 			doftype[1]=MacAyealApproximationEnum;
+ 			doftype[2]=StokesApproximationEnum;
+@@ -95,5 +95,5 @@
+ 	index->Init(numdofs,doftype);
+ 
+ 	/*Clean up*/
+-	 xfree((void**)&doftype);
++	 xDelete<int>(doftype);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp	(revision 12450)
+@@ -119,8 +119,8 @@
+ 
+ 	/*Free data: */
+ 	iomodel->DeleteData(3,DiagnosticIcefrontEnum,ThicknessEnum,BedEnum);
+-	xfree((void**)&elements_type);
+-	xfree((void**)&pressureload);
++	xDelete<double>(elements_type);
++	xDelete<double>(pressureload);
+ 
+ 	/*Create Penpair for penalties: */
+ 	iomodel->FetchData(&penalties,&numpenalties,NULL,DiagnosticVertexPairingEnum);
+@@ -143,7 +143,7 @@
+ 	}
+ 
+ 	/*free ressources: */
+-	xfree((void**)&penalties);
++	xDelete<double>(penalties);
+ 
+ 	/*Create Riffront loads for rifts: */
+ 	if(numrifts){
+@@ -156,7 +156,7 @@
+ 			}
+ 		}
+ 		iomodel->DeleteData(5,RiftsRiftstructEnum,ThicknessEnum,BedEnum,SurfaceEnum,MaskVertexonfloatingiceEnum);
+-		xfree((void**)&riftfront);
++		xDelete<Riftfront>(riftfront);
+ 	}
+ 
+ 	/*Assign output pointer: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp	(revision 12450)
+@@ -86,28 +86,27 @@
+ 	count=0;
+ 
+ 	/*figure out times: */
+-	timesx=(double*)xmalloc(Nx*sizeof(double));
++	timesx=xNew<double>(Nx);
+ 	for(j=0;j<Nx;j++){
+ 		timesx[j]=spcvx[(Mx-1)*Nx+j];
+ 	}
+ 	/*unit conversion: */
+ 	UnitConversion(timesx,Nx,ExtToIuEnum,TimeEnum);
+ 	/*figure out times: */
+-	timesy=(double*)xmalloc(Ny*sizeof(double));
++	timesy=xNew<double>(Ny);
+ 	for(j=0;j<Ny;j++){
+ 		timesy[j]=spcvy[(My-1)*Ny+j];
+ 	}
+ 	/*unit conversion: */
+ 	UnitConversion(timesy,Ny,ExtToIuEnum,TimeEnum);
+ 	/*figure out times: */
+-	timesz=(double*)xmalloc(Nz*sizeof(double));
++	timesz=xNew<double>(Nz);
+ 	for(j=0;j<Nz;j++){
+ 		timesz[j]=spcvz[(Mz-1)*Nz+j];
+ 	}
+ 	/*unit conversion: */
+ 	UnitConversion(timesz,Nz,ExtToIuEnum,TimeEnum);
+ 
+-
+ 	/*Create spcs from x,y,z, as well as the spc values on those spcs: */
+ 	for (i=0;i<numberofvertices;i++){
+ 		if(iomodel->my_vertices[i]){
+@@ -235,7 +234,7 @@
+ 				}
+ 				else if (Mx==numberofvertices+1) {
+ 					/*figure out times and values: */
+-					values=(double*)xmalloc(Nx*sizeof(double));
++					values=xNew<double>(Nx);
+ 					spcpresent=false;
+ 					for(j=0;j<Nx;j++){
+ 						values[j]=spcvx[i*Nx+j]/yts;
+@@ -246,7 +245,7 @@
+ 						constraints->AddObject(new SpcTransient(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,Nx,timesx,values,DiagnosticHorizAnalysisEnum));
+ 						count++;
+ 					}
+-					xfree((void**)&values);
++					xDelete<double>(values);
+ 				}
+ 				else if (vertices_type[i]==HutterApproximationEnum){
+ 					constraints->AddObject(new SpcDynamic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,DiagnosticHorizAnalysisEnum));
+@@ -259,7 +258,7 @@
+ 				}
+ 				else if (My==numberofvertices+1){
+ 					/*figure out times and values: */
+-					values=(double*)xmalloc(Ny*sizeof(double));
++					values=xNew<double>(Ny);
+ 					spcpresent=false;
+ 					for(j=0;j<Ny;j++){
+ 						values[j]=spcvy[i*Ny+j]/yts;
+@@ -269,7 +268,7 @@
+ 						constraints->AddObject(new SpcTransient(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,Ny,timesy,values,DiagnosticHorizAnalysisEnum));
+ 						count++;
+ 					}
+-					xfree((void**)&values);
++					xDelete<double>(values);
+ 				}
+ 				else if (vertices_type[i]==HutterApproximationEnum){
+ 					constraints->AddObject(new SpcDynamic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,DiagnosticHorizAnalysisEnum));
+@@ -283,7 +282,7 @@
+ 					}
+ 					else if (Mz==numberofvertices+1){
+ 						/*figure out times and values: */
+-						values=(double*)xmalloc(Nz*sizeof(double));
++						values=xNew<double>(Nz);
+ 						spcpresent=false;
+ 						for(j=0;j<Nz;j++){
+ 							values[j]=spcvz[i*Nz+j]/yts;
+@@ -293,7 +292,7 @@
+ 							constraints->AddObject(new SpcTransient(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,Nz,timesz,values,DiagnosticHorizAnalysisEnum));
+ 							count++;
+ 						}
+-						xfree((void**)&values);
++						xDelete<double>(values);
+ 					}
+ 
+ 				}
+@@ -325,23 +324,23 @@
+ 	}
+ 	  
+ 	/*Free data: */
+-	xfree((void**)&spcvx);
+-	xfree((void**)&spcvy);
+-	xfree((void**)&spcvz);
+-	xfree((void**)&nodeonmacayeal);
+-	xfree((void**)&nodeonpattyn);
+-	xfree((void**)&nodeonstokes);
+-	xfree((void**)&nodeonicesheet);
+-	xfree((void**)&nodeonbed);
+-	xfree((void**)&vertices_type);
+-	xfree((void**)&surface);
+-	xfree((void**)&z);
++	xDelete<double>(spcvx);
++	xDelete<double>(spcvy);
++	xDelete<double>(spcvz);
++	xDelete<double>(nodeonmacayeal);
++	xDelete<double>(nodeonpattyn);
++	xDelete<double>(nodeonstokes);
++	xDelete<double>(nodeonicesheet);
++	xDelete<double>(nodeonbed);
++	xDelete<double>(vertices_type);
++	xDelete<double>(surface);
++	xDelete<double>(z);
+ 
+ 	/*Free resources:*/
+-	xfree((void**)&timesx);
+-	xfree((void**)&timesy);
+-	xfree((void**)&timesz);
+-	xfree((void**)&values);
++	xDelete<double>(timesx);
++	xDelete<double>(timesy);
++	xDelete<double>(timesz);
++	xDelete<double>(values);
+ 
+ 	/*Assign output pointer: */
+ 	*pconstraints=constraints;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 12450)
+@@ -73,15 +73,15 @@
+ 		iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
+ 
+ 		/*name of qmu input, error and output files:{{{*/
+-		qmuinname=(char*)xmalloc((strlen(name)+strlen(".qmu.in")+1)*sizeof(char));
++		qmuinname=xNew<char>((strlen(name)+strlen(".qmu.in")+1));
+ 		sprintf(qmuinname,"%s%s",name,".qmu.in");
+ 		parameters->AddObject(new   StringParam(QmuInNameEnum,qmuinname));
+ 
+-		qmuoutname=(char*)xmalloc((strlen(name)+strlen(".qmu.out")+1)*sizeof(char));
++		qmuoutname=xNew<char>((strlen(name)+strlen(".qmu.out")+1));
+ 		sprintf(qmuoutname,"%s%s",name,".qmu.out");
+ 		parameters->AddObject(new   StringParam(QmuOutNameEnum,qmuoutname));
+ 
+-		qmuerrname=(char*)xmalloc((strlen(name)+strlen(".qmu.err")+1)*sizeof(char));
++		qmuerrname=xNew<char>((strlen(name)+strlen(".qmu.err")+1));
+ 		sprintf(qmuerrname,"%s%s",name,".qmu.err");
+ 		parameters->AddObject(new   StringParam(QmuErrNameEnum,qmuerrname));
+ 		/*}}}*/
+@@ -110,7 +110,7 @@
+ 			/*Partition elements and vertices and nodes: */
+ 			ElementsAndVerticesPartitioning(&iomodel->my_elements,&iomodel->my_vertices,iomodel);
+ 
+-			dpart=(double*)xmalloc(numberofvertices*sizeof(double));
++			dpart=xNew<double>(numberofvertices);
+ 			for(i=0;i<numberofvertices;i++)dpart[i]=iomodel->my_vertices[i];
+ 		}
+ 		parameters->AddObject(new DoubleVecParam(QmuPartitionEnum,dpart,numberofvertices));
+@@ -135,7 +135,7 @@
+ 				}
+ 				
+ 				/*Free ressources:*/
+-				xfree((void**)&dakota_parameter);
++				xDelete<int>(dakota_parameter);
+ 			}
+ 		}
+ 		/*}}}*/
+@@ -165,7 +165,7 @@
+ 					if (  iomodel->my_elements[(int)(*(temp_matrix+5*j+4))-1])m++;
+ 				}
+ 				if(m){
+-					matrix=(double*)xcalloc(5*m,sizeof(double));
++					matrix=xNewZeroInit<double>(5*m);
+ 					count=0;
+ 					for(j=0;j<temp_m;j++){
+ 						if (iomodel->my_elements[(int)*(temp_matrix+5*j+4)-1]){
+@@ -184,7 +184,7 @@
+ 				ndims_array[i]=5;
+ 
+ 				/*Free temporary matrix: */
+-				xfree((void**)&temp_matrix);
++				xDelete<double>(temp_matrix);
+ 			}
+ 
+ 			/*Ok, we have an array of segments, different on every cpu. Create a DoubleMatArrayParam object with it: */
+@@ -193,35 +193,35 @@
+ 			/*Free data: */
+ 			for(i=0;i<qmu_mass_flux_num_profiles;i++){
+ 				double* matrix=array[i];
+-				xfree((void**)&matrix);
++				xDelete<double>(matrix);
+ 			}
+-			xfree((void**)&mdims_array); 
+-			xfree((void**)&ndims_array);
+-			xfree((void**)&array);
++			xDelete<int>(mdims_array); 
++			xDelete<int>(ndims_array);
++			xDelete<double*>(array);
+ 		}
+ 		/*}}}*/
+ 		/*Free data: {{{*/
+ 		for(i=0;i<numresponsedescriptors;i++){
+ 			descriptor=responsedescriptors[i];
+-			xfree((void**)&descriptor);
++			xDelete<char>(descriptor);
+ 		}
+-		xfree((void**)&responsedescriptors);
++		xDelete<char*>(responsedescriptors);
+ 
+ 		for(i=0;i<numvariabledescriptors;i++){
+ 			descriptor=variabledescriptors[i];
+-			xfree((void**)&descriptor);
++			xDelete<char>(descriptor);
+ 		}
+-		xfree((void**)&variabledescriptors);
+-		xfree((void**)&part);
+-		xfree((void**)&dpart);
+-		xfree((void**)&qmuinname);
+-		xfree((void**)&qmuerrname);
+-		xfree((void**)&qmuoutname);
++		xDelete<char*>(variabledescriptors);
++		xDelete<int>(part);
++		xDelete<int>(dpart);
++		xDelete<char>(qmuinname);
++		xDelete<char>(qmuerrname);
++		xDelete<char>(qmuoutname);
+ 		/*}}}*/
+ 	} //if(dakota_analysis)
+ 
+ 	/*Free data*/
+-	xfree((void**)&name);
++	xDelete<char>(name);
+ 
+ 	/*Assign output pointer: */
+ 	*pparameters=parameters;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp	(revision 12450)
+@@ -43,7 +43,7 @@
+ 	_assert_(elements);
+ 
+ 	/*Allocate ouput*/
+-	connectivity=(int*)xcalloc(numberofvertices,sizeof(int));
++	connectivity=xNewZeroInit<int>(numberofvertices);
+ 
+ 	/*Get element width (3 or 6)*/
+ 	if (dim==2){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 12450)
+@@ -104,15 +104,15 @@
+ 	iomodel->FetchData(&requestedoutputs,&numoutputs,NULL,DiagnosticRequestedOutputsEnum);
+ 	parameters->AddObject(new IntParam(DiagnosticNumRequestedOutputsEnum,numoutputs));
+ 	if(numoutputs)parameters->AddObject(new IntVecParam(DiagnosticRequestedOutputsEnum,requestedoutputs,numoutputs));
+-	xfree((void**)&requestedoutputs);
++	xDelete<double>(requestedoutputs);
+ 	iomodel->FetchData(&requestedoutputs,&numoutputs,NULL,TransientRequestedOutputsEnum);
+ 	parameters->AddObject(new IntParam(TransientNumRequestedOutputsEnum,numoutputs));
+ 	if(numoutputs)parameters->AddObject(new IntVecParam(TransientRequestedOutputsEnum,requestedoutputs,numoutputs));
+-	xfree((void**)&requestedoutputs);
++	xDelete<double>(requestedoutputs);
+ 	iomodel->FetchData(&requestedoutputs,&numoutputs,NULL,SteadystateRequestedOutputsEnum);
+ 	parameters->AddObject(new IntParam(SteadystateNumRequestedOutputsEnum,numoutputs));
+ 	if(numoutputs)parameters->AddObject(new IntVecParam(SteadystateRequestedOutputsEnum,requestedoutputs,numoutputs));
+-	xfree((void**)&requestedoutputs);
++	xDelete<double>(requestedoutputs);
+ 	
+ 	/*Before returning, create parameters in case we are running Qmu or control types runs: */
+ 	#ifdef _HAVE_CONTROL_
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 12450)
+@@ -75,8 +75,8 @@
+ 	MeshPartitionx(&epart, &npart,numberofelements,numberofvertices,elements, numberofelements2d,numberofvertices2d,elements2d,numlayers,elements_width, dim,num_procs);
+ 
+ 	/*Free elements and elements2d: */
+-	xfree((void**)&elements);
+-	xfree((void**)&elements2d);
++	xDelete<double>(elements);
++	xDelete<double>(elements2d);
+ 
+ 	/*Deal with rifts, they have to be included into one partition only, not several: */
+ 	if(numrifts){
+@@ -86,12 +86,12 @@
+ 			el2=(int)*(riftinfo+RIFTINFOSIZE*i+3)-1; //matlab indexing to c indexing
+ 			epart[el2]=epart[el1]; //ensures that this pair of elements will be in the same partition, as well as the corresponding vertices;
+ 		}
+-		xfree((void**)&riftinfo); 
++		xDelete<double>(riftinfo); 
+ 	}
+ 
+ 	/*Used later on: */
+-	my_vertices=(int*)xcalloc(numberofvertices,sizeof(int));
+-	my_elements=(bool*)xcalloc(numberofelements,sizeof(bool));
++	my_vertices=xNewZeroInit<int>(numberofvertices);
++	my_elements=xNewZeroInit<bool>(numberofelements);
+ 
+ 	/*Start figuring out, out of the partition, which elements belong to this cpu: */
+ 	iomodel->FetchData(&elements,NULL,NULL,MeshElementsEnum);
+@@ -118,7 +118,7 @@
+ 		}
+ 	}//for (i=0;i<numberofelements;i++)
+ 	/*Free data : */
+-	xfree((void**)&elements);
++	xDelete<double>(elements);
+ 
+ 	/*We might have vertex_pairing in which case, some vertices have to be cloned:
+ 	 * penpair has 2 nodes that are poointing toward 2 vertices.
+@@ -129,18 +129,18 @@
+ 			my_vertices[(int)vertex_pairing[2*i+1]-1]=2; //to know that these elements are not on the partition
+ 		}
+ 	}
+-	xfree((void**)&vertex_pairing);
++	xDelete<double>(vertex_pairing);
+ 	iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,PrognosticVertexPairingEnum);
+ 	for(i=0;i<numvertex_pairing;i++){
+ 		if(my_vertices[(int)vertex_pairing[2*i+0]-1] && !my_vertices[(int)vertex_pairing[2*i+1]-1]){
+ 			my_vertices[(int)vertex_pairing[2*i+1]-1]=2; //to know that these elements are not on the partition
+ 		}
+ 	}
+-	xfree((void**)&vertex_pairing);
++	xDelete<double>(vertex_pairing);
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&npart);
+-	xfree((void**)&epart);
++	xDelete<int>(npart);
++	xDelete<int>(epart);
+ 
+ 	/*Assign output pointers:*/
+ 	*pmy_elements=my_elements;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SetControlInputsFromVectorx/SetControlInputsFromVectorx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SetControlInputsFromVectorx/SetControlInputsFromVectorx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SetControlInputsFromVectorx/SetControlInputsFromVectorx.cpp	(revision 12450)
+@@ -24,7 +24,7 @@
+ 		}
+ 	}
+ 
+-	xfree((void**)&control_type);
++	xDelete<int>(control_type);
+ }
+ 
+ void SetControlInputsFromVectorx(Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Vector* vector){
+@@ -36,5 +36,5 @@
+ 	SetControlInputsFromVectorx(elements,nodes, vertices, loads, materials, parameters,serial_vector);
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&serial_vector);
++	xDelete<double>(serial_vector);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/DofTypesToIndexSet.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/DofTypesToIndexSet.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/DofTypesToIndexSet.cpp	(revision 12450)
+@@ -45,8 +45,8 @@
+ 		}
+ 
+ 		/*Allocate indices: */
+-		if(pressure_num)pressure_indices=(int*)xmalloc(pressure_num*sizeof(int));
+-		if(velocity_num)velocity_indices=(int*)xmalloc(velocity_num*sizeof(int));
++		if(pressure_num)pressure_indices=xNew<int>(pressure_num);
++		if(velocity_num)velocity_indices=xNew<int>(velocity_num);
+ 
+ 		pressure_count=0;
+ 		velocity_count=0;
+@@ -73,8 +73,8 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&pressure_indices);
+-	xfree((void**)&velocity_indices);
++	xDelete<int>(pressure_indices);
++	xDelete<int>(velocity_indices);
+ 
+ 	/*Assign output pointers:*/
+ 	*pisv=isv;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12450)
+@@ -17,21 +17,10 @@
+ 
+ void SolverxGsl(SeqVec** puf,SeqMat* Kff, SeqVec* pf){/*{{{*/
+ 
+-	/*Intermediaries*/
+-	SeqMat* KffCopy = NULL;
+-	SeqVec*  uf = NULL;
+-	
+-	/*GSL Matrices and vectors: */
+-	gsl_matrix_view m;
+-	gsl_vector_view b;
+-	gsl_vector* x=NULL;
+-	gsl_permutation* p=NULL;
+-	
+-	/*We are going to do an in place LU decomp, so we need to save the matrix with its original structure: */
+-	KffCopy=Kff->Duplicate();
+-
+ 	/*Intermediary: */
+ 	int M,N,N2,s;
++	SeqVec *uf = NULL;
++	double *x  = NULL;
+ 
+ 	Kff->GetSize(&M,&N);
+ 	pf->GetSize(&N2);
+@@ -39,27 +28,9 @@
+ 	if(N!=N2)_error_("Right hand side vector of size %i, when matrix is of size %i-%i !",N2,M,N);
+ 	if(M!=N)_error_("Stiffness matrix should be square!");
+ 
+-	/*Initialize gsl matrices and vectors: */
+-	m = gsl_matrix_view_array (KffCopy->matrix, M, N);
+-	b = gsl_vector_view_array (pf->vector, N);
+-	x = gsl_vector_alloc (N);
++	SolverxGsl(&x,Kff->matrix,pf->vector,N);
++	uf=new SeqVec(x,N);
+ 
+-	/*Run LU and solve: */
+-	p = gsl_permutation_alloc (N);
+-	gsl_linalg_LU_decomp (&m.matrix, p, &s);
+-	gsl_linalg_LU_solve (&m.matrix, p, &b.vector, x);
+-
+-	//printf ("x = \n");
+-	//gsl_vector_fprintf (stdout, x, "%g");
+-
+-	/*Get uf initialized with the results: */
+-	uf=new SeqVec(gsl_vector_ptr(x,0),M);
+-
+-	/*Free resources:*/
+-	gsl_permutation_free (p);
+-	gsl_vector_free (x);
+-	delete KffCopy;
+-
+ 	/*Assign output pointers:*/
+ 	*puf=uf;
+ }/*}}}*/
+@@ -73,7 +44,7 @@
+ 	gsl_permutation *p = NULL;
+ 
+ 	/*A will be modified by LU decomposition. Use copy*/
+-	double* Acopy = (double*)xmalloc(n*n*sizeof(double));
++	double* Acopy = xNew<double>(n*n);
+ 	memcpy(Acopy,A,n*n*sizeof(double));
+ 
+ 	/*Initialize gsl matrices and vectors: */
+@@ -90,11 +61,11 @@
+ 	//gsl_vector_fprintf (stdout, x, "%g");
+ 
+ 	/*Copy result*/
+-	double* X = (double*)xmalloc(n*sizeof(double));
++	double* X = xNew<double>(n);
+ 	memcpy(X,gsl_vector_ptr(x,0),n*sizeof(double));
+ 
+ 	/*Clean up and assign output pointer*/
+-	xfree((void**)&Acopy);
++	xDelete<double>(Acopy);
+ 	gsl_permutation_free(p);
+ 	gsl_vector_free(x);
+ 	*pX=X;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12450)
+@@ -51,8 +51,8 @@
+ 	if(N==(x_rows-1) && M==(y_rows-1)){
+ 
+ 		/*The coordinates given in input describe the contour of each pixel. Take the center of each pixel*/
+-		x=(double*)xmalloc(N*sizeof(double));
+-		y=(double*)xmalloc(M*sizeof(double));
++		x=xNew<double>(N);
++		y=xNew<double>(M);
+ 		for (i=0;i<N;i++) x[i]=(x_in[i]+x_in[i+1])/2;
+ 		for (i=0;i<M;i++) y[i]=(y_in[i]+y_in[i+1])/2;
+ 		x_rows=x_rows-1;
+@@ -61,8 +61,8 @@
+ 	else if (N==x_rows && M==y_rows){
+ 
+ 		/*The coordinates given in input describe the center each pixel. Keep them*/
+-		x=(double*)xmalloc(N*sizeof(double));
+-		y=(double*)xmalloc(M*sizeof(double));
++		x=xNew<double>(N);
++		y=xNew<double>(M);
+ 		for (i=0;i<N;i++) x[i]=x_in[i];
+ 		for (i=0;i<M;i++) y[i]=y_in[i];
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12450)
+@@ -11,15 +11,15 @@
+ bool InputConvergencex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int* enums, int num_enums, int* criterionenums, double* criterionvalues,int num_criterionenums){
+ 
+ 	/*intermediary:*/
+-	int         i;
+-	bool        converged;
+-	int         num_notconverged=0;
+-	int         total_notconverged;
+-	double     *eps       = NULL;
+-	Element*    element=NULL;
++	int      i;
++	bool     converged;
++	int      num_notconverged   = 0;
++	int      total_notconverged;
++	double  *eps                = NULL;
++	Element *element            = NULL;
+ 
+ 	/*allocate dynamic memory: */
+-	eps=(double*)xmalloc(num_criterionenums*sizeof(double));
++	eps=xNew<double>(num_criterionenums);
+ 
+ 	/*Go through elements, and ask them to do the job: */
+ 	for(i=0;i<elements->Size();i++){
+@@ -36,7 +36,7 @@
+ 	_printf_(VerboseConvergence(),"      #elements above convergence criterion = %i\n",num_notconverged);
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&eps);
++	xDelete<double>(eps);
+ 
+ 	/*return: */
+ 	if (num_notconverged){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/CostFunctionx/CostFunctionx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/CostFunctionx/CostFunctionx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/CostFunctionx/CostFunctionx.cpp	(revision 12450)
+@@ -34,6 +34,6 @@
+ 	}
+ 
+ 	/*Assign output pointers: */
+-	xfree((void**)&responses);
++	xDelete<int>(responses);
+ 	*pJ=J;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp	(revision 12450)
+@@ -43,7 +43,7 @@
+ 		}
+ 
+ //		_printf_(true,"%s\n",kstr);
+-		xfree((void**)&kstr);
++		xDelete<char>(kstr);
+ 	}
+ 
+ 	if (kxml) {
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp	(revision 12450)
+@@ -36,7 +36,7 @@
+ 
+ 
+ 	/*Allocate connectivity: */
+-	connectivity=(double*)xcalloc(nods*width,sizeof(double));
++	connectivity=xNewZeroInit<double>(nods*width);
+ 
+ 	/*Go through all elements, and for each elements, plug into the connectivity, all the nodes. 
+ 	 * If nodes are already plugged into the connectivity, skip them.: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12450)
+@@ -47,8 +47,8 @@
+ 		}
+ 
+ 		/*Now, allocate analyses and strings: */
+-		analyses=(double*)xmalloc(numanalyses*sizeof(double));
+-		strings=(char**)xmalloc(numanalyses*sizeof(char*));
++		analyses=xNew<double>(numanalyses);
++		strings=xNew<char*>(numanalyses);
+ 		for(i=0;i<numanalyses;i++)strings[i]=NULL; 
+ 
+ 		/*Go back to beginning of file:*/
+@@ -69,25 +69,25 @@
+ 			else{ /*this is an option corresponding to analysis numanalyses-1. Add it 
+ 			to the already existing options*/
+ 				if(strings[numanalyses-1]==NULL){
+-					string=(char*)xmalloc((strlen(line)+1)*sizeof(char)); 
++					string=xNew<char>((strlen(line)+1)); 
+ 					memcpy(string,line,(strlen(line)+1)*sizeof(char));
+ 
+ 					strings[numanalyses-1]=string;
+ 				}
+ 				else{
+ 					string=strings[numanalyses-1];
+-					newstring=(char*)xmalloc((strlen(line)+1)*sizeof(char));
++					newstring=xNew<char>((strlen(line)+1));
+ 					memcpy(newstring,line,(strlen(line)+1)*sizeof(char));
+ 
+ 					/*concatenate:*/
+-					catstring=(char*)xmalloc((strlen(string)+1+strlen(newstring)+1+1)*sizeof(char)); //fit in a space " "
++					catstring=xNew<char>(strlen(string)+1+strlen(newstring)+1+1); //fit in a space " "
+ 					memcpy(catstring,string,(strlen(string)+1)*sizeof(char));
+ 
+ 					strcat(catstring," ");
+ 					strcat(catstring,newstring);
+ 					strings[numanalyses-1]=catstring;
+-					xfree((void**)&newstring);
+-					xfree((void**)&string);
++					xDelete<char>(newstring);
++					xDelete<char>(string);
+ 				}
+ 			}
+ 		}
+@@ -97,8 +97,8 @@
+  	#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*));
++		analyses=xNew<double>(numanalyses);
++		strings=xNew<char*>(numanalyses);
+ 	}
+ 	MPI_Bcast(analyses,numanalyses,MPI_DOUBLE,0,MPI_COMM_WORLD);
+ 	#endif
+@@ -110,7 +110,7 @@
+ 		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);
++		if(my_rank!=0)string=xNew<char>(stringlength);
+ 		MPI_Bcast(string,stringlength,MPI_CHAR,0,MPI_COMM_WORLD);
+ 		if(my_rank!=0)strings[i]=string;
+ 		#endif
+@@ -121,9 +121,8 @@
+ 	parameters->AddObject(new DoubleVecParam(PetscOptionsAnalysesEnum,analyses,numanalyses));
+ 
+ 	/*Clean up and return*/
+-	for(i=0;i<numanalyses;i++) xfree((void**)&strings[i]);
+-	xfree((void**)&strings);
+-	xfree((void**)&analyses);
++	for(i=0;i<numanalyses;i++) xDelete<char>(strings[i]);
++	xDelete<char*>(strings);
++	xDelete<double>(analyses);
+ 	return;
+ }
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp	(revision 12450)
+@@ -18,7 +18,7 @@
+ 	double* tria=NULL;
+ 
+ 	/*allocate: */
+-	tria=(double*)xmalloc(numberofnodes*sizeof(double));
++	tria=xNew<double>(numberofnodes);
+ 
+ 	/*Intermediary*/
+ 	R2     r;
+@@ -51,7 +51,6 @@
+ 		else tria[i]=NAN;
+ 	}
+ 
+-
+ 	/*Assign output pointers:*/
+ 	*ptria=tria;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp	(revision 12450)
+@@ -13,11 +13,11 @@
+ 
+ 	int     i,j,numberofvertices;
+ 	int     num_controls;
+-	double  norm_inf;
+-	double *norm_list       = NULL;
+-	int    *control_type    = NULL;
+-	Vector*     gradient        = NULL;
+-	Vector*    *gradient_list   = NULL;
++	double   norm_inf;
++	double  *norm_list     = NULL;
++	int     *control_type  = NULL;
++	Vector  *gradient      = NULL;
++	Vector **gradient_list = NULL;
+ 	
+ 	/*retrieve some parameters: */
+ 	parameters->FindParam(&num_controls,InversionNumControlParametersEnum);   _assert_(num_controls);
+@@ -25,8 +25,8 @@
+ 	numberofvertices=vertices->NumberOfVertices();
+ 
+ 	/*Allocate gradient_list */
+-	gradient_list = (Vector**)xmalloc(num_controls*sizeof(Vector*));
+-	norm_list = (double*)xmalloc(num_controls*sizeof(double));
++	gradient_list = xNew<Vector*>(num_controls);
++	norm_list = xNew<double>(num_controls);
+ 	for(i=0;i<num_controls;i++){
+ 		gradient_list[i]=new Vector(num_controls*numberofvertices);
+ 	}
+@@ -61,9 +61,9 @@
+ 		*pnorm_list=norm_list;
+ 	}
+ 	else{
+-		xfree((void**)&norm_list);
++		xDelete<double>(norm_list);
+ 	}
+ 	if(pgradient)  *pgradient=gradient;
+-	xfree((void**)&gradient_list);
+-	xfree((void**)&control_type);
++	xDelete<Vector*>(gradient_list);
++	xDelete<int>(control_type);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/VecMergex/VecMergex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/VecMergex/VecMergex.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/VecMergex/VecMergex.cpp	(revision 12450)
+@@ -40,7 +40,7 @@
+ 		}
+ 	}
+ 	/*Free ressources:*/
+-	xfree((void**)&uf_serial);
++	xDelete<double>(uf_serial);
+ 
+ 	/*Assemble vector: */
+ 	ug->Assemble();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp	(revision 12450)
+@@ -66,11 +66,11 @@
+ 	/*Free ressources:*/
+ 	for(j=0;j<M;j++){
+ 		double* matrix=array[j];
+-		xfree((void**)&matrix);
++		xDelete<double>(matrix);
+ 	}
+-	xfree((void**)&mdims_array);
+-	xfree((void**)&ndims_array);
+-	xfree((void**)&array);
++	xDelete<int>(mdims_array);
++	xDelete<int>(ndims_array);
++	xDelete<double*>(array);
+ 	
+ 	/*Assign output pointers: */
+ 	*pmass_flux=mass_flux;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12450)
+@@ -29,11 +29,10 @@
+ 	int    npart;
+ 	double femmodel_response;
+ 	int    flag;
+-	double* vertex_response=NULL;
+-	double* qmu_response=NULL;
++	double *vertex_response   = NULL;
++	double *qmu_response      = NULL;
++	double *responses_pointer = NULL;
+ 
+-	double* responses_pointer=NULL;
+-
+ 	/*retrieve npart: */
+ 	parameters->FindParam(&npart,QmuNumberofpartitionsEnum);
+ 
+@@ -65,8 +64,8 @@
+ 			}
+ 
+ 			/*Free ressources:*/
+-			xfree((void**)&vertex_response);
+-			xfree((void**)&qmu_response);
++			xDelete<double>(vertex_response);
++			xDelete<double>(qmu_response);
+ 
+ 		}
+ 		else if (flag==IndexedEnum){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp	(revision 12450)
+@@ -69,7 +69,7 @@
+ 	*pin_elem=in_elem;
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&in_nod_serial);
++	xDelete<double>(in_nod_serial);
+ 
+ 	return noerr;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12450)
+@@ -183,8 +183,8 @@
+ 														edata,
+ 														cmap,mcmap,ncmap));
+ 
+-	if(edfree) xfree((void**)&edata);
+-	if(ncfree) xfree((void**)&nodecon);
++	if(edfree) xDelete<double>(edata);
++	if(ncfree) xDelete<int>(nodecon);
+ 	clock0a=clock();
+ 	time0a =time(NULL);
+ 	_printf_(true,"  Constructed kml document -- %f CPU seconds; %f elapsed seconds.\n\n",
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 12450)
+@@ -97,7 +97,7 @@
+ 	}
+ 	
+ 	in.segmentlist = xNew<int>(in.numberofsegments*2);
+-	in.segmentmarkerlist = (int*)xcalloc(in.numberofsegments,sizeof(int));
++	in.segmentmarkerlist = xNewZeroInit<int>(in.numberofsegments);
+ 	counter=0;
+ 	backcounter=0;
+ 	for (i=0;i<domain->Size();i++){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ControlInputGetGradientx/ControlInputGetGradientx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ControlInputGetGradientx/ControlInputGetGradientx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ControlInputGetGradientx/ControlInputGetGradientx.cpp	(revision 12450)
+@@ -32,6 +32,6 @@
+ 	gradient->Assemble();
+ 
+ 	/*Clean up and return*/
+-	xfree((void**)&control_type);
++	xDelete<int>(control_type);
+ 	*pgradient=gradient;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp	(revision 12450)
+@@ -33,5 +33,5 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&yg_serial);
++	xDelete<double>(yg_serial);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp	(revision 12450)
+@@ -38,7 +38,7 @@
+ 	bool* already=NULL;
+ 
+ 	/*allocate: */
+-	already=(bool*)xcalloc(nods,sizeof(bool));
++	already=xNewZeroInit<bool>(nods);
+ 
+ 	/*partition loop across threads: */
+ 	PartitionRange(&i0,&i1,nods,num_threads,my_thread);
+@@ -72,7 +72,7 @@
+ 	if (my_thread==0) printf("\b\b\b\b\b\b\b%5.2lf %%\n",100.0);
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&already);
++	xDelete<bool>(already);
+ 	
+ 	return NULL;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ControlInputScaleGradientx/ControlInputScaleGradientx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ControlInputScaleGradientx/ControlInputScaleGradientx.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ControlInputScaleGradientx/ControlInputScaleGradientx.cpp	(revision 12450)
+@@ -36,6 +36,6 @@
+ 	}
+ 
+ 	/*Clean up and return*/
+-	xfree((void**)&control_type);
+-	xfree((void**)&scalar_list);
++	xDelete<int>(control_type);
++	xDelete<double>(scalar_list);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12449)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12450)
+@@ -204,7 +204,7 @@
+ 	for(i = 0; i <num; i++){
+ 		dataenum=va_arg(ap, int);
+ 		_assert_(dataenum<MaximumNumberOfEnums);
+-		xfree((void**)&this->data[dataenum]);
++		xDelete<double>(this->data[dataenum]);
+ 	}
+ 	va_end(ap);
+ } /*}}}*/
+@@ -690,7 +690,7 @@
+ 
+ 	/*Now allocate matrix: */
+ 	if(M*N){
+-		matrix=(IssmPDouble*)xmalloc(M*N*sizeof(IssmPDouble));
++		matrix=xNew<IssmPDouble>(M*N);
+ 
+ 		/*Read matrix on node 0, then broadcast: */
+ 		if(my_rank==0){  
Index: /issm/oecreview/Archive/12321-12677/ISSM-12450-12451.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12450-12451.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12450-12451.diff	(revision 12679)
@@ -0,0 +1,365 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 12450)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 12451)
+@@ -135,7 +135,7 @@
+ 				}
+ 				
+ 				/*Free ressources:*/
+-				xDelete<int>(dakota_parameter);
++				xDelete<double>(dakota_parameter);
+ 			}
+ 		}
+ 		/*}}}*/
+@@ -213,7 +213,7 @@
+ 		}
+ 		xDelete<char*>(variabledescriptors);
+ 		xDelete<int>(part);
+-		xDelete<int>(dpart);
++		xDelete<double>(dpart);
+ 		xDelete<char>(qmuinname);
+ 		xDelete<char>(qmuerrname);
+ 		xDelete<char>(qmuoutname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12450)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12451)
+@@ -32,7 +32,7 @@
+ 	M=in_M;
+ 
+ 	if(M){
+-		values=(int*)xmalloc(M*sizeof(int));
++		values=xNew<int>(M);
+ 		memcpy(values,in_values,M*sizeof(int));
+ 	}
+ 	else values=NULL;
+@@ -45,7 +45,7 @@
+ 	M=in_M;
+ 
+ 	if(M){
+-		values=(int*)xmalloc(M*sizeof(int));
++		values=xNew<int>(M);
+ 		for(int i=0;i<in_M;i++) values[i]=(int)in_values[i];
+ 	}
+ 	else values=NULL;
+@@ -53,7 +53,7 @@
+ /*}}}*/
+ /*FUNCTION IntVecParam::~IntVecParam(){{{*/
+ IntVecParam::~IntVecParam(){
+-	xfree((void**)&values);
++	xDelete<int>(values);
+ 	return;
+ }
+ /*}}}*/
+@@ -111,7 +111,7 @@
+ 	int* output=NULL;
+ 
+ 	if(M){
+-		output=(int*)xmalloc(M*sizeof(int));
++		output=xNew<int>(M);
+ 		memcpy(output,values,M*sizeof(int));
+ 	}
+ 
+@@ -129,10 +129,10 @@
+ void  IntVecParam::SetValue(int* intarray,int in_M){
+ 
+ 	/*avoid leak: */
+-	xfree((void**)&this->values);
++	xDelete<int>(this->values);
+ 
+ 	if(in_M){
+-		this->values=(int*)xmalloc(in_M*sizeof(int));
++		this->values=xNew<int>(in_M);
+ 		memcpy(this->values,intarray,in_M*sizeof(int));
+ 	}
+ 	else this->values=NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12450)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12451)
+@@ -32,13 +32,13 @@
+ 	M=in_M;
+ 	N=in_N;
+ 
+-	value=(int*)xmalloc(M*N*sizeof(int));
++	value=xNew<int>(M*N);
+ 	memcpy(value,in_value,M*N*sizeof(int));
+ }
+ /*}}}*/
+ /*FUNCTION IntMatParam::~IntMatParam(){{{*/
+ IntMatParam::~IntMatParam(){
+-	xfree((void**)&value);
++	xDelete<int>(value);
+ 	return;
+ }
+ /*}}}*/
+@@ -97,7 +97,7 @@
+ void  IntMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){
+ 	int* output=NULL;
+ 
+-	output=(int*)xmalloc((int)(M*N*sizeof(int)));
++	output=xNew<int>(M*N);
+ 	memcpy(output,value,M*N*sizeof(int));
+ 
+ 	/*Assign output pointers:*/
+@@ -115,9 +115,9 @@
+ void  IntMatParam::SetValue(int* intarray,int in_M,int in_N){
+ 
+ 	/*avoid leak: */
+-	xfree((void**)&this->value);
++	xDelete<int>(this->value);
+ 
+-	this->value=(int*)xmalloc(in_M*in_N*sizeof(int));
++	this->value=xNew<int>(in_M*in_N);
+ 	memcpy(this->value,intarray,in_M*in_N*sizeof(int));
+ 
+ 	this->M=in_M;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12450)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12451)
+@@ -35,11 +35,11 @@
+ 	numstrings=in_numstrings;
+ 
+ 	if(numstrings){
+-		value=(char**)xmalloc(numstrings*sizeof(char*));
++		value=xNew<char*>(numstrings);
+ 		for(i=0;i<numstrings;i++){
+ 			char* string=NULL;
+ 			size=strlen(in_values[i])+1;
+-			string=(char*)xmalloc(size*sizeof(char));
++			string=xNew<char>(size);
+ 			memcpy(string,in_values[i],size*sizeof(char));
+ 			value[i]=string;
+ 		}
+@@ -56,9 +56,9 @@
+ 	char* string=NULL;
+ 	for(i=0;i<this->numstrings;i++){
+ 		string=value[i];
+-		xfree((void**)&string);
++		xDelete<char>(string);
+ 	}
+-	xfree((void**)&value);
++	xDelete<char*>(value);
+ }
+ /*}}}*/
+ 
+@@ -119,13 +119,13 @@
+ 
+ 	M=this->numstrings;
+ 	if(this->numstrings){
+-		outstrings=(char**)xmalloc(this->numstrings*sizeof(char*));
++		outstrings=xNew<char*>(this->numstrings);
+ 
+ 		for(i=0;i<this->numstrings;i++){
+ 			string=this->value[i];
+ 			stringsize=strlen(string)+1;
+ 
+-			string2=(char*)xmalloc(stringsize*sizeof(char));
++			string2=xNew<char>(stringsize);
+ 			memcpy(string2,string,stringsize*sizeof(char));
+ 
+ 			outstrings[i]=string2;
+@@ -154,18 +154,18 @@
+ 	/*first, avoid leak: */
+ 	for(i=0;i<this->numstrings;i++){
+ 		string=this->value[i];
+-		xfree((void**)&string);
++		xDelete<char>(string);
+ 	}
+-	xfree((void**)&this->value);
++	xDelete<char*>(this->value);
+ 
+ 	/*copy: */
+ 	this->numstrings=M;
+-	this->value=(char**)xmalloc(this->numstrings*sizeof(char*));
++	this->value=xNew<char*>(this->numstrings);
+ 	for(i=0;i<this->numstrings;i++){
+ 		string=stringarray[i];
+ 		stringsize=strlen(string)+1;
+ 
+-		string2=(char*)xmalloc(stringsize*sizeof(char));
++		string2=xNew<char>(stringsize);
+ 		memcpy(string2,string,stringsize*sizeof(char));
+ 
+ 		this->value[i]=string2;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12450)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12451)
+@@ -29,7 +29,7 @@
+ StringParam::StringParam(int in_enum_type,char* in_value){
+ 
+ 	enum_type=in_enum_type;
+-	value=(char*)xmalloc((strlen(in_value)+1)*sizeof(char));
++	value=xNew<char>(strlen(in_value)+1);
+ 	memcpy(value,in_value,(strlen(in_value)+1)*sizeof(char));
+ 
+ 	
+@@ -37,7 +37,7 @@
+ /*}}}*/
+ /*FUNCTION StringParam::~StringParam(){{{*/
+ StringParam::~StringParam(){
+-	xfree((void**)&value);
++	xDelete<char>(value);
+ }
+ /*}}}*/
+ 
+@@ -87,7 +87,7 @@
+ 
+ 	stringsize=strlen(this->value)+1;
+ 
+-	outstring=(char*)xmalloc(stringsize*sizeof(char));
++	outstring=xNew<char>(stringsize);
+ 	memcpy(outstring,this->value,stringsize*sizeof(char));
+ 
+ 	*pstring=outstring;
+@@ -105,11 +105,11 @@
+ 	int   stringsize;
+ 	
+ 	/*avoid leak: */
+-	xfree((void**)&this->value);
++	xDelete<char>(this->value);
+ 
+ 	/*copy: */
+ 	stringsize=strlen(string)+1;
+-	this->value=(char*)xmalloc(stringsize*sizeof(char));
++	this->value=xNew<char>(stringsize);
+ 	memcpy(this->value,string,stringsize*sizeof(char));
+ 
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12450)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12451)
+@@ -35,9 +35,9 @@
+ 	enum_type=in_enum_type;
+ 	M=in_M;
+ 	if(M){
+-		array=(double**)xmalloc(M*sizeof(double*));
+-		mdim_array=(int*)xmalloc(M*sizeof(int));
+-		ndim_array=(int*)xmalloc(M*sizeof(int));
++		array=xNew<double*>(M);
++		mdim_array=xNew<int>(M);
++		ndim_array=xNew<int>(M);
+ 
+ 		for(i=0;i<M;i++){
+ 			m=in_mdim_array[i]; 
+@@ -47,7 +47,7 @@
+ 			ndim_array[i]=n;
+ 
+ 			if(m*n){
+-				matrix=(double*)xmalloc(m*n*sizeof(double));
++				matrix=xNew<double>(m*n);
+ 				memcpy(matrix,in_array[i],m*n*sizeof(double));
+ 			}
+ 			else{
+@@ -69,15 +69,15 @@
+ 	int i;
+ 	double* matrix=NULL;
+ 
+-	xfree((void**)&mdim_array);
+-	xfree((void**)&ndim_array);
++	xDelete<int>(mdim_array);
++	xDelete<int>(ndim_array);
+ 
+ 	for(i=0;i<M;i++){
+ 		matrix=array[i];
+-		xfree((void**)&matrix);
++		xDelete<double>(matrix);
+ 	}
+ 	
+-	xfree((void**)&array);
++	xDelete<double*>(array);
+ 	return;
+ }
+ /*}}}*/
+@@ -158,9 +158,9 @@
+ 
+ 	out_M=this->M;
+ 	if(out_M){
+-		out_array=(double**)xmalloc(M*sizeof(double*));
+-		out_mdim_array=(int*)xmalloc(M*sizeof(int));
+-		out_ndim_array=(int*)xmalloc(M*sizeof(int));
++		out_array=xNew<double*>(M);
++		out_mdim_array=xNew<int>(M);
++		out_ndim_array=xNew<int>(M);
+ 
+ 		memcpy(out_mdim_array,this->mdim_array,M*sizeof(int));
+ 		memcpy(out_ndim_array,this->ndim_array,M*sizeof(int));
+@@ -171,7 +171,7 @@
+ 			n=this->ndim_array[i];
+ 
+ 			if(m*n){
+-				out_matrix=(double*)xmalloc(m*n*sizeof(double));
++				out_matrix=xNew<double>(m*n);
+ 				memcpy(out_matrix,matrix,m*n*sizeof(double));
+ 			}
+ 			else{
+@@ -208,19 +208,19 @@
+ 	double* matrix=NULL;
+ 
+ 	/*avoid leak: */
+-	xfree((void**)&mdim_array);
+-	xfree((void**)&ndim_array);
++	xDelete<int>(mdim_array);
++	xDelete<int>(ndim_array);
+ 	for(i=0;i<M;i++){
+ 		matrix=array[i];
+-		xfree((void**)&matrix);
++		xDelete<double>(matrix);
+ 	}
+-	xfree((void**)&array);
++	xDelete<double*>(array);
+ 
+ 	/*copy data: */
+ 	this->M=in_M;
+-	this->array=(double**)xmalloc(M*sizeof(double*));
+-	this->mdim_array=(int*)xmalloc(M*sizeof(int));
+-	this->ndim_array=(int*)xmalloc(M*sizeof(int));
++	this->array=xNew<double*>(M);
++	this->mdim_array=xNew<int>(M);
++	this->ndim_array=xNew<int>(M);
+ 	
+ 	memcpy(this->mdim_array,in_mdim_array,M*sizeof(double));
+ 	memcpy(this->ndim_array,in_ndim_array,M*sizeof(double));
+@@ -230,7 +230,7 @@
+ 		m=in_mdim_array[i];
+ 		n=in_ndim_array[i];
+ 
+-		matrix=(double*)xmalloc(m*n*sizeof(double));
++		matrix=xNew<double>(m*n);
+ 		memcpy(matrix,in_matrix,m*n*sizeof(double));
+ 
+ 		this->array[i]=matrix;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12450)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12451)
+@@ -32,7 +32,7 @@
+ 	M=in_M;
+ 	N=in_N;
+ 
+-	value=(double*)xmalloc(M*N*sizeof(double));
++	value=xNew<double>(M*N);
+ 	memcpy(value,in_value,M*N*sizeof(double));
+ }
+ /*}}}*/
+@@ -97,7 +97,7 @@
+ void  DoubleMatParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){
+ 	double* output=NULL;
+ 
+-	output=(double*)xmalloc((int)(M*N*sizeof(double)));
++	output=xNew<double>(M*N);
+ 	memcpy(output,value,M*N*sizeof(double));
+ 
+ 	/*Assign output pointers:*/
+@@ -122,7 +122,7 @@
+ 	/*avoid leak: */
+ 	xfree((void**)&this->value);
+ 
+-	this->value=(double*)xmalloc(in_M*in_N*sizeof(double));
++	this->value=xNew<double>(in_M*in_N);
+ 	memcpy(this->value,doublearray,in_M*in_N*sizeof(double));
+ 
+ 	this->M=in_M;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12451-12452.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12451-12452.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12451-12452.diff	(revision 12679)
@@ -0,0 +1,72 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12451)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12452)
+@@ -31,13 +31,13 @@
+ 	enum_type=in_enum_type;
+ 	M=in_M;
+ 
+-	values=(double*)xmalloc(M*sizeof(double));
++	values=xNew<double>(M);
+ 	memcpy(values,in_values,M*sizeof(double));
+ }
+ /*}}}*/
+ /*FUNCTION DoubleVecParam::~DoubleVecParam(){{{*/
+ DoubleVecParam::~DoubleVecParam(){
+-	xfree((void**)&values);
++	xDelete<double>(values);
+ 	return;
+ }
+ /*}}}*/
+@@ -96,7 +96,7 @@
+ 	int M;
+ 
+ 	M=this->M;
+-	output=(double*)xmalloc(M*sizeof(double));
++	output=xNew<double>(M);
+ 	memcpy(output,values,M*sizeof(double));
+ 
+ 	/*Assign output pointers:*/
+@@ -112,7 +112,7 @@
+ 
+ 	N=1;
+ 	M=this->M;
+-	output=(double*)xmalloc(M*sizeof(double));
++	output=xNew<double>(M);
+ 	memcpy(output,values,M*sizeof(double));
+ 
+ 	/*Assign output pointers:*/
+@@ -135,9 +135,9 @@
+ void  DoubleVecParam::SetValue(double* doublearray,int in_M){
+ 
+ 	/*avoid leak: */
+-	xfree((void**)&this->values);
++	xDelete<double>(this->values);
+ 
+-	this->values=(double*)xmalloc(in_M*sizeof(double));
++	this->values=xNew<double>(in_M);
+ 	memcpy(this->values,doublearray,in_M*sizeof(double));
+ 
+ 	this->M=in_M;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12451)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12452)
+@@ -38,7 +38,7 @@
+ /*}}}*/
+ /*FUNCTION DoubleMatParam::~DoubleMatParam(){{{*/
+ DoubleMatParam::~DoubleMatParam(){
+-	xfree((void**)&value);
++	xDelete<double>(value);
+ 	return;
+ }
+ /*}}}*/
+@@ -120,7 +120,7 @@
+ void  DoubleMatParam::SetValue(double* doublearray,int in_M,int in_N){
+ 
+ 	/*avoid leak: */
+-	xfree((void**)&this->value);
++	xDelete<double>(this->value);
+ 
+ 	this->value=xNew<double>(in_M*in_N);
+ 	memcpy(this->value,doublearray,in_M*in_N*sizeof(double));
Index: /issm/oecreview/Archive/12321-12677/ISSM-12452-12453.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12452-12453.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12452-12453.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp	(revision 12452)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp	(revision 12453)
+@@ -64,7 +64,7 @@
+ 	average=vec_average->ToMPISerial();
+ 
+ 	/*Free ressources:*/
+-	xDelete<int>(qmu_part);
++	xDelete<double>(qmu_part);
+ 	xdelete(&partition_contributions);
+ 	xdelete(&partition_areas);
+ 	xdelete(&vec_average);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12453-12454.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12453-12454.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12453-12454.diff	(revision 12679)
@@ -0,0 +1,188 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12453)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12454)
+@@ -30,7 +30,7 @@
+ /*FUNCTION OptionDouble::~OptionDouble(){{{*/
+ OptionDouble::~OptionDouble(){
+ 
+-	if (values) xfree((void**)&values);
++	if (values) xDelete<double>(values);
+ 
+ }
+ /*}}}*/
+@@ -81,7 +81,7 @@
+ 	strcat(indent2,"  ");
+ 
+ 	if (values) {
+-		dims=(int *) xmalloc(ndims*sizeof(int));
++		dims=xNew<int>(ndims);
+ 		if(numel==1) _printf_(flag,"%s        values: %g\n" ,indent,values[0]);
+ 		else{
+ 			for (i=0; i<numel; i++) {
+@@ -90,7 +90,7 @@
+ 				_printf_(flag,"%s        values%s: %g\n" ,indent,cstr,values[i]);
+ 			}
+ 		}
+-		xfree((void**)&dims);
++		xDelete<int>(dims);
+ 	}
+ 	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+ }
+@@ -152,7 +152,7 @@
+ 	}
+ 
+ 	/*Copy vector*/
+-	double* outvalue=(double*)xmalloc(this->NumEl()*sizeof(double));
++	double* outvalue=xNew<double>(this->NumEl());
+ 	for(int i=0;i<this->NumEl();i++) outvalue[i]=this->values[i];
+ 
+ 	/*Assign output pointer*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12453)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12454)
+@@ -30,7 +30,7 @@
+ /*FUNCTION OptionLogical::~OptionLogical(){{{*/
+ OptionLogical::~OptionLogical(){
+ 
+-	if (values) xfree((void**)&values);
++	if (values) xDelete<bool>(values);
+ 
+ }
+ /*}}}*/
+@@ -83,13 +83,13 @@
+ 	if (values) {
+ 		if(numel==1) _printf_(flag,"%s        values: %s\n" ,indent,(values[0] ? "true" : "false"));
+ 		else{
+-			dims=(int *) xmalloc(ndims*sizeof(int));
++			dims=xNew<int>(ndims);
+ 			for (i=0; i<numel; i++) {
+ 				RowWiseDimsFromIndex(dims,i,size,ndims);
+ 				StringFromDims(cstr,dims,ndims);
+ 				_printf_(flag,"%s        values%s: %s\n" ,indent,cstr,(values[i] ? "true" : "false"));
+ 			}
+-			xfree((void**)&dims);
++			xDelete<int>(dims);
+ 		}
+ 	}
+ 	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12453)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12454)
+@@ -30,7 +30,7 @@
+ /*FUNCTION OptionChar::~OptionChar(){{{*/
+ OptionChar::~OptionChar(){
+ 
+-	if (values) xfree((void**)&values);
++	if (values) xDelete<char>(values);
+ 
+ }
+ /*}}}*/
+@@ -92,14 +92,14 @@
+ 			nstr=size[0];
+ 			for (i=2; i<ndims; i++) nstr*=size[i];
+ 
+-			dims=(int *) xmalloc(ndims*sizeof(int));
++			dims=xNew<int>(ndims);
+ 			for (i=0; i<nstr; i++) {
+ 				RowWiseDimsFromIndex(dims,ipt,size,ndims);
+ 				StringFromDims(cstr,dims,ndims);
+ 				_printf_(flag,"%s        values%s: \"%.*s\"\n" ,indent,cstr,size[1],&(values[ipt]));
+ 				ipt+=size[1];
+ 			}
+-			xfree((void**)&dims);
++			xDelete<int>(dims);
+ 		}
+ 	}
+ 	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+@@ -137,7 +137,7 @@
+ 
+ 	stringsize=strlen(this->values)+1;
+ 
+-	outstring=(char*)xmalloc(stringsize*sizeof(char));
++	outstring=xNew<char>(stringsize);
+ 	memcpy(outstring,this->values,stringsize*sizeof(char));
+ 
+ 	*pvalue=outstring;
+@@ -161,9 +161,9 @@
+ 	for (i=2; i<this->ndims; i++) nstr*=this->size[i];
+ 
+ 	/*Break concatenated string into individual strings*/
+-	*ppvalue=(char **) xmalloc(nstr*sizeof(char *));
++	*ppvalue=xNew<char*>(nstr);
+ 	for (i=0; i<nstr; i++) {
+-		outstring=(char*)xmalloc(stringsize*sizeof(char));
++		outstring=xNew<char>(stringsize);
+ 		memcpy(outstring,&(this->values[ipt]),(stringsize-1)*sizeof(char));
+ 		outstring[stringsize-1]='\0';
+ 		(*ppvalue)[i]=outstring;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.cpp	(revision 12453)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.cpp	(revision 12454)
+@@ -33,8 +33,8 @@
+ /*FUNCTION Option::~Option(){{{*/
+ Option::~Option(){
+ 
+-	if(size) xfree((void**)&size);
+-	if(name) xfree((void**)&name);
++	if(size) xDelete<int>(size);
++	if(name) xDelete<char>(name);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12453)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12454)
+@@ -81,7 +81,7 @@
+ 	strcat(indent2,"  ");
+ 
+ 	if (values->Size()) {
+-		dims=(int *) xmalloc(ndims*sizeof(int));
++		dims=xNew<int>(ndims);
+ 		for (i=0; i<values->Size(); i++) {
+ 			ColumnWiseDimsFromIndex(dims,i,size,ndims);
+ 			StringFromDims(cstr,dims,ndims);
+@@ -89,7 +89,7 @@
+ 			((Option *)values->GetObjectByOffset(i))->DeepEcho(indent2);
+ 			_printf_(flag,"%s        values: --------  end  %s --------\n" ,indent,cstr);
+ 		}
+-		xfree((void**)&dims);
++		xDelete<int>(dims);
+ 	}
+ 	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12453)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12454)
+@@ -37,7 +37,7 @@
+ 			delete values[i];
+ 			values[i] =NULL;
+ 		}
+-		xfree((void**)&values);
++		xDelete<Options*>(values);
+ 	}
+ 
+ }
+@@ -86,7 +86,7 @@
+ 	strcat(indent2,"  ");
+ 
+ 	if (values) {
+-		dims=(int *)xmalloc(ndims*sizeof(int));
++		dims=xNew<int>(ndims);
+ 		for (i=0; i<numel; i++) {
+ 			ColumnWiseDimsFromIndex(dims,i,size,ndims);
+ 			StringFromDims(cstr,dims,ndims);
+@@ -97,7 +97,7 @@
+ 			}
+ 			else _printf_(flag,"%s        values: %s [empty]\n" ,indent,cstr);
+ 		}
+-		xfree((void**)&dims);
++		xDelete<int>(dims);
+ 	}
+ 	else _printf_(flag,"%s        values: [empty]\n" ,indent);
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12454-12455.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12454-12455.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12454-12455.diff	(revision 12679)
@@ -0,0 +1,257 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp	(revision 12454)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp	(revision 12455)
+@@ -90,8 +90,8 @@
+ 	coord3=UNDEF;
+ 
+ 	/*clean up*/
+-	xfree((void**)&seg_coords);
+-	xfree((void**)&seg_weights);
++	xDelete<double>(seg_coords);
++	xDelete<double>(seg_weights);
+ }
+ /*}}}*/
+ /*FUNCTION GaussTria::~GaussTria(){{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp	(revision 12454)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp	(revision 12455)
+@@ -46,11 +46,11 @@
+ 
+ 	/*Allocate GaussPenta fields*/
+ 	numgauss=numgauss_horiz*numgauss_vert;
+-	coords1=(double*)xmalloc(numgauss*sizeof(double));
+-	coords2=(double*)xmalloc(numgauss*sizeof(double));
+-	coords3=(double*)xmalloc(numgauss*sizeof(double));
+-	coords4=(double*)xmalloc(numgauss*sizeof(double));
+-	weights=(double*)xmalloc(numgauss*sizeof(double));
++	coords1=xNew<double>(numgauss);
++	coords2=xNew<double>(numgauss);
++	coords3=xNew<double>(numgauss);
++	coords4=xNew<double>(numgauss);
++	weights=xNew<double>(numgauss);
+ 
+ 	/*Combine Horizontal and vertical points*/
+ 	for (ighoriz=0; ighoriz<numgauss_horiz; ighoriz++){
+@@ -71,12 +71,12 @@
+ 	coord4=UNDEF;
+ 
+ 	/*Clean up*/
+-	xfree((void**)&coords1_horiz);
+-	xfree((void**)&coords2_horiz);
+-	xfree((void**)&coords3_horiz);
+-	xfree((void**)&coords_vert);
+-	xfree((void**)&weights_horiz);
+-	xfree((void**)&weights_vert);
++	xDelete<double>(coords1_horiz);
++	xDelete<double>(coords2_horiz);
++	xDelete<double>(coords3_horiz);
++	xDelete<double>(coords_vert);
++	xDelete<double>(weights_horiz);
++	xDelete<double>(weights_vert);
+ }
+ /*}}}*/
+ /*FUNCTION GaussPenta::GaussPenta(int index1, int index2, int order){{{*/
+@@ -92,11 +92,11 @@
+ 	GaussLegendreLinear(&seg_coords,&seg_weights,numgauss);
+ 
+ 	/*Allocate GaussPenta fields*/
+-	coords1=(double*)xmalloc(numgauss*sizeof(double));
+-	coords2=(double*)xmalloc(numgauss*sizeof(double));
+-	coords3=(double*)xmalloc(numgauss*sizeof(double));
+-	coords4=(double*)xmalloc(numgauss*sizeof(double));
+-	weights=(double*)xmalloc(numgauss*sizeof(double));
++	coords1=xNew<double>(numgauss);
++	coords2=xNew<double>(numgauss);
++	coords3=xNew<double>(numgauss);
++	coords4=xNew<double>(numgauss);
++	weights=xNew<double>(numgauss);
+ 
+ 	if(index1==0 && index2==3){
+ 		for(i=0;i<numgauss;i++) coords1[i]=1.0;
+@@ -131,8 +131,8 @@
+ 	coord4=UNDEF;
+ 
+ 	/*clean up*/
+-	xfree((void**)&seg_coords);
+-	xfree((void**)&seg_weights);
++	xDelete<double>(seg_coords);
++	xDelete<double>(seg_weights);
+ 
+ }
+ /*}}}*/
+@@ -146,7 +146,7 @@
+ 		GaussLegendreTria(&numgauss,&coords1,&coords2,&coords3,&weights,order);
+ 
+ 		/*compute z coordinate*/
+-		coords4=(double*)xmalloc(numgauss*sizeof(double));
++		coords4=xNew<double>(numgauss);
+ 		for(int i=0;i<numgauss;i++) coords4[i]=-1.0;
+ 	}
+ 	/*Upper surface Tria*/
+@@ -156,7 +156,7 @@
+ 		GaussLegendreTria(&numgauss,&coords1,&coords2,&coords3,&weights,order);
+ 
+ 		/*compute z coordinate*/
+-		coords4=(double*)xmalloc(numgauss*sizeof(double));
++		coords4=xNew<double>(numgauss);
+ 		for(int i=0;i<numgauss;i++) coords4[i]=1.0;
+ 	}
+ 	else{
+@@ -181,11 +181,11 @@
+ 
+ 	/*Allocate GaussPenta fields*/
+ 	numgauss=order_horiz*order_vert;
+-	coords1=(double*)xmalloc(numgauss*sizeof(double));
+-	coords2=(double*)xmalloc(numgauss*sizeof(double));
+-	coords3=(double*)xmalloc(numgauss*sizeof(double));
+-	coords4=(double*)xmalloc(numgauss*sizeof(double));
+-	weights=(double*)xmalloc(numgauss*sizeof(double));
++	coords1=xNew<double>(numgauss);
++	coords2=xNew<double>(numgauss);
++	coords3=xNew<double>(numgauss);
++	coords4=xNew<double>(numgauss);
++	weights=xNew<double>(numgauss);
+ 
+ 	/*Quads: get the gauss points using the product of two line rules  */
+ 	if(index1==0 && index2==1 && index3==4 && index4==3){
+@@ -226,19 +226,19 @@
+ 	}
+ 
+ 	/*clean-up*/
+-	xfree((void**)&seg_horiz_coords);
+-	xfree((void**)&seg_horiz_weights);
+-	xfree((void**)&seg_vert_coords);
+-	xfree((void**)&seg_vert_weights);
++	xDelete<double>(seg_horiz_coords);
++	xDelete<double>(seg_horiz_weights);
++	xDelete<double>(seg_vert_coords);
++	xDelete<double>(seg_vert_weights);
+ }
+ /*}}}*/
+ /*FUNCTION GaussPenta::~GaussPenta(){{{*/
+ GaussPenta::~GaussPenta(){
+-	xfree((void**)&weights);
+-	xfree((void**)&coords1);
+-	xfree((void**)&coords2);
+-	xfree((void**)&coords3);
+-	xfree((void**)&coords4);
++	xDelete<double>(weights);
++	xDelete<double>(coords1);
++	xDelete<double>(coords2);
++	xDelete<double>(coords3);
++	xDelete<double>(coords4);
+ }
+ /*}}}*/
+ 
+@@ -356,7 +356,7 @@
+ 	/*Basal Tria*/
+ 	if(index1==0 && index2==1 && index3==2){
+ 		GaussLegendreTria(&numgauss,&coords1,&coords2,&coords3,&weights,order);
+-		coords4=(double*)xmalloc(numgauss*sizeof(double));
++		coords4=xNew<double>(numgauss);
+ 		for(int i=0;i<numgauss;i++) coords4[i]=-1.0;
+ 	}
+ 	else{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12454)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12455)
+@@ -690,7 +690,7 @@
+ 	}
+ 
+ 	/*Allocate: */
+-	doflist=(int*)xmalloc(numberofdofs*sizeof(int));
++	doflist=xNew<int>(numberofdofs);
+ 
+ 	/*Populate: */
+ 	count=0;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12454)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12455)
+@@ -32,7 +32,7 @@
+ 
+ 	this->analysis_type=in_analysis_type;
+ 	this->inputs=inputs_in;
+-	this->element_type=(char*)xmalloc((strlen(element_type_in)+1)*sizeof(char));
++	this->element_type=xNew<char>(strlen(element_type_in)+1);
+ 	memcpy(this->element_type,element_type_in,(strlen(element_type_in)+1)*sizeof(char));
+ 
+ 	this->matpar=matpar_in;
+@@ -40,7 +40,7 @@
+ /*}}}*/
+ /*FUNCTION Friction::~Friction() {{{*/
+ Friction::~Friction(){
+-	xfree((void**)&element_type);
++	xDelete<char>(element_type);
+ }
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12454)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12455)
+@@ -45,7 +45,7 @@
+ /*}}}*/
+ /*FUNCTION TransientInput::~TransientInput{{{*/
+ TransientInput::~TransientInput(){
+-	xfree((void**)&this->timesteps);
++	xDelete<double>(this->timesteps);
+ 	this->timesteps=NULL;
+ 	this->numtimesteps=0;
+ 	parameters=NULL;
+@@ -99,7 +99,7 @@
+ 	output = new TransientInput();
+ 	output->enum_type=this->enum_type;
+ 	output->numtimesteps=this->numtimesteps;
+-	output->timesteps=(IssmPDouble*)xmalloc(this->numtimesteps*sizeof(IssmPDouble));
++	output->timesteps=xNew<IssmPDouble>(this->numtimesteps);
+    memcpy(output->timesteps,this->timesteps,this->numtimesteps*sizeof(IssmPDouble));
+ 	output->inputs=(Inputs*)this->inputs->Copy();
+ 	output->parameters=this->parameters;
+@@ -127,7 +127,7 @@
+ 	outinput=new TransientInput();
+ 	outinput->enum_type=this->enum_type;
+ 	outinput->numtimesteps=this->numtimesteps;
+-	outinput->timesteps=(IssmPDouble*)xmalloc(this->numtimesteps*sizeof(IssmPDouble));
++	outinput->timesteps=xNew<IssmPDouble>(this->numtimesteps);
+ 	memcpy(outinput->timesteps,this->timesteps,this->numtimesteps*sizeof(IssmPDouble));
+ 	outinput->inputs=(Inputs*)this->inputs->SpawnTriaInputs(indices);
+ 	outinput->parameters=this->parameters;
+@@ -236,17 +236,17 @@
+ 	IssmPDouble* old_timesteps=NULL;
+ 
+ 	if (this->numtimesteps > 0){
+-		old_timesteps=(IssmPDouble*)xmalloc(this->numtimesteps*sizeof(IssmPDouble));
++		old_timesteps=xNew<IssmPDouble>(this->numtimesteps);
+ 		memcpy(old_timesteps,this->timesteps,this->numtimesteps*sizeof(IssmPDouble));
+-		xfree((void**)&this->timesteps); 
++		xDelete<double>(this->timesteps); 
+ 	}
+ 
+ 	this->numtimesteps=this->numtimesteps+1;
+-	this->timesteps=(IssmPDouble*)xmalloc(this->numtimesteps*sizeof(IssmPDouble));
++	this->timesteps=xNew<IssmPDouble>(this->numtimesteps);
+ 
+ 	if (this->numtimesteps > 1){
+ 		memcpy(this->timesteps,old_timesteps,(this->numtimesteps-1)*sizeof(IssmPDouble));
+-		xfree((void**)&old_timesteps);
++		xDelete<double>(old_timesteps);
+ 	}
+ 
+ 	/*go ahead and plug: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12454)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12455)
+@@ -495,7 +495,7 @@
+ 	int *indices = NULL;
+ 
+ 	/*Allocate indices (maximum by default*/
+-	if(this->NbObs) indices = (int*)xmalloc(this->NbObs*sizeof(int));
++	if(this->NbObs) indices = xNew<int>(this->NbObs);
+ 	nobs = 0;
+ 
+ 	if(this->root) this->root->RangeSearch(indices,&nobs,x,y,range);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12455-12456.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12455-12456.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12455-12456.diff	(revision 12679)
@@ -0,0 +1,637 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12455)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12456)
+@@ -35,7 +35,7 @@
+ 
+ 	/*Copy result in values*/
+ 	if(M*N){
+-		values=(double*)xmalloc(M*N*sizeof(double));
++		values=xNew<double>(M*N);
+ 		memcpy(values,in_values,M*N*sizeof(double));
+ 	}
+ 	else values=NULL;
+@@ -47,7 +47,7 @@
+ /*FUNCTION DoubleMatExternalResult::~DoubleMatExternalResult(){{{*/
+ DoubleMatExternalResult::~DoubleMatExternalResult(){
+ 
+-	xfree((void**)&this->values);
++	xDelete<double>(this->values);
+ 	return;
+ }
+ /*}}}*/
+@@ -130,7 +130,7 @@
+ 	length=(strlen(name)+1)*sizeof(char);
+ 	fwrite(&length,sizeof(int),1,fid);
+ 	fwrite(name,length,1,fid);
+-	xfree((void**)&name);
++	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+ 	fwrite(&time,sizeof(double),1,fid);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12455)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12456)
+@@ -117,7 +117,7 @@
+ 	length=(strlen(name)+1)*sizeof(char);
+ 	fwrite(&length,sizeof(int),1,fid);
+ 	fwrite(name,length,1,fid);
+-	xfree((void**)&name);
++	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+ 	fwrite(&time,sizeof(double),1,fid);
+@@ -131,7 +131,7 @@
+ 	fwrite(serialvec,size*sizeof(double),1,fid);
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&serialvec);
++	xDelete<char>(serialvec);
+ }
+ /*}}}*/
+ /*FUNCTION PetscVecExternalResult::GetResultName{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12455)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12456)
+@@ -30,7 +30,7 @@
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+-	value=(char*)xmalloc((strlen(in_value)+1)*sizeof(char));
++	value=xNew<char>(strlen(in_value)+1);
+ 	memcpy(value,in_value,(strlen(in_value)+1)*sizeof(char));
+ 
+ 	step=in_step;
+@@ -40,7 +40,7 @@
+ /*}}}*/
+ /*FUNCTION StringExternalResult::~StringExternalResult(){{{*/
+ StringExternalResult::~StringExternalResult(){
+-	xfree((void**)&value);
++	xDelete<char>(value);
+ }
+ /*}}}*/
+ 
+@@ -102,7 +102,7 @@
+ 	length=(strlen(name)+1)*sizeof(char);
+ 	fwrite(&length,sizeof(int),1,fid);
+ 	fwrite(name,length,1,fid);
+-	xfree((void**)&name);
++	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+ 	fwrite(&time,sizeof(double),1,fid);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12455)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12456)
+@@ -33,7 +33,7 @@
+ 	M=in_M;
+ 
+ 	if(M){
+-		values=(double*)xmalloc(M*sizeof(double));
++		values=xNew<double>(M);
+ 		memcpy(values,in_values,M*sizeof(double));
+ 	}
+ 	else values=NULL;
+@@ -44,7 +44,7 @@
+ /*}}}*/
+ /*FUNCTION DoubleVecExternalResult::~DoubleVecExternalResult(){{{*/
+ DoubleVecExternalResult::~DoubleVecExternalResult(){
+-	xfree((void**)&values);
++	xDelete<double>(values);
+ 	return;
+ }
+ /*}}}*/
+@@ -119,7 +119,7 @@
+ 	length=(strlen(name)+1)*sizeof(char);
+ 	fwrite(&length,sizeof(int),1,fid);
+ 	fwrite(name,length,1,fid);
+-	xfree((void**)&name);
++	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+ 	fwrite(&time,sizeof(double),1,fid);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12455)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12456)
+@@ -100,7 +100,7 @@
+ 	length=(strlen(name)+1)*sizeof(char);
+ 	fwrite(&length,sizeof(int),1,fid);
+ 	fwrite(name,length,1,fid);
+-	xfree((void**)&name);
++	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+ 	fwrite(&time,sizeof(double),1,fid);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12455)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12456)
+@@ -101,7 +101,7 @@
+ 	length=(strlen(name)+1)*sizeof(char);
+ 	fwrite(&length,sizeof(int),1,fid);
+ 	fwrite(name,length,1,fid);
+-	xfree((void**)&name);
++	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+ 	fwrite(&time,sizeof(double),1,fid);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12455)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12456)
+@@ -101,7 +101,7 @@
+ 	length=(strlen(name)+1)*sizeof(char);
+ 	fwrite(&length,sizeof(int),1,fid);
+ 	fwrite(name,length,1,fid);
+-	xfree((void**)&name);
++	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+ 	fwrite(&time,sizeof(double),1,fid);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp	(revision 12455)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp	(revision 12456)
+@@ -43,12 +43,12 @@
+ /*FUNCTION BamgOpts::~BamgOpts() {{{*/
+ BamgOpts::~BamgOpts(){
+ 
+-	xfree((void**)&this->hminVertices);
+-	xfree((void**)&this->hmaxVertices);
+-	xfree((void**)&this->hVertices);
+-	xfree((void**)&this->metric);
+-	xfree((void**)&this->field);
+-	xfree((void**)&this->err);
++	xDelete<double>(this->hminVertices);
++	xDelete<double>(this->hmaxVertices);
++	xDelete<double>(this->hVertices);
++	xDelete<double>(this->metric);
++	xDelete<double>(this->field);
++	xDelete<double>(this->err);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgGeom.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgGeom.cpp	(revision 12455)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgGeom.cpp	(revision 12456)
+@@ -21,14 +21,14 @@
+ /*FUNCTION BamgGeom::~BamgGeom(){{{*/
+ BamgGeom::~BamgGeom(){
+ 
+-	xfree((void**)&this->Vertices);
+-	xfree((void**)&this->Edges);
+-	xfree((void**)&this->TangentAtEdges);
+-	xfree((void**)&this->Corners);
+-	xfree((void**)&this->RequiredVertices);
+-	xfree((void**)&this->RequiredEdges);
+-	xfree((void**)&this->CrackedEdges);
+-	xfree((void**)&this->SubDomains);
++	xDelete<double>(this->Vertices);
++	xDelete<double>(this->Edges);
++	xDelete<double>(this->TangentAtEdges);
++	xDelete<double>(this->Corners);
++	xDelete<double>(this->RequiredVertices);
++	xDelete<double>(this->RequiredEdges);
++	xDelete<double>(this->CrackedEdges);
++	xDelete<double>(this->SubDomains);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp	(revision 12455)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp	(revision 12456)
+@@ -32,27 +32,25 @@
+ /*FUNCTION BamgMesh::~BamgMesh(){{{*/
+ BamgMesh::~BamgMesh(){
+ 
+-	xfree((void**)&this->Vertices);
+-	xfree((void**)&this->Edges);
+-	xfree((void**)&this->Triangles);
+-	xfree((void**)&this->Quadrilaterals);
++	xDelete<double>(this->Vertices);
++	xDelete<double>(this->Edges);
++	xDelete<double>(this->Triangles);
++	xDelete<double>(this->Quadrilaterals);
+ 
+-	xfree((void**)&this->SubDomains);
+-	xfree((void**)&this->SubDomainsFromGeom);
+-	xfree((void**)&this->CrackedVertices);
+-	xfree((void**)&this->CrackedEdges);
++	xDelete<double>(this->SubDomains);
++	xDelete<double>(this->SubDomainsFromGeom);
++	xDelete<double>(this->CrackedVertices);
++	xDelete<double>(this->CrackedEdges);
+ 
+-	xfree((void**)&this->VerticesOnGeomVertex);
+-	xfree((void**)&this->VerticesOnGeomEdge);
+-	xfree((void**)&this->EdgesOnGeomEdge);
++	xDelete<double>(this->VerticesOnGeomVertex);
++	xDelete<double>(this->VerticesOnGeomEdge);
++	xDelete<double>(this->EdgesOnGeomEdge);
+ 
+-	xfree((void**)&this->IssmEdges);
+-	xfree((void**)&this->IssmSegments);
++	xDelete<double>(this->IssmEdges);
++	xDelete<double>(this->IssmSegments);
+ 
+-	xfree((void**)&this->ElementConnectivity);
+-	xfree((void**)&this->NodalConnectivity);
+-	xfree((void**)&this->NodalElementConnectivity);
+-
+-
++	xDelete<double>(this->ElementConnectivity);
++	xDelete<double>(this->NodalConnectivity);
++	xDelete<double>(this->NodalElementConnectivity);
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp	(revision 12455)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp	(revision 12456)
+@@ -297,7 +297,7 @@
+ 		bamggeom->VerticesSize[0]=nbv;
+ 		bamggeom->VerticesSize[1]=3;
+ 		if (nbv){
+-			bamggeom->Vertices=(double*)xmalloc(3*nbv*sizeof(double));
++			bamggeom->Vertices=xNew<double>(3*nbv);
+ 			for (i=0;i<nbv;i++){
+ 				bamggeom->Vertices[i*3+0]=vertices[i].r.x;
+ 				bamggeom->Vertices[i*3+1]=vertices[i].r.y;
+@@ -313,7 +313,7 @@
+ 		bamggeom->EdgesSize[0]=nbe;
+ 		bamggeom->EdgesSize[1]=3;
+ 		if (nbe){
+-			bamggeom->Edges=(double*)xmalloc(3*nbe*sizeof(double));
++			bamggeom->Edges=xNew<double>(3*nbe);
+ 			for (i=0;i<nbe;i++){
+ 				bamggeom->Edges[i*3+0]=GetId(edges[i][0])+1; //back to Matlab indexing
+ 				bamggeom->Edges[i*3+1]=GetId(edges[i][1])+1; //back to Matlab indexing
+@@ -331,7 +331,7 @@
+ 		bamggeom->RequiredEdgesSize[0]=nbreq;
+ 		bamggeom->RequiredEdgesSize[1]=1;
+ 		if (nbreq){
+-			bamggeom->RequiredEdges=(double*)xmalloc(1*nbreq*sizeof(double));
++			bamggeom->RequiredEdges=xNew<double>(1*nbreq);
+ 			count=0;
+ 			for (i=0;i<nbe;i++){
+ 				if (edges[i].Required()){
+@@ -348,7 +348,7 @@
+ 		bamggeom->RequiredVerticesSize[0]=nbreqv;
+ 		bamggeom->RequiredVerticesSize[1]=1;
+ 		if (nbreqv){
+-			bamggeom->RequiredVertices=(double*)xmalloc(1*nbreqv*sizeof(double));
++			bamggeom->RequiredVertices=xNew<double>(1*nbreqv);
+ 			count=0;
+ 			for (i=0;i<nbv;i++){
+ 				if (vertices[i].Required()){
+@@ -363,7 +363,7 @@
+ 		bamggeom->SubDomainsSize[0]=nbsubdomains;
+ 		bamggeom->SubDomainsSize[1]=4;
+ 		if (nbsubdomains){
+-			bamggeom->SubDomains=(double*)xmalloc(4*nbsubdomains*sizeof(double));
++			bamggeom->SubDomains=xNew<double>(4*nbsubdomains);
+ 			for (i=0;i<nbsubdomains;i++){
+ 				bamggeom->SubDomains[4*i+0]=2;
+ 				bamggeom->SubDomains[4*i+1]=GetId(subdomains[i].edge)+1; //back to Matlab indexing
+@@ -377,7 +377,7 @@
+ 		bamggeom->TangentAtEdgesSize[0]=nbtan;
+ 		bamggeom->TangentAtEdgesSize[1]=4;
+ 		if (nbtan){
+-			bamggeom->TangentAtEdges=(double*)xmalloc(4*nbtan*sizeof(double));
++			bamggeom->TangentAtEdges=xNew<double>(4*nbtan);
+ 			count=0;
+ 			for (i=0;i<nbe;i++){
+ 				if (edges[i].TgA() && edges[i][0].Corner()){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12455)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12456)
+@@ -280,8 +280,8 @@
+ 
+ 		//Vertices
+ 		if (verbose) printf("Reading vertices (%i)\n",nbv);
+-		vertices=(BamgVertex*)xmalloc(nbv*sizeof(BamgVertex));
+-		orderedvertices=(BamgVertex**)xmalloc(nbv*sizeof(BamgVertex*));
++		vertices=xNew<BamgVertex>(nbv);
++		orderedvertices=xNew<BamgVertex*>(nbv);
+ 		for (i=0;i<nbv;i++){
+ 			vertices[i].r.x=x[i];
+ 			vertices[i].r.y=y[i];
+@@ -295,7 +295,7 @@
+ 		//Triangles
+ 		if (verbose) printf("Reading triangles (%i)\n",nbt);
+ 		triangles =new Triangle[maxnbt]; //we cannot allocate only nbt triangles since 
+-		nodeflags=(bool*)xmalloc(nbv*sizeof(bool));
++		nodeflags=xNew<bool>(nbv);
+ 		for(i=0;i<nbv;i++) nodeflags[i]=false;
+ 		//other triangles will be added for each edge
+ 		for (i=0;i<nbt;i++){
+@@ -325,7 +325,7 @@
+ 		if(isorphan) _error_("Orphan found in mesh, see ids above");
+ 
+ 		/*Clean up*/
+-		xfree((void**)&nodeflags);
++		xDelete<bool>(nodeflags);
+ 	}
+ 	/*}}}*/
+ 	/*FUNCTION Mesh::ReadMesh(BamgMesh* bamgmesh, BamgOpts* bamgopts){{{*/
+@@ -347,8 +347,8 @@
+ 		if(bamgmesh->Vertices){
+ 			if(verbose>5) printf("      processing Vertices\n");
+ 
+-			vertices=(BamgVertex*)xmalloc(nbv*sizeof(BamgVertex));
+-			orderedvertices=(BamgVertex**)xmalloc(nbv*sizeof(BamgVertex*));
++			vertices=xNew<BamgVertex>(nbv);
++			orderedvertices=xNew<BamgVertex*>(nbv);
+ 
+ 			for (i=0;i<nbv;i++){
+ 				vertices[i].r.x=bamgmesh->Vertices[i*3+0];
+@@ -552,9 +552,9 @@
+ 		/*Chaining algorithm used to generate connectivity tables and other outputs*/
+ 
+ 		//Memory Allocation
+-		head_1=(int*)xmalloc(nbv*sizeof(int));
+-		next_1=(int*)xmalloc(3*nbt*sizeof(int));
+-		connectivitysize_1=(int*)xmalloc(nbv*sizeof(int));
++		head_1=xNew<int>(nbv);
++		next_1=xNew<int>(3*nbt);
++		connectivitysize_1=xNew<int>(nbv);
+ 
+ 		//Initialization
+ 		for (i=0;i<nbv;i++) head_1[i]=-1;
+@@ -587,7 +587,7 @@
+ 		bamgmesh->VerticesSize[0]=nbv;
+ 		bamgmesh->VerticesSize[1]=3;
+ 		if (nbv){
+-			bamgmesh->Vertices=(double*)xmalloc(3*nbv*sizeof(double));
++			bamgmesh->Vertices=xNew<double>(3*nbv);
+ 			for (i=0;i<nbv;i++){
+ 				bamgmesh->Vertices[i*3+0]=vertices[i].r.x;
+ 				bamgmesh->Vertices[i*3+1]=vertices[i].r.y;
+@@ -601,7 +601,7 @@
+ 		bamgmesh->EdgesSize[1]=3;
+ 		int NumIssmSegments=0;
+ 		if (nbe){
+-			bamgmesh->Edges=(double*)xmalloc(3*nbe*sizeof(double));
++			bamgmesh->Edges=xNew<double>(3*nbe);
+ 			for (i=0;i<nbe;i++){
+ 				bamgmesh->Edges[i*3+0]=GetId(edges[i][0])+1; //back to M indexing
+ 				bamgmesh->Edges[i*3+1]=GetId(edges[i][1])+1; //back to M indexing
+@@ -616,7 +616,7 @@
+ 		if(verbose>5) printf("      writing element edges\n");
+ 		SetOfEdges4* edge4=new SetOfEdges4(nbt*3,nbv);
+ 		double* elemedge=NULL;
+-		elemedge=(double*)xmalloc(3*nbt*sizeof(double));
++		elemedge=xNew<double>(3*nbt);
+ 		for (i=0;i<3*nbt;i++) elemedge[i]=NAN;
+ 		k=0;
+ 		for (i=0;i<nbt;i++){
+@@ -641,7 +641,7 @@
+ 		}
+ 		bamgmesh->IssmEdgesSize[0]=edge4->nb();
+ 		bamgmesh->IssmEdgesSize[1]=4;
+-		bamgmesh->IssmEdges=(double*)xmalloc(4*edge4->nb()*sizeof(double));
++		bamgmesh->IssmEdges=xNew<double>(4*edge4->nb());
+ 		for (i=0;i<edge4->nb();i++){
+ 			/*Invert first two vertices if necessary*/
+ 			bool found=false;
+@@ -666,13 +666,13 @@
+ 		}
+ 		//clean up
+ 		delete edge4;
+-		xfree((void**)&elemedge);
++		xDelete<double>(elemedge);
+ 
+ 		/*IssmSegments*/
+ 		if(verbose>5) printf("      writing IssmSegments\n");
+ 		bamgmesh->IssmSegmentsSize[0]=NumIssmSegments;
+ 		bamgmesh->IssmSegmentsSize[1]=4;
+-		bamgmesh->IssmSegments=(double*)xmalloc(4*NumIssmSegments*sizeof(double));
++		bamgmesh->IssmSegments=xNew<double>(4*NumIssmSegments);
+ 		num=0;
+ 		for (i=0;i<nbe;i++){
+ 			if(edges[i].GeomEdgeHook){
+@@ -718,7 +718,7 @@
+ 		bamgmesh->TrianglesSize[0]=k;
+ 		bamgmesh->TrianglesSize[1]=4;
+ 		if (k){
+-			bamgmesh->Triangles=(double*)xmalloc(4*k*sizeof(double));
++			bamgmesh->Triangles=xNew<double>(4*k);
+ 			for (i=0;i<nbt;i++){
+ 				Triangle &t=triangles[i];
+ 				//reft[i]=-1 for outside triangle
+@@ -737,7 +737,7 @@
+ 		bamgmesh->QuadrilateralsSize[0]=nbq;
+ 		bamgmesh->QuadrilateralsSize[1]=5;
+ 		if (nbq){
+-			bamgmesh->Quadrilaterals=(double*)xmalloc(5*nbq*sizeof(double));
++			bamgmesh->Quadrilaterals=xNew<double>(5*nbq);
+ 			for (i=0;i<nbt;i++){
+ 				Triangle &t =triangles[i];
+ 				Triangle* ta;
+@@ -758,7 +758,7 @@
+ 		bamgmesh->SubDomainsSize[0]=nbsubdomains;
+ 		bamgmesh->SubDomainsSize[1]=4;
+ 		if (nbsubdomains){
+-			bamgmesh->SubDomains=(double*)xmalloc(4*nbsubdomains*sizeof(double));
++			bamgmesh->SubDomains=xNew<double>(4*nbsubdomains);
+ 			for (i=0;i<nbsubdomains;i++){
+ 				bamgmesh->SubDomains[i*4+0]=3;
+ 				bamgmesh->SubDomains[i*4+1]=reft[GetId(subdomains[i].head)];
+@@ -772,7 +772,7 @@
+ 		bamgmesh->SubDomainsFromGeomSize[0]=Gh.nbsubdomains;
+ 		bamgmesh->SubDomainsFromGeomSize[1]=4;
+ 		if (Gh.nbsubdomains){
+-			bamgmesh->SubDomainsFromGeom=(double*)xmalloc(4*Gh.nbsubdomains*sizeof(double));
++			bamgmesh->SubDomainsFromGeom=xNew<double>(4*Gh.nbsubdomains);
+ 			for (i=0;i<Gh.nbsubdomains;i++){
+ 				bamgmesh->SubDomainsFromGeom[i*4+0]=2;
+ 				bamgmesh->SubDomainsFromGeom[i*4+1]=GetId(subdomains[i].edge)+1; //back to Matlab indexing
+@@ -786,7 +786,7 @@
+ 		bamgmesh->VerticesOnGeomVertexSize[0]=NbVerticesOnGeomVertex;
+ 		bamgmesh->VerticesOnGeomVertexSize[1]=2;
+ 		if (NbVerticesOnGeomVertex){
+-			bamgmesh->VerticesOnGeomVertex=(double*)xmalloc(2*NbVerticesOnGeomVertex*sizeof(double));
++			bamgmesh->VerticesOnGeomVertex=xNew<double>(2*NbVerticesOnGeomVertex);
+ 			for (i=0;i<NbVerticesOnGeomVertex;i++){
+ 				VertexOnGeom &v=VerticesOnGeomVertex[i];
+ 				_assert_(v.OnGeomVertex());
+@@ -800,7 +800,7 @@
+ 		bamgmesh->VerticesOnGeomEdgeSize[0]=NbVerticesOnGeomEdge;
+ 		bamgmesh->VerticesOnGeomEdgeSize[1]=3;
+ 		if (NbVerticesOnGeomEdge){
+-			bamgmesh->VerticesOnGeomEdge=(double*)xmalloc(3*NbVerticesOnGeomEdge*sizeof(double));
++			bamgmesh->VerticesOnGeomEdge=xNew<double>(3*NbVerticesOnGeomEdge);
+ 			for (i=0;i<NbVerticesOnGeomEdge;i++){
+ 				const VertexOnGeom &v=VerticesOnGeomEdge[i];
+ 				if (!v.OnGeomEdge()){
+@@ -821,7 +821,7 @@
+ 		bamgmesh->EdgesOnGeomEdgeSize[0]=k;
+ 		bamgmesh->EdgesOnGeomEdgeSize[1]=2;
+ 		if (k){
+-			bamgmesh->EdgesOnGeomEdge=(double*)xmalloc(2*(int)k*sizeof(double));
++			bamgmesh->EdgesOnGeomEdge=xNew<double>(2*(int)k);
+ 			int count=0;
+ 			for (i=0;i<nbe;i++){
+ 				if (edges[i].GeomEdgeHook){
+@@ -836,7 +836,7 @@
+ 		if(verbose>5) printf("      writing Element connectivity\n");
+ 		bamgmesh->ElementConnectivitySize[0]=nbt-nbtout;
+ 		bamgmesh->ElementConnectivitySize[1]=3;
+-		bamgmesh->ElementConnectivity=(double*)xmalloc(3*(nbt-nbtout)*sizeof(double));
++		bamgmesh->ElementConnectivity=xNew<double>(3*(nbt-nbtout));
+ 		for (i=0;i<3*(nbt-nbtout);i++) bamgmesh->ElementConnectivity[i]=NAN;
+ 		num=0;
+ 		for (i=0;i<nbt;i++){
+@@ -856,7 +856,7 @@
+ 		if(verbose>5) printf("      writing Nodal element connectivity\n");
+ 		bamgmesh->NodalElementConnectivitySize[0]=nbv;
+ 		bamgmesh->NodalElementConnectivitySize[1]=connectivitymax_1;
+-		bamgmesh->NodalElementConnectivity=(double*)xmalloc(connectivitymax_1*nbv*sizeof(double));
++		bamgmesh->NodalElementConnectivity=xNew<double>(connectivitymax_1*nbv);
+ 		for (i=0;i<connectivitymax_1*nbv;i++) bamgmesh->NodalElementConnectivity[i]=NAN;
+ 		for (i=0;i<nbv;i++){
+ 			k=0;
+@@ -876,9 +876,9 @@
+ 		int  connectivitymax_2=0;
+ 		i1=bamgmesh->IssmEdgesSize[0];
+ 		i2=bamgmesh->IssmEdgesSize[1];
+-		head_2=(int*)xmalloc(nbv*sizeof(int));
+-		next_2=(int*)xmalloc(2*i1*sizeof(int));
+-		connectivitysize_2=(int*)xmalloc(nbv*sizeof(int));
++		head_2=xNew<int>(nbv);
++		next_2=xNew<int>(2*i1);
++		connectivitysize_2=xNew<int>(nbv);
+ 		//Initialization
+ 		for (i=0;i<nbv;i++) head_2[i]=-1;
+ 		for (i=0;i<nbv;i++) connectivitysize_2[i]=0;
+@@ -901,7 +901,7 @@
+ 		//Build output
+ 		bamgmesh->NodalConnectivitySize[0]=nbv;
+ 		bamgmesh->NodalConnectivitySize[1]=connectivitymax_2;
+-		bamgmesh->NodalConnectivity=(double*)xmalloc(connectivitymax_2*nbv*sizeof(double));
++		bamgmesh->NodalConnectivity=xNew<double>(connectivitymax_2*nbv);
+ 		for (i=0;i<connectivitymax_2*nbv;i++) bamgmesh->NodalConnectivity[i]=NAN;
+ 		for (i=0;i<nbv;i++){
+ 			k=0;
+@@ -924,7 +924,7 @@
+ 		bamgmesh->CrackedVerticesSize[0]=NbCrackedVertices;
+ 		bamgmesh->CrackedVerticesSize[1]=2;
+ 		if (NbCrackedVertices){
+-			bamgmesh->CrackedVertices=(double*)xmalloc(2*NbCrackedVertices*sizeof(double));
++			bamgmesh->CrackedVertices=xNew<double>(2*NbCrackedVertices);
+ 			for (i=0;i<NbCrackedVertices;i++){
+ 				bamgmesh->CrackedVertices[i*2+0]=CrackedVertices[i*2+0]+1; //M indexing
+ 				bamgmesh->CrackedVertices[i*2+1]=CrackedVertices[i*2+1]+1; //M indexing
+@@ -936,7 +936,7 @@
+ 		bamgmesh->CrackedEdgesSize[0]=NbCrackedEdges;
+ 		bamgmesh->CrackedEdgesSize[1]=4;
+ 		if (NbCrackedEdges){
+-			bamgmesh->CrackedEdges=(double*)xmalloc(2*NbCrackedEdges*sizeof(double));
++			bamgmesh->CrackedEdges=xNew<double>(2*NbCrackedEdges);
+ 			for (i=0;i<NbCrackedEdges;i++){
+ 				bamgmesh->CrackedEdges[i*2+0]=0;//CrackedEdges[i]->+1; //M indexing
+ 				bamgmesh->CrackedEdges[i*2+1]=0;//CrackedEdges[i]-]->+1; //M indexing
+@@ -944,12 +944,12 @@
+ 		}
+ 
+ 		//clean up
+-		xfree((void**)&connectivitysize_1);
+-		xfree((void**)&head_1);
+-		xfree((void**)&next_1);
+-		xfree((void**)&connectivitysize_2);
+-		xfree((void**)&head_2);
+-		xfree((void**)&next_2);
++		xDelete<int>(connectivitysize_1);
++		xDelete<int>(head_1);
++		xDelete<int>(next_1);
++		xDelete<int>(connectivitysize_2);
++		xDelete<int>(head_2);
++		xDelete<int>(next_2);
+ 		delete [] reft;
+ 		delete [] numt;
+ 	}
+@@ -995,8 +995,8 @@
+ 	/*FUNCTION Mesh::WriteMetric{{{*/
+ 	void Mesh::WriteMetric(BamgOpts* bamgopts) {
+ 		int i;
+-		xfree((void**)&bamgopts->metric);
+-		bamgopts->metric=(double*)xmalloc(3*nbv*sizeof(double));
++		xDelete<double>(bamgopts->metric);
++		bamgopts->metric=xNew<double>(3*nbv);
+ 		for (i=0;i<nbv;i++){
+ 			bamgopts->metric[i*3+0]=vertices[i].m.a11;
+ 			bamgopts->metric[i*3+1]=vertices[i].m.a21;
+@@ -1022,7 +1022,7 @@
+ 		}
+ 
+ 		if (k){
+-			index=(int*)xmalloc(3*k*sizeof(double));
++			index=xNew<int>(3*k);
+ 			num=0;
+ 			for (i=0;i<nbt;i++){
+ 				Triangle &t=triangles[i];
+@@ -1794,9 +1794,9 @@
+ 
+ 		//first, build the chains that will be used for the Hessian computation, as weel as the area of each element
+ 		int* head_s=NULL;
+-		head_s=(int*)xmalloc(nbv*sizeof(int));
++		head_s=xNew<int>(nbv);
+ 		int* next_p=NULL;
+-		next_p=(int*)xmalloc(3*nbt*sizeof(int));
++		next_p=xNew<int>(3*nbt);
+ 		int  p=0;
+ 		//initialization
+ 		for(i=0;i<nbv;i++){
+@@ -1935,8 +1935,8 @@
+ 		}//for all solutions
+ 
+ 		//clean up
+-		xfree((void**)&head_s);
+-		xfree((void**)&next_p);
++		xDelete<int>(head_s);
++		xDelete<int>(next_p);
+ 		delete [] detT;
+ 		delete [] alpha;
+ 		delete [] beta;
+@@ -2306,7 +2306,7 @@
+ 		//Add new vertices
+ 		if (verbose>4) printf("      number of Cracked Vertices = %i\n",NbCrackedVertices);
+ 		if (NbCrackedVertices){
+-			CrackedVertices=(long*)xmalloc(2*NbCrackedVertices*sizeof(double));
++			CrackedVertices=xNew<long>(2*NbCrackedVertices);
+ 			num=0;
+ 			for (i=0;i<nbv;i++){
+ 				if (splitvertex[i]==2){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12455)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12456)
+@@ -37,8 +37,8 @@
+ 	dof=spc_dof;
+ 	nsteps=spc_nsteps;
+ 	if(spc_nsteps){
+-		values=(double*)xmalloc(spc_nsteps*sizeof(double));
+-		times=(double*)xmalloc(spc_nsteps*sizeof(double));
++		values=xNew<double>(spc_nsteps);
++		times=xNew<double>(spc_nsteps);
+ 		memcpy(values,spc_values,nsteps*sizeof(double));
+ 		memcpy(times,spc_times,nsteps*sizeof(double));
+ 	}
+@@ -48,8 +48,8 @@
+ /*}}}*/
+ /*FUNCTION SpcTransient::~SpcTransient{{{*/
+ SpcTransient::~SpcTransient(){
+-	xfree((void**)&times);
+-	xfree((void**)&values);
++	xDelete<double>(times);
++	xDelete<double>(values);
+ 	return;
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12456-12457.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12456-12457.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12456-12457.diff	(revision 12679)
@@ -0,0 +1,424 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12456)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12457)
+@@ -50,11 +50,11 @@
+ 	this->clone=in->clone;
+ 
+ 	if(this->gsize>0){
+-		this->f_set=(bool*)xmalloc(this->gsize*sizeof(bool));
+-		this->s_set=(bool*)xmalloc(this->gsize*sizeof(bool));
++		this->f_set=xNew<bool>(this->gsize);
++		this->s_set=xNew<bool>(this->gsize);
+ 		this->svalues=xNew<IssmDouble>(this->gsize);
+-		if(in->doftype)this->doftype=(int*)xmalloc(this->gsize*sizeof(int)); 
+-		this->gdoflist=(int*)xmalloc(this->gsize*sizeof(int)); 
++		if(in->doftype)this->doftype=xNew<int>(this->gsize); 
++		this->gdoflist=xNew<int>(this->gsize); 
+ 	}
+ 	else{
+ 		this->f_set=NULL;
+@@ -63,8 +63,8 @@
+ 		this->doftype=NULL;
+ 		this->gdoflist=NULL;
+ 	}
+-	if(this->fsize>0 && this->fsize!=UNDEF)this->fdoflist=(int*)xmalloc(this->fsize*sizeof(int)); else this->fdoflist=NULL;
+-	if(this->ssize>0 && this->ssize!=UNDEF)this->sdoflist=(int*)xmalloc(this->ssize*sizeof(int)); else this->sdoflist=NULL;
++	if(this->fsize>0 && this->fsize!=UNDEF)this->fdoflist=xNew<int>(this->fsize); else this->fdoflist=NULL;
++	if(this->ssize>0 && this->ssize!=UNDEF)this->sdoflist=xNew<int>(this->ssize); else this->sdoflist=NULL;
+ 
+ 	if(this->gsize>0){
+ 		memcpy(this->f_set,in->f_set,this->gsize*sizeof(bool));
+@@ -81,13 +81,13 @@
+ /*FUNCTION DofIndexing::~DofIndexing() {{{*/
+ DofIndexing::~DofIndexing(){ //destructor
+ 
+-	xfree((void**)&f_set); 
+-	xfree((void**)&s_set); 
++	xDelete<bool>(f_set); 
++	xDelete<bool>(s_set); 
+ 	xDelete<IssmDouble>(svalues);
+-	xfree((void**)&doftype); 
+-	xfree((void**)&gdoflist);
+-	xfree((void**)&fdoflist);
+-	xfree((void**)&sdoflist);
++	xDelete<int>(doftype); 
++	xDelete<int>(gdoflist);
++	xDelete<int>(fdoflist);
++	xDelete<int>(sdoflist);
+ 
+ }
+ /*}}}*/
+@@ -101,11 +101,11 @@
+ 
+ 	/*allocate: */
+ 	if(this->gsize>0){
+-		this->f_set=(bool*)xmalloc(this->gsize*sizeof(bool));
+-		this->s_set=(bool*)xmalloc(this->gsize*sizeof(bool));
++		this->f_set=xNew<bool>(this->gsize);
++		this->s_set=xNew<bool>(this->gsize);
+ 		this->svalues=xNew<IssmDouble>(this->gsize);
+-		if(in_doftype)this->doftype=(int*)xmalloc(this->gsize*sizeof(int));
+-		this->gdoflist=(int*)xmalloc(this->gsize*sizeof(int));
++		if(in_doftype)this->doftype=xNew<int>(this->gsize);
++		this->gdoflist=xNew<int>(this->gsize);
+ 	}
+ 
+ 	for (i=0;i<this->gsize;i++){
+@@ -130,16 +130,16 @@
+ 		size=0;
+ 		for(i=0;i<this->gsize;i++) if(f_set[i])size++;
+ 		this->fsize=size;
+-		xfree((void**)&this->fdoflist);
+-		if(this->fsize)this->fdoflist=(int*)xmalloc(size*sizeof(int));
++		xDelete<int>(this->fdoflist);
++		if(this->fsize)this->fdoflist=xNew<int>(size);
+ 		else this->fdoflist=NULL;
+ 	}
+ 	else if(setenum==SsetEnum){
+ 		size=0;
+ 		for(i=0;i<this->gsize;i++) if(s_set[i])size++;
+ 		this->ssize=size;
+-		xfree((void**)&this->sdoflist);
+-		if(this->ssize)this->sdoflist=(int*)xmalloc(size*sizeof(int));
++		xDelete<int>(this->sdoflist);
++		if(this->ssize)this->sdoflist=xNew<int>(size);
+ 		else this->sdoflist=NULL;
+ 	}
+ 	else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DakotaPlugin.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DakotaPlugin.cpp	(revision 12456)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DakotaPlugin.cpp	(revision 12457)
+@@ -73,10 +73,10 @@
+ 		variables[i]=xC[i];
+ 	}
+ 	/*The descriptors: */
+-	variable_descriptors=(char**)xmalloc(numACV*sizeof(char*));
++	variable_descriptors=xNew<char*>(numACV);
+ 	for(i=0;i<numACV;i++){
+ 		string label=xCLabels[i];
+-		variable_descriptor=(char*)xmalloc((strlen(label.c_str())+1)*sizeof(char));
++		variable_descriptor=xNew<char>(strlen(label.c_str())+1);
+ 		memcpy(variable_descriptor,label.c_str(),(strlen(label.c_str())+1)*sizeof(char));
+ 
+ 		
+@@ -99,9 +99,9 @@
+ 	xDelete<IssmDouble>(variables);
+ 	for(i=0;i<numACV;i++){
+ 		variable_descriptor=variable_descriptors[i];
+-		xfree((void**)&variable_descriptor);
++		xDelete<char>(variable_descriptor);
+ 	}
+-	xfree((void**)&variable_descriptors);
++	xDelete<char*>(variable_descriptors);
+ 	xDelete<IssmDouble>(responses);
+ 
+ 	return 0;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp	(revision 12456)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp	(revision 12457)
+@@ -38,7 +38,7 @@
+ 	this->results=new Results(); //not initialized by CreateDataSets
+ 	
+ 	/*Dynamically allocate whatever is a list of length nummodels: */
+-	analysis_type_list=(int*)xmalloc(nummodels*sizeof(int));
++	analysis_type_list=xNew<int>(nummodels);
+ 
+ 	/*Initialize: */
+ 	for(i=0;i<nummodels;i++)analysis_type_list[i]=analyses[i];
+@@ -84,7 +84,7 @@
+ 	int i;
+ 
+ 	/*Delete all the datasets: */
+-	xfree((void**)&analysis_type_list);
++	xDelete<int>(analysis_type_list);
+ 	delete elements;
+ 	delete nodes;
+ 	delete vertices;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12456)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12457)
+@@ -46,9 +46,9 @@
+ 	}
+ 	else{
+ 		/*Allocate: */
+-		this->objects=(Object**)xmalloc(this->num*sizeof(Object*));
+-		this->ids=(int*)xmalloc(this->num*sizeof(int));
+-		this->offsets=(int*)xmalloc(this->num*sizeof(int));
++		this->objects=xNew<Object*>(this->num);
++		this->ids=xNew<int>(this->num);
++		this->offsets=xNew<int>(this->num);
+ 
+ 		/*Copy ids: */
+ 		for (i=0;i<this->num;i++){
+@@ -62,9 +62,9 @@
+ /*FUNCTION Hook::~Hook(){{{*/
+ Hook::~Hook(){
+ 	/*deallocate: */
+-	xfree((void**)&this->objects);
+-	xfree((void**)&this->ids);
+-	xfree((void**)&this->offsets);
++	xDelete<Object*>(this->objects);
++	xDelete<int>(this->ids);
++	xDelete<int>(this->offsets);
+ 	return;
+ }
+ /*}}}*/
+@@ -131,9 +131,9 @@
+ 	/*copy in the fields: */
+ 	output->num=this->num;
+ 	if(output->num){
+-		output->objects=(Object**)xmalloc(output->num*sizeof(Object*));
+-		output->ids=(int*)xmalloc(output->num*sizeof(int));
+-		output->offsets=(int*)xmalloc(output->num*sizeof(int));
++		output->objects=xNew<Object*>(output->num);
++		output->ids=xNew<int>(output->num);
++		output->offsets=xNew<int>(output->num);
+ 	}
+ 	
+ 	for(i=0;i<output->num;i++){
+@@ -251,9 +251,9 @@
+ 	output->num=numindices;
+ 	if(output->num<1) _error_("Trying to spawn an empty ElementProperties!");
+ 
+-	output->objects=(Object**)xmalloc(output->num*sizeof(Object*));
+-	output->ids=(int*)xmalloc(output->num*sizeof(int));
+-	output->offsets=(int*)xmalloc(output->num*sizeof(int));
++	output->objects=xNew<Object*>(output->num);
++	output->ids=xNew<int>(output->num);
++	output->offsets=xNew<int>(output->num);
+ 
+ 	for(i=0;i<output->num;i++){
+ 		output->objects[i]=this->objects[indices[i]];
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12456)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12457)
+@@ -800,7 +800,7 @@
+ 
+ 	if(setenum==FsetEnum){
+ 		if(this->indexing.fsize){
+-			indices=(int*)xmalloc(this->indexing.fsize*sizeof(int));
++			indices=xNew<int>(this->indexing.fsize);
+  			values=xNew<IssmDouble>(this->indexing.fsize);
+ 
+ 			for(i=0;i<this->indexing.gsize;i++){
+@@ -818,7 +818,7 @@
+ 	}
+ 	else if(setenum==SsetEnum){
+ 		if(this->indexing.ssize){
+-			indices=(int*)xmalloc(this->indexing.ssize*sizeof(int));
++			indices=xNew<int>(this->indexing.ssize);
+ 			values=xNew<IssmDouble>(this->indexing.ssize);
+ 
+ 			for(i=0;i<this->indexing.gsize;i++){
+@@ -838,7 +838,7 @@
+ 
+ 	/*Free ressources:*/
+ 	xDelete<IssmDouble>(values);
+-	xfree((void**)&indices);
++	xDelete<int>(indices);
+ }
+ /*}}}*/
+ /*FUNCTION Node::VecReduce {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12456)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12457)
+@@ -52,7 +52,7 @@
+ 	this->FetchConstants(); /*this routine goes through the input file, and fetches bools, ints, IssmPDoubles and strings only, nothing memory intensive*/
+ 
+ 	/*Initialize data: */
+-	this->data=(IssmPDouble**)xmalloc(MaximumNumberOfEnums*sizeof(IssmPDouble*));
++	this->data=xNew<IssmPDouble*>(MaximumNumberOfEnums);
+ 	for(int i=0;i<MaximumNumberOfEnums;i++) this->data[i]=NULL;
+ 	
+ 	/*Initialize permanent data: */
+@@ -83,12 +83,12 @@
+ 	}
+ 	#endif
+ 
+-	xfree((void**)&this->data);
+-	xfree((void**)&this->my_elements);
+-	xfree((void**)&this->my_nodes);
+-	xfree((void**)&this->my_vertices);
+-	xfree((void**)&this->singlenodetoelementconnectivity);
+-	xfree((void**)&this->numbernodetoelementconnectivity);
++	xDelete<IssmPDouble*>(this->data);
++	xDelete<bool>(this->my_elements);
++	xDelete<bool>(this->my_nodes);
++	xDelete<int>(this->my_vertices);
++	xDelete<int>(this->singlenodetoelementconnectivity);
++	xDelete<int>(this->numbernodetoelementconnectivity);
+ }
+ /*}}}*/
+ 
+@@ -304,7 +304,7 @@
+ 						#endif
+ 
+ 						if(string_size){
+-							string=(char*)xmalloc((string_size+1)*sizeof(char));
++							string=xNew<char>(string_size+1);
+ 							string[string_size]='\0';
+ 
+ 							/*Read string, then broadcast: */
+@@ -314,7 +314,7 @@
+ 							#endif
+ 						}
+ 						else{
+-							string=(char*)xmalloc(sizeof(char));
++							string=xNew<char>(1);
+ 							string[0]='\0';
+ 						}
+ 						
+@@ -322,7 +322,7 @@
+ 						this->constants->AddObject(new StringParam(record_enum,string));
+ 
+ 						/*Free string*/
+-						xfree((void**)&string);
++						xDelete<char>(string);
+ 
+ 						break;
+ 					case 5: 
+@@ -403,21 +403,21 @@
+ 				case 4: 
+ 					MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
+ 					if(string_size){
+-						string=(char*)xmalloc((string_size+1)*sizeof(char));
++						string=xNew<char>((string_size+1));
+ 						string[string_size]='\0';
+ 
+ 						/*Read string from cpu 0: */
+ 						MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
+ 					}
+ 					else{
+-						string=(char*)xmalloc(sizeof(char));
++						string=xNew<char>(1);
+ 						string[0]='\0';
+ 					}
+ 					/*Add string to parameters: */
+ 					this->constants->AddObject(new StringParam(record_enum,string));
+ 
+ 					/*Free string*/
+-					xfree((void**)&string);
++					xDelete<char>(string);
+ 
+ 					break;
+ 				case 5: break; //do nothing. not interested in this type of data, which is memory intensive.
+@@ -558,7 +558,7 @@
+ 
+ 	/*Now allocate string: */
+ 	if(string_size){
+-		string=(char*)xmalloc((string_size+1)*sizeof(char));
++		string=xNew<char>((string_size+1));
+ 		string[string_size]='\0';
+ 
+ 		/*Read string on node 0, then broadcast: */
+@@ -570,7 +570,7 @@
+ 		#endif
+ 	}
+ 	else{
+-		string=(char*)xmalloc(sizeof(char));
++		string=xNew<char>(1);
+ 		string[0]='\0';
+ 	}
+ 
+@@ -620,7 +620,7 @@
+ 
+ 	/*Now allocate matrix: */
+ 	if(M*N){
+-		matrix=(IssmPDouble*)xmalloc(M*N*sizeof(IssmPDouble));
++		matrix=xNew<IssmPDouble>(M*N);
+ 
+ 		/*Read matrix on node 0, then broadcast: */
+ 		if(my_rank==0){  
+@@ -634,7 +634,7 @@
+ 
+ 	/*Now cast to integer: */
+ 	if(M*N){
+-		integer_matrix=(int*)xmalloc(M*N*sizeof(int));
++		integer_matrix=xNew<int>(M*N);
+ 		for (i=0;i<M;i++){
+ 			for (j=0;j<N;j++){
+ 				integer_matrix[i*N+j]=(int)matrix[i*N+j];
+@@ -645,7 +645,7 @@
+ 		integer_matrix=NULL;
+ 	}
+ 	/*Free ressources:*/
+-	xfree((void**)&matrix);
++	xDelete<IssmPDouble>(matrix);
+ 
+ 	/*Assign output pointers: */
+ 	*pmatrix=integer_matrix;
+@@ -739,7 +739,7 @@
+ 
+ 	/*Now allocate string array: */
+ 	if(numstrings){
+-		strings=(char**)xmalloc(numstrings*sizeof(char*));
++		strings=xNew<char*>(numstrings);
+ 		for(i=0;i<numstrings;i++)strings[i]=NULL;
+ 
+ 		/*Go through strings, and read: */
+@@ -752,7 +752,7 @@
+ 			MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
+ 			#endif
+ 			if(string_size){
+-				string=(char*)xmalloc((string_size+1)*sizeof(char));
++				string=xNew<char>((string_size+1));
+ 				string[string_size]='\0';
+ 
+ 				/*Read string on node 0, then broadcast: */
+@@ -764,7 +764,7 @@
+ 				#endif
+ 			}
+ 			else{
+-				string=(char*)xmalloc(sizeof(char));
++				string=xNew<char>(1);
+ 				string[0]='\0';
+ 			}
+ 
+@@ -811,9 +811,9 @@
+ 	if(numrecords){
+ 
+ 		/*Allocate matrices :*/
+-		matrices=(IssmPDouble**)xmalloc(numrecords*sizeof(IssmPDouble*));
+-		mdims=(int*)xmalloc(numrecords*sizeof(int));
+-		ndims=(int*)xmalloc(numrecords*sizeof(int));
++		matrices=xNew<IssmPDouble*>(numrecords);
++		mdims=xNew<int>(numrecords);
++		ndims=xNew<int>(numrecords);
+ 
+ 		for(i=0;i<numrecords;i++){
+ 			matrices[i]=NULL;
+@@ -840,7 +840,7 @@
+ 
+ 			/*Now allocate matrix: */
+ 			if(M*N){
+-				matrix=(IssmPDouble*)xmalloc(M*N*sizeof(IssmPDouble));
++				matrix=xNew<IssmPDouble>(M*N);
+ 
+ 				/*Read matrix on node 0, then broadcast: */
+ 				if(my_rank==0){  
+@@ -885,7 +885,7 @@
+ 	switch(code){
+ 		case 3: {//IssmPDouble
+ 			  IssmPDouble *value = NULL;
+-			  value=(IssmPDouble*)xmalloc(1*sizeof(IssmPDouble));
++			  value=xNew<IssmPDouble>(1);
+ 			  FetchData(value,index+1);
+ 			  option = new OptionDouble();
+ 			  ((OptionDouble*)option)->values = value;
+@@ -1141,8 +1141,8 @@
+ 			/*}}}*/
+ 	}
+ 	/*Free ressources:*/
+-	xfree((void**)&IssmPDoublevector);
+-	xfree((void**)&string);
++	xDelete<IssmPDouble>(IssmPDoublevector);
++	xDelete<char>(string);
+ }
+ /*FUNCTION IoModel::LastIndex{{{*/
+ void IoModel::LastIndex(int *pindex){
Index: /issm/oecreview/Archive/12321-12677/ISSM-12457-12458.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12457-12458.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12457-12458.diff	(revision 12679)
@@ -0,0 +1,554 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12457)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12458)
+@@ -81,7 +81,7 @@
+ 	tria=new Tria();
+ 
+ 	//deal with TriaRef mother class
+-	tria->element_type_list=(int*)xmalloc(this->numanalyses*sizeof(int));
++	tria->element_type_list=xNew<int>(this->numanalyses);
+ 	for(i=0;i<this->numanalyses;i++) tria->element_type_list[i]=this->element_type_list[i];
+ 
+ 	//deal with TriaHook mother class
+@@ -110,7 +110,7 @@
+ 	tria->parameters=this->parameters;
+ 
+ 	/*recover objects: */
+-	tria->nodes=(Node**)xmalloc(3*sizeof(Node*)); //we cannot rely on an analysis_counter to tell us which analysis_type we are running, so we just copy the nodes.
++	tria->nodes=xNew<Node*>(3); //we cannot rely on an analysis_counter to tell us which analysis_type we are running, so we just copy the nodes.
+ 	for(i=0;i<3;i++)tria->nodes[i]=this->nodes[i];
+ 	tria->matice=(Matice*)tria->hmatice->delivers();
+ 	tria->matpar=(Matpar*)tria->hmatpar->delivers();
+@@ -973,7 +973,7 @@
+ 
+ 	/*First, figure out size of doflist and create it: */
+ 	for(i=0;i<3;i++) numberofdofs+=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
+-	doflist=(int*)xmalloc(numberofdofs*sizeof(int));
++	doflist=xNew<int>(numberofdofs);
+ 
+ 	/*Populate: */
+ 	count=0;
+@@ -1245,8 +1245,8 @@
+ 	Input** new_inputs=NULL;
+ 	Input** old_inputs=NULL;
+ 
+-	new_inputs=(Input**)xmalloc(num_enums/2*sizeof(Input*)); //half the enums are for the new inputs
+-	old_inputs=(Input**)xmalloc(num_enums/2*sizeof(Input*)); //half the enums are for the old inputs
++	new_inputs=xNew<Input*>(num_enums/2); //half the enums are for the new inputs
++	old_inputs=xNew<Input*>(num_enums/2); //half the enums are for the old inputs
+ 
+ 	for(i=0;i<num_enums/2;i++){
+ 		new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
+@@ -1262,8 +1262,8 @@
+ 	}
+ 
+ 	/*clean up and return*/
+-	xfree((void**)&new_inputs);
+-	xfree((void**)&old_inputs);
++	xDelete<Input*>(new_inputs);
++	xDelete<Input*>(old_inputs);
+ 	return converged;
+ }
+ /*}}}*/
+@@ -1529,7 +1529,7 @@
+ 	this->inputs->AddInput(new TriaP1Input(enum_type,values));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromSolutionPrognostic{{{*/
+@@ -1596,7 +1596,7 @@
+ 	this->inputs->AddInput(new TriaP1Input(BedEnum,newbed));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromVector(double* vector, int name, int type);{{{*/
+@@ -1861,10 +1861,10 @@
+ 	if(numberofresults){
+ 
+ 		/*Allocate output*/
+-		resultsenums=(int*)xmalloc(numberofresults*sizeof(int));
+-		resultssizes=(int*)xmalloc(numberofresults*sizeof(int));
+-		resultstimes=(double*)xmalloc(numberofresults*sizeof(double));
+-		resultssteps=(int*)xmalloc(numberofresults*sizeof(int));
++		resultsenums=xNew<int>(numberofresults);
++		resultssizes=xNew<int>(numberofresults);
++		resultstimes=xNew<double>(numberofresults);
++		resultssteps=xNew<int>(numberofresults);
+ 
+ 		/*populate enums*/
+ 		for(i=0;i<this->results->Size();i++){
+@@ -3251,7 +3251,7 @@
+ 
+ 	/*Free ressources:*/
+ 	delete gauss;
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Tria::GetSolutionFromInputsDiagnosticHutter{{{*/
+@@ -3290,7 +3290,7 @@
+ 
+ 	/*Free ressources:*/
+ 	delete gauss;
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromSolutionDiagnosticHoriz {{{*/
+@@ -3352,7 +3352,7 @@
+ 	this->inputs->AddInput(new TriaP1Input(PressureEnum,pressure));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ 
+ }
+ /*}}}*/
+@@ -3412,7 +3412,7 @@
+ 	this->inputs->AddInput(new TriaP1Input(PressureEnum,pressure));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ #endif
+@@ -3450,7 +3450,7 @@
+ 	}
+ 
+ 	/*Clean up and return*/
+-	xfree((void**)&control_type);
++	xDelete<int>(control_type);
+ }
+ /*}}}*/
+ /*FUNCTION Tria::ControlInputGetGradient{{{*/
+@@ -3568,7 +3568,7 @@
+ 			_error_("response %s not supported yet",EnumToStringx(responses[resp]));
+ 	}
+ 
+-	xfree((void**)&responses);
++	xDelete<int>(responses);
+ }
+ /*}}}*/
+ /*FUNCTION Tria::GradjBGradient{{{*/
+@@ -4427,7 +4427,7 @@
+ 
+ 	/*Clean up and return*/
+ 	delete gauss;
+-	xfree((void**)&responses);
++	xDelete<int>(responses);
+ 	return pe;
+ }
+ /*}}}*/
+@@ -4606,7 +4606,7 @@
+ 
+ 	/*Clean up and return*/
+ 	delete gauss;
+-	xfree((void**)&responses);
++	xDelete<int>(responses);
+ 	return pe;
+ }
+ /*}}}*/
+@@ -4783,7 +4783,7 @@
+ 
+ 	/*Clean up and return*/
+ 	delete gauss;
+-	xfree((void**)&responses);
++	xDelete<int>(responses);
+ 	return pe;
+ }
+ /*}}}*/
+@@ -4955,7 +4955,7 @@
+ 	this->inputs->AddInput(new TriaP1Input(AdjointyEnum,lambday));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromSolutionAdjointBalancethickness {{{*/
+@@ -4984,7 +4984,7 @@
+ 	this->inputs->AddInput(new TriaP1Input(AdjointEnum,lambda));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Tria::GetVectorFromControlInputs{{{*/
+@@ -5294,7 +5294,7 @@
+ 
+ 	/*Free ressources:*/
+ 	delete gauss;
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromSolutionHydrology{{{*/
+@@ -5322,7 +5322,7 @@
+ 	this->inputs->AddInput(new TriaP1Input(WatercolumnEnum,values));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.cpp	(revision 12457)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.cpp	(revision 12458)
+@@ -34,13 +34,13 @@
+ PentaRef::PentaRef(const int nummodels){
+ 
+ 	/*Only allocate pointer*/
+-	element_type_list=(int*)xmalloc(nummodels*sizeof(int));
++	element_type_list=xNew<int>(nummodels);
+ 
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::~PentaRef(){{{*/
+ PentaRef::~PentaRef(){
+-	xfree((void**)&element_type_list);
++	xDelete<int>(element_type_list);
+ }
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12457)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12458)
+@@ -99,7 +99,7 @@
+ 	penta=new Penta();
+ 
+ 	//deal with PentaRef mother class
+-	penta->element_type_list=(int*)xmalloc(this->numanalyses*sizeof(int));
++	penta->element_type_list=xNew<int>(this->numanalyses);
+ 	for(i=0;i<this->numanalyses;i++) penta->element_type_list[i]=this->element_type_list[i];
+ 
+ 	//deal with PentaHook mother class
+@@ -129,7 +129,7 @@
+ 	penta->parameters=this->parameters;
+ 
+ 	/*recover objects: */
+-	penta->nodes=(Node**)xmalloc(6*sizeof(Node*)); //we cannot rely on an analysis_counter to tell us which analysis_type we are running, so we just copy the nodes.
++	penta->nodes=xNew<Node*>(6); //we cannot rely on an analysis_counter to tell us which analysis_type we are running, so we just copy the nodes.
+ 	for(i=0;i<6;i++)penta->nodes[i]=this->nodes[i];
+ 	penta->matice=(Matice*)penta->hmatice->delivers();
+ 	penta->matpar=(Matpar*)penta->hmatpar->delivers();
+@@ -729,7 +729,7 @@
+ 	for(i=0;i<6;i++) numberofdofs+=nodes[i]->GetNumberOfDofs(approximation_enum,setenum);
+ 
+ 	/*Allocate: */
+-	doflist=(int*)xmalloc(numberofdofs*sizeof(int));
++	doflist=xNew<int>(numberofdofs);
+ 
+ 	/*Populate: */
+ 	count=0;
+@@ -1146,8 +1146,8 @@
+ 	Input** new_inputs=NULL;
+ 	Input** old_inputs=NULL;
+ 
+-	new_inputs=(Input**)xmalloc(num_enums/2*sizeof(Input*)); //half the enums are for the new inputs
+-	old_inputs=(Input**)xmalloc(num_enums/2*sizeof(Input*)); //half the enums are for the old inputs
++	new_inputs=xNew<Input*>(num_enums/2); //half the enums are for the new inputs
++	old_inputs=xNew<Input*>(num_enums/2); //half the enums are for the old inputs
+ 
+ 	for(i=0;i<num_enums/2;i++){
+ 		new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
+@@ -1163,8 +1163,8 @@
+ 	}
+ 
+ 	/*clean up*/
+-	xfree((void**)&new_inputs);
+-	xfree((void**)&old_inputs);
++	xDelete<Input*>(new_inputs);
++	xDelete<Input*>(old_inputs);
+ 
+ 	/*Return output*/
+ 	return converged;
+@@ -1398,17 +1398,17 @@
+ 	/*Step1: Get and Extrude original input: */
+ 	if (object_type==ElementEnum){
+ 		num_inputs=1;
+-		base_inputs=(Input**)xmalloc(num_inputs*sizeof(Input*));
++		base_inputs=xNew<Input*>(num_inputs);
+ 		base_inputs[0]=(Input*)this->inputs->GetInput(enum_type);
+ 	}
+ 	else if (object_type==MaterialsEnum){
+ 		num_inputs=1;
+-		base_inputs=(Input**)xmalloc(num_inputs*sizeof(Input*));
++		base_inputs=xNew<Input*>(num_inputs);
+ 		base_inputs[0]=(Input*)matice->inputs->GetInput(enum_type);
+ 	}
+ 	else if (object_type==NodeEnum){
+ 		num_inputs=3; //only the three upper nodes
+-		base_inputs=(Input**)xmalloc(num_inputs*sizeof(Input*));
++		base_inputs=xNew<Input*>(num_inputs);
+ 		for(i=0;i<num_inputs;i++){
+ 			base_inputs[i]=(Input*)this->nodes[i]->inputs->GetInput(enum_type);
+ 		}
+@@ -1453,7 +1453,7 @@
+ 	}
+ 
+ 	/*clean-up and return*/
+-	xfree((void**)&base_inputs);
++	xDelete<Input*>(base_inputs);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputScale{{{*/
+@@ -1794,7 +1794,7 @@
+ 	}
+ 	
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionOneDof{{{*/
+@@ -1818,7 +1818,7 @@
+ 	this->inputs->AddInput(new PentaP1Input(enum_type,values));
+ 	
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionOneDofCollpased{{{*/
+@@ -1858,7 +1858,7 @@
+ 	}
+ 	
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromVector(double* vector, int name, int type);{{{*/
+@@ -2030,10 +2030,10 @@
+ 	if(numberofresults){
+ 
+ 		/*Allocate output*/
+-		resultsenums=(int*)xmalloc(numberofresults*sizeof(int));
+-		resultssizes=(int*)xmalloc(numberofresults*sizeof(int));
+-		resultstimes=(double*)xmalloc(numberofresults*sizeof(double));
+-		resultssteps=(int*)xmalloc(numberofresults*sizeof(int));
++		resultsenums=xNew<int>(numberofresults);
++		resultssizes=xNew<int>(numberofresults);
++		resultstimes=xNew<double>(numberofresults);
++		resultssteps=xNew<int>(numberofresults);
+ 
+ 		/*populate enums*/
+ 		for(i=0;i<this->results->Size();i++){
+@@ -4268,7 +4268,7 @@
+ 
+ 	/*Free ressources:*/
+ 	delete gauss;
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetSolutionFromInputsEnthalpy{{{*/
+@@ -4299,7 +4299,7 @@
+ 
+ 	/*Free ressources:*/
+ 	delete gauss;
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionThermal {{{*/
+@@ -4370,7 +4370,7 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionEnthalpy {{{*/
+@@ -4448,7 +4448,7 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ #endif
+@@ -4867,7 +4867,7 @@
+ 		default:
+ 			_error_("response %s not supported yet",EnumToStringx(responses[resp]));
+ 	}
+-	xfree((void**)&responses);
++	xDelete<int>(responses);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GradjDragMacAyeal {{{*/
+@@ -5132,7 +5132,7 @@
+ 
+ 	/*Clean up and return*/
+ cleanup_and_return:
+-	xfree((void**)&control_type);
++	xDelete<int>(control_type);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionAdjointStokes {{{*/
+@@ -5175,7 +5175,7 @@
+ 	this->inputs->AddInput(new PentaP1Input(AdjointpEnum,lambdap));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionAdjointHoriz {{{*/
+@@ -5210,7 +5210,7 @@
+ 	this->inputs->AddInput(new PentaP1Input(AdjointyEnum,lambday));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::SurfaceAverageVelMisfit {{{*/
+@@ -7939,7 +7939,7 @@
+ 
+ 	/*Free ressources:*/
+ 	delete gauss;
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetSolutionFromInputsDiagnosticHutter{{{*/
+@@ -7975,7 +7975,7 @@
+ 
+ 	/*Free ressources:*/
+ 	delete gauss;
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetSolutionFromInputsDiagnosticVert{{{*/
+@@ -8008,7 +8008,7 @@
+ 
+ 	/*Free ressources:*/
+ 	delete gauss;
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetSolutionFromInputsDiagnosticStokes{{{*/
+@@ -8053,7 +8053,7 @@
+ 
+ 	/*Free ressources:*/
+ 	delete gauss;
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHoriz {{{*/
+@@ -8170,7 +8170,7 @@
+ 	}
+ 	
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealPattyn {{{*/
+@@ -8253,8 +8253,8 @@
+ 	this->inputs->AddInput(new PentaP1Input(PressureEnum,pressure));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflistp);
+-	xfree((void**)&doflistm);
++	xDelete<int>(doflistp);
++	xDelete<int>(doflistm);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealStokes {{{*/
+@@ -8353,8 +8353,8 @@
+ 	this->inputs->AddInput(new PentaP1Input(PressureEnum,pressure));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflistm);
+-	xfree((void**)&doflists);
++	xDelete<int>(doflistm);
++	xDelete<int>(doflists);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticPattyn {{{*/
+@@ -8428,7 +8428,7 @@
+ 	this->inputs->AddInput(new PentaP1Input(PressureEnum,pressure));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticPattynStokes {{{*/
+@@ -8521,8 +8521,8 @@
+ 	this->inputs->AddInput(new PentaP1Input(PressureEnum,pressure));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflistp);
+-	xfree((void**)&doflists);
++	xDelete<int>(doflistp);
++	xDelete<int>(doflists);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHutter {{{*/
+@@ -8585,7 +8585,7 @@
+ 	this->inputs->AddInput(new PentaP1Input(PressureEnum,pressure));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticVert {{{*/
+@@ -8689,7 +8689,7 @@
+ 	this->inputs->AddInput(new PentaP1Input(VelEnum,vel));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticStokes {{{*/
+@@ -8750,7 +8750,7 @@
+ 	this->inputs->AddInput(new PentaP1Input(PressureEnum,pressure));
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&doflist);
++	xDelete<int>(doflist);
+ }
+ /*}}}*/
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.cpp	(revision 12457)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.cpp	(revision 12458)
+@@ -33,13 +33,13 @@
+ TriaRef::TriaRef(const int nummodels){
+ 
+ 	/*Only allocate pointer*/
+-	element_type_list=(int*)xmalloc(nummodels*sizeof(int));
++	element_type_list=xNew<int>(nummodels);
+ 
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::~TriaRef(){{{*/
+ TriaRef::~TriaRef(){
+-	xfree((void**)&element_type_list);
++	xDelete<int>(element_type_list);
+ }
+ /*}}}*/
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12458-12459.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12458-12459.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12458-12459.diff	(revision 12679)
@@ -0,0 +1,362 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Nodes.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Nodes.cpp	(revision 12458)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Nodes.cpp	(revision 12459)
+@@ -83,7 +83,7 @@
+ 	 * 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: get number of dofs for each cpu*/
+-	alldofcount=(int*)xmalloc(num_procs*sizeof(int));
++	alldofcount=xNew<int>(num_procs);
+ 	#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);
+@@ -112,8 +112,8 @@
+ 	maxdofspernode=this->MaxNumDofs(analysis_type,setenum);
+ 	numnodes=this->NumberOfNodes(analysis_type);
+ 	if(numnodes*maxdofspernode){
+-		truedofs=   (int*)xcalloc(numnodes*maxdofspernode,sizeof(int)); //initialize to 0, so that we can pick up the max
+-		alltruedofs=(int*)xcalloc(numnodes*maxdofspernode,sizeof(int));
++		truedofs=   xNewZeroInit<int>(numnodes*maxdofspernode); //initialize to 0, so that we can pick up the max
++		alltruedofs=xNewZeroInit<int>(numnodes*maxdofspernode);
+ 	}
+ 
+ 	for (i=0;i<this->Size();i++){
+@@ -138,9 +138,9 @@
+ 	}
+ 
+ 	/* Free ressources: */
+-	xfree((void**)&alldofcount);
+-	xfree((void**)&truedofs);
+-	xfree((void**)&alltruedofs);
++	xDelete<int>(alldofcount);
++	xDelete<int>(truedofs);
++	xDelete<int>(alltruedofs);
+ }
+ /*}}}*/
+ /*FUNCTION Nodes::FlagClones{{{*/
+@@ -157,8 +157,8 @@
+ 	numnodes=this->NumberOfNodes(analysis_type);
+ 
+ 	/*Allocate ranks: */
+-	ranks=(int*)xmalloc(numnodes*sizeof(int));
+-	minranks=(int*)xmalloc(numnodes*sizeof(int));
++	ranks=xNew<int>(numnodes);
++	minranks=xNew<int>(numnodes);
+ 
+ 	for(i=0;i<numnodes;i++)ranks[i]=num_procs; //no cpu can have rank num_procs. This is the maximum limit.
+ 
+@@ -189,8 +189,8 @@
+ 	}
+ 
+ 	/*Free ressources: */
+-	xfree((void**)&ranks); 
+-	xfree((void**)&minranks);
++	xDelete<int>(ranks); 
++	xDelete<int>(minranks);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.cpp	(revision 12458)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.cpp	(revision 12459)
+@@ -214,10 +214,10 @@
+ 		if(!numberofresults) return;
+ 		#ifdef _HAVE_MPI_
+ 		if(my_rank!=minrank){
+-			resultsenums=(int*)xmalloc(numberofresults*sizeof(int));
+-			resultssizes=(int*)xmalloc(numberofresults*sizeof(int));
+-			resultstimes=(double*)xmalloc(numberofresults*sizeof(double));
+-			resultssteps=(int*)xmalloc(numberofresults*sizeof(int));
++			resultsenums=xNew<int>(numberofresults);
++			resultssizes=xNew<int>(numberofresults);
++			resultstimes=xNew<double>(numberofresults);
++			resultssteps=xNew<int>(numberofresults);
+ 		}
+ 		MPI_Bcast(resultsenums,numberofresults,MPI_INT,minrank,MPI_COMM_WORLD);
+ 		MPI_Bcast(resultssizes,numberofresults,MPI_INT,minrank,MPI_COMM_WORLD);
+@@ -249,7 +249,7 @@
+ 
+ 			/*clean up*/
+ 			xdelete(&vector);
+-			xfree((void**)&vector_serial);
++			xDelete<double>(vector_serial);
+ 		}
+ 	}
+ 	else{
+@@ -268,10 +268,10 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xfree((void**)&resultsenums);
+-	xfree((void**)&resultssizes);
+-	xfree((void**)&resultstimes);
+-	xfree((void**)&resultssteps);
++	xDelete<int>(resultsenums);
++	xDelete<int>(resultssizes);
++	xDelete<int>(resultssteps);
++	xDelete<double>(resultstimes);
+ 	delete patch;
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12458)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12459)
+@@ -161,7 +161,7 @@
+ 		*py=observation->y;
+ 		*pobs=observation->value;
+ 	}
+-	xfree((void**)&indices);
++	xDelete<int>(indices);
+ 
+ }/*}}}*/
+ /*FUNCTION Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double radius,int maxdata){{{*/
+@@ -188,8 +188,8 @@
+ 	/*Find all observations that are in radius*/
+ 	this->quadtree->RangeSearch(&tempindices,&tempnobs,x_interp,y_interp,radius);
+ 	if(tempnobs){
+-		indices = (int*)xmalloc(tempnobs*sizeof(int));
+-		dists   = (double*)xmalloc(tempnobs*sizeof(double));
++		indices = xNew<int>(tempnobs);
++		dists   = xNew<double>(tempnobs);
+ 	}
+ 	nobs = 0;
+ 	for (i=0;i<tempnobs;i++){
+@@ -224,14 +224,14 @@
+ 			if(stop) break;
+ 		}
+ 	}  
+-	xfree((void**)&dists);
+-	xfree((void**)&tempindices);
++	xDelete<double>(dists);
++	xDelete<int>(tempindices);
+ 
+ 	if(nobs){
+ 		/*Allocate vectors*/
+-		x   = (double*)xmalloc(nobs*sizeof(double));
+-		y   = (double*)xmalloc(nobs*sizeof(double));
+-		obs = (double*)xmalloc(nobs*sizeof(double));
++		x   = xNew<double>(nobs);
++		y   = xNew<double>(nobs);
++		obs = xNew<double>(nobs);
+ 
+ 		/*Loop over all observations and fill in x, y and obs*/
+ 		for (i=0;i<nobs;i++){
+@@ -241,7 +241,7 @@
+ 	}
+ 
+ 	/*Assign output pointer*/
+-	xfree((void**)&indices);
++	xDelete<int>(indices);
+ 	*px=x;
+ 	*py=y;
+ 	*pobs=obs;
+@@ -260,9 +260,9 @@
+ 	nobs = this->Size();
+ 
+ 	if(nobs){
+-		x   = (double*)xmalloc(nobs*sizeof(double));
+-		y   = (double*)xmalloc(nobs*sizeof(double));
+-		obs = (double*)xmalloc(nobs*sizeof(double));
++		x   = xNew<double>(nobs);
++		y   = xNew<double>(nobs);
++		obs = xNew<double>(nobs);
+ 		for(int i=0;i<this->Size();i++){
+ 			observation=(Observation*)this->GetObjectByOffset(i);
+ 			observation->WriteXYObs(&x[i],&y[i],&obs[i]);
+@@ -320,9 +320,9 @@
+ 
+ 	/*clean-up*/
+ 	*pprediction = prediction;
+-	xfree((void**)&x);
+-	xfree((void**)&y);
+-	xfree((void**)&obs);
++	xDelete<double>(x);
++	xDelete<double>(y);
++	xDelete<double>(obs);
+ }/*}}}*/
+ /*FUNCTION Observations::InterpolationKriging{{{*/
+ void Observations::InterpolationKriging(double *pprediction,double *perror,double x_interp,double y_interp,double radius,int mindata,int maxdata,Variogram* variogram){
+@@ -359,9 +359,9 @@
+ 	}
+ 
+ 	/*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  = xNew<double>(n_obs*n_obs);
++	gamma0 = xNew<double>(n_obs);
++	ones   = xNew<double>(n_obs);
+ 
+ 	/*First: Create semivariogram matrix for observations*/
+ 	for(i=0;i<n_obs;i++){
+@@ -400,15 +400,15 @@
+ 	/*clean-up*/
+ 	*pprediction = prediction;
+ 	*perror = error;
+-	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);
++	xDelete<double>(x);
++	xDelete<double>(y);
++	xDelete<double>(obs);
++	xDelete<double>(Gamma);
++	xDelete<double>(gamma0);
++	xDelete<double>(ones);
++	xDelete<double>(GinvG0);
++	xDelete<double>(Ginv1);
++	xDelete<double>(GinvZ);
+ 
+ }/*}}}*/
+ /*FUNCTION Observations::InterpolationNearestNeighbor{{{*/
+@@ -444,7 +444,7 @@
+ 	Observation *observation1 = NULL;
+ 	Observation *observation2 = NULL;
+ 
+-	double *counter = (double*)xmalloc(n*sizeof(double));
++	double *counter = xNew<double>(n);
+ 	for(j=0;j<n;j++) counter[j] = 0.0;
+ 	for(j=0;j<n;j++) gamma[j]   = 0.0;
+ 
+@@ -473,5 +473,5 @@
+ 	}
+ 
+ 	/*Assign output pointer*/
+-	xfree((void**)&counter);
++	xDelete<double>(counter);
+ }/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Vertices.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Vertices.cpp	(revision 12458)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Vertices.cpp	(revision 12459)
+@@ -59,7 +59,7 @@
+ 	 * 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*/
+-	alldofcount=(int*)xmalloc(num_procs*sizeof(int));
++	alldofcount=xNew<int>(num_procs);
+ 	#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);
+@@ -82,8 +82,8 @@
+ 	/* Finally, remember that cpus may have skipped some objects, because they were clones. For every 
+ 	 * object that is not a clone, tell them to show their dofs, so that later on, they can get picked 
+ 	 * up by their clones: */
+-	truedofs   =(int*)xcalloc(numberofobjects*numberofdofsperobject,sizeof(int));
+-	alltruedofs=(int*)xcalloc(numberofobjects*numberofdofsperobject,sizeof(int));
++	truedofs   =xNewZeroInit<int>(numberofobjects*numberofdofsperobject);
++	alltruedofs=xNewZeroInit<int>(numberofobjects*numberofdofsperobject);
+ 	for (i=0;i<this->Size();i++){
+ 		Vertex* vertex=(Vertex*)this->GetObjectByOffset(i);
+ 		vertex->ShowTrueDofs(truedofs);
+@@ -101,9 +101,9 @@
+ 	}
+ 
+ 	/* Free ressources: */
+-	xfree((void**)&alldofcount);
+-	xfree((void**)&truedofs);
+-	xfree((void**)&alltruedofs);
++	xDelete<int>(alldofcount);
++	xDelete<int>(truedofs);
++	xDelete<int>(alltruedofs);
+ }
+ /*}}}*/
+ /*FUNCTION Vertices::FlagClones{{{*/
+@@ -116,8 +116,8 @@
+ 	int* minranks=NULL;
+ 
+ 	/*Allocate ranks: */
+-	ranks=(int*)xmalloc(numberofobjects*sizeof(int));
+-	minranks=(int*)xmalloc(numberofobjects*sizeof(int));
++	ranks=xNew<int>(numberofobjects);
++	minranks=xNew<int>(numberofobjects);
+ 
+ 	for(i=0;i<numberofobjects;i++)ranks[i]=num_procs; //no cpu can have rank num_procs. This is the maximum limit.
+ 
+@@ -142,8 +142,8 @@
+ 	}
+ 
+ 	/*Free ressources: */
+-	xfree((void**)&ranks); 
+-	xfree((void**)&minranks);
++	xDelete<int>(ranks); 
++	xDelete<int>(minranks);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12458)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12459)
+@@ -58,11 +58,11 @@
+ 	copy->sorted=sorted;
+ 	copy->presorted=presorted;
+ 	if(sorted_ids){
+-		copy->sorted_ids=(int*)xmalloc(objects.size()*sizeof(int));
++		copy->sorted_ids=xNew<int>(objects.size());
+ 		memcpy(copy->sorted_ids,sorted_ids,objects.size()*sizeof(int));
+ 	}
+ 	if(id_offsets){
+-		copy->id_offsets=(int*)xmalloc(objects.size()*sizeof(int));
++		copy->id_offsets=xNew<int>(objects.size());
+ 		memcpy(copy->id_offsets,id_offsets,objects.size()*sizeof(int));
+ 	}
+ 
+@@ -79,8 +79,8 @@
+ /*FUNCTION DataSet::~DataSet{{{*/
+ DataSet::~DataSet(){
+ 	clear();
+-	xfree((void**)&sorted_ids);
+-	xfree((void**)&id_offsets);
++	xDelete<int>(sorted_ids);
++	xDelete<int>(id_offsets);
+ }
+ /*}}}*/
+ 
+@@ -220,12 +220,12 @@
+ 	if(objects.size()){
+ 
+ 		/*Delete existing ids*/
+-		xfree((void**)&sorted_ids);
+-		xfree((void**)&id_offsets);
++		xDelete<int>(sorted_ids);
++		xDelete<int>(id_offsets);
+ 
+ 		/*Allocate new ids*/
+-		sorted_ids=(int*)xmalloc(objects.size()*sizeof(int));
+-		id_offsets=(int*)xmalloc(objects.size()*sizeof(int));
++		sorted_ids=xNew<int>(objects.size());
++		id_offsets=xNew<int>(objects.size());
+ 
+ 		/*Build id_offsets and sorted_ids*/
+ 		for(i=0;i<objects.size();i++){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.cpp	(revision 12458)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.cpp	(revision 12459)
+@@ -221,7 +221,7 @@
+ 	/*Else, the Option does not exist, a default is provided here*/
+ 	else{
+ 		stringsize=strlen(default_value)+1;
+-		outstring=(char*)xmalloc(stringsize*sizeof(char));
++		outstring=xNew<char>(stringsize);
+ 		memcpy(outstring,default_value,stringsize*sizeof(char));
+ 		*pvalue=outstring;
+ 	}
+@@ -245,7 +245,7 @@
+ 		/*If the object is a Cell, copy the strings from its options dataset*/ 
+ 		if(option->ObjectEnum()==OptionCellEnum){
+ 			if (option->NumEl()) {
+-				*ppvalue=(char **) xmalloc(option->NumEl()*sizeof(char *));
++				*ppvalue=xNew<char*>(option->NumEl());
+ 				if (numel) *numel=option->NumEl();
+ 				option->Get(&options);
+ 				for (i=0; i<option->NumEl(); i++) {
Index: /issm/oecreview/Archive/12321-12677/ISSM-12459-12460.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12459-12460.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12459-12460.diff	(revision 12679)
@@ -0,0 +1,60 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp	(revision 12459)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp	(revision 12460)
+@@ -8,23 +8,45 @@
+ 
+ #include <stdarg.h>
+ #include <stdio.h>
++#include "../Alloc/xNewDelete.h"
+ #include "../Alloc/alloc.h"
+ 
+ char* exprintf(const char* format,...){
+ 
+ 	/*returned string: */
+-	char* string=NULL;
++	char *buffer = NULL;
++	int   n,size = 100;
++	int   string_size;
+ 
+-	/*Assum nobody will print more that 1024 characters!*/
+-	string=(char*)xmalloc(1024*sizeof(char));//assume that nobody will print more than 1024 characters at once.
+-                                                                                                                                                                                                     
+ 	//variable list of arguments
+-	va_list ap;
++	va_list args;
+ 
+-	//First use vsprintf to get the whole input string.
+-	va_start(ap,format);
+-	vsprintf(string,format,ap); //printf style coding 
+-	va_end(ap); 
++	while(true){
+ 
+-	return string;
++		/*allocate buffer for given string size*/
++		//buffer=xNew<char>(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 */
++
++		xDelete<char>(buffer);
++	}
++
++	return buffer;
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12460-12461.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12460-12461.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12460-12461.diff	(revision 12679)
@@ -0,0 +1,14 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp	(revision 12460)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp	(revision 12461)
+@@ -45,7 +45,8 @@
+ 		else       /* glibc 2.0 */
+ 		 size*=2;  /* twice the old size */
+ 
+-		xDelete<char>(buffer);
++		//xDelete<char>(buffer);
++		xfree((void**)&buffer);
+ 	}
+ 
+ 	return buffer;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12461-12462.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12461-12462.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12461-12462.diff	(revision 12679)
@@ -0,0 +1,191 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.h	(revision 12461)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.h	(revision 12462)
+@@ -17,7 +17,7 @@
+ 		int	sid; /*! id, to track it*/
+ 		int	nodeid; /*!node id*/
+ 		int dof; /*!component*/
+-		double value; /*value*/
++		IssmDouble value; /*value*/
+ 		bool isset;
+ 		int analysis_type;
+ 
+@@ -43,8 +43,8 @@
+ 		/*SpcDynamic management:{{{ */
+ 		int    GetNodeId();
+ 		int    GetDof();
+-		double GetValue();
+-		void   SetDynamicConstraint(Nodes* nodes,double *yg_serial);
++		IssmDouble GetValue();
++		void   SetDynamicConstraint(Nodes* nodes,IssmDouble *yg_serial);
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.h	(revision 12461)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.h	(revision 12462)
+@@ -17,14 +17,14 @@
+ 		int	sid; /*! id, to track it*/
+ 		int	nodeid; /*!node id*/
+ 		int dof; /*!component*/
+-		double value; /*value*/
++		IssmDouble value; /*value*/
+ 		int analysis_type;
+ 
+ 	public:
+ 
+ 		/*SpcStatic constructors, destructors:{{{*/
+ 		SpcStatic();
+-		SpcStatic(int sid,int nodeid, int dof,double value,int analysis_type);
++		SpcStatic(int sid,int nodeid, int dof,IssmDouble value,int analysis_type);
+ 		~SpcStatic();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -42,7 +42,7 @@
+ 		/*SpcStatic management:{{{ */
+ 		int    GetNodeId();
+ 		int    GetDof();
+-		double GetValue();
++		IssmDouble GetValue();
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.h	(revision 12461)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.h	(revision 12462)
+@@ -17,8 +17,8 @@
+ 		int	sid; /*! id, to track it*/
+ 		int	nodeid; /*!node id*/
+ 		int dof; /*!component*/
+-		double* values; /*different values in time*/
+-		double* times; /*different time steps*/
++		IssmDouble* values; /*different values in time*/
++		IssmDouble* times; /*different time steps*/
+ 		int nsteps; /*number of time steps*/
+ 		int analysis_type;
+ 
+@@ -26,7 +26,7 @@
+ 
+ 		/*SpcTransient constructors, destructors:{{{*/
+ 		SpcTransient();
+-		SpcTransient(int sid,int nodeid, int dof,int nsteps, double* times, double* values,int analysis_type);
++		SpcTransient(int sid,int nodeid, int dof,int nsteps, IssmDouble* times, IssmDouble* values,int analysis_type);
+ 		~SpcTransient();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -44,7 +44,7 @@
+ 		/*SpcTransient management:{{{ */
+ 		int    GetNodeId();
+ 		int    GetDof();
+-		double GetValue();
++		IssmDouble GetValue();
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp	(revision 12461)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp	(revision 12462)
+@@ -121,14 +121,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION SpcDynamic::GetValue {{{*/
+-double SpcDynamic::GetValue(){
++IssmDouble SpcDynamic::GetValue(){
+ 	_assert_(this->isset);
+ 	_assert_(!isnan(value));
+ 	return value;
+ }
+ /*}}}*/
+ /*FUNCTION SpcDynamic::SetDynamicConstraint {{{*/
+-void SpcDynamic::SetDynamicConstraint(Nodes* nodes,double* yg_serial){
++void SpcDynamic::SetDynamicConstraint(Nodes* nodes,IssmDouble* yg_serial){
+ 
+ 	int pos;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp	(revision 12461)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp	(revision 12462)
+@@ -23,7 +23,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION SpcStatic::SpcStatic(int spc_sid,int spc_nodeid,...){{{*/
+-SpcStatic::SpcStatic(int spc_sid,int spc_nodeid, int spc_dof,double spc_value,int spc_analysis_type){
++SpcStatic::SpcStatic(int spc_sid,int spc_nodeid, int spc_dof,IssmDouble spc_value,int spc_analysis_type){
+ 
+ 	sid=spc_sid;
+ 	nodeid=spc_nodeid;
+@@ -122,7 +122,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION SpcStatic::GetValue {{{*/
+-double SpcStatic::GetValue(){
++IssmDouble SpcStatic::GetValue(){
+ 	_assert_(!isnan(value));
+ 	return value;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12461)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12462)
+@@ -30,17 +30,17 @@
+ }
+ /*}}}*/
+ /*FUNCTION SpcTransient::SpcTransient(int spc_sid,int spc_nodeid,...){{{*/
+-SpcTransient::SpcTransient(int spc_sid,int spc_nodeid, int spc_dof,int spc_nsteps, double* spc_times, double* spc_values,int spc_analysis_type){
++SpcTransient::SpcTransient(int spc_sid,int spc_nodeid, int spc_dof,int spc_nsteps, IssmDouble* spc_times, IssmDouble* spc_values,int spc_analysis_type){
+ 
+ 	sid=spc_sid;
+ 	nodeid=spc_nodeid;
+ 	dof=spc_dof;
+ 	nsteps=spc_nsteps;
+ 	if(spc_nsteps){
+-		values=xNew<double>(spc_nsteps);
+-		times=xNew<double>(spc_nsteps);
+-		memcpy(values,spc_values,nsteps*sizeof(double));
+-		memcpy(times,spc_times,nsteps*sizeof(double));
++		values=xNew<IssmDouble>(spc_nsteps);
++		times=xNew<IssmDouble>(spc_nsteps);
++		xMemCpy<IssmDouble>(values,spc_values,nsteps);
++		xMemCpy<IssmDouble>(times,spc_times,nsteps);
+ 	}
+ 	analysis_type=spc_analysis_type;
+ 	return;
+@@ -48,8 +48,8 @@
+ /*}}}*/
+ /*FUNCTION SpcTransient::~SpcTransient{{{*/
+ SpcTransient::~SpcTransient(){
+-	xDelete<double>(times);
+-	xDelete<double>(values);
++	xDelete<IssmDouble>(times);
++	xDelete<IssmDouble>(values);
+ 	return;
+ }
+ /*}}}*/
+@@ -111,10 +111,10 @@
+ void SpcTransient::ConstrainNode(Nodes* nodes,Parameters* parameters){
+ 
+ 	Node* node=NULL;
+-	double time=0;
++	IssmDouble time=0;
+ 	int    i;
+-	double alpha=-1;
+-	double value;
++	IssmDouble alpha=-1;
++	IssmDouble value;
+ 	bool   found=false;
+ 
+ 	/*Chase through nodes and find the node to which this SpcTransient applys: */
+@@ -169,7 +169,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION SpcTransient::GetValue {{{*/
+-double SpcTransient::GetValue(){
++IssmDouble SpcTransient::GetValue(){
+ 	return values[0];
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12462-12463.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12462-12463.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12462-12463.diff	(revision 12679)
@@ -0,0 +1,253 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h	(revision 12462)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h	(revision 12463)
+@@ -16,15 +16,15 @@
+ 
+ 	private: 
+ 		int    enum_type;
+-		double values[3];
++		IssmDouble values[3];
+ 		int    step;
+-		double time;
++		IssmDouble time;
+ 
+ 	public:
+ 
+ 		/*TriaP1ElementResult constructors, destructors: {{{*/
+ 		TriaP1ElementResult();
+-		TriaP1ElementResult(int enum_type,double* values,int step,double time);
++		TriaP1ElementResult(int enum_type,IssmDouble* values,int step,IssmDouble time);
+ 		~TriaP1ElementResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -37,7 +37,7 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+-		double  GetTime(void){return time;};
++		IssmDouble  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12462)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12463)
+@@ -23,8 +23,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1ElementResult::PentaP1ElementResult(int in_enum_type,double* in_values,int in_step, double in_time){{{*/
+-PentaP1ElementResult::PentaP1ElementResult(int in_enum_type,double* in_values,int in_step, double in_time){
++/*FUNCTION PentaP1ElementResult::PentaP1ElementResult(int in_enum_type,IssmDouble* in_values,int in_step, IssmDouble in_time){{{*/
++PentaP1ElementResult::PentaP1ElementResult(int in_enum_type,IssmDouble* in_values,int in_step, IssmDouble in_time){
+ 
+ 	int i;
+ 
+@@ -94,7 +94,7 @@
+ 
+ 	/*output*/
+ 	TriaP1ElementResult* outresult=NULL;
+-	double newvalues[3];
++	IssmDouble newvalues[3];
+ 
+ 	/*Loop over the new indices*/
+ 	for(int i=0;i<3;i++){
+@@ -139,10 +139,10 @@
+ /*FUNCTION PentaP1ElementResult::GetVectorFromResults{{{*/
+ void PentaP1ElementResult::GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){
+ 
+-	double data[6];
++	IssmDouble data[6];
+ 
+ 	if(numdofs!=6)_error_("Result %s is a PentaP1ElementResult and cannot write vector of %i dofs",numdofs);
+-	for(int i=0;i<6;i++) data[i]=this->values[i]/(double)connectivitylist[i];
++	for(int i=0;i<6;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i];
+ 	vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
+ 
+ } /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp	(revision 12462)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp	(revision 12463)
+@@ -23,8 +23,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleElementResult::DoubleElementResult(int in_enum_type,IssmDouble in_value,int in_step, double in_time){{{*/
+-DoubleElementResult::DoubleElementResult(int in_enum_type,IssmDouble in_value,int in_step, double in_time){
++/*FUNCTION DoubleElementResult::DoubleElementResult(int in_enum_type,IssmDouble in_value,int in_step, IssmDouble in_time){{{*/
++DoubleElementResult::DoubleElementResult(int in_enum_type,IssmDouble in_value,int in_step, IssmDouble in_time){
+ 
+ 	enum_type=in_enum_type;
+ 	value=in_value;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 12462)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 12463)
+@@ -23,8 +23,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION BoolElementResult::BoolElementResult(int in_enum_type,IssmDouble in_value,int in_step, double in_time){{{*/
+-BoolElementResult::BoolElementResult(int in_enum_type,bool in_value,int in_step, double in_time){
++/*FUNCTION BoolElementResult::BoolElementResult(int in_enum_type,IssmDouble in_value,int in_step, IssmDouble in_time){{{*/
++BoolElementResult::BoolElementResult(int in_enum_type,bool in_value,int in_step, IssmDouble in_time){
+ 
+ 	enum_type=in_enum_type;
+ 	value=in_value;
+@@ -121,8 +121,8 @@
+ 	 /*Here, we fill the result information into the patch object. First, let's remember what is in a row 
+ 	  * of the patch object: enum_type step time element_id interpolation vertices_ids nodal_values
+ 	  * Here, we will supply the enum_type, step, time, interpolation and nodal_values: */
+-	double doublevalue=this->value?1:0;
+-	patch->fillresultinfo(row,this->enum_type,this->step,this->time,P0Enum,&doublevalue,1);
++	IssmDouble IssmDoublevalue=this->value?1:0;
++	patch->fillresultinfo(row,this->enum_type,this->step,this->time,P0Enum,&IssmDoublevalue,1);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h	(revision 12462)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h	(revision 12463)
+@@ -17,15 +17,15 @@
+ 
+ 	private: 
+ 		int    enum_type;
+-		double values[6];
++		IssmDouble values[6];
+ 		int    step;
+-		double time;
++		IssmDouble time;
+ 
+ 	public:
+ 
+ 		/*PentaP1ElementResult constructors, destructors: {{{*/
+ 		PentaP1ElementResult();
+-		PentaP1ElementResult(int enum_type,double* values,int step, double time);
++		PentaP1ElementResult(int enum_type,IssmDouble* values,int step, IssmDouble time);
+ 		~PentaP1ElementResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -38,7 +38,7 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+-		double  GetTime(void){return time;};
++		IssmDouble  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 12462)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 12463)
+@@ -1,6 +1,6 @@
+ /*! \file DoubleElementResult.h 
+- *  \brief: header file for double result object
+- *  A double result object is just derived from a DoubleInput object, with additional time and step information.
++ *  \brief: header file for IssmDouble result object
++ *  A IssmDouble result object is just derived from a DoubleInput object, with additional time and step information.
+  */
+ 
+ 
+@@ -18,15 +18,15 @@
+ 
+ 	private: 
+ 		int    enum_type;
+-		double value;
++		IssmDouble value;
+ 		int    step;
+-		double time;
++		IssmDouble time;
+ 
+ 	public:
+ 
+ 		/*DoubleElementResult constructors, destructors: {{{*/
+ 		DoubleElementResult();
+-		DoubleElementResult(int enum_type,double value,int step,double time);
++		DoubleElementResult(int enum_type,IssmDouble value,int step,IssmDouble time);
+ 		~DoubleElementResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -39,7 +39,7 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+-		double  GetTime(void){return time;};
++		IssmDouble  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 12462)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 12463)
+@@ -20,13 +20,13 @@
+ 		int    enum_type;
+ 		bool   value;
+ 		int    step;
+-		double time;
++		IssmDouble time;
+ 
+ 	public:
+ 
+ 		/*BoolElementResult constructors, destructors: {{{*/
+ 		BoolElementResult();
+-		BoolElementResult(int enum_type,bool value,int step,double time);
++		BoolElementResult(int enum_type,bool value,int step,IssmDouble time);
+ 		~BoolElementResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -39,7 +39,7 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+-		double  GetTime(void){return time;};
++		IssmDouble  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12462)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12463)
+@@ -23,8 +23,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1ElementResult::TriaP1ElementResult(int in_enum_type,double* in_values,int in_step, double in_time){{{*/
+-TriaP1ElementResult::TriaP1ElementResult(int in_enum_type,double* in_values,int in_step, double in_time){
++/*FUNCTION TriaP1ElementResult::TriaP1ElementResult(int in_enum_type,IssmDouble* in_values,int in_step, IssmDouble in_time){{{*/
++TriaP1ElementResult::TriaP1ElementResult(int in_enum_type,IssmDouble* in_values,int in_step, IssmDouble in_time){
+ 
+ 	enum_type=in_enum_type;
+ 	values[0]=in_values[0];
+@@ -127,10 +127,10 @@
+ /*FUNCTION TriaP1ElementResult::GetVectorFromResults{{{*/
+ void TriaP1ElementResult::GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){
+ 
+-	double data[3];
++	IssmDouble data[3];
+ 
+ 	if(numdofs!=3)_error_("Result %s is a TriaP1ElementResult and cannot write vector of %i dofs",numdofs);
+-	for(int i=0;i<3;i++) data[i]=this->values[i]/(double)connectivitylist[i];
++	for(int i=0;i<3;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i];
+ 	vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
+ 
+ } /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/ElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 12462)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 12463)
+@@ -18,7 +18,7 @@
+ 		virtual        ~ElementResult(){};
+ 		
+ 		virtual         ElementResult* SpawnTriaElementResult(int* indices)=0;
+-		virtual double  GetTime(void)=0;
++		virtual IssmDouble  GetTime(void)=0;
+ 		virtual int     GetStep(void)=0;
+ 		virtual void    ProcessUnits(Parameters* parameters)=0;
+ 		virtual int     NumberOfNodalValues(void)=0;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12463-12464.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12463-12464.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12463-12464.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/ncview/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/ncview/install.sh	(revision 12463)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/ncview/install.sh	(revision 12464)
+@@ -17,7 +17,7 @@
+ #Configure doxygen
+ cd install
+ ./configure \
+-	--prefix "$ISSM_DIR/externalpackages/ncview/install" \
++	--prefix="$ISSM_DIR/externalpackages/ncview/install" \
+ 	--x-libraries=/usr/X11/lib/ \
+ 	--x-includes=/usr/X11/include/ \
+ 	--with-netcdf_incdir="$ISSM_DIR/externalpackages/netcdf/install/include/" \
Index: /issm/oecreview/Archive/12321-12677/ISSM-12464-12465.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12464-12465.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12464-12465.diff	(revision 12679)
@@ -0,0 +1,450 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12465)
+@@ -25,8 +25,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatExternalResult::DoubleMatExternalResult(int in_id, int enum_type,IssmDoubleMat values,int M,int N,int in_step,double in_time){{{*/
+-DoubleMatExternalResult::DoubleMatExternalResult(int in_id, int in_enum_type,double* in_values, int in_M,int in_N,int in_step,double in_time){
++/*FUNCTION DoubleMatExternalResult::DoubleMatExternalResult(int in_id, int enum_type,IssmDoubleMat values,int M,int N,int in_step,IssmPDouble in_time){{{*/
++DoubleMatExternalResult::DoubleMatExternalResult(int in_id, int in_enum_type,IssmPDouble* in_values, int in_M,int in_N,int in_step,IssmPDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+@@ -35,8 +35,8 @@
+ 
+ 	/*Copy result in values*/
+ 	if(M*N){
+-		values=xNew<double>(M*N);
+-		memcpy(values,in_values,M*N*sizeof(double));
++		values=xNew<IssmPDouble>(M*N);
++		xMemCpy<IssmPDouble>(values,in_values,M*N);
+ 	}
+ 	else values=NULL;
+ 
+@@ -47,7 +47,7 @@
+ /*FUNCTION DoubleMatExternalResult::~DoubleMatExternalResult(){{{*/
+ DoubleMatExternalResult::~DoubleMatExternalResult(){
+ 
+-	xDelete<double>(this->values);
++	xDelete<IssmPDouble>(this->values);
+ 	return;
+ }
+ /*}}}*/
+@@ -133,17 +133,17 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(double),1,fid);
++	fwrite(&time,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+-	/*writing a double array, type is 3:*/
++	/*writing a IssmPDouble array, type is 3:*/
+ 	type=3;
+ 	fwrite(&type,sizeof(int),1,fid);
+ 	rows=this->M;
+ 	fwrite(&rows,sizeof(int),1,fid);
+ 	cols=this->N;
+ 	fwrite(&cols,sizeof(int),1,fid);
+-	fwrite(this->values,cols*rows*sizeof(double),1,fid);
++	fwrite(this->values,cols*rows*sizeof(IssmPDouble),1,fid);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12465)
+@@ -26,7 +26,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PetscVecExternalResult::PetscVecExternalResult(int enum_type,IssmPetscVec value){{{*/
+-PetscVecExternalResult::PetscVecExternalResult(int in_id, int in_enum_type,Vector* in_value,int in_step, double in_time){
++PetscVecExternalResult::PetscVecExternalResult(int in_id, int in_enum_type,Vector* in_value,int in_step, IssmPDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+@@ -102,7 +102,7 @@
+ 	int     type;
+ 	int     size;
+ 	char   *name      = NULL;
+-	double *serialvec = NULL;
++	IssmPDouble *serialvec = NULL;
+ 	extern int my_rank;
+ 
+ 	/*serialize: */
+@@ -120,15 +120,15 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(double),1,fid);
++	fwrite(&time,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+-	/*writing a double, type is 1, size is 1: */
++	/*writing a IssmPDouble, type is 1, size is 1: */
+ 	type=1;
+ 	
+ 	fwrite(&type,sizeof(int),1,fid);
+ 	fwrite(&size,sizeof(int),1,fid);
+-	fwrite(serialvec,size*sizeof(double),1,fid);
++	fwrite(serialvec,size*sizeof(IssmPDouble),1,fid);
+ 
+ 	/*Free ressources:*/
+ 	xDelete<char>(serialvec);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h	(revision 12465)
+@@ -26,15 +26,15 @@
+ 	private: 
+ 		int id;
+ 		int enum_type;
+-		double* values;
++		IssmPDouble* values;
+ 		int M;
+ 		int step;
+-		double time;
++		IssmPDouble time;
+ 
+ 	public:
+ 		/*DoubleVecExternalResult constructors, destructors: {{{*/
+ 		DoubleVecExternalResult();
+-		DoubleVecExternalResult(int id,int enum_type,double* values,int M,int step, double time);
++		DoubleVecExternalResult(int id,int enum_type,IssmPDouble* values,int M,int step, IssmPDouble time);
+ 		~DoubleVecExternalResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h	(revision 12465)
+@@ -28,14 +28,14 @@
+ 	public:
+ 		int    id;
+ 		int    enum_type;
+-		double value;
++		IssmPDouble value;
+ 		int    step;
+-		double time;
++		IssmPDouble time;
+ 
+ 
+ 		/*DoubleExternalResult constructors, destructors: {{{*/
+ 		DoubleExternalResult();
+-		DoubleExternalResult(int id,int enum_type,double value,int step,double time);
++		DoubleExternalResult(int id,int enum_type,IssmPDouble value,int step,IssmPDouble time);
+ 		~DoubleExternalResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h	(revision 12465)
+@@ -27,12 +27,12 @@
+ 		int    enum_type;
+ 		int    value;
+ 		int    step;
+-		double time;
++		IssmPDouble time;
+ 
+ 
+ 		/*IntExternalResult constructors, destructors: {{{*/
+ 		IntExternalResult();
+-		IntExternalResult(int id,int enum_type,int value,int step,double time);
++		IntExternalResult(int id,int enum_type,int value,int step,IssmPDouble time);
+ 		~IntExternalResult();
+ 
+ 		/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h	(revision 12465)
+@@ -29,11 +29,11 @@
+ 		int    enum_type;
+ 		bool   value;
+ 		int    step;
+-		double time;
++		IssmPDouble time;
+ 
+ 		/*BoolExternalResult constructors, destructors: {{{*/
+ 		BoolExternalResult();
+-		BoolExternalResult(int id, int enum_type,bool value,int step,double time);
++		BoolExternalResult(int id, int enum_type,bool value,int step,IssmPDouble time);
+ 		~BoolExternalResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h	(revision 12465)
+@@ -26,16 +26,16 @@
+ 	private: 
+ 		int id;
+ 		int enum_type;
+-		double* values;
++		IssmPDouble* values;
+ 		int M;
+ 		int N;
+ 		int step;
+-		double time;
++		IssmPDouble time;
+ 
+ 	public:
+ 		/*DoubleMatExternalResult constructors, destructors: {{{*/
+ 		DoubleMatExternalResult();
+-		DoubleMatExternalResult(int id,int enum_type,double* values,int M,int N,int step, double time);
++		DoubleMatExternalResult(int id,int enum_type,IssmPDouble* values,int M,int N,int step, IssmPDouble time);
+ 		~DoubleMatExternalResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h	(revision 12465)
+@@ -29,12 +29,12 @@
+ 		int enum_type;
+ 		Vector* value;
+ 		int step;
+-		double time;
++		IssmPDouble time;
+ 
+ 	public:
+ 		/*PetscVecExternalResult constructors, destructors: {{{*/
+ 		PetscVecExternalResult();
+-		PetscVecExternalResult(int id,int enum_type,Vector* value, int step, double time);
++		PetscVecExternalResult(int id,int enum_type,Vector* value, int step, IssmPDouble time);
+ 		~PetscVecExternalResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12465)
+@@ -26,13 +26,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION StringExternalResult::StringExternalResult(int enum_type,IssmString value){{{*/
+-StringExternalResult::StringExternalResult(int in_id, int in_enum_type,char* in_value,int in_step, double in_time){
++StringExternalResult::StringExternalResult(int in_id, int in_enum_type,char* in_value,int in_step, IssmPDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+ 	value=xNew<char>(strlen(in_value)+1);
+-	memcpy(value,in_value,(strlen(in_value)+1)*sizeof(char));
+-
++	xMemCpy<char>(value,in_value,(strlen(in_value)+1));
+ 	step=in_step;
+ 	time=in_time;
+ 	
+@@ -105,7 +104,7 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(double),1,fid);
++	fwrite(&time,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+ 	/*writing a string, type is 2: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12465)
+@@ -25,16 +25,16 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecExternalResult::DoubleVecExternalResult(int enum_type,IssmDoubleVec values,int M,int in_step,double in_time){{{*/
+-DoubleVecExternalResult::DoubleVecExternalResult(int in_id, int in_enum_type,double* in_values, int in_M,int in_step,double in_time){
++/*FUNCTION DoubleVecExternalResult::DoubleVecExternalResult(int enum_type,IssmDoubleVec values,int M,int in_step,IssmPDouble in_time){{{*/
++DoubleVecExternalResult::DoubleVecExternalResult(int in_id, int in_enum_type,IssmPDouble* in_values, int in_M,int in_step,IssmPDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+ 	M=in_M;
+ 
+ 	if(M){
+-		values=xNew<double>(M);
+-		memcpy(values,in_values,M*sizeof(double));
++		values=xNew<IssmPDouble>(M);
++		xMemCpy<IssmPDouble>(values,in_values,M);
+ 	}
+ 	else values=NULL;
+ 
+@@ -44,7 +44,7 @@
+ /*}}}*/
+ /*FUNCTION DoubleVecExternalResult::~DoubleVecExternalResult(){{{*/
+ DoubleVecExternalResult::~DoubleVecExternalResult(){
+-	xDelete<double>(values);
++	xDelete<IssmPDouble>(values);
+ 	return;
+ }
+ /*}}}*/
+@@ -122,15 +122,15 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(double),1,fid);
++	fwrite(&time,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+-	/*writing a double, type is 1, size is 1: */
++	/*writing a IssmPDouble, type is 1, size is 1: */
+ 	type=1;
+ 	size=this->M;
+ 	fwrite(&type,sizeof(int),1,fid);
+ 	fwrite(&size,sizeof(int),1,fid);
+-	fwrite(this->values,size*sizeof(double),1,fid);
++	fwrite(this->values,size*sizeof(IssmPDouble),1,fid);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12465)
+@@ -25,8 +25,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleExternalResult::DoubleExternalResult(int enum_type,double value){{{*/
+-DoubleExternalResult::DoubleExternalResult(int in_id, int in_enum_type,double in_value,int in_step, double in_time){
++/*FUNCTION DoubleExternalResult::DoubleExternalResult(int enum_type,IssmPDouble value){{{*/
++DoubleExternalResult::DoubleExternalResult(int in_id, int in_enum_type,IssmPDouble in_value,int in_step, IssmPDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+@@ -103,15 +103,15 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(double),1,fid);
++	fwrite(&time,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+-	/*writing a double, type is 1, size is 1: */
++	/*writing a IssmPDouble, type is 1, size is 1: */
+ 	type=1;
+ 	size=1;
+ 	fwrite(&type,sizeof(int),1,fid);
+ 	fwrite(&size,sizeof(int),1,fid);
+-	fwrite(&this->value,size*sizeof(double),1,fid);
++	fwrite(&this->value,size*sizeof(IssmPDouble),1,fid);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12465)
+@@ -25,8 +25,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION IntExternalResult::IntExternalResult(int in_id, int in_enum_type,int in_value,int in_step, double in_time){{{*/
+-IntExternalResult::IntExternalResult(int in_id, int in_enum_type,int in_value,int in_step, double in_time){
++/*FUNCTION IntExternalResult::IntExternalResult(int in_id, int in_enum_type,int in_value,int in_step, IssmPDouble in_time){{{*/
++IntExternalResult::IntExternalResult(int in_id, int in_enum_type,int in_value,int in_step, IssmPDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+@@ -90,7 +90,7 @@
+ 	int     type;
+ 	int     size;
+ 	char   *name    = NULL;
+-	double  integer;
++	IssmPDouble  integer;
+ 	extern  int my_rank;
+ 
+ 	/*return if now on cpu 0: */
+@@ -104,18 +104,18 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(double),1,fid);
++	fwrite(&time,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+-	/*cast to a double: */
+-	integer=(double)this->value;
++	/*cast to a IssmPDouble: */
++	integer=(IssmPDouble)this->value;
+ 
+-	/*writing a double, type is 1, size is 1: */
++	/*writing a IssmPDouble, type is 1, size is 1: */
+ 	type=1;
+ 	size=1;
+ 	fwrite(&type,sizeof(int),1,fid);
+ 	fwrite(&size,sizeof(int),1,fid);
+-	fwrite(&integer,size*sizeof(double),1,fid);
++	fwrite(&integer,size*sizeof(IssmPDouble),1,fid);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12465)
+@@ -26,7 +26,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION BoolExternalResult::BoolExternalResult(int enum_type,bool value){{{*/
+-BoolExternalResult::BoolExternalResult(int in_id, int in_enum_type,bool in_value,int in_step, double in_time){
++BoolExternalResult::BoolExternalResult(int in_id, int in_enum_type,bool in_value,int in_step, IssmPDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+@@ -89,7 +89,7 @@
+ 	int     length;
+ 	int     type;
+ 	int     size;
+-	double  boolean;
++	IssmPDouble  boolean;
+ 	extern  int my_rank;
+ 	char*   name = NULL;
+ 
+@@ -104,18 +104,18 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(double),1,fid);
++	fwrite(&time,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+ 	/*Now write bool, after casting it: */
+-	boolean=(double)this->value;
++	boolean=(IssmPDouble)this->value;
+ 
+-	/*writing a double, type is 1, size is 1: */
++	/*writing a IssmPDouble, type is 1, size is 1: */
+ 	type=1;
+ 	size=1;
+ 	fwrite(&type,sizeof(int),1,fid);
+ 	fwrite(&size,sizeof(int),1,fid);
+-	fwrite(&boolean,size*sizeof(double),1,fid);
++	fwrite(&boolean,size*sizeof(IssmPDouble),1,fid);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h	(revision 12464)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h	(revision 12465)
+@@ -29,12 +29,12 @@
+ 		int    enum_type;
+ 		char*  value;
+ 		int    step;
+-		double time;
++		IssmPDouble time;
+ 
+ 	public:
+ 		/*StringExternalResult constructors, destructors: {{{*/
+ 		StringExternalResult();
+-		StringExternalResult(int id,int enum_type,char* value,int step, double time);
++		StringExternalResult(int id,int enum_type,char* value,int step, IssmPDouble time);
+ 		~StringExternalResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
Index: /issm/oecreview/Archive/12321-12677/ISSM-12465-12466.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12465-12466.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12465-12466.diff	(revision 12679)
@@ -0,0 +1,752 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.h	(revision 12465)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.h	(revision 12466)
+@@ -19,8 +19,8 @@
+ 		/*numerics*/
+ 		int  AddOption(Option* in_oobject);
+ 		Option* GetOption(const char* name);
+-		void Get(double*  pvalue,const char* name);
+-		void Get(double*  pvalue,const char* name,double default_value);
++		void Get(IssmDouble*  pvalue,const char* name);
++		void Get(IssmDouble*  pvalue,const char* name,IssmDouble 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);
+@@ -28,7 +28,7 @@
+ 		void Get(char**   pvalue,const char* name);
+ 		void Get(char**   pvalue,const char* name,const char* default_value);
+ 		void Get(char***  pvalue,int* numel,const char* name);
+-		void Get(double** pvalue,int* numel,const char* name);
++		void Get(IssmDouble** pvalue,int* numel,const char* name);
+ };
+ 
+ #endif //ifndef _INPUTS_H_
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.cpp	(revision 12465)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.cpp	(revision 12466)
+@@ -84,8 +84,8 @@
+ 	_error_("could not find parameter %s",EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(double* pscalar, int enum_type){{{*/
+-void Parameters::FindParam(double* pscalar, int enum_type){ _assert_(this);
++/*FUNCTION Parameters::FindParam(IssmDouble* pscalar, int enum_type){{{*/
++void Parameters::FindParam(IssmDouble* pscalar, int enum_type){ _assert_(this);
+ 	
+ 	vector<Object*>::iterator object;
+ 	Param* param=NULL;
+@@ -173,8 +173,8 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM,int enum_type){{{*/
+-void Parameters::FindParam(double** pdoublearray,int* pM, int enum_type){ _assert_(this);
++/*FUNCTION Parameters::FindParam(IssmDouble** pIssmDoublearray,int* pM,int enum_type){{{*/
++void Parameters::FindParam(IssmDouble** pIssmDoublearray,int* pM, int enum_type){ _assert_(this);
+ 
+ 	vector<Object*>::iterator object;
+ 	Param* param=NULL;
+@@ -183,7 +183,7 @@
+ 
+ 		param=(Param*)(*object);
+ 		if(param->InstanceEnum()==enum_type){
+-			param->GetParameterValue(pdoublearray,pM);
++			param->GetParameterValue(pIssmDoublearray,pM);
+ 			return;
+ 		}
+ 	}
+@@ -191,8 +191,8 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){{{*/
+-void Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){ _assert_(this);
++/*FUNCTION Parameters::FindParam(IssmDouble** pIssmDoublearray,int* pM, int* pN,int enum_type){{{*/
++void Parameters::FindParam(IssmDouble** pIssmDoublearray,int* pM, int* pN,int enum_type){ _assert_(this);
+ 
+ 	vector<Object*>::iterator object;
+ 	Param* param=NULL;
+@@ -201,7 +201,7 @@
+ 
+ 		param=(Param*)(*object);
+ 		if(param->InstanceEnum()==enum_type){
+-			param->GetParameterValue(pdoublearray,pM,pN);
++			param->GetParameterValue(pIssmDoublearray,pM,pN);
+ 			return;
+ 		}
+ 	}
+@@ -209,8 +209,8 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::FindParam(double*** parray,int* pM,int** pmdims_array,int** pndims_array,int enum_type){{{*/
+-void Parameters::FindParam(double*** parray,int* pM,int** pmdims_array,int** pndims_array,int enum_type){ _assert_(this);
++/*FUNCTION Parameters::FindParam(IssmDouble*** parray,int* pM,int** pmdims_array,int** pndims_array,int enum_type){{{*/
++void Parameters::FindParam(IssmDouble*** parray,int* pM,int** pmdims_array,int** pndims_array,int enum_type){ _assert_(this);
+ 	
+ 	vector<Object*>::iterator object;
+ 	Param* param=NULL;
+@@ -304,8 +304,8 @@
+ 	else this->AddObject(new IntParam(enum_type,integer)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(double scalar,int enum_type);{{{*/
+-void   Parameters::SetParam(double scalar,int enum_type){
++/*FUNCTION Parameters::SetParam(IssmDouble scalar,int enum_type);{{{*/
++void   Parameters::SetParam(IssmDouble scalar,int enum_type){
+ 
+ 	Param* param=NULL;
+ 	
+@@ -340,28 +340,28 @@
+ 	else this->AddObject(new StringArrayParam(enum_type,stringarray,M)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(double* doublearray,int M,int enum_type);{{{*/
+-void   Parameters::SetParam(double* doublearray,int M, int enum_type){
++/*FUNCTION Parameters::SetParam(IssmDouble* IssmDoublearray,int M,int enum_type);{{{*/
++void   Parameters::SetParam(IssmDouble* IssmDoublearray,int M, int enum_type){
+ 
+ 	Param* param=NULL;
+ 	
+ 	/*first, figure out if the param has already been created: */
+ 	param=(Param*)this->FindParamObject(enum_type);
+ 
+-	if(param) param->SetValue(doublearray,M); //already exists, just set it.
+-	else this->AddObject(new DoubleVecParam(enum_type,doublearray,M)); //just add the new parameter.
++	if(param) param->SetValue(IssmDoublearray,M); //already exists, just set it.
++	else this->AddObject(new DoubleVecParam(enum_type,IssmDoublearray,M)); //just add the new parameter.
+ }
+ /*}}}*/
+-/*FUNCTION Parameters::SetParam(double* doublearray,int M,int N, int enum_type);{{{*/
+-void   Parameters::SetParam(double* doublearray,int M, int N, int enum_type){
++/*FUNCTION Parameters::SetParam(IssmDouble* IssmDoublearray,int M,int N, int enum_type);{{{*/
++void   Parameters::SetParam(IssmDouble* IssmDoublearray,int M, int N, int enum_type){
+ 
+ 	Param* param=NULL;
+ 	
+ 	/*first, figure out if the param has already been created: */
+ 	param=(Param*)this->FindParamObject(enum_type);
+ 
+-	if(param) param->SetValue(doublearray,M,N); //already exists, just set it.
+-	else this->AddObject(new DoubleMatParam(enum_type,doublearray,M,N)); //just add the new parameter.
++	if(param) param->SetValue(IssmDoublearray,M,N); //already exists, just set it.
++	else this->AddObject(new DoubleMatParam(enum_type,IssmDoublearray,M,N)); //just add the new parameter.
+ }
+ /*}}}*/
+ /*FUNCTION Parameters::SetParam(int* intarray,int M,int enum_type);{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.h	(revision 12465)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.h	(revision 12466)
+@@ -31,25 +31,25 @@
+ 
+ 		void  FindParam(bool* pinteger,int enum_type);
+ 		void  FindParam(int* pinteger,int enum_type);
+-		void  FindParam(double* pscalar, int enum_type);
++		void  FindParam(IssmDouble* pscalar, int enum_type);
+ 		void  FindParam(char** pstring,int enum_type);
+ 		void  FindParam(char*** pstringarray,int* pM,int enum_type);
+ 		void  FindParam(int** pintarray,int* pM,int enum_type);
+ 		void  FindParam(int** pintarray,int* pM,int* PN,int enum_type);
+-		void  FindParam(double** pdoublearray,int* pM,int enum_type);
+-		void  FindParam(double** pdoublearray,int* pM,int* pN,int enum_type);
+-		void  FindParam(double*** parray,int* pM, int** pmdims_array,int** pndims_array,int enum_type);
++		void  FindParam(IssmDouble** pIssmDoublearray,int* pM,int enum_type);
++		void  FindParam(IssmDouble** pIssmDoublearray,int* pM,int* pN,int enum_type);
++		void  FindParam(IssmDouble*** parray,int* pM, int** pmdims_array,int** pndims_array,int enum_type);
+ 		void  FindParam(Vector** pvec,int enum_type);
+ 		void  FindParam(Matrix** pmat,int enum_type);
+ 		void  FindParam(FILE** pfid,int enum_type);
+ 		
+ 		void  SetParam(bool boolean,int enum_type);
+ 		void  SetParam(int integer,int enum_type);
+-		void  SetParam(double scalar, int enum_type);
++		void  SetParam(IssmDouble scalar, int enum_type);
+ 		void  SetParam(char* string,int enum_type);
+ 		void  SetParam(char** stringarray,int M,int enum_type);
+-		void  SetParam(double* doublearray,int M,int enum_type);
+-		void  SetParam(double* doublearray,int M,int N,int enum_type);
++		void  SetParam(IssmDouble* IssmDoublearray,int M,int enum_type);
++		void  SetParam(IssmDouble* IssmDoublearray,int M,int N,int enum_type);
+ 		void  SetParam(int* intarray,int M,int enum_type);
+ 		void  SetParam(int* intarray,int M,int N,int enum_type);
+ 		void  SetParam(Vector* vec,int enum_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.cpp	(revision 12465)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.cpp	(revision 12466)
+@@ -172,8 +172,8 @@
+ 	int    *resultsenums = NULL;
+ 	int    *resultssizes  = NULL;
+ 	int    *resultssteps  = NULL;
+-	double *resultstimes = NULL;
+-	double *vector_serial= NULL;
++	IssmDouble *resultstimes = NULL;
++	IssmDouble *vector_serial= NULL;
+ 	Vector*     vector       = NULL;
+ 	bool   io_gather;
+ 	bool   results_as_patches;
+@@ -216,7 +216,7 @@
+ 		if(my_rank!=minrank){
+ 			resultsenums=xNew<int>(numberofresults);
+ 			resultssizes=xNew<int>(numberofresults);
+-			resultstimes=xNew<double>(numberofresults);
++			resultstimes=xNew<IssmDouble>(numberofresults);
+ 			resultssteps=xNew<int>(numberofresults);
+ 		}
+ 		MPI_Bcast(resultsenums,numberofresults,MPI_INT,minrank,MPI_COMM_WORLD);
+@@ -249,7 +249,7 @@
+ 
+ 			/*clean up*/
+ 			xdelete(&vector);
+-			xDelete<double>(vector_serial);
++			xDelete<IssmDouble>(vector_serial);
+ 		}
+ 	}
+ 	else{
+@@ -271,7 +271,7 @@
+ 	xDelete<int>(resultsenums);
+ 	xDelete<int>(resultssizes);
+ 	xDelete<int>(resultssteps);
+-	xDelete<double>(resultstimes);
++	xDelete<IssmDouble>(resultstimes);
+ 	delete patch;
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12465)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12466)
+@@ -33,14 +33,14 @@
+ 	return;
+ }
+ /*}}}*/
+-/*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){
++/*FUNCTION Observations::Observations(IssmDouble* observations_list,IssmDouble* x,IssmDouble* y,int n,Options* options){{{*/
++Observations::Observations(IssmDouble* observations_list,IssmDouble* x,IssmDouble* y,int n,Options* options){
+ 
+ 	/*Intermediaries*/
+ 	int          i,j,maxdepth,level,counter,index;
+ 	int          xi,yi;
+-	double       xmin,xmax,ymin,ymax;
+-	double       offset,minlength,minspacing,mintrimming,maxtrimming;
++	IssmDouble       xmin,xmax,ymin,ymax;
++	IssmDouble       offset,minlength,minspacing,mintrimming,maxtrimming;
+ 	int         *indices     = NULL;
+ 	Observation *observation = NULL;
+ 
+@@ -68,7 +68,7 @@
+ 	}
+ 	else{
+ 		maxdepth = 30;
+-		minlength=max(xmax-xmin,ymax-ymin)/double((1L<<maxdepth)-1);
++		minlength=max(xmax-xmin,ymax-ymin)/IssmDouble((1L<<maxdepth)-1);
+ 	}
+ 
+ 	/*Initialize Quadtree*/
+@@ -116,12 +116,12 @@
+ 
+ /*Methods*/
+ /*FUNCTION Observations::ClosestObservation{{{*/
+-void Observations::ClosestObservation(double *px,double *py,double *pobs,double x_interp,double y_interp,double radius){
++void Observations::ClosestObservation(IssmDouble *px,IssmDouble *py,IssmDouble *pobs,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius){
+ 
+ 	/*Output and Intermediaries*/
+ 	bool         stop;
+ 	int          nobs,i,index;
+-	double       h2,hmin2,radius2;
++	IssmDouble       h2,hmin2,radius2;
+ 	int         *indices      = NULL;
+ 	Observation *observation  = NULL;
+ 
+@@ -164,19 +164,19 @@
+ 	xDelete<int>(indices);
+ 
+ }/*}}}*/
+-/*FUNCTION Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double radius,int maxdata){{{*/
+-void Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double radius,int maxdata){
++/*FUNCTION Observations::ObservationList(IssmDouble **px,IssmDouble **py,IssmDouble **pobs,int* pnobs,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius,int maxdata){{{*/
++void Observations::ObservationList(IssmDouble **px,IssmDouble **py,IssmDouble **pobs,int* pnobs,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius,int maxdata){
+ 
+ 	/*Output and Intermediaries*/
+ 	bool         stop;
+ 	int          nobs,tempnobs,i,j,k,n,counter;
+-	double       h2,radius2;
++	IssmDouble       h2,radius2;
+ 	int         *indices      = NULL;
+ 	int         *tempindices  = NULL;
+-	double      *dists        = NULL;
+-	double      *x            = NULL;
+-	double      *y            = NULL;
+-	double      *obs          = NULL;
++	IssmDouble      *dists        = NULL;
++	IssmDouble      *x            = NULL;
++	IssmDouble      *y            = NULL;
++	IssmDouble      *obs          = NULL;
+ 	Observation *observation  = NULL;
+ 
+ 	/*If radius is not provided or is 0, return all observations*/
+@@ -189,7 +189,7 @@
+ 	this->quadtree->RangeSearch(&tempindices,&tempnobs,x_interp,y_interp,radius);
+ 	if(tempnobs){
+ 		indices = xNew<int>(tempnobs);
+-		dists   = xNew<double>(tempnobs);
++		dists   = xNew<IssmDouble>(tempnobs);
+ 	}
+ 	nobs = 0;
+ 	for (i=0;i<tempnobs;i++){
+@@ -224,14 +224,14 @@
+ 			if(stop) break;
+ 		}
+ 	}  
+-	xDelete<double>(dists);
++	xDelete<IssmDouble>(dists);
+ 	xDelete<int>(tempindices);
+ 
+ 	if(nobs){
+ 		/*Allocate vectors*/
+-		x   = xNew<double>(nobs);
+-		y   = xNew<double>(nobs);
+-		obs = xNew<double>(nobs);
++		x   = xNew<IssmDouble>(nobs);
++		y   = xNew<IssmDouble>(nobs);
++		obs = xNew<IssmDouble>(nobs);
+ 
+ 		/*Loop over all observations and fill in x, y and obs*/
+ 		for (i=0;i<nobs;i++){
+@@ -247,22 +247,22 @@
+ 	*pobs=obs;
+ 	*pnobs=nobs;
+ }/*}}}*/
+-/*FUNCTION Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs){{{*/
+-void Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs){
++/*FUNCTION Observations::ObservationList(IssmDouble **px,IssmDouble **py,IssmDouble **pobs,int* pnobs){{{*/
++void Observations::ObservationList(IssmDouble **px,IssmDouble **py,IssmDouble **pobs,int* pnobs){
+ 
+ 	/*Output and Intermediaries*/
+ 	int          nobs;
+-	double      *x            = NULL;
+-	double      *y            = NULL;
+-	double      *obs          = NULL;
++	IssmDouble      *x            = NULL;
++	IssmDouble      *y            = NULL;
++	IssmDouble      *obs          = NULL;
+ 	Observation *observation  = NULL;
+ 
+ 	nobs = this->Size();
+ 
+ 	if(nobs){
+-		x   = xNew<double>(nobs);
+-		y   = xNew<double>(nobs);
+-		obs = xNew<double>(nobs);
++		x   = xNew<IssmDouble>(nobs);
++		y   = xNew<IssmDouble>(nobs);
++		obs = xNew<IssmDouble>(nobs);
+ 		for(int i=0;i<this->Size();i++){
+ 			observation=(Observation*)this->GetObjectByOffset(i);
+ 			observation->WriteXYObs(&x[i],&y[i],&obs[i]);
+@@ -276,15 +276,15 @@
+ 	*pnobs=nobs;
+ }/*}}}*/
+ /*FUNCTION Observations::InterpolationIDW{{{*/
+-void Observations::InterpolationIDW(double *pprediction,double x_interp,double y_interp,double radius,int mindata,int maxdata,double power){
++void Observations::InterpolationIDW(IssmDouble *pprediction,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius,int mindata,int maxdata,IssmDouble power){
+ 
+ 	/*Intermediaries*/
+ 	int    i,n_obs;
+-	double prediction;
+-	double numerator,denominator,h,weight;
+-	double *x   = NULL;
+-	double *y   = NULL;
+-	double *obs = NULL;
++	IssmDouble prediction;
++	IssmDouble numerator,denominator,h,weight;
++	IssmDouble *x   = NULL;
++	IssmDouble *y   = NULL;
++	IssmDouble *obs = NULL;
+ 
+ 	/*Some checks*/
+ 	_assert_(maxdata>0);
+@@ -320,26 +320,26 @@
+ 
+ 	/*clean-up*/
+ 	*pprediction = prediction;
+-	xDelete<double>(x);
+-	xDelete<double>(y);
+-	xDelete<double>(obs);
++	xDelete<IssmDouble>(x);
++	xDelete<IssmDouble>(y);
++	xDelete<IssmDouble>(obs);
+ }/*}}}*/
+ /*FUNCTION Observations::InterpolationKriging{{{*/
+-void Observations::InterpolationKriging(double *pprediction,double *perror,double x_interp,double y_interp,double radius,int mindata,int maxdata,Variogram* variogram){
++void Observations::InterpolationKriging(IssmDouble *pprediction,IssmDouble *perror,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius,int mindata,int maxdata,Variogram* variogram){
+ 
+ 	/*Intermediaries*/
+ 	int           i,j,n_obs;
+-	double        prediction,error;
+-	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;
++	IssmDouble        prediction,error;
++	IssmDouble        numerator,denominator,ratio;
++	IssmDouble       *x            = NULL;
++	IssmDouble       *y            = NULL;
++	IssmDouble       *obs          = NULL;
++	IssmDouble       *Gamma        = NULL;
++	IssmDouble       *GinvG0       = NULL;
++	IssmDouble       *Ginv1        = NULL;
++	IssmDouble       *GinvZ        = NULL;
++	IssmDouble       *gamma0       = NULL;
++	IssmDouble       *ones         = NULL;
+ 
+ 	/*Some checks*/
+ 	_assert_(mindata>0 && maxdata>0);
+@@ -359,9 +359,9 @@
+ 	}
+ 
+ 	/*Allocate intermediary matrix and vectors*/
+-	Gamma  = xNew<double>(n_obs*n_obs);
+-	gamma0 = xNew<double>(n_obs);
+-	ones   = xNew<double>(n_obs);
++	Gamma  = xNew<IssmDouble>(n_obs*n_obs);
++	gamma0 = xNew<IssmDouble>(n_obs);
++	ones   = xNew<IssmDouble>(n_obs);
+ 
+ 	/*First: Create semivariogram matrix for observations*/
+ 	for(i=0;i<n_obs;i++){
+@@ -400,22 +400,22 @@
+ 	/*clean-up*/
+ 	*pprediction = prediction;
+ 	*perror = error;
+-	xDelete<double>(x);
+-	xDelete<double>(y);
+-	xDelete<double>(obs);
+-	xDelete<double>(Gamma);
+-	xDelete<double>(gamma0);
+-	xDelete<double>(ones);
+-	xDelete<double>(GinvG0);
+-	xDelete<double>(Ginv1);
+-	xDelete<double>(GinvZ);
++	xDelete<IssmDouble>(x);
++	xDelete<IssmDouble>(y);
++	xDelete<IssmDouble>(obs);
++	xDelete<IssmDouble>(Gamma);
++	xDelete<IssmDouble>(gamma0);
++	xDelete<IssmDouble>(ones);
++	xDelete<IssmDouble>(GinvG0);
++	xDelete<IssmDouble>(Ginv1);
++	xDelete<IssmDouble>(GinvZ);
+ 
+ }/*}}}*/
+ /*FUNCTION Observations::InterpolationNearestNeighbor{{{*/
+-void Observations::InterpolationNearestNeighbor(double *pprediction,double x_interp,double y_interp,double radius){
++void Observations::InterpolationNearestNeighbor(IssmDouble *pprediction,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius){
+ 
+ 	/*Intermediaries*/
+-	double        x,y,obs;
++	IssmDouble        x,y,obs;
+ 
+ 	/*Get clostest observation*/
+ 	this->ClosestObservation(&x,&y,&obs,x_interp,y_interp,radius);
+@@ -424,27 +424,27 @@
+ 	*pprediction = obs;
+ }/*}}}*/
+ /*FUNCTION Observations::QuadtreeColoring{{{*/
+-void Observations::QuadtreeColoring(double* A,double *x,double *y,int n){
++void Observations::QuadtreeColoring(IssmDouble* A,IssmDouble *x,IssmDouble *y,int n){
+ 
+ 	int xi,yi,level;
+ 
+ 	for(int i=0;i<n;i++){
+ 		this->quadtree->IntergerCoordinates(&xi,&yi,x[i],y[i]);
+ 		this->quadtree->QuadtreeDepth(&level,xi,yi);
+-		A[i]=(double)level;
++		A[i]=(IssmDouble)level;
+ 	}
+ 
+ }/*}}}*/
+ /*FUNCTION Observations::Variomap{{{*/
+-void Observations::Variomap(double* gamma,double *x,int n){
++void Observations::Variomap(IssmDouble* gamma,IssmDouble *x,int n){
+ 
+ 	/*Output and Intermediaries*/
+ 	int          i,j,k;
+-	double       distance;
++	IssmDouble       distance;
+ 	Observation *observation1 = NULL;
+ 	Observation *observation2 = NULL;
+ 
+-	double *counter = xNew<double>(n);
++	IssmDouble *counter = xNew<IssmDouble>(n);
+ 	for(j=0;j<n;j++) counter[j] = 0.0;
+ 	for(j=0;j<n;j++) gamma[j]   = 0.0;
+ 
+@@ -473,5 +473,5 @@
+ 	}
+ 
+ 	/*Assign output pointer*/
+-	xDelete<double>(counter);
++	xDelete<IssmDouble>(counter);
+ }/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.cpp	(revision 12465)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.cpp	(revision 12466)
+@@ -92,8 +92,8 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Inputs::GetInputValue(double* pvalue,int enum-type){{{*/
+-void Inputs::GetInputValue(double* pvalue,int enum_type){
++/*FUNCTION Inputs::GetInputValue(IssmDouble* pvalue,int enum-type){{{*/
++void Inputs::GetInputValue(IssmDouble* pvalue,int enum_type){
+ 
+ 	vector<Object*>::iterator object;
+ 	Input* input=NULL;
+@@ -121,7 +121,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Inputs::GetInputAverage{{{*/
+-void Inputs::GetInputAverage(double* pvalue,int enum_type){
++void Inputs::GetInputAverage(IssmDouble* pvalue,int enum_type){
+ 
+ 	vector<Object*>::iterator object;
+ 	Input* input=NULL;
+@@ -205,7 +205,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Inputs::ConstrainMin{{{*/
+-void  Inputs::ConstrainMin(int constrain_enum, double minimum){
++void  Inputs::ConstrainMin(int constrain_enum, IssmDouble minimum){
+ 	   
+ 	Input* constrain_input=NULL; 
+ 	/*Find x and y inputs: */
+@@ -219,10 +219,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Inputs::InfinityNorm{{{*/
+-double Inputs::InfinityNorm(int enumtype){
++IssmDouble Inputs::InfinityNorm(int enumtype){
+ 
+ 	/*Output*/
+-	double norm;
++	IssmDouble norm;
+ 
+ 	/*Get input*/
+ 	Input* input=(Input*)this->GetInput(enumtype);
+@@ -240,10 +240,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Inputs::Max{{{*/
+-double Inputs::Max(int enumtype){
++IssmDouble Inputs::Max(int enumtype){
+ 
+ 	/*Output*/
+-	double max;
++	IssmDouble max;
+ 
+ 	/*Get input*/
+ 	Input* input=(Input*)this->GetInput(enumtype);
+@@ -261,10 +261,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Inputs::MaxAbs{{{*/
+-double Inputs::MaxAbs(int enumtype){
++IssmDouble Inputs::MaxAbs(int enumtype){
+ 
+ 	/*Output*/
+-	double max;
++	IssmDouble max;
+ 
+ 	/*Get input*/
+ 	Input* input=(Input*)this->GetInput(enumtype);
+@@ -282,10 +282,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Inputs::Min{{{*/
+-double Inputs::Min(int enumtype){
++IssmDouble Inputs::Min(int enumtype){
+ 
+ 	/*Output*/
+-	double min;
++	IssmDouble min;
+ 
+ 	/*Get input*/
+ 	Input* input=(Input*)this->GetInput(enumtype);
+@@ -303,10 +303,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Inputs::MinAbs{{{*/
+-double Inputs::MinAbs(int enumtype){
++IssmDouble Inputs::MinAbs(int enumtype){
+ 
+ 	/*Output*/
+-	double min;
++	IssmDouble min;
+ 
+ 	/*Get input*/
+ 	Input* input=(Input*)this->GetInput(enumtype);
+@@ -405,7 +405,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Inputs::AXPY{{{*/
+-void  Inputs::AXPY(int MeshYEnum, double scalar, int MeshXEnum){
++void  Inputs::AXPY(int MeshYEnum, IssmDouble scalar, int MeshXEnum){
+ 	   
+ 	Input* xinput=NULL;
+ 	Input* yinput=NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.h	(revision 12465)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.h	(revision 12466)
+@@ -19,18 +19,18 @@
+ 
+ 		/*constructors, destructors*/
+ 		Observations();
+-		Observations(double* observations_list,double* x,double* y,int n,Options* options);
++		Observations(IssmDouble* observations_list,IssmDouble* x,IssmDouble* y,int n,Options* options);
+ 		~Observations();
+ 
+ 		/*Methods*/
+-		void ClosestObservation(double *px,double *py,double *pobs,double x_interp,double y_interp,double radius);
+-		void InterpolationIDW(double *pprediction,double x_interp,double y_interp,double radius,int mindata,int maxdata,double power);
+-		void InterpolationKriging(double *pprediction,double *perror,double x_interp,double y_interp,double radius,int mindata,int maxdata,Variogram* variogram);
+-		void InterpolationNearestNeighbor(double *pprediction,double x_interp,double y_interp,double radius);
+-		void ObservationList(double **px,double **py,double **pobs,int* pnobs);
+-		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);
++		void ClosestObservation(IssmDouble *px,IssmDouble *py,IssmDouble *pobs,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius);
++		void InterpolationIDW(IssmDouble *pprediction,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius,int mindata,int maxdata,IssmDouble power);
++		void InterpolationKriging(IssmDouble *pprediction,IssmDouble *perror,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius,int mindata,int maxdata,Variogram* variogram);
++		void InterpolationNearestNeighbor(IssmDouble *pprediction,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius);
++		void ObservationList(IssmDouble **px,IssmDouble **py,IssmDouble **pobs,int* pnobs);
++		void ObservationList(IssmDouble **px,IssmDouble **py,IssmDouble **pobs,int* pnobs,IssmDouble x_interp,IssmDouble y_interp,IssmDouble radius,int maxdata);
++		void QuadtreeColoring(IssmDouble* A,IssmDouble *x,IssmDouble *y,int n);
++		void Variomap(IssmDouble* gamma,IssmDouble *x,int n);
+ 
+ };
+ #endif //ifndef _OBSERVATIONS_H_
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12465)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12466)
+@@ -59,11 +59,11 @@
+ 	copy->presorted=presorted;
+ 	if(sorted_ids){
+ 		copy->sorted_ids=xNew<int>(objects.size());
+-		memcpy(copy->sorted_ids,sorted_ids,objects.size()*sizeof(int));
++		xMemCpy<int>(copy->sorted_ids,sorted_ids,objects.size());
+ 	}
+ 	if(id_offsets){
+ 		copy->id_offsets=xNew<int>(objects.size());
+-		memcpy(copy->id_offsets,id_offsets,objects.size()*sizeof(int));
++		xMemCpy<int>(copy->id_offsets,id_offsets,objects.size());
+ 	}
+ 
+ 	/*Now we need to deep copy the objects: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.h	(revision 12465)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.h	(revision 12466)
+@@ -30,22 +30,22 @@
+ 		/*numerics: {{{*/
+ 		int     AddInput(Input* in_input);
+ 		void    ChangeEnum(int enumtype,int new_enumtype);
+-		void    ConstrainMin(int constrain_enum, double minimum);
++		void    ConstrainMin(int constrain_enum, IssmDouble minimum);
+ 		int     DeleteInput(int enum_type);
+ 		void    DuplicateInput(int original_enum,int new_enum);
+ 		Input*  GetInput(int enum_name);
+ 		Inputs* SpawnTriaInputs(int* indices);
+-		void    AXPY(int MeshYEnum, double scalar, int MeshXEnum);
+-		double  InfinityNorm(int enumtype);
+-		double  Max(int enumtype);
+-		double  MaxAbs(int enumtype);
+-		double  Min(int enumtype);
+-		double  MinAbs(int enumtype);
++		void    AXPY(int MeshYEnum, IssmDouble scalar, int MeshXEnum);
++		IssmDouble  InfinityNorm(int enumtype);
++		IssmDouble  Max(int enumtype);
++		IssmDouble  MaxAbs(int enumtype);
++		IssmDouble  Min(int enumtype);
++		IssmDouble  MinAbs(int enumtype);
+ 		
+-		void GetInputAverage(double* pvalue, int enum_type);
++		void GetInputAverage(IssmDouble* pvalue, int enum_type);
+ 		void GetInputValue(bool* pvalue,int enum_type);
+ 		void GetInputValue(int* pvalue,int enum_type);
+-		void GetInputValue(double* pvalue,int enum_type);
++		void GetInputValue(IssmDouble* pvalue,int enum_type);
+ 
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Container.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Container.h	(revision 12465)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Container.h	(revision 12466)
+@@ -5,6 +5,7 @@
+ #ifndef _CONTAINER_CONTAINER_H_
+ #define  _CONTAINER_CONTAINER_H_
+ 
++#include "../include/include.h"
+ #include "./DataSet.h"
+ #include "./Constraints.h"
+ #include "./Elements.h"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.cpp	(revision 12465)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.cpp	(revision 12466)
+@@ -105,8 +105,8 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Options::Get(double* pvalue, char* name){{{*/
+-void Options::Get(double* pvalue,const char* name){
++/*FUNCTION Options::Get(IssmDouble* pvalue, char* name){{{*/
++void Options::Get(IssmDouble* pvalue,const char* name){
+ 
+ 	vector<Object*>::iterator object;
+ 	Option* option=NULL;
+@@ -124,8 +124,8 @@
+ 	}
+ }
+ /*}}}*/
+-/*FUNCTION Options::Get(double* pvalue, char* name,double default_value){{{*/
+-void Options::Get(double* pvalue,const char* name,double default_value){
++/*FUNCTION Options::Get(IssmDouble* pvalue, char* name,IssmDouble default_value){{{*/
++void Options::Get(IssmDouble* pvalue,const char* name,IssmDouble default_value){
+ 
+ 	vector<Object*>::iterator object;
+ 	Option* option=NULL;
+@@ -222,7 +222,7 @@
+ 	else{
+ 		stringsize=strlen(default_value)+1;
+ 		outstring=xNew<char>(stringsize);
+-		memcpy(outstring,default_value,stringsize*sizeof(char));
++		xMemCpy<char>(outstring,default_value,stringsize);
+ 		*pvalue=outstring;
+ 	}
+ 
+@@ -274,8 +274,8 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Options::Get(double** pvalue,int* numel,const char* name){{{*/
+-void Options::Get(double** pvalue,int* numel,const char* name){
++/*FUNCTION Options::Get(IssmDouble** pvalue,int* numel,const char* name){{{*/
++void Options::Get(IssmDouble** pvalue,int* numel,const char* name){
+ 
+ 	vector<Object*>::iterator object;
+ 	Option* option=NULL;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12466-12467.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12466-12467.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12466-12467.diff	(revision 12679)
@@ -0,0 +1,17 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 12466)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 12467)
+@@ -308,9 +308,9 @@
+ 	Riftfront* riftfront=NULL;
+ 
+ 	/*rift penetration: */
+-	double max_penetration=0;
+-	double mpi_max_penetration;
+-	double penetration;
++	IssmDouble max_penetration=0;
++	IssmDouble mpi_max_penetration;
++	IssmDouble penetration;
+ 
+ 	/*Ok, we are going to find the node pairs which are not penetrating, even though they 
+ 	 * are penalised. We will release only the one with has least <0 penetration. : */
Index: /issm/oecreview/Archive/12321-12677/ISSM-12467-12468.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12467-12468.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12467-12468.diff	(revision 12679)
@@ -0,0 +1,14 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.h	(revision 12467)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.h	(revision 12468)
+@@ -5,7 +5,8 @@
+ #ifndef _CONTAINER_OBSERVATIONS_H_
+ #define  _CONTAINER_OBSERVATIONS_H_
+ 
+-class Obsevration;
++#include "../include/include.h"
++
+ class Quadtree;
+ class Variogram;
+ class Options;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12468-12469.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12468-12469.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12468-12469.diff	(revision 12679)
@@ -0,0 +1,15 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh	(revision 12468)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh	(revision 12469)
+@@ -39,3 +39,10 @@
+ 	ln -s Python.framework/Versions/3.2/include/python3.2m include
+ 	ln -s Python.framework/Versions/3.2/lib/ lib
+ fi
++
++#Some modifications to be done in case version is 2.7
++if [[ $version == "2.7.2" ]]; then 
++	cd install/
++	ln -s Python.framework/Headers include
++	ln -s Python.framework/Versions/2.7/lib lib
++fi
Index: /issm/oecreview/Archive/12321-12677/ISSM-12469-12470.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12469-12470.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12469-12470.diff	(revision 12679)
@@ -0,0 +1,1096 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp	(revision 12470)
+@@ -14,8 +14,8 @@
+ 	int     i;
+ 	Vector*     vz        = NULL;
+ 	Vertex *vertex    = NULL;
+-	double *thickness = NULL;
+-	double *bed       = NULL;
++	IssmDouble *thickness = NULL;
++	IssmDouble *bed       = NULL;
+ 
+ 	/*get vertex vectors for bed and thickness: */
+ 	GetVectorFromInputsx(&thickness,elements,nodes, vertices, loads, materials, parameters, ThicknessEnum,VertexEnum);
+@@ -37,8 +37,8 @@
+ 	InputUpdateFromVectorx(elements,nodes,vertices,loads,materials,parameters,vz,VzMeshEnum,VertexEnum);
+ 
+ 	/*Free ressources:*/
+-	xDelete<double>(thickness);
+-	xDelete<double>(bed);
++	xDelete<IssmDouble>(thickness);
++	xDelete<IssmDouble>(bed);
+ 	xdelete(&vz);
+ 	return 1;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Responsex/Responsex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Responsex/Responsex.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Responsex/Responsex.cpp	(revision 12470)
+@@ -15,7 +15,7 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../modules.h"
+ 
+-void Responsex(double* responses,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,const char* response_descriptor,bool process_units,int weight_index){
++void Responsex(IssmDouble* responses,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,const char* response_descriptor,bool process_units,int weight_index){
+ 
+ 	switch (StringToEnumx(response_descriptor)){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Responsex/Responsex.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Responsex/Responsex.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Responsex/Responsex.h	(revision 12470)
+@@ -8,6 +8,6 @@
+ #include "../../objects/objects.h"
+ #include "../../Container/Container.h"
+ 
+-void Responsex(double* presponse,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,const char* response_descriptor,bool process_units,int weight_index);
++void Responsex(IssmDouble* presponse,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,const char* response_descriptor,bool process_units,int weight_index);
+ 
+ #endif  /* _RESPONSESXX_H */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12470)
+@@ -466,7 +466,7 @@
+ 
+ 	len=strlen(EnumToStringx(enum_in));
+ 	string=xNew<char>(len+1);
+-	memcpy(string,EnumToStringx(enum_in),(len+1)*sizeof(char));
++	xMemCpy<char>(string,EnumToStringx(enum_in),(len+1));
+ 
+ 	/*Assign output pointer*/
+ 	*pstring=string;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp	(revision 12470)
+@@ -9,17 +9,17 @@
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ #include "../../Container/Container.h"
+ 
+-void TimeAdaptx(double* pdt, Elements* elements, Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters){
++void TimeAdaptx(IssmDouble* pdt, Elements* elements, Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters){
+ 
+ 	int      i;
+ 
+ 	/*output: */
+-	double   dt;
++	IssmDouble   dt;
+ 
+ 	/*intermediary: */
+ 	Element *element     = NULL;
+-	double   min_dt      = 0;
+-	double   node_min_dt = 0;
++	IssmDouble   min_dt      = 0;
++	IssmDouble   node_min_dt = 0;
+ 
+ 	/*Go through elements, and figure out the minimum of the time steps for each element (using CFL criterion): */
+ 	element=(Element*)elements->GetObjectByOffset(0); min_dt=element->TimeAdapt();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.h	(revision 12470)
+@@ -8,7 +8,7 @@
+ #include "../../objects/objects.h"
+ 
+ /* local prototypes: */
+-void TimeAdaptx(double* pdt, Elements* elements, Nodes* nodes,Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters);
++void TimeAdaptx(IssmDouble* pdt, Elements* elements, Nodes* nodes,Vertices* vertices,Loads* loads, Materials* materials, Parameters* parameters);
+ 
+ #endif  /* _TIMEADAPTX_H */
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp	(revision 12470)
+@@ -10,18 +10,18 @@
+ 
+ void InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Vector* vector, int name, int type){
+ 
+-	double* serial_vector=NULL;
++	IssmDouble* serial_vector=NULL;
+ 
+ 	serial_vector=vector->ToMPISerial();
+ 
+ 	InputUpdateFromVectorx( elements,nodes, vertices, loads, materials, parameters,serial_vector,name, type);
+ 
+ 	/*Free ressources:*/
+-	xDelete<double>(serial_vector);
++	xDelete<IssmDouble>(serial_vector);
+ }
+ 
+ 	
+-void InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* vector, int name, int type){
++void InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,IssmDouble* vector, int name, int type){
+ 
+ 	int i;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.h	(revision 12470)
+@@ -10,7 +10,7 @@
+ 
+ /* local prototypes: */
+ void	InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,Vector* vector, int name,int type);
+-void	InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,double* vector, int name,int type);
++void	InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,IssmDouble* vector, int name,int type);
+ void	InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,int* vector, int name,int type);
+ void	InputUpdateFromVectorx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,bool* vector, int name,int type);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp	(revision 12470)
+@@ -14,7 +14,7 @@
+ 	int i;
+ 	int configuration_type;
+ 	int fsize;
+-	double* ug_serial=NULL;
++	IssmDouble* ug_serial=NULL;
+ 
+ 	/*first figure out fsize: */
+ 	parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
+@@ -50,7 +50,7 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xDelete<double>(ug_serial);
++	xDelete<IssmDouble>(ug_serial);
+ 
+ 	/*Assign output pointers:*/
+ 	*puf=uf;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputScalex/InputScalex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputScalex/InputScalex.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputScalex/InputScalex.cpp	(revision 12470)
+@@ -8,7 +8,7 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 
+-void InputScalex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int enum_type, double scale_factor){
++void InputScalex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int enum_type, IssmDouble scale_factor){
+ 
+ 	/*intermediary:*/
+ 	int      i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputScalex/InputScalex.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputScalex/InputScalex.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputScalex/InputScalex.h	(revision 12470)
+@@ -8,7 +8,7 @@
+ #include "../../Container/Container.h"
+ 
+ /* local prototypes: */
+-void InputScalex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int enum_type, double scale_factor);
++void InputScalex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int enum_type, IssmDouble scale_factor);
+ 
+ #endif  /* _SCALEINPUTX_H */
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp	(revision 12470)
+@@ -13,7 +13,7 @@
+ 
+ void UpdateConstraintsx(Nodes* nodes,Constraints* constraints,Parameters* parameters){
+ 
+-	double time;
++	IssmDouble time;
+ 	int    analysis_type;
+ 
+ 	/*retrieve parameters: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12470)
+@@ -22,25 +22,25 @@
+ //    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 = signorm - 0.5;     // sigma of the temperature distribution for cloudy day
+-  double siglimc, siglim0, siglim0c;
+-  double tstep, tsint, tint, tstepc;
++  IssmDouble DT = 0.02, sigfac, snormfac;
++  IssmDouble signorm = 5.5;      // signorm : sigma of the temperature distribution for a normal day 
++  IssmDouble siglim;       // sigma limit for the integration which is equal to 2.5 sigmanorm
++  IssmDouble signormc = signorm - 0.5;     // sigma of the temperature distribution for cloudy day
++  IssmDouble siglimc, siglim0, siglim0c;
++  IssmDouble 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
++  //IssmDouble pdds[NPDMAX]={0}; 
++  //IssmDouble pds[NPDCMAX]={0};
++  IssmDouble pddt, pd ; // pd : snow/precip fraction, precipitation falling as snow
++  IssmDouble PDup, PDCUT = 2.0;    // PDcut: rain/snow cutoff temperature (C)
++  IssmDouble tstar; // monthly mean surface temp
+   
+-  double* pdds=NULL; 
+-  double* pds=NULL; 
++  IssmDouble* pdds=NULL; 
++  IssmDouble* pds=NULL; 
+   Element* element = NULL;
+   
+-  pdds=xNew<double>(NPDMAX+1); 
+-  pds=xNew<double>(NPDCMAX+1); 
++  pdds=xNew<IssmDouble>(NPDMAX+1); 
++  pds=xNew<IssmDouble>(NPDCMAX+1); 
+   
+   // initialize PDD (creation of a lookup table)
+   tstep = 0.1;
+@@ -105,7 +105,7 @@
+     element->PositiveDegreeDay(pdds,pds,signorm);
+   }
+   /*free ressouces: */
+-  xDelete<double>(pdds);
+-  xDelete<double>(pds);
++  xDelete<IssmDouble>(pdds);
++  xDelete<IssmDouble>(pds);
+   
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.h	(revision 12470)
+@@ -9,7 +9,7 @@
+ #include "../../Container/Container.h"
+ 
+ /* local prototypes: */
+-void SurfaceAreax( double* pS, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters);
++void SurfaceAreax( IssmDouble* pS, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters);
+ 
+ #endif  /* _SURFACEAREAX_H */
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.cpp	(revision 12470)
+@@ -10,15 +10,15 @@
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ #include "../InputUpdateFromConstantx/InputUpdateFromConstantx.h"
+ 
+-void SurfaceAreax( double* pS, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters){
++void SurfaceAreax( IssmDouble* pS, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters){
+ 	
+ 	/*Intermediary*/
+ 	Element* element=NULL;
+ 	int i;
+ 
+ 	/*output: */
+-	double S=0;
+-	double S_sum;
++	IssmDouble S=0;
++	IssmDouble S_sum;
+ 	
+ 	/*Compute gradients: */
+ 	for (i=0;i<elements->Size();i++){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.h	(revision 12470)
+@@ -10,11 +10,11 @@
+ 
+ /* local prototypes: */
+ void		InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,Vector* solution);
+-void        InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* solution);
++void        InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,IssmDouble* solution);
+ 
+ //with timestep
+ void		InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,Vector* solution,int timestep);
+-void        InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* solution, int timestep);
++void        InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,IssmDouble* solution, int timestep);
+ 
+ #endif  /* _UPDATEINPUTSFROMSOLUTIONXX_H */
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp	(revision 12470)
+@@ -10,7 +10,7 @@
+ 
+ void InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Vector* solution){
+ 
+-	double* serial_solution=NULL;
++	IssmDouble* serial_solution=NULL;
+ 
+ 	/*Serialize solution, so that elements can index into it on every CPU: */
+ 	serial_solution=solution->ToMPISerial();
+@@ -19,11 +19,11 @@
+ 	InputUpdateFromSolutionx( elements, nodes,  vertices,  loads,  materials,  parameters,serial_solution);
+ 
+ 	/*Free ressources:*/
+-	xDelete<double>(serial_solution);
++	xDelete<IssmDouble>(serial_solution);
+ }
+ 
+ 
+-void InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* solution){
++void InputUpdateFromSolutionx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,IssmDouble* solution){
+ 
+ 	/*Intermediary*/
+ 	int i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 12470)
+@@ -8,8 +8,8 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 
+-int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofnodes,double* elements,
+-		int numberofelements2d,int numberofnodes2d,double* elements2d,int numlayers,int elements_width, int dim,int num_procs){
++int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofnodes,IssmDouble* elements,
++		int numberofelements2d,int numberofnodes2d,IssmDouble* elements2d,int numlayers,int elements_width, int dim,int num_procs){
+ 
+ 	int noerr=1;
+ 	int i,j;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.h	(revision 12470)
+@@ -5,9 +5,11 @@
+ #ifndef _MESHPARTITIONX_H
+ #define _MESHPARTITIONX_H
+ 
++#include "../../include/include.h"
++
+ /* local prototypes: */
+-int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofnodes,double* elements,
+-		int numberofelements2d,int numberofnodes2d,double* elements2d,int numlayers,int elements_width, int dim,int numareas);
++int MeshPartitionx(int** pepart, int** pnpart, int numberofelements,int numberofnodes,IssmDouble* elements,
++		int numberofelements2d,int numberofnodes2d,IssmDouble* elements2d,int numlayers,int elements_width, int dim,int numareas);
+ 	
+ #endif /* _MESHPARTITIONX_H */
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 12470)
+@@ -40,10 +40,10 @@
+ 	*pvector=vector;
+ }
+ 
+-void GetVectorFromInputsx( double** pvector, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters, int name, int type){
++void GetVectorFromInputsx( IssmDouble** pvector, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters, int name, int type){
+ 	
+ 	/*output: */
+-	double* vector=NULL;
++	IssmDouble* vector=NULL;
+ 	
+ 	/*intermediary: */
+ 	Vector* vec_vector=NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.h	(revision 12470)
+@@ -9,7 +9,7 @@
+ 
+ /* local prototypes: */
+ void	GetVectorFromInputsx( Vector** pvector, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,int name,int type);
+-void	GetVectorFromInputsx( double** pvector, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,int name,int type);
++void	GetVectorFromInputsx( IssmDouble** pvector, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,int name,int type);
+ 
+ #endif  /* _GETVECTORFROMINPUTSXX_H */
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp	(revision 12470)
+@@ -9,13 +9,13 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 
+-void NodalValuex( double* pnodalvalue, int natureofdataenum,Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units){
++void NodalValuex( IssmDouble* pnodalvalue, int natureofdataenum,Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units){
+ 
+ 	extern int my_rank;
+ 	int i;
+ 	int index;
+ 	Element* element=NULL;
+-	double value;
++	IssmDouble value;
+ 	int found;
+ 	int sumfound;
+ 	int cpu_found;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodalValuex/NodalValuex.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodalValuex/NodalValuex.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodalValuex/NodalValuex.h	(revision 12470)
+@@ -9,7 +9,7 @@
+ #include "../../objects/objects.h"
+ 
+ /* local prototypes: */
+-void NodalValuex( double* pnodalvalue, int natureofdataenum,Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
++void NodalValuex( IssmDouble* pnodalvalue, int natureofdataenum,Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
+ 
+ #endif  /* _NODALVALUEX_H */
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 12470)
+@@ -22,7 +22,7 @@
+ 	int    dim;
+ 	int    numberofelements;
+ 	int    numberofvertices;
+-	double* elements=NULL;
++	IssmDouble* elements=NULL;
+ 
+ 	/*output*/
+ 	int* connectivity=NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12470)
+@@ -70,11 +70,11 @@
+ 
+ 	int     i1,i2;
+ 	int     cols;
+-	double  e1,e2;
++	IssmDouble  e1,e2;
+ 	int     pos;
+ 	int     numberofedges;
+-	double* edges=NULL;
+-	double* elements=NULL;
++	IssmDouble* edges=NULL;
++	IssmDouble* elements=NULL;
+ 
+ 	/*Fetch parameters: */
+ 	iomodel->Constant(&dim,MeshDimensionEnum);
+@@ -157,8 +157,8 @@
+ 	}
+ 
+ 	/*Free data: */
+-	xDelete<double>(elements);
+-	xDelete<double>(edges);
++	xDelete<IssmDouble>(elements);
++	xDelete<IssmDouble>(edges);
+ 
+ 	/*Assign output pointers:*/
+ 	*pmy_nodes=my_nodes;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp	(revision 12470)
+@@ -60,8 +60,8 @@
+ 	}
+ 
+ 	/*Create Penpair for vertex_pairing: */
+-	double *vertex_pairing=NULL;
+-	double *nodeonbed=NULL;
++	IssmDouble *vertex_pairing=NULL;
++	IssmDouble *nodeonbed=NULL;
+ 	iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,PrognosticVertexPairingEnum);
+ 	iomodel->FetchData(&nodeonbed,NULL,NULL,MeshVertexonbedEnum);
+ 
+@@ -89,8 +89,8 @@
+ 	}
+ 
+ 	/*free ressources: */
+-	xDelete<double>(vertex_pairing);
+-	xDelete<double>(nodeonbed);
++	xDelete<IssmDouble>(vertex_pairing);
++	xDelete<IssmDouble>(nodeonbed);
+ 
+ 	/*Assign output pointer: */
+ 	*ploads=loads;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp	(revision 12470)
+@@ -6,7 +6,7 @@
+ #include "../../include/include.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 	
+-void DistributeNumDofs(DofIndexing* index,int analysis_type,double* vertices_type){
++void DistributeNumDofs(DofIndexing* index,int analysis_type,IssmDouble* vertices_type){
+ 
+ 	/*For now, we distribute by analysis_type, later, we will distribute using the analysis_type,
+ 	 * but also the vertices_type: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp	(revision 12470)
+@@ -22,7 +22,7 @@
+ 	int    dim;
+ 	int    numberofelements;
+ 	int    numberofvertices;
+-	double* elements=NULL;
++	IssmDouble* elements=NULL;
+ 
+ 	/*output*/
+ 	int* connectivity=NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 12470)
+@@ -23,7 +23,7 @@
+ 	int         i;
+ 	int         numoutputs;
+ 	Parameters *parameters       = NULL;
+-	double     *requestedoutputs = NULL;
++	IssmDouble     *requestedoutputs = NULL;
+ 	
+ 	if(*pparameters)return; //do not create parameters twice!
+ 
+@@ -104,15 +104,15 @@
+ 	iomodel->FetchData(&requestedoutputs,&numoutputs,NULL,DiagnosticRequestedOutputsEnum);
+ 	parameters->AddObject(new IntParam(DiagnosticNumRequestedOutputsEnum,numoutputs));
+ 	if(numoutputs)parameters->AddObject(new IntVecParam(DiagnosticRequestedOutputsEnum,requestedoutputs,numoutputs));
+-	xDelete<double>(requestedoutputs);
++	xDelete<IssmDouble>(requestedoutputs);
+ 	iomodel->FetchData(&requestedoutputs,&numoutputs,NULL,TransientRequestedOutputsEnum);
+ 	parameters->AddObject(new IntParam(TransientNumRequestedOutputsEnum,numoutputs));
+ 	if(numoutputs)parameters->AddObject(new IntVecParam(TransientRequestedOutputsEnum,requestedoutputs,numoutputs));
+-	xDelete<double>(requestedoutputs);
++	xDelete<IssmDouble>(requestedoutputs);
+ 	iomodel->FetchData(&requestedoutputs,&numoutputs,NULL,SteadystateRequestedOutputsEnum);
+ 	parameters->AddObject(new IntParam(SteadystateNumRequestedOutputsEnum,numoutputs));
+ 	if(numoutputs)parameters->AddObject(new IntVecParam(SteadystateRequestedOutputsEnum,requestedoutputs,numoutputs));
+-	xDelete<double>(requestedoutputs);
++	xDelete<IssmDouble>(requestedoutputs);
+ 	
+ 	/*Before returning, create parameters in case we are running Qmu or control types runs: */
+ 	#ifdef _HAVE_CONTROL_
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 12470)
+@@ -41,10 +41,10 @@
+ 	int  elements_width; //number of columns in elements (2d->3, 3d->6)
+ 	int  el1,el2;
+ 	int    dim;
+-	double* elements=NULL;
+-	double* elements2d=NULL;
+-	double* riftinfo=NULL;
+-	double* vertex_pairing=NULL;
++	IssmDouble* elements=NULL;
++	IssmDouble* elements2d=NULL;
++	IssmDouble* riftinfo=NULL;
++	IssmDouble* vertex_pairing=NULL;
+ 
+ 	/*Fetch parameters: */
+ 	iomodel->Constant(&dim,MeshDimensionEnum);
+@@ -75,8 +75,8 @@
+ 	MeshPartitionx(&epart, &npart,numberofelements,numberofvertices,elements, numberofelements2d,numberofvertices2d,elements2d,numlayers,elements_width, dim,num_procs);
+ 
+ 	/*Free elements and elements2d: */
+-	xDelete<double>(elements);
+-	xDelete<double>(elements2d);
++	xDelete<IssmDouble>(elements);
++	xDelete<IssmDouble>(elements2d);
+ 
+ 	/*Deal with rifts, they have to be included into one partition only, not several: */
+ 	if(numrifts){
+@@ -86,7 +86,7 @@
+ 			el2=(int)*(riftinfo+RIFTINFOSIZE*i+3)-1; //matlab indexing to c indexing
+ 			epart[el2]=epart[el1]; //ensures that this pair of elements will be in the same partition, as well as the corresponding vertices;
+ 		}
+-		xDelete<double>(riftinfo); 
++		xDelete<IssmDouble>(riftinfo); 
+ 	}
+ 
+ 	/*Used later on: */
+@@ -118,7 +118,7 @@
+ 		}
+ 	}//for (i=0;i<numberofelements;i++)
+ 	/*Free data : */
+-	xDelete<double>(elements);
++	xDelete<IssmDouble>(elements);
+ 
+ 	/*We might have vertex_pairing in which case, some vertices have to be cloned:
+ 	 * penpair has 2 nodes that are poointing toward 2 vertices.
+@@ -129,14 +129,14 @@
+ 			my_vertices[(int)vertex_pairing[2*i+1]-1]=2; //to know that these elements are not on the partition
+ 		}
+ 	}
+-	xDelete<double>(vertex_pairing);
++	xDelete<IssmDouble>(vertex_pairing);
+ 	iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,PrognosticVertexPairingEnum);
+ 	for(i=0;i<numvertex_pairing;i++){
+ 		if(my_vertices[(int)vertex_pairing[2*i+0]-1] && !my_vertices[(int)vertex_pairing[2*i+1]-1]){
+ 			my_vertices[(int)vertex_pairing[2*i+1]-1]=2; //to know that these elements are not on the partition
+ 		}
+ 	}
+-	xDelete<double>(vertex_pairing);
++	xDelete<IssmDouble>(vertex_pairing);
+ 
+ 	/*Free ressources:*/
+ 	xDelete<int>(npart);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h	(revision 12470)
+@@ -107,6 +107,6 @@
+ 
+ 
+ /*Distribution of dofs: */
+-void DistributeNumDofs(DofIndexing* index,int analysis_type,double* vertices_type);
++void DistributeNumDofs(DofIndexing* index,int analysis_type,IssmDouble* vertices_type);
+ 
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputToResultx/InputToResultx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputToResultx/InputToResultx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputToResultx/InputToResultx.cpp	(revision 12470)
+@@ -12,7 +12,7 @@
+ 
+ 	/*intermediary:*/
+ 	int      step;
+-	double   time;
++	IssmDouble   time;
+ 	Element *element = NULL;
+ 
+ 	/*Get time and step*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/RequestedOutputsx/RequestedOutputsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/RequestedOutputsx/RequestedOutputsx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/RequestedOutputsx/RequestedOutputsx.cpp	(revision 12470)
+@@ -12,8 +12,8 @@
+ 
+ 	int      output_enum;
+ 	int      step;
+-	double   time;
+-	double   output_value;
++	IssmDouble   time;
++	IssmDouble   output_value;
+ 	Element *element      = NULL;
+ 
+ 	/*Get time and step*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/DofTypesToIndexSet.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/DofTypesToIndexSet.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/DofTypesToIndexSet.cpp	(revision 12470)
+@@ -19,7 +19,7 @@
+ 	IS          isp=NULL;
+ 
+ 	int         start,end;
+-	double*     df_local=NULL;
++	IssmDouble*     df_local=NULL;
+ 	int         df_local_size;
+ 	int         i;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/Solverx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/Solverx.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/Solverx.h	(revision 12470)
+@@ -23,7 +23,7 @@
+ 
+ #ifdef _HAVE_GSL_
+ void SolverxGsl(SeqVec** puf,SeqMat* Kff, SeqVec* pf);
+-void SolverxGsl(double** pX,double* A,double* B,int n);
++void SolverxGsl(IssmDouble** pX,IssmDouble* A,IssmDouble* B,int n);
+ #endif
+ 
+ #endif  /* _SOLVERX_H */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12470)
+@@ -20,7 +20,7 @@
+ 	/*Intermediary: */
+ 	int M,N,N2,s;
+ 	SeqVec *uf = NULL;
+-	double *x  = NULL;
++	IssmDouble *x  = NULL;
+ 
+ 	Kff->GetSize(&M,&N);
+ 	pf->GetSize(&N2);
+@@ -34,7 +34,7 @@
+ 	/*Assign output pointers:*/
+ 	*puf=uf;
+ }/*}}}*/
+-void SolverxGsl(double** pX,double* A,double* B,int n){/*{{{*/
++void SolverxGsl(IssmDouble** pX,IssmDouble* A,IssmDouble* B,int n){/*{{{*/
+ 
+ 	/*GSL Matrices and vectors: */
+ 	int              s;
+@@ -44,8 +44,8 @@
+ 	gsl_permutation *p = NULL;
+ 
+ 	/*A will be modified by LU decomposition. Use copy*/
+-	double* Acopy = xNew<double>(n*n);
+-	memcpy(Acopy,A,n*n*sizeof(double));
++	IssmDouble* Acopy = xNew<IssmDouble>(n*n);
++	xMemCpy<IssmDouble>(Acopy,A,n*n);
+ 
+ 	/*Initialize gsl matrices and vectors: */
+ 	a = gsl_matrix_view_array (Acopy,n,n);
+@@ -61,11 +61,11 @@
+ 	//gsl_vector_fprintf (stdout, x, "%g");
+ 
+ 	/*Copy result*/
+-	double* X = xNew<double>(n);
+-	memcpy(X,gsl_vector_ptr(x,0),n*sizeof(double));
++	IssmDouble* X = xNew<IssmDouble>(n);
++	memcpy(X,gsl_vector_ptr(x,0),n*sizeof(IssmDouble));
+ 
+ 	/*Clean up and assign output pointer*/
+-	xDelete<double>(Acopy);
++	xDelete<IssmDouble>(Acopy);
+ 	gsl_permutation_free(p);
+ 	gsl_vector_free(x);
+ 	*pX=X;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 12470)
+@@ -9,7 +9,7 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 
+-void SystemMatricesx(Matrix** pKff, Matrix** pKfs, Vector** ppf, Vector** pdf, double* pkmax,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,bool kflag,bool pflag,bool penalty_kflag,bool penalty_pflag){
++void SystemMatricesx(Matrix** pKff, Matrix** pKfs, Vector** ppf, Vector** pdf, IssmDouble* pkmax,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,bool kflag,bool pflag,bool penalty_kflag,bool penalty_pflag){
+ 	
+ 	/*intermediary: */
+ 	int      i,j;
+@@ -24,7 +24,7 @@
+ 	Matrix*    Kfs  = NULL;
+ 	Vector*    pf   = NULL;
+ 	Vector*    df=NULL;
+-	double kmax = 0;
++	IssmDouble kmax = 0;
+ 
+ 	/*Display message*/
+ 	_printf_(VerboseModule(),"   Generating matrices\n");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.h	(revision 12470)
+@@ -9,7 +9,7 @@
+ #include "../../objects/objects.h"
+ 
+ /* local prototypes: */
+-void SystemMatricesx(Matrix** pKff, Matrix** pKfs, Vector** ppf, Vector** pdf, double* pkmax,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,
++void SystemMatricesx(Matrix** pKff, Matrix** pKfs, Vector** ppf, Vector** pdf, IssmDouble* pkmax,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,
+ 			bool kflag=true,bool pflag=true,bool penalty_kflag=true,bool penalty_pflag=true);
+ 
+ #endif  /* _SYSTEMMATRICESX_H */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12470)
+@@ -8,18 +8,18 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 
+-bool InputConvergencex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int* enums, int num_enums, int* criterionenums, double* criterionvalues,int num_criterionenums){
++bool InputConvergencex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int* enums, int num_enums, int* criterionenums, IssmDouble* criterionvalues,int num_criterionenums){
+ 
+ 	/*intermediary:*/
+ 	int      i;
+ 	bool     converged;
+ 	int      num_notconverged   = 0;
+ 	int      total_notconverged;
+-	double  *eps                = NULL;
++	IssmDouble  *eps                = NULL;
+ 	Element *element            = NULL;
+ 
+ 	/*allocate dynamic memory: */
+-	eps=xNew<double>(num_criterionenums);
++	eps=xNew<IssmDouble>(num_criterionenums);
+ 
+ 	/*Go through elements, and ask them to do the job: */
+ 	for(i=0;i<elements->Size();i++){
+@@ -36,7 +36,7 @@
+ 	_printf_(VerboseConvergence(),"      #elements above convergence criterion = %i\n",num_notconverged);
+ 
+ 	/*Free ressources:*/
+-	xDelete<double>(eps);
++	xDelete<IssmDouble>(eps);
+ 
+ 	/*return: */
+ 	if (num_notconverged){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.h	(revision 12470)
+@@ -7,7 +7,7 @@
+ #include "../../Container/Container.h"
+ 
+ /* local prototypes: */
+-bool InputConvergencex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int* enums, int num_enums, int* criterionenums, double* criterionvalues,int num_criterionenums);
++bool InputConvergencex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,int* enums, int num_enums, int* criterionenums, IssmDouble* criterionvalues,int num_criterionenums);
+ 
+ #endif  /* _INPUTCONVERGENCEX_H */
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.cpp	(revision 12470)
+@@ -9,7 +9,7 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 
+-void CreateJacobianMatrixx(Matrix** pJff,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,double kmax){
++void CreateJacobianMatrixx(Matrix** pJff,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,IssmDouble kmax){
+ 	
+ 	int      i,connectivity;
+ 	int      numberofdofspernode;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.h	(revision 12470)
+@@ -9,6 +9,6 @@
+ #include "../../objects/objects.h"
+ 
+ /* local prototypes: */
+-void CreateJacobianMatrixx(Matrix** pJff,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,double kmax);
++void CreateJacobianMatrixx(Matrix** pJff,Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,IssmDouble kmax);
+ 
+ #endif  /* _CREATEJACOBIANMATRIXX_H */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12470)
+@@ -26,7 +26,7 @@
+ 	int i;
+ 
+ 	/*intermediary: */
+-	double* analyses=NULL;
++	IssmPDouble* analyses=NULL;
+ 	char** strings=NULL;
+ 	int numanalyses;
+ 	char* string=NULL;
+@@ -47,7 +47,7 @@
+ 		}
+ 
+ 		/*Now, allocate analyses and strings: */
+-		analyses=xNew<double>(numanalyses);
++		analyses=xNew<IssmPDouble>(numanalyses);
+ 		strings=xNew<char*>(numanalyses);
+ 		for(i=0;i<numanalyses;i++)strings[i]=NULL; 
+ 
+@@ -70,18 +70,18 @@
+ 			to the already existing options*/
+ 				if(strings[numanalyses-1]==NULL){
+ 					string=xNew<char>((strlen(line)+1)); 
+-					memcpy(string,line,(strlen(line)+1)*sizeof(char));
++					xMemCpy<char>(string,line,(strlen(line)+1));
+ 
+ 					strings[numanalyses-1]=string;
+ 				}
+ 				else{
+ 					string=strings[numanalyses-1];
+ 					newstring=xNew<char>((strlen(line)+1));
+-					memcpy(newstring,line,(strlen(line)+1)*sizeof(char));
++					xMemCpy<char>(newstring,line,(strlen(line)+1));
+ 
+ 					/*concatenate:*/
+ 					catstring=xNew<char>(strlen(string)+1+strlen(newstring)+1+1); //fit in a space " "
+-					memcpy(catstring,string,(strlen(string)+1)*sizeof(char));
++					xMemCpy<char>(catstring,string,(strlen(string)+1));
+ 
+ 					strcat(catstring," ");
+ 					strcat(catstring,newstring);
+@@ -97,7 +97,7 @@
+  	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&numanalyses,1,MPI_INT,0,MPI_COMM_WORLD);
+ 	if(my_rank!=0){
+-		analyses=xNew<double>(numanalyses);
++		analyses=xNew<IssmPDouble>(numanalyses);
+ 		strings=xNew<char*>(numanalyses);
+ 	}
+ 	MPI_Bcast(analyses,numanalyses,MPI_DOUBLE,0,MPI_COMM_WORLD);
+@@ -123,6 +123,6 @@
+ 	/*Clean up and return*/
+ 	for(i=0;i<numanalyses;i++) xDelete<char>(strings[i]);
+ 	xDelete<char*>(strings);
+-	xDelete<double>(analyses);
++	xDelete<IssmPDouble>(analyses);
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/VecMergex/VecMergex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/VecMergex/VecMergex.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/VecMergex/VecMergex.cpp	(revision 12470)
+@@ -14,7 +14,7 @@
+ 	/*variables: */
+ 	int i;
+ 	int configuration_type;
+-	double* uf_serial=NULL;
++	IssmDouble* uf_serial=NULL;
+ 
+ 	/*retrieve parameters: */
+ 	parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
+@@ -40,7 +40,7 @@
+ 		}
+ 	}
+ 	/*Free ressources:*/
+-	xDelete<double>(uf_serial);
++	xDelete<IssmDouble>(uf_serial);
+ 
+ 	/*Assemble vector: */
+ 	ug->Assemble();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp	(revision 12470)
+@@ -48,7 +48,7 @@
+ 		material->InputUpdateFromConstant(constant,name);
+ 	}
+ }
+-void InputUpdateFromConstantx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double constant, int name){
++void InputUpdateFromConstantx( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,IssmDouble constant, int name){
+ 
+ 	int i;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.h	(revision 12470)
+@@ -11,7 +11,7 @@
+ /* local prototypes: */
+ void		InputUpdateFromConstantx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters, bool   constant, int name);
+ void		InputUpdateFromConstantx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters, int    constant, int name);
+-void		InputUpdateFromConstantx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters, double constant, int name);
++void		InputUpdateFromConstantx( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters, IssmDouble constant, int name);
+ 
+ #endif  /* _UPDATEINPUTSFROMCONSTANTXX_H */
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp	(revision 12470)
+@@ -12,7 +12,7 @@
+ void UpdateDynamicConstraintsx(Constraints* constraints,Nodes* nodes,Parameters* parameters,Vector* yg){
+ 	
+ 	int configuration_type;
+-	double* yg_serial=NULL;
++	IssmDouble* yg_serial=NULL;
+ 
+ 	/*Get current configuration*/
+ 	parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
+@@ -33,5 +33,5 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xDelete<double>(yg_serial);
++	xDelete<IssmDouble>(yg_serial);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12470)
+@@ -21,14 +21,14 @@
+ 	int     vector_layout = 0;
+ 	int     counter;
+ 	int     nods;
+-	double* times=NULL;
+-	double* values=NULL;
++	IssmDouble* times=NULL;
++	IssmDouble* values=NULL;
+ 	bool    spcpresent=false;
+ 	int     count=0;
+ 	int     numberofvertices;
+ 
+ 	/*variables being fetched: */
+-	double *doublevector  = NULL;
++	IssmDouble *IssmDoublevector  = NULL;
+ 	int     M,N;
+ 
+ 	/*Fetch parameters: */
+@@ -37,11 +37,11 @@
+ 	/*First of, find the record for the enum, and get code  of data type: */
+ 	fid=iomodel->SetFilePointerToData(&code, &vector_layout,vector_enum);
+ 
+-	if(code!=7)_error_("%s%s"," expecting a double vector for constraints with enum ",EnumToStringx(vector_enum));
++	if(code!=7)_error_("%s%s"," expecting a IssmDouble vector for constraints with enum ",EnumToStringx(vector_enum));
+ 	if(vector_layout!=1)_error_("%s%s"," expecting a nodal vector for constraints with enum ",EnumToStringx(vector_enum));
+ 
+ 	/*Fetch vector:*/
+-	iomodel->FetchData(&doublevector,&M,&N,vector_enum);
++	iomodel->FetchData(&IssmDoublevector,&M,&N,vector_enum);
+ 
+ 	/*Transient or static?:*/
+ 	if(M==numberofvertices){
+@@ -54,9 +54,9 @@
+ 			/*keep only this partition's nodes:*/
+ 			if((iomodel->my_vertices[i])){
+ 
+-				if (!isnan(doublevector[i])){
++				if (!isnan(IssmDoublevector[i])){
+ 
+-					constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,doublevector[i],analysis_type));
++					constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,IssmDoublevector[i],analysis_type));
+ 					count++;
+ 				}
+ 			}
+@@ -68,9 +68,9 @@
+ 		count=0;
+ 
+ 		/*figure out times: */
+-		times=xNew<double>(N);
++		times=xNew<IssmDouble>(N);
+ 		for(j=0;j<N;j++){
+-			times[j]=doublevector[(M-1)*N+j];
++			times[j]=IssmDoublevector[(M-1)*N+j];
+ 		}
+ 		/*unit conversion: */
+ 		UnitConversion(times,N,ExtToIuEnum,TimeEnum);
+@@ -82,10 +82,10 @@
+ 			if((iomodel->my_vertices[i])){
+ 
+ 				/*figure out times and values: */
+-				values=xNew<double>(N);
++				values=xNew<IssmDouble>(N);
+ 				spcpresent=false;
+ 				for(j=0;j<N;j++){
+-					values[j]=doublevector[i*N+j];
++					values[j]=IssmDoublevector[i*N+j];
+ 					if(!isnan(values[j]))spcpresent=true; //NaN means no spc by default
+ 				}
+ 
+@@ -93,7 +93,7 @@
+ 					constraints->AddObject(new SpcTransient(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,N,times,values,analysis_type));
+ 					count++;
+ 				}
+-				xDelete<double>(values);
++				xDelete<IssmDouble>(values);
+ 			}
+ 		}
+ 	}
+@@ -102,7 +102,7 @@
+ 	}
+ 
+ 	/*Free ressources:*/
+-	xDelete<double>(doublevector);
+-	xDelete<double>(times);
+-	xDelete<double>(values);
++	xDelete<IssmDouble>(IssmDoublevector);
++	xDelete<IssmDouble>(times);
++	xDelete<IssmDouble>(values);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.h	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.h	(revision 12470)
+@@ -9,6 +9,6 @@
+ #include "../../Container/Container.h"
+ 
+ /* local prototypes: */
+-void	InputArtificialNoisex( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,int enum_name,double min,double max);
++void	InputArtificialNoisex( Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,int enum_name,IssmDouble min,IssmDouble max);
+ 
+ #endif  /* _UPDATEINPUTSFROMVECTORXX_H */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.cpp	(revision 12469)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.cpp	(revision 12470)
+@@ -8,7 +8,7 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 
+-void InputArtificialNoisex( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,int enum_name,double min,double max){
++void InputArtificialNoisex( Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,int enum_name,IssmDouble min,IssmDouble max){
+ 
+ 	int i;
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12470-12471.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12470-12471.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12470-12471.diff	(revision 12679)
@@ -0,0 +1,6338 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Element.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Element.h	(revision 12470)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Element.h	(revision 12471)
+@@ -37,78 +37,78 @@
+ 		virtual int    Sid()=0;
+ 		virtual bool   IsFloating()=0; 
+ 		virtual bool   IsNodeOnShelf()=0; 
+-		virtual bool   IsNodeOnShelfFromFlags(double* flags)=0; 
++		virtual bool   IsNodeOnShelfFromFlags(IssmDouble* flags)=0; 
+ 		virtual bool   IsOnBed()=0;
+-		virtual void   GetInputListOnVertices(double* pvalue,int enumtype)=0;
+-		virtual void   GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue)=0;
+-		virtual void   GetInputValue(double* pvalue,Node* node,int enumtype)=0;
++		virtual void   GetInputListOnVertices(IssmDouble* pvalue,int enumtype)=0;
++		virtual void   GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue)=0;
++		virtual void   GetInputValue(IssmDouble* pvalue,Node* node,int enumtype)=0;
+ 		
+-		virtual double SurfaceArea(void)=0;
++		virtual IssmDouble SurfaceArea(void)=0;
+ 		virtual void   InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum)=0;
+ 		virtual void   ComputeBasalStress(Vector* sigma_b)=0;
+ 		virtual void   ComputeStrainRate(Vector* eps)=0;
+ 		virtual void   PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes)=0;
+ 		virtual void   PatchFill(int* pcount, Patch* patch)=0;
+-		virtual void   ListResultsInfo(int** results_enums,int** results_size,double** results_times,int** results_steps,int* num_results)=0;
++		virtual void   ListResultsInfo(int** results_enums,int** results_size,IssmDouble** results_times,int** results_steps,int* num_results)=0;
+ 		virtual void   DeleteResults(void)=0;
+ 		virtual void   Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type)=0;
+-		virtual void   InputToResult(int enum_type,int step,double time)=0;
++		virtual void   InputToResult(int enum_type,int step,IssmDouble time)=0;
+ 		virtual void   InputDuplicate(int original_enum,int new_enum)=0;
+-		virtual void   InputCreate(double scalar,int name,int code)=0;
+-		virtual void   InputCreate(double* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code)=0;
++		virtual void   InputCreate(IssmDouble scalar,int name,int code)=0;
++		virtual void   InputCreate(IssmDouble* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code)=0;
+ 		virtual void   ProcessResultsUnits(void)=0;
+-		virtual void   RequestedOutput(int output_enum,int step,double time)=0;
++		virtual void   RequestedOutput(int output_enum,int step,IssmDouble time)=0;
+ 		
+-		virtual int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units)=0;
+-		virtual void   InputScale(int enum_type,double scale_factor)=0;
++		virtual int    NodalValue(IssmDouble* pvalue, int index, int natureofdataenum,bool process_units)=0;
++		virtual void   InputScale(int enum_type,IssmDouble scale_factor)=0;
+ 		virtual void   GetVectorFromInputs(Vector* vector, int name_enum)=0;
+ 		virtual void   GetVectorFromResults(Vector* vector,int id,int interp)=0;
+-		virtual void   InputArtificialNoise(int enum_type,double min,double max)=0;
+-		virtual bool   InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums)=0;
+-		virtual void   AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,double* vertex_response,double* qmu_part)=0;
++		virtual void   InputArtificialNoise(int enum_type,IssmDouble min,IssmDouble max)=0;
++		virtual bool   InputConvergence(IssmDouble* eps, int* enums,int num_enums,int* criterionenums,IssmDouble* criterionvalues,int num_criterionenums)=0;
++		virtual void   AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part)=0;
+ 		virtual int*   GetHorizontalNeighboorSids(void)=0;
+-		virtual double TimeAdapt()=0;
+-		virtual void   MigrateGroundingLine(double* old_floating_ice,double* sheet_ungrounding)=0;
++		virtual IssmDouble TimeAdapt()=0;
++		virtual void   MigrateGroundingLine(IssmDouble* old_floating_ice,IssmDouble* sheet_ungrounding)=0;
+ 		virtual void   PotentialSheetUngrounding(Vector* potential_sheet_ungrounding)=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   PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm)=0;
++		virtual int    UpdatePotentialSheetUngrounding(IssmDouble* potential_sheet_ungrounding,Vector* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf)=0;
+ 		virtual void   ResetCoordinateSystem()=0;
+-		virtual void   SmearFunction(Vector* smearedvector,double (*WeightFunction)(double distance,double radius),double radius)=0;
++		virtual void   SmearFunction(Vector* smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius)=0;
+ 
+ 		#ifdef _HAVE_RESPONSES_
+-		virtual void   MinVel(double* pminvel, bool process_units)=0;
+-		virtual void   MaxVel(double* pmaxvel, bool process_units)=0;
+-		virtual void   MinVx(double* pminvx, bool process_units)=0;
+-		virtual void   MaxVx(double* pmaxvx, bool process_units)=0;
+-		virtual void   MaxAbsVx(double* pmaxabsvx, bool process_units)=0;
+-		virtual void   MinVy(double* pminvy, bool process_units)=0;
+-		virtual void   MaxVy(double* pmaxvy, bool process_units)=0;
+-		virtual void   MaxAbsVy(double* pmaxabsvy, bool process_units)=0;
+-		virtual void   MinVz(double* pminvz, bool process_units)=0;
+-		virtual void   MaxVz(double* pmaxvz, bool process_units)=0;
+-		virtual void   MaxAbsVz(double* pmaxabsvz, bool process_units)=0;
+-		virtual double MassFlux(double* segment,bool process_units)=0;
+-		virtual void   ElementResponse(double* presponse,int response_enum,bool process_units)=0;
+-		virtual double IceVolume(void)=0;
++		virtual void   MinVel(IssmDouble* pminvel, bool process_units)=0;
++		virtual void   MaxVel(IssmDouble* pmaxvel, bool process_units)=0;
++		virtual void   MinVx(IssmDouble* pminvx, bool process_units)=0;
++		virtual void   MaxVx(IssmDouble* pmaxvx, bool process_units)=0;
++		virtual void   MaxAbsVx(IssmDouble* pmaxabsvx, bool process_units)=0;
++		virtual void   MinVy(IssmDouble* pminvy, bool process_units)=0;
++		virtual void   MaxVy(IssmDouble* pmaxvy, bool process_units)=0;
++		virtual void   MaxAbsVy(IssmDouble* pmaxabsvy, bool process_units)=0;
++		virtual void   MinVz(IssmDouble* pminvz, bool process_units)=0;
++		virtual void   MaxVz(IssmDouble* pmaxvz, bool process_units)=0;
++		virtual void   MaxAbsVz(IssmDouble* pmaxabsvz, bool process_units)=0;
++		virtual IssmDouble MassFlux(IssmDouble* segment,bool process_units)=0;
++		virtual void   ElementResponse(IssmDouble* presponse,int response_enum,bool process_units)=0;
++		virtual IssmDouble IceVolume(void)=0;
+ 		#endif
+ 
+ 		#ifdef _HAVE_CONTROL_
+ 		virtual void   Gradj(Vector* gradient,int control_type,int control_index)=0;
+-		virtual double ThicknessAbsMisfit(bool process_units  ,int weight_index)=0;
+-		virtual double SurfaceAbsVelMisfit(bool process_units ,int weight_index)=0;
+-		virtual double SurfaceRelVelMisfit(bool process_units ,int weight_index)=0;
+-		virtual double SurfaceLogVelMisfit(bool process_units ,int weight_index)=0;
+-		virtual double SurfaceLogVxVyMisfit(bool process_units,int weight_index)=0;
+-		virtual double SurfaceAverageVelMisfit(bool process_units,int weight_index)=0;
+-		virtual double ThicknessAbsGradient(bool process_units,int weight_index)=0;
+-		virtual double RheologyBbarAbsGradient(bool process_units,int weight_index)=0;
+-		virtual double DragCoefficientAbsGradient(bool process_units,int weight_index)=0;
++		virtual IssmDouble ThicknessAbsMisfit(bool process_units  ,int weight_index)=0;
++		virtual IssmDouble SurfaceAbsVelMisfit(bool process_units ,int weight_index)=0;
++		virtual IssmDouble SurfaceRelVelMisfit(bool process_units ,int weight_index)=0;
++		virtual IssmDouble SurfaceLogVelMisfit(bool process_units ,int weight_index)=0;
++		virtual IssmDouble SurfaceLogVxVyMisfit(bool process_units,int weight_index)=0;
++		virtual IssmDouble SurfaceAverageVelMisfit(bool process_units,int weight_index)=0;
++		virtual IssmDouble ThicknessAbsGradient(bool process_units,int weight_index)=0;
++		virtual IssmDouble RheologyBbarAbsGradient(bool process_units,int weight_index)=0;
++		virtual IssmDouble DragCoefficientAbsGradient(bool process_units,int weight_index)=0;
+ 		virtual void   ControlInputGetGradient(Vector* gradient,int enum_type,int control_index)=0;
+-		virtual void   ControlInputSetGradient(double* gradient,int enum_type,int control_index)=0;
+-		virtual void   ControlInputScaleGradient(int enum_type, double scale)=0;
++		virtual void   ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index)=0;
++		virtual void   ControlInputScaleGradient(int enum_type, IssmDouble scale)=0;
+ 		virtual void   GetVectorFromControlInputs(Vector* gradient,int control_enum,int control_index,const char* data)=0;
+-		virtual void   SetControlInputsFromVector(double* vector,int control_enum,int control_index)=0;
+-		virtual void   InputControlUpdate(double scalar,bool save_parameter)=0;
++		virtual void   SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index)=0;
++		virtual void   InputControlUpdate(IssmDouble scalar,bool save_parameter)=0;
+ 		#endif
+ };
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12470)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12471)
+@@ -124,16 +124,16 @@
+ 
+ /*Other*/
+ /*FUNCTION Tria::AverageOntoPartition {{{*/
+-void  Tria::AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,double* vertex_response,double* qmu_part){
++void  Tria::AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){
+ 
+ 	bool      already=false;
+ 	int       i,j;
+ 	int       partition[NUMVERTICES];
+ 	int       offsetsid[NUMVERTICES];
+ 	int       offsetdof[NUMVERTICES];
+-	double    area;
+-	double    mean;
+-	double    values[3];
++	IssmDouble    area;
++	IssmDouble    mean;
++	IssmDouble    values[3];
+ 
+ 	/*First, get the area: */
+ 	area=this->GetArea();
+@@ -231,10 +231,10 @@
+ 
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+-	double     heatcapacity,latentheat;
+-	double     Jdet,D_scalar;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     L[3];
++	IssmDouble     heatcapacity,latentheat;
++	IssmDouble     Jdet,D_scalar;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     L[3];
+ 	GaussTria *gauss=NULL;
+ 
+ 	/*Initialize Element matrix*/
+@@ -290,18 +290,18 @@
+ 	/*Intermediaries */
+ 	int        stabilization;
+ 	int        i,j,ig,dim;
+-	double     Jdettria,DL_scalar,dt,h;
+-	double     vel,vx,vy,dvxdx,dvydy;
+-	double     dvx[2],dvy[2];
+-	double     v_gauss[2]={0.0};
+-	double     xyz_list[NUMVERTICES][3];
+-	double     L[NUMVERTICES];
+-	double     B[2][NUMVERTICES];
+-	double     Bprime[2][NUMVERTICES];
+-	double     K[2][2]                        ={0.0};
+-	double     KDL[2][2]                      ={0.0};
+-	double     DL[2][2]                        ={0.0};
+-	double     DLprime[2][2]                   ={0.0};
++	IssmDouble     Jdettria,DL_scalar,dt,h;
++	IssmDouble     vel,vx,vy,dvxdx,dvydy;
++	IssmDouble     dvx[2],dvy[2];
++	IssmDouble     v_gauss[2]={0.0};
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     L[NUMVERTICES];
++	IssmDouble     B[2][NUMVERTICES];
++	IssmDouble     Bprime[2][NUMVERTICES];
++	IssmDouble     K[2][2]                        ={0.0};
++	IssmDouble     KDL[2][2]                      ={0.0};
++	IssmDouble     DL[2][2]                        ={0.0};
++	IssmDouble     DLprime[2][2]                   ={0.0};
+ 	GaussTria *gauss=NULL;
+ 
+ 	/*Initialize Element matrix*/
+@@ -409,14 +409,14 @@
+ 
+ 	/*Intermediaries */
+ 	int        i,j,ig,dim;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     Jdettria,dt,vx,vy;
+-	double     L[NUMVERTICES];
+-	double     B[2][NUMVERTICES];
+-	double     Bprime[2][NUMVERTICES];
+-	double     DL[2][2]={0.0};
+-	double     DLprime[2][2]={0.0};
+-	double     DL_scalar;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     Jdettria,dt,vx,vy;
++	IssmDouble     L[NUMVERTICES];
++	IssmDouble     B[2][NUMVERTICES];
++	IssmDouble     Bprime[2][NUMVERTICES];
++	IssmDouble     DL[2][2]={0.0};
++	IssmDouble     DLprime[2][2]={0.0};
++	IssmDouble     DL_scalar;
+ 	GaussTria  *gauss=NULL;
+ 
+ 	/*Initialize Element matrix*/
+@@ -484,9 +484,9 @@
+ 
+ 	/* Intermediaries */
+ 	int        i,j,ig;
+-	double     DL_scalar,Jdet;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     L[1][3];
++	IssmDouble     DL_scalar,Jdet;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     L[1][3];
+ 	GaussTria *gauss = NULL;
+ 
+ 	/*Initialize Element matrix*/
+@@ -598,10 +598,10 @@
+ 
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+-	double     Jdettria,dt;
+-	double     surface_mass_balance_g,basal_melting_g,basal_melting_correction_g,thickness_g;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     L[NUMVERTICES];
++	IssmDouble     Jdettria,dt;
++	IssmDouble     surface_mass_balance_g,basal_melting_g,basal_melting_correction_g,thickness_g;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     L[NUMVERTICES];
+ 	GaussTria* gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -649,10 +649,10 @@
+ 
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+-	double     Jdettria,dt;
+-	double     surface_mass_balance_g,basal_melting_g,thickness_g;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     L[NUMVERTICES];
++	IssmDouble     Jdettria,dt;
++	IssmDouble     surface_mass_balance_g,basal_melting_g,thickness_g;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     L[NUMVERTICES];
+ 	GaussTria* gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -695,10 +695,10 @@
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+ 	int        analysis_type;
+-	double     Jdet;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     slope[2];
+-	double     basis[3];
++	IssmDouble     Jdet;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     slope[2];
++	IssmDouble     basis[3];
+ 	GaussTria* gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -786,15 +786,15 @@
+ void  Tria::ComputeStressTensor(){
+ 
+ 	int         iv;
+-	double      xyz_list[NUMVERTICES][3];
+-	double      pressure,viscosity;
+-	double      epsilon[3]; /* epsilon=[exx,eyy,exy];*/
+-	double      sigma_xx[NUMVERTICES];
+-	double		sigma_yy[NUMVERTICES];
+-	double		sigma_zz[NUMVERTICES]={0,0,0};
+-	double      sigma_xy[NUMVERTICES];
+-	double		sigma_xz[NUMVERTICES]={0,0,0};
+-	double		sigma_yz[NUMVERTICES]={0,0,0};
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble      pressure,viscosity;
++	IssmDouble      epsilon[3]; /* epsilon=[exx,eyy,exy];*/
++	IssmDouble      sigma_xx[NUMVERTICES];
++	IssmDouble		sigma_yy[NUMVERTICES];
++	IssmDouble		sigma_zz[NUMVERTICES]={0,0,0};
++	IssmDouble      sigma_xy[NUMVERTICES];
++	IssmDouble		sigma_xz[NUMVERTICES]={0,0,0};
++	IssmDouble		sigma_yz[NUMVERTICES]={0,0,0};
+ 	GaussTria* gauss=NULL;
+ 
+ 	/* Get node coordinates and dof list: */
+@@ -947,11 +947,11 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::GetArea {{{*/
+-double Tria::GetArea(void){
++IssmDouble Tria::GetArea(void){
+ 
+-	double area=0;
+-	double xyz_list[NUMVERTICES][3];
+-	double x1,y1,x2,y2,x3,y3;
++	IssmDouble area=0;
++	IssmDouble xyz_list[NUMVERTICES][3];
++	IssmDouble x1,y1,x2,y2,x3,y3;
+ 
+ 	/*Get xyz list: */
+ 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
+@@ -1021,11 +1021,11 @@
+ 	_error_("Node provided not found among element nodes");
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetInputListOnVertices(double* pvalue,int enumtype) {{{*/
+-void Tria::GetInputListOnVertices(double* pvalue,int enumtype){
++/*FUNCTION Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype) {{{*/
++void Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype){
+ 
+ 	/*Intermediaries*/
+-	double     value[NUMVERTICES];
++	IssmDouble     value[NUMVERTICES];
+ 	GaussTria *gauss              = NULL;
+ 
+ 	/*Recover input*/
+@@ -1046,10 +1046,10 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue) {{{*/
+-void Tria::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue){
++/*FUNCTION Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue) {{{*/
++void Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){
+ 
+-	double     value[NUMVERTICES];
++	IssmDouble     value[NUMVERTICES];
+ 	GaussTria *gauss = NULL;
+ 	Input     *input = inputs->GetInput(enumtype);
+ 
+@@ -1072,10 +1072,10 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue,int index) TO BE REMOVED{{{*/
+-void Tria::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue,int index){
++/*FUNCTION Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue,int index) TO BE REMOVED{{{*/
++void Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue,int index){
+ 
+-	double     value[NUMVERTICES];
++	IssmDouble     value[NUMVERTICES];
+ 	GaussTria *gauss = NULL;
+ 	Input     *input = inputs->GetInput(enumtype);
+ 
+@@ -1098,8 +1098,8 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetInputValue(double* pvalue,Node* node,int enumtype) {{{*/
+-void Tria::GetInputValue(double* pvalue,Node* node,int enumtype){
++/*FUNCTION Tria::GetInputValue(IssmDouble* pvalue,Node* node,int enumtype) {{{*/
++void Tria::GetInputValue(IssmDouble* pvalue,Node* node,int enumtype){
+ 
+ 	Input* input=inputs->GetInput(enumtype);
+ 	if(!input) _error_("No input of type %s found in tria",EnumToStringx(enumtype));
+@@ -1149,14 +1149,14 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::GetStrainRate2d(double* epsilon,double* xyz_list, GaussTria* gauss, Input* vx_input, Input* vy_input){{{*/
+-void Tria::GetStrainRate2d(double* epsilon,double* xyz_list, GaussTria* gauss, Input* vx_input, Input* vy_input){
++/*FUNCTION Tria::GetStrainRate2d(IssmDouble* epsilon,IssmDouble* xyz_list, GaussTria* gauss, Input* vx_input, Input* vy_input){{{*/
++void Tria::GetStrainRate2d(IssmDouble* epsilon,IssmDouble* xyz_list, GaussTria* gauss, Input* vx_input, Input* vy_input){
+ 	/*Compute the 2d Strain Rate (3 components):
+ 	 * epsilon=[exx eyy exy] */
+ 
+ 	int i;
+-	double epsilonvx[3];
+-	double epsilonvy[3];
++	IssmDouble epsilonvx[3];
++	IssmDouble epsilonvy[3];
+ 
+ 	/*Check that both inputs have been found*/
+ 	if (!vx_input || !vy_input){
+@@ -1225,7 +1225,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputArtificialNoise{{{*/
+-void  Tria::InputArtificialNoise(int enum_type,double min,double max){
++void  Tria::InputArtificialNoise(int enum_type,IssmDouble min,IssmDouble max){
+ 
+ 	Input* input=NULL;
+ 
+@@ -1238,7 +1238,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputConvergence{{{*/
+-bool Tria::InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){
++bool Tria::InputConvergence(IssmDouble* eps, int* enums,int num_enums,int* criterionenums,IssmDouble* criterionvalues,int num_criterionenums){
+ 
+ 	bool    converged=true;
+ 	int     i;
+@@ -1305,7 +1305,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputScale{{{*/
+-void  Tria::InputScale(int enum_type,double scale_factor){
++void  Tria::InputScale(int enum_type,IssmDouble scale_factor){
+ 
+ 	Input* input=NULL;
+ 
+@@ -1318,7 +1318,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputToResult{{{*/
+-void  Tria::InputToResult(int enum_type,int step,double time){
++void  Tria::InputToResult(int enum_type,int step,IssmDouble time){
+ 
+ 	int    i;
+ 	Input *input = NULL;
+@@ -1349,8 +1349,8 @@
+ 	this->inputs->AddInput(new IntInput(name,constant));
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromConstant(double value, int name);{{{*/
+-void  Tria::InputUpdateFromConstant(double constant, int name){
++/*FUNCTION Tria::InputUpdateFromConstant(IssmDouble value, int name);{{{*/
++void  Tria::InputUpdateFromConstant(IssmDouble constant, int name){
+ 	/*Check that name is an element input*/
+ 	if (!IsInput(name)) return;
+ 
+@@ -1373,12 +1373,12 @@
+ 	/*Intermediaries*/
+ 	int    i,j;
+ 	int    tria_vertex_ids[3];
+-	double nodeinputs[3];
+-	double cmmininputs[3];
+-	double cmmaxinputs[3];
++	IssmDouble nodeinputs[3];
++	IssmDouble cmmininputs[3];
++	IssmDouble cmmaxinputs[3];
+ 	bool   control_analysis=false;
+ 	int    num_control_type;
+-	double yts;
++	IssmDouble yts;
+ 	int    num_cm_responses;
+    
+ 	/*Get parameters: */
+@@ -1454,7 +1454,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromSolution {{{*/
+-void  Tria::InputUpdateFromSolution(double* solution){
++void  Tria::InputUpdateFromSolution(IssmDouble* solution){
+ 
+ 	/*retrive parameters: */
+ 	int analysis_type;
+@@ -1509,12 +1509,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromSolutionOneDof{{{*/
+-void  Tria::InputUpdateFromSolutionOneDof(double* solution,int enum_type){
++void  Tria::InputUpdateFromSolutionOneDof(IssmDouble* solution,int enum_type){
+ 
+ 	const int numdof          = NDOF1*NUMVERTICES;
+ 
+ 	int*      doflist=NULL;
+-	double    values[numdof];
++	IssmDouble    values[numdof];
+ 
+ 	/*Get dof list: */
+ 	GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
+@@ -1533,20 +1533,20 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromSolutionPrognostic{{{*/
+-void  Tria::InputUpdateFromSolutionPrognostic(double* solution){
++void  Tria::InputUpdateFromSolutionPrognostic(IssmDouble* solution){
+ 
+ 	/*Intermediaries*/
+ 	const int numdof = NDOF1*NUMVERTICES;
+ 
+ 	int       i,hydroadjustment;
+ 	int*      doflist=NULL;
+-	double    rho_ice,rho_water,minthickness;
+-	double    newthickness[numdof];
+-	double    newbed[numdof];
+-	double    newsurface[numdof];
+-	double    oldbed[NUMVERTICES];
+-	double    oldsurface[NUMVERTICES];
+-	double    oldthickness[NUMVERTICES];
++	IssmDouble    rho_ice,rho_water,minthickness;
++	IssmDouble    newthickness[numdof];
++	IssmDouble    newbed[numdof];
++	IssmDouble    newsurface[numdof];
++	IssmDouble    oldbed[NUMVERTICES];
++	IssmDouble    oldsurface[NUMVERTICES];
++	IssmDouble    oldthickness[NUMVERTICES];
+ 
+ 	/*Get dof list: */
+ 	GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
+@@ -1599,8 +1599,8 @@
+ 	xDelete<int>(doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromVector(double* vector, int name, int type);{{{*/
+-void  Tria::InputUpdateFromVector(double* vector, int name, int type){
++/*FUNCTION Tria::InputUpdateFromVector(IssmDouble* vector, int name, int type);{{{*/
++void  Tria::InputUpdateFromVector(IssmDouble* vector, int name, int type){
+ 
+ 	/*Check that name is an element input*/
+ 	if (!IsInput(name)) return;
+@@ -1610,7 +1610,7 @@
+ 		case VertexEnum:
+ 
+ 			/*New TriaP1Input*/
+-			double values[3];
++			IssmDouble values[3];
+ 
+ 			/*Get values on the 3 vertices*/
+ 			for (int i=0;i<3;i++){
+@@ -1641,8 +1641,8 @@
+ 	_error_(" not supported yet!");
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputCreate(double scalar,int enum,int code);{{{*/
+-void Tria::InputCreate(double scalar,int name,int code){
++/*FUNCTION Tria::InputCreate(IssmDouble scalar,int enum,int code);{{{*/
++void Tria::InputCreate(IssmDouble scalar,int name,int code){
+ 
+ 	/*Check that name is an element input*/
+ 	if (!IsInput(name)) return;
+@@ -1653,26 +1653,26 @@
+ 	else if ((code==6) || (code==2)){ //integer
+ 		this->inputs->AddInput(new IntInput(name,(int)scalar));
+ 	}
+-	else if ((code==7) || (code==3)){ //double
++	else if ((code==7) || (code==3)){ //IssmDouble
+ 		this->inputs->AddInput(new DoubleInput(name,(int)scalar));
+ 	}
+ 	else _error_("%s%i"," could not recognize nature of vector from code ",code);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputCreate(double* vector,int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){{{*/
+-void Tria::InputCreate(double* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){//index into elements
++/*FUNCTION Tria::InputCreate(IssmDouble* vector,int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){{{*/
++void Tria::InputCreate(IssmDouble* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){//index into elements
+ 
+ 	/*Intermediaries*/
+ 	int    i,j,t;
+ 	int    tria_vertex_ids[3];
+ 	int    row;
+-	double nodeinputs[3];
+-	double time;
++	IssmDouble nodeinputs[3];
++	IssmDouble time;
+ 	TransientInput* transientinput=NULL;
+ 	int    numberofvertices;
+ 	int    numberofelements;
+-	double yts;
++	IssmDouble yts;
+ 
+ 
+ 	/*Fetch parameters: */
+@@ -1692,7 +1692,7 @@
+ 		if(M==numberofvertices){
+ 
+ 			/*create input values: */
+-			for(i=0;i<3;i++)nodeinputs[i]=(double)vector[tria_vertex_ids[i]-1];
++			for(i=0;i<3;i++)nodeinputs[i]=(IssmDouble)vector[tria_vertex_ids[i]-1];
+ 
+ 			/*process units: */
+ 			UnitConversion(&nodeinputs[0], 3 ,ExtToIuEnum, vector_enum);
+@@ -1707,14 +1707,14 @@
+ 				/*create input values: */
+ 				for(i=0;i<3;i++){
+ 					row=tria_vertex_ids[i]-1;
+-					nodeinputs[i]=(double)vector[N*row+t];
++					nodeinputs[i]=(IssmDouble)vector[N*row+t];
+ 				}
+ 
+ 				/*process units: */
+ 				UnitConversion(&nodeinputs[0], 3 ,ExtToIuEnum, vector_enum);
+ 
+ 				/*time? :*/
+-				time=(double)vector[(M-1)*N+t]*yts;
++				time=(IssmDouble)vector[(M-1)*N+t]*yts;
+ 
+ 				if(t==0) transientinput=new TransientInput(vector_enum);
+ 				transientinput->AddTimeInput(new TriaP1Input(vector_enum,nodeinputs),time);
+@@ -1735,8 +1735,8 @@
+ 			else if (code==6){ //integer
+ 				this->inputs->AddInput(new IntInput(vector_enum,(int)vector[index]));
+ 			}
+-			else if (code==7){ //double
+-				this->inputs->AddInput(new DoubleInput(vector_enum,(double)vector[index]));
++			else if (code==7){ //IssmDouble
++				this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index]));
+ 			}
+ 			else _error_("%s%i"," could not recognize nature of vector from code ",code);
+ 		}
+@@ -1816,7 +1816,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::IsNodeOnShelfFromFlags {{{*/
+-bool   Tria::IsNodeOnShelfFromFlags(double* flags){
++bool   Tria::IsNodeOnShelfFromFlags(IssmDouble* flags){
+ 
+ 	int  i;
+ 	bool shelf=false;
+@@ -1839,14 +1839,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::ListResultsInfo{{{*/
+-void Tria::ListResultsInfo(int** in_resultsenums,int** in_resultssizes,double** in_resultstimes,int** in_resultssteps,int* in_num_results){
++void Tria::ListResultsInfo(int** in_resultsenums,int** in_resultssizes,IssmDouble** in_resultstimes,int** in_resultssteps,int* in_num_results){
+ 
+ 	/*Intermediaries*/
+ 	int     i;
+ 	int     numberofresults = 0;
+ 	int     *resultsenums   = NULL;
+ 	int     *resultssizes   = NULL;
+-	double  *resultstimes   = NULL;
++	IssmDouble  *resultstimes   = NULL;
+ 	int     *resultssteps   = NULL;
+ 
+ 	/*Checks*/
+@@ -1863,7 +1863,7 @@
+ 		/*Allocate output*/
+ 		resultsenums=xNew<int>(numberofresults);
+ 		resultssizes=xNew<int>(numberofresults);
+-		resultstimes=xNew<double>(numberofresults);
++		resultstimes=xNew<IssmDouble>(numberofresults);
+ 		resultssteps=xNew<int>(numberofresults);
+ 
+ 		/*populate enums*/
+@@ -1890,14 +1890,14 @@
+ 
+ }/*}}}*/
+ /*FUNCTION Tria::MigrateGroundingLine{{{*/
+-void  Tria::MigrateGroundingLine(double* old_floating_ice,double* sheet_ungrounding){
++void  Tria::MigrateGroundingLine(IssmDouble* old_floating_ice,IssmDouble* sheet_ungrounding){
+ 
+ 	int     i,migration_style,unground;
+ 	bool    elementonshelf = false;
+-	double  bed_hydro,yts,gl_melting_rate;
+-	double  rho_water,rho_ice,density;
+-	double  melting[NUMVERTICES];
+-	double  h[NUMVERTICES],s[NUMVERTICES],b[NUMVERTICES],ba[NUMVERTICES];
++	IssmDouble  bed_hydro,yts,gl_melting_rate;
++	IssmDouble  rho_water,rho_ice,density;
++	IssmDouble  melting[NUMVERTICES];
++	IssmDouble  h[NUMVERTICES],s[NUMVERTICES],b[NUMVERTICES],ba[NUMVERTICES];
+ 
+ 	/*Recover info at the vertices: */
+ 	parameters->FindParam(&migration_style,GroundinglineMigrationEnum);
+@@ -1972,11 +1972,11 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::NodalValue {{{*/
+-int    Tria::NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units){
++int    Tria::NodalValue(IssmDouble* pvalue, int index, int natureofdataenum,bool process_units){
+ 
+ 	int i;
+ 	int found=0;
+-	double value;
++	IssmDouble value;
+ 	Input* data=NULL;
+ 	GaussTria *gauss                            = NULL;
+ 
+@@ -2057,9 +2057,9 @@
+ void  Tria::PotentialSheetUngrounding(Vector* potential_sheet_ungrounding){
+ 
+ 	int     i;
+-	double  h[NUMVERTICES],ba[NUMVERTICES];
+-	double  bed_hydro;
+-	double  rho_water,rho_ice,density;
++	IssmDouble  h[NUMVERTICES],ba[NUMVERTICES];
++	IssmDouble  bed_hydro;
++	IssmDouble  rho_water,rho_ice,density;
+ 	bool    elementonshelf = false;
+ 
+ 	/*material parameters: */
+@@ -2083,58 +2083,58 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::PositiveDegreeDay{{{*/
+-void  Tria::PositiveDegreeDay(double* pdds,double* pds,double signorm){
++void  Tria::PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm){
+ 
+    int    i,iqj,imonth;
+-   double agd[NUMVERTICES];             // surface mass balance
+-   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
++   IssmDouble agd[NUMVERTICES];             // surface mass balance
++   IssmDouble saccu[NUMVERTICES] = {0};     // yearly surface accumulation
++   IssmDouble smelt[NUMVERTICES] = {0};     // yearly melt
++   IssmDouble precrunoff[NUMVERTICES];      // yearly runoff
++   IssmDouble prect; // total precipitation during 1 year taking into account des. ef.
++   IssmDouble water; //water=rain + snowmelt 
++   IssmDouble runoff; //meltwater only, does not include rain 
++   IssmDouble sconv; //rhow_rain/rhoi / 12 months
+ 
+-   double rho_water,rho_ice,density;
+-   double lapser=6.5/1000, sealev=0;    // lapse rate. degrees per meter. 7.5 lev's 99 paper, 9 Marshall 99 paper
+-   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
++   IssmDouble rho_water,rho_ice,density;
++   IssmDouble lapser=6.5/1000, sealev=0;    // lapse rate. degrees per meter. 7.5 lev's 99 paper, 9 Marshall 99 paper
++   IssmDouble desfac = 0.5;                 // desert elevation factor
++   IssmDouble s0p[NUMVERTICES]={0};         // should be set to elevation from precip source
++   IssmDouble s0t[NUMVERTICES]={0};         // should be set to elevation from temperature source
++   IssmDouble st;             // elevation between altitude of the temp record and current altitude
++   IssmDouble 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 signormc = signorm - 0.5;     // sigma of the temperature distribution for cloudy day
+-   double siglimc, 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
++   IssmDouble siglim;          // sigma limit for the integration which is equal to 2.5 sigmanorm
++   IssmDouble signormc = signorm - 0.5;     // sigma of the temperature distribution for cloudy day
++   IssmDouble siglimc, siglim0, siglim0c;
++   IssmDouble PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C)
++   IssmDouble DT = 0.02;
++   IssmDouble 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};  
++   IssmDouble q, qmpt; // q is desert/elev. fact, hnpfac is huybrect fact, and pd is normal dist.
++   IssmDouble qm[NUMVERTICES] = {0};        // snow part of the precipitation 
++   IssmDouble qmt[NUMVERTICES] = {0};       // precipitation without desertification effect adjustment
++   IssmDouble qmp[NUMVERTICES] = {0};       // desertification taken into account
++   IssmDouble pdd[NUMVERTICES] = {0};     
++   IssmDouble frzndd[NUMVERTICES] = {0};  
+ 
+-   double tstar;                        // monthly mean surface temp
+-   double Tsum[NUMVERTICES]= {0};       // average summer (JJA) temperature
+-   double Tsurf[NUMVERTICES] = {0};     // average annual temperature    
++   IssmDouble tstar;                        // monthly mean surface temp
++   IssmDouble Tsum[NUMVERTICES]= {0};       // average summer (JJA) temperature
++   IssmDouble Tsurf[NUMVERTICES] = {0};     // average annual temperature    
+    
+-   double h[NUMVERTICES],s[NUMVERTICES],ttmp[NUMVERTICES],prectmp[NUMVERTICES]; // ,b[NUMVERTICES]
+-   double t[NUMVERTICES+1][12],prec[NUMVERTICES+1][12];
+-   double deltm=1/12;
++   IssmDouble h[NUMVERTICES],s[NUMVERTICES],ttmp[NUMVERTICES],prectmp[NUMVERTICES]; // ,b[NUMVERTICES]
++   IssmDouble t[NUMVERTICES+1][12],prec[NUMVERTICES+1][12];
++   IssmDouble 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).
++   IssmDouble snwm;  // snow that could have been melted in a year.
++   IssmDouble snwmf; //  ablation factor for snow per positive degree day.
++   IssmDouble 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;
++   IssmDouble dfrz=1.5, CovrLm=2009./3.35e+5, dCovrLm=dfrz*CovrLm; //m*J kg^-1 C^-1 /(J kg^-1)=m/C yr
++   IssmDouble supice,supcap,diffndd;
++   IssmDouble fsupT=0.5,  fsupndd=0.5;  // Tsurf mode factors for supice
++   IssmDouble pddtj[NUMVERTICES], hmx2;
+ 
+    /*Recover info at the vertices: */
+    GetInputListOnVertices(&h[0],ThicknessEnum);
+@@ -2145,7 +2145,7 @@
+ 	/*Recover monthly temperatures*/
+ 	Input*     input=inputs->GetInput(SurfaceforcingsMonthlytemperaturesEnum); _assert_(input);
+ 	GaussTria* gauss=new GaussTria();
+-	double time,yts;
++	IssmDouble time,yts;
+ 	this->parameters->FindParam(&time,TimeEnum);
+ 	this->parameters->FindParam(&yts,ConstantsYtsEnum);
+ 	for(int month=0;month<12;month++){
+@@ -2329,7 +2329,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::RequestedOutput{{{*/
+-void Tria::RequestedOutput(int output_enum,int step,double time){
++void Tria::RequestedOutput(int output_enum,int step,IssmDouble time){
+ 
+ 	if(IsInput(output_enum)){
+ 		/*just transfer this input to results, and we are done: */
+@@ -2363,7 +2363,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::SmearFunction {{{*/
+-void  Tria::SmearFunction(Vector*  smearedvector,double (*WeightFunction)(double distance,double radius),double radius){
++void  Tria::SmearFunction(Vector*  smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius){
+ 	_error_("not implemented yet");
+ 
+ }
+@@ -2385,13 +2385,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::SurfaceArea {{{*/
+-double Tria::SurfaceArea(void){
++IssmDouble Tria::SurfaceArea(void){
+ 
+ 	int    i;
+-	double S;
+-	double normal[3];
+-	double v13[3],v23[3];
+-	double xyz_list[NUMVERTICES][3];
++	IssmDouble S;
++	IssmDouble normal[3];
++	IssmDouble v13[3],v23[3];
++	IssmDouble xyz_list[NUMVERTICES][3];
+ 
+ 	/*If on water, return 0: */
+ 	if(IsOnWater())return 0;
+@@ -2407,19 +2407,19 @@
+ 	normal[1]=v13[2]*v23[0]-v13[0]*v23[2];
+ 	normal[2]=v13[0]*v23[1]-v13[1]*v23[0];
+ 
+-	S = 0.5 * sqrt(pow(normal[0],(double)2)+pow(normal[1],(double)2)+pow(normal[2],(double)2));
++	S = 0.5 * sqrt(pow(normal[0],(IssmDouble)2)+pow(normal[1],(IssmDouble)2)+pow(normal[2],(IssmDouble)2));
+ 
+ 	/*Return: */
+ 	return S;
+ }
+ /*}}}*/
+ /*FUNCTION Tria::SurfaceNormal{{{*/
+-void Tria::SurfaceNormal(double* surface_normal, double xyz_list[3][3]){
++void Tria::SurfaceNormal(IssmDouble* surface_normal, IssmDouble xyz_list[3][3]){
+ 
+ 	int i;
+-	double v13[3],v23[3];
+-	double normal[3];
+-	double normal_norm;
++	IssmDouble v13[3],v23[3];
++	IssmDouble normal[3];
++	IssmDouble normal_norm;
+ 
+ 	for (i=0;i<3;i++){
+ 		v13[i]=xyz_list[0][i]-xyz_list[2][i];
+@@ -2430,7 +2430,7 @@
+ 	normal[1]=v13[2]*v23[0]-v13[0]*v23[2];
+ 	normal[2]=v13[0]*v23[1]-v13[1]*v23[0];
+ 
+-	normal_norm=sqrt( pow(normal[0],(double)2)+pow(normal[1],(double)2)+pow(normal[2],(double)2) );
++	normal_norm=sqrt( pow(normal[0],(IssmDouble)2)+pow(normal[1],(IssmDouble)2)+pow(normal[2],(IssmDouble)2) );
+ 
+ 	*(surface_normal)=normal[0]/normal_norm;
+ 	*(surface_normal+1)=normal[1]/normal_norm;
+@@ -2438,16 +2438,16 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::TimeAdapt{{{*/
+-double  Tria::TimeAdapt(void){
++IssmDouble  Tria::TimeAdapt(void){
+ 
+ 	/*intermediary: */
+ 	int    i;
+-	double C,dt;
+-	double dx,dy;
+-	double maxx,minx;
+-	double maxy,miny;
+-	double maxabsvx,maxabsvy;
+-	double xyz_list[NUMVERTICES][3];
++	IssmDouble C,dt;
++	IssmDouble dx,dy;
++	IssmDouble maxx,minx;
++	IssmDouble maxy,miny;
++	IssmDouble maxabsvx,maxabsvy;
++	IssmDouble xyz_list[NUMVERTICES][3];
+ 
+ 	/*get CFL coefficient:*/
+ 	this->parameters->FindParam(&C,TimesteppingCflCoefficientEnum);
+@@ -2491,8 +2491,8 @@
+ 	int    tria_node_ids[3];
+ 	int    tria_vertex_ids[3];
+ 	int    tria_type;
+-	double nodeinputs[3];
+-	double yts;
++	IssmDouble nodeinputs[3];
++	IssmDouble yts;
+ 	int    progstabilization,balancestabilization;
+ 	bool   dakota_analysis;
+ 
+@@ -2584,7 +2584,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::UpdatePotentialSheetUngrounding{{{*/
+-int Tria::UpdatePotentialSheetUngrounding(double* vertices_potentially_ungrounding,Vector* vec_nodes_on_iceshelf,double* nodes_on_iceshelf){
++int Tria::UpdatePotentialSheetUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf){
+ 
+ 	int i;
+ 	int nflipped=0;
+@@ -2606,11 +2606,11 @@
+ 
+ #ifdef _HAVE_RESPONSES_
+ /*FUNCTION Tria::IceVolume {{{*/
+-double Tria::IceVolume(void){
++IssmDouble Tria::IceVolume(void){
+ 
+ 	/*The volume of a troncated prism is base * 1/3 sum(length of edges)*/
+-	double base,surface,bed;
+-	double xyz_list[NUMVERTICES][3];
++	IssmDouble base,surface,bed;
++	IssmDouble xyz_list[NUMVERTICES][3];
+ 
+ 	if(IsOnWater())return 0;
+ 
+@@ -2632,17 +2632,17 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::MassFlux {{{*/
+-double Tria::MassFlux( double* segment,bool process_units){
++IssmDouble Tria::MassFlux( IssmDouble* segment,bool process_units){
+ 
+ 	const int    numdofs=2;
+ 
+ 	int        i,dim;
+-	double     mass_flux=0;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     normal[2];
+-	double     length,rho_ice;
+-	double     x1,y1,x2,y2,h1,h2;
+-	double     vx1,vx2,vy1,vy2;
++	IssmDouble     mass_flux=0;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     normal[2];
++	IssmDouble     length,rho_ice;
++	IssmDouble     x1,y1,x2,y2,h1,h2;
++	IssmDouble     vx1,vx2,vy1,vy2;
+ 	GaussTria* gauss_1=NULL;
+ 	GaussTria* gauss_2=NULL;
+ 
+@@ -2704,10 +2704,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::MaxAbsVx{{{*/
+-void  Tria::MaxAbsVx(double* pmaxabsvx, bool process_units){
++void  Tria::MaxAbsVx(IssmDouble* pmaxabsvx, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxabsvx=this->inputs->MaxAbs(VxEnum);
++	IssmDouble maxabsvx=this->inputs->MaxAbs(VxEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxabsvx=UnitConversion(maxabsvx,IuToExtEnum,VxEnum);
+@@ -2717,10 +2717,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::MaxAbsVy{{{*/
+-void  Tria::MaxAbsVy(double* pmaxabsvy, bool process_units){
++void  Tria::MaxAbsVy(IssmDouble* pmaxabsvy, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxabsvy=this->inputs->MaxAbs(VyEnum);
++	IssmDouble maxabsvy=this->inputs->MaxAbs(VyEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxabsvy=UnitConversion(maxabsvy,IuToExtEnum,VyEnum);
+@@ -2730,10 +2730,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::MaxAbsVz{{{*/
+-void  Tria::MaxAbsVz(double* pmaxabsvz, bool process_units){
++void  Tria::MaxAbsVz(IssmDouble* pmaxabsvz, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxabsvz=this->inputs->MaxAbs(VzEnum);
++	IssmDouble maxabsvz=this->inputs->MaxAbs(VzEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxabsvz=UnitConversion(maxabsvz,IuToExtEnum,VyEnum);
+@@ -2743,10 +2743,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::MaxVel{{{*/
+-void  Tria::MaxVel(double* pmaxvel, bool process_units){
++void  Tria::MaxVel(IssmDouble* pmaxvel, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxvel=this->inputs->Max(VelEnum);
++	IssmDouble maxvel=this->inputs->Max(VelEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxvel=UnitConversion(maxvel,IuToExtEnum,VelEnum);
+@@ -2756,10 +2756,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::MaxVx{{{*/
+-void  Tria::MaxVx(double* pmaxvx, bool process_units){
++void  Tria::MaxVx(IssmDouble* pmaxvx, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxvx=this->inputs->Max(VxEnum);
++	IssmDouble maxvx=this->inputs->Max(VxEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxvx=UnitConversion(maxvx,IuToExtEnum,VxEnum);
+@@ -2769,10 +2769,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::MaxVy{{{*/
+-void  Tria::MaxVy(double* pmaxvy, bool process_units){
++void  Tria::MaxVy(IssmDouble* pmaxvy, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxvy=this->inputs->Max(VyEnum);
++	IssmDouble maxvy=this->inputs->Max(VyEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxvy=UnitConversion(maxvy,IuToExtEnum,VyEnum);
+@@ -2783,10 +2783,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::MaxVz{{{*/
+-void  Tria::MaxVz(double* pmaxvz, bool process_units){
++void  Tria::MaxVz(IssmDouble* pmaxvz, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxvz=this->inputs->Max(VzEnum);
++	IssmDouble maxvz=this->inputs->Max(VzEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxvz=UnitConversion(maxvz,IuToExtEnum,VzEnum);
+@@ -2796,10 +2796,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::MinVel{{{*/
+-void  Tria::MinVel(double* pminvel, bool process_units){
++void  Tria::MinVel(IssmDouble* pminvel, bool process_units){
+ 
+ 	/*Get minimum:*/
+-	double minvel=this->inputs->Min(VelEnum);
++	IssmDouble minvel=this->inputs->Min(VelEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) minvel=UnitConversion(minvel,IuToExtEnum,VelEnum);
+@@ -2809,10 +2809,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::MinVx{{{*/
+-void  Tria::MinVx(double* pminvx, bool process_units){
++void  Tria::MinVx(IssmDouble* pminvx, bool process_units){
+ 
+ 	/*Get minimum:*/
+-	double minvx=this->inputs->Min(VxEnum);
++	IssmDouble minvx=this->inputs->Min(VxEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) minvx=UnitConversion(minvx,IuToExtEnum,VxEnum);
+@@ -2822,10 +2822,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::MinVy{{{*/
+-void  Tria::MinVy(double* pminvy, bool process_units){
++void  Tria::MinVy(IssmDouble* pminvy, bool process_units){
+ 
+ 	/*Get minimum:*/
+-	double minvy=this->inputs->Min(VyEnum);
++	IssmDouble minvy=this->inputs->Min(VyEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) minvy=UnitConversion(minvy,IuToExtEnum,VyEnum);
+@@ -2835,10 +2835,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::MinVz{{{*/
+-void  Tria::MinVz(double* pminvz, bool process_units){
++void  Tria::MinVz(IssmDouble* pminvz, bool process_units){
+ 
+ 	/*Get minimum:*/
+-	double minvz=this->inputs->Min(VzEnum);
++	IssmDouble minvz=this->inputs->Min(VzEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) minvz=UnitConversion(minvz,IuToExtEnum,VzEnum);
+@@ -2848,7 +2848,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::ElementResponse{{{*/
+-void Tria::ElementResponse(double* presponse,int response_enum,bool process_units){
++void Tria::ElementResponse(IssmDouble* presponse,int response_enum,bool process_units){
+ 
+ 	switch(response_enum){
+ 		case MaterialsRheologyBbarEnum:
+@@ -2857,7 +2857,7 @@
+ 		case VelEnum:
+ 
+ 			/*Get input:*/
+-			double vel;
++			IssmDouble vel;
+ 			Input* vel_input;
+ 
+ 			vel_input=this->inputs->GetInput(VelEnum); _assert_(vel_input);
+@@ -2899,14 +2899,14 @@
+ 
+ 	/*Intermediaries*/
+ 	int        i,j,ig;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     viscosity,newviscosity,oldviscosity;
+-	double     viscosity_overshoot,thickness,Jdet;
+-	double     epsilon[3],oldepsilon[3];    /* epsilon=[exx,eyy,exy];    */
+-	double     B[3][numdof];
+-	double     Bprime[3][numdof];
+-	double     D[3][3]   = {0.0};
+-	double     D_scalar;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     viscosity,newviscosity,oldviscosity;
++	IssmDouble     viscosity_overshoot,thickness,Jdet;
++	IssmDouble     epsilon[3],oldepsilon[3];    /* epsilon=[exx,eyy,exy];    */
++	IssmDouble     B[3][numdof];
++	IssmDouble     Bprime[3][numdof];
++	IssmDouble     D[3][3]   = {0.0};
++	IssmDouble     D_scalar;
+ 	GaussTria *gauss = NULL;
+ 
+ 	/*Initialize Element matrix*/
+@@ -2964,15 +2964,15 @@
+ 	/*Intermediaries*/
+ 	int        i,j,ig;
+ 	int        analysis_type;
+-	double     MAXSLOPE  = .06; // 6 %
+-	double     MOUNTAINKEXPONENT = 10;
+-	double     slope_magnitude,alpha2;
+-	double     Jdet;
+-	double     L[2][numdof];
+-	double     DL[2][2]  = {{ 0,0 },{0,0}};
+-	double     DL_scalar;
+-	double     slope[2]  = {0.0,0.0};
+-	double     xyz_list[NUMVERTICES][3];
++	IssmDouble     MAXSLOPE  = .06; // 6 %
++	IssmDouble     MOUNTAINKEXPONENT = 10;
++	IssmDouble     slope_magnitude,alpha2;
++	IssmDouble     Jdet;
++	IssmDouble     L[2][numdof];
++	IssmDouble     DL[2][2]  = {{ 0,0 },{0,0}};
++	IssmDouble     DL_scalar;
++	IssmDouble     slope[2]  = {0.0,0.0};
++	IssmDouble     xyz_list[NUMVERTICES][3];
+ 	Friction  *friction = NULL;
+ 	GaussTria *gauss    = NULL;
+ 
+@@ -3001,7 +3001,7 @@
+ 		//velocity should be = 0. To achieve this result, we set alpha2_list to a very high value: */
+ 		surface_input->GetInputDerivativeValue(&slope[0],&xyz_list[0][0],gauss);
+ 		slope_magnitude=sqrt(pow(slope[0],2)+pow(slope[1],2));
+-		if(slope_magnitude>MAXSLOPE) alpha2=pow((double)10,MOUNTAINKEXPONENT);
++		if(slope_magnitude>MAXSLOPE) alpha2=pow((IssmDouble)10,MOUNTAINKEXPONENT);
+ 		else friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum);
+ 
+ 		GetL(&L[0][0], &xyz_list[0][0], gauss,NDOF2);
+@@ -3037,8 +3037,8 @@
+ 	/*Create Element matrix*/
+ 	for(i=0;i<NUMVERTICES;i++){
+ 		connectivity=nodes[i]->GetConnectivity();
+-		Ke->values[(2*i)*numdof  +(2*i)  ]=1/(double)connectivity;
+-		Ke->values[(2*i+1)*numdof+(2*i+1)]=1/(double)connectivity;
++		Ke->values[(2*i)*numdof  +(2*i)  ]=1/(IssmDouble)connectivity;
++		Ke->values[(2*i+1)*numdof+(2*i+1)]=1/(IssmDouble)connectivity;
+ 	}
+ 
+ 	/*Clean up and return*/
+@@ -3053,12 +3053,12 @@
+ 
+ 	/*Intermediaries */
+ 	int            i,j,ig;
+-	double         driving_stress_baseline,thickness;
+-	double         Jdet;
+-	double         xyz_list[NUMVERTICES][3];
+-	double         slope[2];
+-	double         basis[3];
+-	double         pe_g_gaussian[numdof];
++	IssmDouble         driving_stress_baseline,thickness;
++	IssmDouble         Jdet;
++	IssmDouble         xyz_list[NUMVERTICES][3];
++	IssmDouble         slope[2];
++	IssmDouble         basis[3];
++	IssmDouble         pe_g_gaussian[numdof];
+ 	GaussTria*     gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -3104,10 +3104,10 @@
+ 
+ 	/*Intermediaries */
+ 	int        i,connectivity;
+-	double     constant_part,ub,vb;
+-	double     rho_ice,gravity,n,B;
+-	double     slope2,thickness;
+-	double     slope[2];
++	IssmDouble     constant_part,ub,vb;
++	IssmDouble     rho_ice,gravity,n,B;
++	IssmDouble     slope2,thickness;
++	IssmDouble     slope[2];
+ 	GaussTria* gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -3137,11 +3137,11 @@
+ 
+ 		constant_part=-2*pow(rho_ice*gravity,n)*pow(slope2,((n-1)/2));
+ 
+-		ub=-1.58*pow((double)10.0,(double)-10.0)*rho_ice*gravity*thickness*slope[0];
+-		vb=-1.58*pow((double)10.0,(double)-10.0)*rho_ice*gravity*thickness*slope[1];
++		ub=-1.58*pow((IssmDouble)10.0,(IssmDouble)-10.0)*rho_ice*gravity*thickness*slope[0];
++		vb=-1.58*pow((IssmDouble)10.0,(IssmDouble)-10.0)*rho_ice*gravity*thickness*slope[1];
+ 
+-		pe->values[2*i]  =(ub-2.0*pow(rho_ice*gravity,n)*pow(slope2,((n-1)/2.0))*pow(thickness,n)/(pow(B,n)*(n+1))*slope[0])/(double)connectivity;
+-		pe->values[2*i+1]=(vb-2.0*pow(rho_ice*gravity,n)*pow(slope2,((n-1)/2.0))*pow(thickness,n)/(pow(B,n)*(n+1))*slope[1])/(double)connectivity;
++		pe->values[2*i]  =(ub-2.0*pow(rho_ice*gravity,n)*pow(slope2,((n-1)/2.0))*pow(thickness,n)/(pow(B,n)*(n+1))*slope[0])/(IssmDouble)connectivity;
++		pe->values[2*i+1]=(vb-2.0*pow(rho_ice*gravity,n)*pow(slope2,((n-1)/2.0))*pow(thickness,n)/(pow(B,n)*(n+1))*slope[1])/(IssmDouble)connectivity;
+ 	}
+ 
+ 	/*Clean up and return*/
+@@ -3157,15 +3157,15 @@
+ 
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     Jdet,thickness;
+-	double     eps1dotdphii,eps1dotdphij;
+-	double     eps2dotdphii,eps2dotdphij;
+-	double     mu_prime;
+-	double     epsilon[3];/* epsilon=[exx,eyy,exy];*/
+-	double     eps1[2],eps2[2];
+-	double     phi[NUMVERTICES];
+-	double     dphi[2][NUMVERTICES];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     Jdet,thickness;
++	IssmDouble     eps1dotdphii,eps1dotdphij;
++	IssmDouble     eps2dotdphii,eps2dotdphij;
++	IssmDouble     mu_prime;
++	IssmDouble     epsilon[3];/* epsilon=[exx,eyy,exy];*/
++	IssmDouble     eps1[2],eps2[2];
++	IssmDouble     phi[NUMVERTICES];
++	IssmDouble     dphi[2][NUMVERTICES];
+ 	GaussTria *gauss=NULL;
+ 
+ 	/*Initialize Jacobian with regular MacAyeal (first part of the Gateau derivative)*/
+@@ -3222,8 +3222,8 @@
+ 
+ 	int          i;
+ 	int*         doflist=NULL;
+-	double       vx,vy;
+-	double       values[numdof];
++	IssmDouble       vx,vy;
++	IssmDouble       values[numdof];
+ 	GaussTria*   gauss=NULL;
+ 
+ 	/*Get dof list: */
+@@ -3260,8 +3260,8 @@
+ 	const int    numdof=NDOF2*NUMVERTICES;
+ 
+ 	int        i;
+-	double     vx,vy;
+-	double     values[numdof];
++	IssmDouble     vx,vy;
++	IssmDouble     values[numdof];
+ 	int       *doflist = NULL;
+ 	GaussTria *gauss   = NULL;
+ 
+@@ -3294,20 +3294,20 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromSolutionDiagnosticHoriz {{{*/
+-void  Tria::InputUpdateFromSolutionDiagnosticHoriz(double* solution){
++void  Tria::InputUpdateFromSolutionDiagnosticHoriz(IssmDouble* solution){
+ 	
+ 	const int numdof=NDOF2*NUMVERTICES;
+ 
+ 	int       i;
+ 	int*      doflist=NULL;
+-	double    rho_ice,g;
+-	double    values[numdof];
+-	double    vx[NUMVERTICES];
+-	double    vy[NUMVERTICES];
+-	double    vz[NUMVERTICES];
+-	double    vel[NUMVERTICES];
+-	double    pressure[NUMVERTICES];
+-	double    thickness[NUMVERTICES];
++	IssmDouble    rho_ice,g;
++	IssmDouble    values[numdof];
++	IssmDouble    vx[NUMVERTICES];
++	IssmDouble    vy[NUMVERTICES];
++	IssmDouble    vz[NUMVERTICES];
++	IssmDouble    vel[NUMVERTICES];
++	IssmDouble    pressure[NUMVERTICES];
++	IssmDouble    thickness[NUMVERTICES];
+ 	
+ 	/*Get dof list: */
+ 	GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
+@@ -3357,20 +3357,20 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromSolutionDiagnosticHutter {{{*/
+-void  Tria::InputUpdateFromSolutionDiagnosticHutter(double* solution){
++void  Tria::InputUpdateFromSolutionDiagnosticHutter(IssmDouble* solution){
+ 	
+ 	const int numdof=NDOF2*NUMVERTICES;
+ 	
+ 	int       i;
+ 	int*      doflist=NULL;
+-	double    rho_ice,g;
+-	double    values[numdof];
+-	double    vx[NUMVERTICES];
+-	double    vy[NUMVERTICES];
+-	double    vz[NUMVERTICES];
+-	double    vel[NUMVERTICES];
+-	double    pressure[NUMVERTICES];
+-	double    thickness[NUMVERTICES];
++	IssmDouble    rho_ice,g;
++	IssmDouble    values[numdof];
++	IssmDouble    vx[NUMVERTICES];
++	IssmDouble    vy[NUMVERTICES];
++	IssmDouble    vz[NUMVERTICES];
++	IssmDouble    vel[NUMVERTICES];
++	IssmDouble    pressure[NUMVERTICES];
++	IssmDouble    thickness[NUMVERTICES];
+ 	
+ 	/*Get dof list: */
+ 	GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
+@@ -3419,7 +3419,7 @@
+ 
+ #ifdef _HAVE_CONTROL_
+ /*FUNCTION Tria::InputControlUpdate{{{*/
+-void  Tria::InputControlUpdate(double scalar,bool save_parameter){
++void  Tria::InputControlUpdate(IssmDouble scalar,bool save_parameter){
+ 
+ 	/*Intermediary*/
+ 	int    num_controls;
+@@ -3473,7 +3473,7 @@
+ 
+ }/*}}}*/
+ /*FUNCTION Tria::ControlInputScaleGradient{{{*/
+-void Tria::ControlInputScaleGradient(int enum_type,double scale){
++void Tria::ControlInputScaleGradient(int enum_type,IssmDouble scale){
+ 
+ 	Input* input=NULL;
+ 
+@@ -3489,10 +3489,10 @@
+ 	((ControlInput*)input)->ScaleGradient(scale);
+ }/*}}}*/
+ /*FUNCTION Tria::ControlInputSetGradient{{{*/
+-void Tria::ControlInputSetGradient(double* gradient,int enum_type,int control_index){
++void Tria::ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index){
+ 
+ 	int    doflist1[NUMVERTICES];
+-	double grad_list[NUMVERTICES];
++	IssmDouble grad_list[NUMVERTICES];
+ 	Input* grad_input=NULL;
+ 	Input* input=NULL;
+ 
+@@ -3576,11 +3576,11 @@
+ 
+ 	int        i,ig;
+ 	int        doflist1[NUMVERTICES];
+-	double     Jdet,weight;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     dbasis[NDOF2][NUMVERTICES];
+-	double     dk[NDOF2]; 
+-	double     grade_g[NUMVERTICES]={0.0};
++	IssmDouble     Jdet,weight;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     dbasis[NDOF2][NUMVERTICES];
++	IssmDouble     dk[NDOF2]; 
++	IssmDouble     grade_g[NUMVERTICES]={0.0};
+ 	GaussTria  *gauss=NULL;
+ 
+ 	/*Retrieve all inputs we will be needing: */
+@@ -3617,12 +3617,12 @@
+ 	/*Intermediaries*/
+ 	int        i,ig;
+ 	int        doflist[NUMVERTICES];
+-	double     vx,vy,lambda,mu,thickness,Jdet;
+-	double     viscosity_complement;
+-	double     dvx[NDOF2],dvy[NDOF2],dadjx[NDOF2],dadjy[NDOF2],dB[NDOF2]; 
+-	double     xyz_list[NUMVERTICES][3];
+-	double     basis[3],epsilon[3];
+-	double     grad[NUMVERTICES]={0.0};
++	IssmDouble     vx,vy,lambda,mu,thickness,Jdet;
++	IssmDouble     viscosity_complement;
++	IssmDouble     dvx[NDOF2],dvy[NDOF2],dadjx[NDOF2],dadjy[NDOF2],dB[NDOF2]; 
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     basis[3],epsilon[3];
++	IssmDouble     grad[NUMVERTICES]={0.0};
+ 	GaussTria *gauss = NULL;
+ 
+ 	/* Get node coordinates and dof list: */
+@@ -3675,14 +3675,14 @@
+ 	int        analysis_type;
+ 	int        doflist1[NUMVERTICES];
+ 	int        connectivity[NUMVERTICES];
+-	double     vx,vy,lambda,mu,alpha_complement,Jdet;
+-	double     bed,thickness,Neff,drag;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     dk[NDOF2]; 
+-	double     grade_g[NUMVERTICES]={0.0};
+-	double     grade_g_gaussian[NUMVERTICES];
+-	double     basis[3];
+-	double     epsilon[3]; /* epsilon=[exx,eyy,exy];*/
++	IssmDouble     vx,vy,lambda,mu,alpha_complement,Jdet;
++	IssmDouble     bed,thickness,Neff,drag;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     dk[NDOF2]; 
++	IssmDouble     grade_g[NUMVERTICES]={0.0};
++	IssmDouble     grade_g_gaussian[NUMVERTICES];
++	IssmDouble     basis[3];
++	IssmDouble     epsilon[3]; /* epsilon=[exx,eyy,exy];*/
+ 	Friction*  friction=NULL;
+ 	GaussTria  *gauss=NULL;
+ 
+@@ -3745,7 +3745,7 @@
+ 	//	adjointy_input->GetInputValue(&mu, gauss);
+ 	//	vx_input->GetInputValue(&vx,gauss);
+ 	//	vy_input->GetInputValue(&vy,gauss);
+-	//	grade_g[iv] = -2*1.e+7*drag*alpha_complement*(lambda*vx+mu*vy)/((double)connectivity[iv]);
++	//	grade_g[iv] = -2*1.e+7*drag*alpha_complement*(lambda*vx+mu*vy)/((IssmDouble)connectivity[iv]);
+ 	//}
+ 	/*End Analytical gradient*/
+ 
+@@ -3761,11 +3761,11 @@
+ 
+ 	int        i,ig;
+ 	int        doflist1[NUMVERTICES];
+-	double     Jdet,weight;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     dbasis[NDOF2][NUMVERTICES];
+-	double     dk[NDOF2]; 
+-	double     grade_g[NUMVERTICES]={0.0};
++	IssmDouble     Jdet,weight;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     dbasis[NDOF2][NUMVERTICES];
++	IssmDouble     dk[NDOF2]; 
++	IssmDouble     grade_g[NUMVERTICES]={0.0};
+ 	GaussTria  *gauss=NULL;
+ 
+ 	/*Retrieve all inputs we will be needing: */
+@@ -3805,8 +3805,8 @@
+ 
+ 	/*Intermediaries*/
+ 	int    doflist1[NUMVERTICES];
+-	double lambda[NUMVERTICES];
+-	double gradient_g[NUMVERTICES];
++	IssmDouble lambda[NUMVERTICES];
++	IssmDouble gradient_g[NUMVERTICES];
+ 
+ 	/*Compute Gradient*/
+ 	GradientIndexing(&doflist1[0],control_index);
+@@ -3822,11 +3822,11 @@
+ 	/*Intermediaries*/
+ 	int        i,ig;
+ 	int        doflist1[NUMVERTICES];
+-	double     thickness,Jdet;
+-	double     basis[3];
+-	double     Dlambda[2],dp[2];
+-	double     xyz_list[NUMVERTICES][3];
+-	double     grade_g[NUMVERTICES] = {0.0};
++	IssmDouble     thickness,Jdet;
++	IssmDouble     basis[3];
++	IssmDouble     Dlambda[2],dp[2];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     grade_g[NUMVERTICES] = {0.0};
+ 	GaussTria *gauss                = NULL;
+ 
+ 	/* Get node coordinates and dof list: */
+@@ -3865,11 +3865,11 @@
+ 	/*Intermediaries*/
+ 	int        i,ig;
+ 	int        doflist1[NUMVERTICES];
+-	double     thickness,Jdet;
+-	double     basis[3];
+-	double     Dlambda[2],dp[2];
+-	double     xyz_list[NUMVERTICES][3];
+-	double     grade_g[NUMVERTICES] = {0.0};
++	IssmDouble     thickness,Jdet;
++	IssmDouble     basis[3];
++	IssmDouble     Dlambda[2],dp[2];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     grade_g[NUMVERTICES] = {0.0};
+ 	GaussTria *gauss                = NULL;
+ 
+ 	/* Get node coordinates and dof list: */
+@@ -3916,15 +3916,15 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::RheologyBbarAbsGradient{{{*/
+-double Tria::RheologyBbarAbsGradient(bool process_units,int weight_index){
++IssmDouble Tria::RheologyBbarAbsGradient(bool process_units,int weight_index){
+ 
+ 	/* Intermediaries */
+ 	int        ig;
+-	double     Jelem = 0;
+-	double     weight;
+-	double     Jdet;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     dp[NDOF2];
++	IssmDouble     Jelem = 0;
++	IssmDouble     weight;
++	IssmDouble     Jdet;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     dp[NDOF2];
+ 	GaussTria *gauss = NULL;
+ 
+ 	/*retrieve parameters and inputs*/
+@@ -3960,15 +3960,15 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::SurfaceAverageVelMisfit {{{*/
+-double Tria::SurfaceAverageVelMisfit(bool process_units,int weight_index){
++IssmDouble Tria::SurfaceAverageVelMisfit(bool process_units,int weight_index){
+ 
+ 	const int    numdof=2*NUMVERTICES;
+ 
+ 	int        i,ig;
+-	double     Jelem=0,S,Jdet;
+-	double     misfit;
+-	double     vx,vy,vxobs,vyobs,weight;
+-	double     xyz_list[NUMVERTICES][3];
++	IssmDouble     Jelem=0,S,Jdet;
++	IssmDouble     misfit;
++	IssmDouble     vx,vy,vxobs,vyobs,weight;
++	IssmDouble     xyz_list[NUMVERTICES][3];
+ 	GaussTria *gauss=NULL;
+ 
+ 	/*If on water, return 0: */
+@@ -4021,18 +4021,18 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::SurfaceLogVelMisfit {{{*/
+-double Tria::SurfaceLogVelMisfit(bool process_units,int weight_index){
++IssmDouble Tria::SurfaceLogVelMisfit(bool process_units,int weight_index){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+ 
+ 	int        i,ig;
+-	double     Jelem=0;
+-	double     misfit,Jdet;
+-	double     epsvel=2.220446049250313e-16;
+-	double     meanvel=3.170979198376458e-05; /*1000 m/yr*/
+-	double     velocity_mag,obs_velocity_mag;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     vx,vy,vxobs,vyobs,weight;
++	IssmDouble     Jelem=0;
++	IssmDouble     misfit,Jdet;
++	IssmDouble     epsvel=2.220446049250313e-16;
++	IssmDouble     meanvel=3.170979198376458e-05; /*1000 m/yr*/
++	IssmDouble     velocity_mag,obs_velocity_mag;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     vx,vy,vxobs,vyobs,weight;
+ 	GaussTria *gauss=NULL;
+ 
+ 	/*If on water, return 0: */
+@@ -4086,18 +4086,18 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::SurfaceLogVxVyMisfit {{{*/
+-double Tria::SurfaceLogVxVyMisfit(bool process_units,int weight_index){
++IssmDouble Tria::SurfaceLogVxVyMisfit(bool process_units,int weight_index){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+ 
+ 	int        i,ig;
+ 	int        fit=-1;
+-	double     Jelem=0, S=0;
+-	double     epsvel=2.220446049250313e-16;
+-	double     meanvel=3.170979198376458e-05; /*1000 m/yr*/
+-	double     misfit, Jdet;
+-	double     vx,vy,vxobs,vyobs,weight;
+-	double     xyz_list[NUMVERTICES][3];
++	IssmDouble     Jelem=0, S=0;
++	IssmDouble     epsvel=2.220446049250313e-16;
++	IssmDouble     meanvel=3.170979198376458e-05; /*1000 m/yr*/
++	IssmDouble     misfit, Jdet;
++	IssmDouble     vx,vy,vxobs,vyobs,weight;
++	IssmDouble     xyz_list[NUMVERTICES][3];
+ 	GaussTria *gauss=NULL;
+ 
+ 	/*If on water, return 0: */
+@@ -4152,15 +4152,15 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::SurfaceAbsVelMisfit {{{*/
+-double Tria::SurfaceAbsVelMisfit(bool process_units,int weight_index){
++IssmDouble Tria::SurfaceAbsVelMisfit(bool process_units,int weight_index){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+ 
+ 	int        i,ig;
+-	double     Jelem=0;
+-	double     misfit,Jdet;
+-	double     vx,vy,vxobs,vyobs,weight;
+-	double     xyz_list[NUMVERTICES][3];
++	IssmDouble     Jelem=0;
++	IssmDouble     misfit,Jdet;
++	IssmDouble     vx,vy,vxobs,vyobs,weight;
++	IssmDouble     xyz_list[NUMVERTICES][3];
+ 	GaussTria *gauss=NULL;
+ 
+ 	/*If on water, return 0: */
+@@ -4213,17 +4213,17 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::SurfaceRelVelMisfit {{{*/
+-double Tria::SurfaceRelVelMisfit(bool process_units,int weight_index){
++IssmDouble Tria::SurfaceRelVelMisfit(bool process_units,int weight_index){
+ 	const int  numdof=2*NUMVERTICES;
+ 
+ 	int        i,ig;
+-	double     Jelem=0;
+-	double     scalex=1,scaley=1;
+-	double     misfit,Jdet;
+-	double     epsvel=2.220446049250313e-16;
+-	double     meanvel=3.170979198376458e-05; /*1000 m/yr*/
+-	double     vx,vy,vxobs,vyobs,weight;
+-	double     xyz_list[NUMVERTICES][3];
++	IssmDouble     Jelem=0;
++	IssmDouble     scalex=1,scaley=1;
++	IssmDouble     misfit,Jdet;
++	IssmDouble     epsvel=2.220446049250313e-16;
++	IssmDouble     meanvel=3.170979198376458e-05; /*1000 m/yr*/
++	IssmDouble     vx,vy,vxobs,vyobs,weight;
++	IssmDouble     xyz_list[NUMVERTICES][3];
+ 	GaussTria *gauss=NULL;
+ 
+ 	/*If on water, return 0: */
+@@ -4277,15 +4277,15 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::ThicknessAbsGradient{{{*/
+-double Tria::ThicknessAbsGradient(bool process_units,int weight_index){
++IssmDouble Tria::ThicknessAbsGradient(bool process_units,int weight_index){
+ 
+ 	/* Intermediaries */
+ 	int        ig;
+-	double     Jelem = 0;
+-	double     weight;
+-	double     Jdet;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     dp[NDOF2];
++	IssmDouble     Jelem = 0;
++	IssmDouble     weight;
++	IssmDouble     Jdet;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     dp[NDOF2];
+ 	GaussTria *gauss = NULL;
+ 
+ 	/*retrieve parameters and inputs*/
+@@ -4321,16 +4321,16 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::ThicknessAbsMisfit {{{*/
+-double Tria::ThicknessAbsMisfit(bool process_units,int weight_index){
++IssmDouble Tria::ThicknessAbsMisfit(bool process_units,int weight_index){
+ 
+ 	/*Intermediaries*/
+ 	int        i,ig;
+-	double     thickness,thicknessobs,weight;
+-	double     Jdet;
+-	double     Jelem = 0;
+-	double     xyz_list[NUMVERTICES][3];
++	IssmDouble     thickness,thicknessobs,weight;
++	IssmDouble     Jdet;
++	IssmDouble     Jelem = 0;
++	IssmDouble     xyz_list[NUMVERTICES][3];
+ 	GaussTria *gauss = NULL;
+-	double     dH[2];
++	IssmDouble     dH[2];
+ 
+ 	/*If on water, return 0: */
+ 	if(IsOnWater())return 0;
+@@ -4373,14 +4373,14 @@
+ 
+ 	/*Intermediaries */
+ 	int         i,ig,resp;
+-	double      Jdet;
+-	double      thickness,thicknessobs,weight;
++	IssmDouble      Jdet;
++	IssmDouble      thickness,thicknessobs,weight;
+ 	int        *responses = NULL;
+ 	int         num_responses;
+-	double      xyz_list[NUMVERTICES][3];
+-	double      basis[3];
+-	double      dbasis[NDOF2][NUMVERTICES];
+-	double      dH[2];
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble      basis[3];
++	IssmDouble      dbasis[NDOF2][NUMVERTICES];
++	IssmDouble      dH[2];
+ 	GaussTria*  gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -4441,15 +4441,15 @@
+ 	int        i,resp,ig;
+ 	int       *responses=NULL;
+ 	int        num_responses;
+-	double     Jdet;
+-	double     obs_velocity_mag,velocity_mag;
+-	double     dux,duy;
+-	double     epsvel=2.220446049250313e-16;
+-	double     meanvel=3.170979198376458e-05; /*1000 m/yr*/
+-	double     scalex=0,scaley=0,scale=0,S=0;
+-	double     vx,vy,vxobs,vyobs,weight;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     basis[3];
++	IssmDouble     Jdet;
++	IssmDouble     obs_velocity_mag,velocity_mag;
++	IssmDouble     dux,duy;
++	IssmDouble     epsvel=2.220446049250313e-16;
++	IssmDouble     meanvel=3.170979198376458e-05; /*1000 m/yr*/
++	IssmDouble     scalex=0,scaley=0,scale=0,S=0;
++	IssmDouble     vx,vy,vxobs,vyobs,weight;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     basis[3];
+ 	GaussTria* gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -4617,15 +4617,15 @@
+ 	int        i,resp,ig;
+ 	int       *responses=NULL;
+ 	int        num_responses;
+-	double     Jdet;
+-	double     obs_velocity_mag,velocity_mag;
+-	double     dux,duy;
+-	double     epsvel=2.220446049250313e-16;
+-	double     meanvel=3.170979198376458e-05; /*1000 m/yr*/
+-	double     scalex=0,scaley=0,scale=0,S=0;
+-	double     vx,vy,vxobs,vyobs,weight;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     basis[3];
++	IssmDouble     Jdet;
++	IssmDouble     obs_velocity_mag,velocity_mag;
++	IssmDouble     dux,duy;
++	IssmDouble     epsvel=2.220446049250313e-16;
++	IssmDouble     meanvel=3.170979198376458e-05; /*1000 m/yr*/
++	IssmDouble     scalex=0,scaley=0,scale=0,S=0;
++	IssmDouble     vx,vy,vxobs,vyobs,weight;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     basis[3];
+ 	GaussTria* gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -4788,15 +4788,15 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::DragCoefficientAbsGradient{{{*/
+-double Tria::DragCoefficientAbsGradient(bool process_units,int weight_index){
++IssmDouble Tria::DragCoefficientAbsGradient(bool process_units,int weight_index){
+ 
+ 	/* Intermediaries */
+ 	int        ig;
+-	double     Jelem = 0;
+-	double     weight;
+-	double     Jdet;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     dp[NDOF2];
++	IssmDouble     Jelem = 0;
++	IssmDouble     weight;
++	IssmDouble     Jdet;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     dp[NDOF2];
+ 	GaussTria *gauss = NULL;
+ 
+ 	/*retrieve parameters and inputs*/
+@@ -4862,15 +4862,15 @@
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+ 	bool       incomplete_adjoint;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     Jdet,thickness;
+-	double     eps1dotdphii,eps1dotdphij;
+-	double     eps2dotdphii,eps2dotdphij;
+-	double     mu_prime;
+-	double     epsilon[3];/* epsilon=[exx,eyy,exy];*/
+-	double     eps1[2],eps2[2];
+-	double     phi[NUMVERTICES];
+-	double     dphi[2][NUMVERTICES];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     Jdet,thickness;
++	IssmDouble     eps1dotdphii,eps1dotdphij;
++	IssmDouble     eps2dotdphii,eps2dotdphij;
++	IssmDouble     mu_prime;
++	IssmDouble     epsilon[3];/* epsilon=[exx,eyy,exy];*/
++	IssmDouble     eps1[2],eps2[2];
++	IssmDouble     phi[NUMVERTICES];
++	IssmDouble     dphi[2][NUMVERTICES];
+ 	GaussTria *gauss=NULL;
+ 
+ 	/*Initialize Jacobian with regular MacAyeal (first part of the Gateau derivative)*/
+@@ -4924,15 +4924,15 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromSolutionAdjointHoriz {{{*/
+-void  Tria::InputUpdateFromSolutionAdjointHoriz(double* solution){
++void  Tria::InputUpdateFromSolutionAdjointHoriz(IssmDouble* solution){
+ 
+ 	const int numdof=NDOF2*NUMVERTICES;
+ 
+ 	int       i;
+ 	int*      doflist=NULL;
+-	double    values[numdof];
+-	double    lambdax[NUMVERTICES];
+-	double    lambday[NUMVERTICES];
++	IssmDouble    values[numdof];
++	IssmDouble    lambdax[NUMVERTICES];
++	IssmDouble    lambday[NUMVERTICES];
+ 
+ 	/*Get dof list: */
+ 	GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
+@@ -4959,14 +4959,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromSolutionAdjointBalancethickness {{{*/
+-void  Tria::InputUpdateFromSolutionAdjointBalancethickness(double* solution){
++void  Tria::InputUpdateFromSolutionAdjointBalancethickness(IssmDouble* solution){
+ 
+ 	const int numdof=NDOF1*NUMVERTICES;
+ 
+ 	int       i;
+ 	int*      doflist=NULL;
+-	double    values[numdof];
+-	double    lambda[NUMVERTICES];
++	IssmDouble    values[numdof];
++	IssmDouble    lambda[NUMVERTICES];
+ 
+ 	/*Get dof list: */
+ 	GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
+@@ -5016,9 +5016,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::SetControlInputsFromVector{{{*/
+-void  Tria::SetControlInputsFromVector(double* vector,int control_enum,int control_index){
++void  Tria::SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index){
+ 
+-	double  values[NUMVERTICES];
++	IssmDouble  values[NUMVERTICES];
+ 	int     doflist1[NUMVERTICES];
+ 	Input  *input     = NULL;
+ 	Input  *new_input = NULL;
+@@ -5056,14 +5056,14 @@
+ void Tria::CreateHydrologyWaterVelocityInput(void){
+ 
+ 	/*material parameters: */
+-	double mu_water;
+-	double VelocityFactor;  // This factor represents the number 12 in laminar flow velocity which can vary by differnt hydrology.CR
+-	double n_man,CR;
+-	double w;
+-	double rho_ice, rho_water, g;
+-	double dsdx,dsdy,dbdx,dbdy;
+-	double vx[NUMVERTICES];
+-	double vy[NUMVERTICES];
++	IssmDouble mu_water;
++	IssmDouble VelocityFactor;  // This factor represents the number 12 in laminar flow velocity which can vary by differnt hydrology.CR
++	IssmDouble n_man,CR;
++	IssmDouble w;
++	IssmDouble rho_ice, rho_water, g;
++	IssmDouble dsdx,dsdy,dbdx,dbdy;
++	IssmDouble vx[NUMVERTICES];
++	IssmDouble vy[NUMVERTICES];
+ 	GaussTria *gauss = NULL;
+ 
+ 	/*Retrieve all inputs and parameters*/
+@@ -5114,20 +5114,20 @@
+ 	const int    numdof=NDOF1*NUMVERTICES;
+ 
+ 	/*Intermediaries */
+-	double     diffusivity;
++	IssmDouble     diffusivity;
+ 	int        i,j,ig;
+-	double     Jdettria,DL_scalar,dt,h;
+-	double     vx,vy,vel,dvxdx,dvydy;
+-	double     dvx[2],dvy[2];
+-	double     v_gauss[2]={0.0};
+-	double     xyz_list[NUMVERTICES][3];
+-	double     L[NUMVERTICES];
+-	double     B[2][NUMVERTICES];
+-	double     Bprime[2][NUMVERTICES];
+-	double     K[2][2]                        ={0.0};
+-	double     KDL[2][2]                      ={0.0};
+-	double     DL[2][2]                        ={0.0};
+-	double     DLprime[2][2]                   ={0.0};
++	IssmDouble     Jdettria,DL_scalar,dt,h;
++	IssmDouble     vx,vy,vel,dvxdx,dvydy;
++	IssmDouble     dvx[2],dvy[2];
++	IssmDouble     v_gauss[2]={0.0};
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     L[NUMVERTICES];
++	IssmDouble     B[2][NUMVERTICES];
++	IssmDouble     Bprime[2][NUMVERTICES];
++	IssmDouble     K[2][2]                        ={0.0};
++	IssmDouble     KDL[2][2]                      ={0.0};
++	IssmDouble     DL[2][2]                        ={0.0};
++	IssmDouble     DLprime[2][2]                   ={0.0};
+ 	GaussTria *gauss=NULL;
+ 
+ 	/*Skip if water or ice shelf element*/
+@@ -5220,11 +5220,11 @@
+ 
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+-	double     Jdettria,dt;
+-	double     basal_melting_g;
+-	double     old_watercolumn_g;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     basis[numdof];
++	IssmDouble     Jdettria,dt;
++	IssmDouble     basal_melting_g;
++	IssmDouble     old_watercolumn_g;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     basis[numdof];
+ 	GaussTria* gauss=NULL;
+ 
+ 	/*Skip if water or ice shelf element*/
+@@ -5268,8 +5268,8 @@
+ 
+ 	int i;
+ 	int*         doflist=NULL;
+-	double       watercolumn;
+-	double       values[numdof];
++	IssmDouble       watercolumn;
++	IssmDouble       values[numdof];
+ 	GaussTria*   gauss=NULL;
+ 
+ 	/*Get dof list: */
+@@ -5298,14 +5298,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromSolutionHydrology{{{*/
+-void  Tria::InputUpdateFromSolutionHydrology(double* solution){
++void  Tria::InputUpdateFromSolutionHydrology(IssmDouble* solution){
+ 
+ 	/*Intermediaries*/
+ 	const int numdof = NDOF1*NUMVERTICES;
+ 
+ 	int       i;
+ 	int*      doflist=NULL;
+-	double    values[numdof];
++	IssmDouble    values[numdof];
+ 
+ 	/*Get dof list: */
+ 	GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
+@@ -5314,7 +5314,7 @@
+ 	for(i=0;i<numdof;i++){
+ 		values[i]=solution[doflist[i]];
+ 		if(isnan(values[i])) _error_("NaN found in solution vector");
+-		if (values[i]<pow((double)10,(double)-10))values[i]=pow((double)10,(double)-10); //correcting the water column to positive values
++		if (values[i]<pow((IssmDouble)10,(IssmDouble)-10))values[i]=pow((IssmDouble)10,(IssmDouble)-10); //correcting the water column to positive values
+  
+ 	}
+ 
+@@ -5328,8 +5328,8 @@
+ #endif
+ 
+ #ifdef _HAVE_DAKOTA_
+-/*FUNCTION Tria::InputUpdateFromVectorDakota(double* vector, int name, int type);{{{*/
+-void  Tria::InputUpdateFromVectorDakota(double* vector, int name, int type){
++/*FUNCTION Tria::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);{{{*/
++void  Tria::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){
+ 	
+ 	int i,j;
+ 
+@@ -5341,7 +5341,7 @@
+ 		case VertexEnum:
+ 
+ 			/*New TriaP1Input*/
+-			double values[3];
++			IssmDouble values[3];
+ 
+ 			/*Get values on the 3 vertices*/
+ 			for (i=0;i<3;i++){
+@@ -5352,11 +5352,11 @@
+ 			switch(name){
+ 				case ThicknessEnum:
+ 					/*Update thickness + surface: assume bed is constant. On ice shelves, takes hydrostatic equilibrium {{{*/
+-					double  thickness[3];
+-					double  thickness_init[3];
+-					double  hydrostatic_ratio[3];
+-					double  surface[3];
+-					double  bed[3];
++					IssmDouble  thickness[3];
++					IssmDouble  thickness_init[3];
++					IssmDouble  hydrostatic_ratio[3];
++					IssmDouble  surface[3];
++					IssmDouble  bed[3];
+ 					
+ 					/*retrieve inputs: */
+ 					GetInputListOnVertices(&thickness_init[0],ThicknessEnum);
+@@ -5370,7 +5370,7 @@
+ 					/*build new bed and surface: */
+ 					if (this->IsFloating()){
+ 						/*hydrostatic equilibrium: */
+-						double rho_ice,rho_water,di;
++						IssmDouble rho_ice,rho_water,di;
+ 						rho_ice=this->matpar->GetRhoIce();
+ 						rho_water=this->matpar->GetRhoWater();
+ 
+@@ -5440,15 +5440,15 @@
+ 	_error_(" not supported yet!");
+ }
+ /*}}}*/
+-/*FUNCTION Tria::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type);{{{*/
+-void  Tria::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
++/*FUNCTION Tria::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type);{{{*/
++void  Tria::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){
+ 	
+ 	int i,j,t;
+ 	TransientInput* transientinput=NULL;
+-	double values[3];
+-	double time;
++	IssmDouble values[3];
++	IssmDouble time;
+ 	int row;
+-	double yts;
++	IssmDouble yts;
+ 
+ 	/*Check that name is an element input*/
+ 	if (!IsInput(name)) return;
+@@ -5465,11 +5465,11 @@
+ 				/*create input values: */
+ 				for(i=0;i<3;i++){
+ 					row=this->nodes[i]->GetSidList();
+-					values[i]=(double)matrix[ncols*row+t];
++					values[i]=(IssmDouble)matrix[ncols*row+t];
+ 				}
+ 
+ 				/*time? :*/
+-				time=(double)matrix[(nrows-1)*ncols+t]*yts;
++				time=(IssmDouble)matrix[(nrows-1)*ncols+t]*yts;
+ 
+ 				if(t==0) transientinput=new TransientInput(name);
+ 				transientinput->AddTimeInput(new TriaP1Input(name,values),time);
+@@ -5510,17 +5510,17 @@
+ 	/*Intermediaries */
+ 	int        stabilization;
+ 	int        i,j,ig,dim;
+-	double     Jdettria,vx,vy,dvxdx,dvydy,vel,h;
+-	double     dvx[2],dvy[2];
+-	double     xyz_list[NUMVERTICES][3];
+-	double     L[NUMVERTICES];
+-	double     B[2][NUMVERTICES];
+-	double     Bprime[2][NUMVERTICES];
+-	double     K[2][2]                          = {0.0};
+-	double     KDL[2][2]                        = {0.0};
+-	double     DL[2][2]                         = {0.0};
+-	double     DLprime[2][2]                    = {0.0};
+-	double     DL_scalar;
++	IssmDouble     Jdettria,vx,vy,dvxdx,dvydy,vel,h;
++	IssmDouble     dvx[2],dvy[2];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     L[NUMVERTICES];
++	IssmDouble     B[2][NUMVERTICES];
++	IssmDouble     Bprime[2][NUMVERTICES];
++	IssmDouble     K[2][2]                          = {0.0};
++	IssmDouble     KDL[2][2]                        = {0.0};
++	IssmDouble     DL[2][2]                         = {0.0};
++	IssmDouble     DLprime[2][2]                    = {0.0};
++	IssmDouble     DL_scalar;
+ 	GaussTria *gauss                            = NULL;
+ 
+ 	/*Initialize Element matrix*/
+@@ -5619,12 +5619,12 @@
+ 
+ 	/*Intermediaries*/
+ 	int        i,j,ig,dim;
+-	double     vx,vy,Jdettria;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     B[2][NUMVERTICES];
+-	double     Bprime[2][NUMVERTICES];
+-	double     DL[2][2]={0.0};
+-	double     DL_scalar;
++	IssmDouble     vx,vy,Jdettria;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     B[2][NUMVERTICES];
++	IssmDouble     Bprime[2][NUMVERTICES];
++	IssmDouble     DL[2][2]={0.0};
++	IssmDouble     DL_scalar;
+ 	GaussTria  *gauss=NULL;
+ 
+ 	/*Initialize Element matrix*/
+@@ -5687,9 +5687,9 @@
+ 	
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     dhdt_g,basal_melting_g,surface_mass_balance_g,Jdettria;
+-	double     L[NUMVERTICES];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     dhdt_g,basal_melting_g,surface_mass_balance_g,Jdettria;
++	IssmDouble     L[NUMVERTICES];
+ 	GaussTria* gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -5730,9 +5730,9 @@
+ 
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     basal_melting_g,surface_mass_balance_g,dhdt_g,Jdettria;
+-	double     L[NUMVERTICES];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     basal_melting_g,surface_mass_balance_g,dhdt_g,Jdettria;
++	IssmDouble     L[NUMVERTICES];
+ 	GaussTria* gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.h	(revision 12470)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.h	(revision 12471)
+@@ -24,26 +24,26 @@
+ 		void SetElementType(int type,int type_counter);
+ 
+ 		/*Numerics*/
+-		void GetBMacAyeal(double* B, double* xyz_list, GaussTria* gauss);
+-		void GetBMacAyealStokes(double* B , double* xyz_list, GaussTria* gauss);
+-		void GetBprimeMacAyeal(double* Bprime, double* xyz_list, GaussTria* gauss);
+-		void GetBprimeMacAyealStokes(double* Bprime, double* xyz_list, GaussTria* gauss);
+-		void GetBprimePrognostic(double* Bprime_prog, double* xyz_list, GaussTria* gauss);
+-		void GetBPrognostic(double* B_prog, double* xyz_list, GaussTria* gauss);
+-		void GetL(double* L, double* xyz_list,GaussTria* gauss,int numdof);
+-		void GetJacobian(double* J, double* xyz_list,GaussTria* gauss);
+-		void GetSegmentJacobianDeterminant(double* Jdet, double* xyz_list,GaussTria* gauss);
+-		void GetJacobianDeterminant2d(double* Jdet, double* xyz_list,GaussTria* gauss);
+-		void GetJacobianDeterminant3d(double* Jdet, double* xyz_list,GaussTria* gauss);
+-		void GetJacobianInvert(double*  Jinv, double* xyz_list,GaussTria* gauss);
+-		void GetNodalFunctions(double* l1l2l3,GaussTria* gauss);
+-		void GetSegmentNodalFunctions(double* l1l2l3,GaussTria* gauss, int index1,int index2);
+-		void GetSegmentBFlux(double* B,GaussTria* gauss, int index1,int index2);
+-		void GetSegmentBprimeFlux(double* Bprime,GaussTria* gauss, int index1,int index2);
+-		void GetNodalFunctionsDerivatives(double* l1l2l3,double* xyz_list, GaussTria* gauss);
+-		void GetNodalFunctionsDerivativesReference(double* dl1dl3,GaussTria* gauss);
+-		void GetInputValue(double* pp, double* plist, GaussTria* gauss);
+-		void GetInputDerivativeValue(double* pp, double* plist,double* xyz_list, GaussTria* gauss);
++		void GetBMacAyeal(IssmDouble* B, IssmDouble* xyz_list, GaussTria* gauss);
++		void GetBMacAyealStokes(IssmDouble* B , IssmDouble* xyz_list, GaussTria* gauss);
++		void GetBprimeMacAyeal(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss);
++		void GetBprimeMacAyealStokes(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss);
++		void GetBprimePrognostic(IssmDouble* Bprime_prog, IssmDouble* xyz_list, GaussTria* gauss);
++		void GetBPrognostic(IssmDouble* B_prog, IssmDouble* xyz_list, GaussTria* gauss);
++		void GetL(IssmDouble* L, IssmDouble* xyz_list,GaussTria* gauss,int numdof);
++		void GetJacobian(IssmDouble* J, IssmDouble* xyz_list,GaussTria* gauss);
++		void GetSegmentJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTria* gauss);
++		void GetJacobianDeterminant2d(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTria* gauss);
++		void GetJacobianDeterminant3d(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTria* gauss);
++		void GetJacobianInvert(IssmDouble*  Jinv, IssmDouble* xyz_list,GaussTria* gauss);
++		void GetNodalFunctions(IssmDouble* l1l2l3,GaussTria* gauss);
++		void GetSegmentNodalFunctions(IssmDouble* l1l2l3,GaussTria* gauss, int index1,int index2);
++		void GetSegmentBFlux(IssmDouble* B,GaussTria* gauss, int index1,int index2);
++		void GetSegmentBprimeFlux(IssmDouble* Bprime,GaussTria* gauss, int index1,int index2);
++		void GetNodalFunctionsDerivatives(IssmDouble* l1l2l3,IssmDouble* xyz_list, GaussTria* gauss);
++		void GetNodalFunctionsDerivativesReference(IssmDouble* dl1dl3,GaussTria* gauss);
++		void GetInputValue(IssmDouble* pp, IssmDouble* plist, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmDouble* pp, IssmDouble* plist,IssmDouble* xyz_list, GaussTria* gauss);
+ 
+ };
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.cpp	(revision 12470)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.cpp	(revision 12471)
+@@ -57,7 +57,7 @@
+ 
+ /*Reference Element numerics*/
+ /*FUNCTION PentaRef::GetBMacAyealPattyn {{{*/
+-void PentaRef::GetBMacAyealPattyn(double* B, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetBMacAyealPattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+ 	 * by: 
+@@ -69,7 +69,7 @@
+ 	 * We assume B has been allocated already, of size: 5x(NDOF2*NUMNODESP1)
+ 	 */
+ 
+-	double dbasis[3][NUMNODESP1];
++	IssmDouble dbasis[3][NUMNODESP1];
+ 
+ 	/*Get dbasis in actual coordinate system: */
+ 	GetNodalFunctionsP1Derivatives(&dbasis[0][0],xyz_list, gauss);
+@@ -88,7 +88,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetBMacAyealStokes{{{*/
+-void PentaRef::GetBMacAyealStokes(double* B, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetBMacAyealStokes(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+ 	 * by: 
+@@ -102,8 +102,8 @@
+ 	 */
+ 
+ 	int    i;
+-	double dh1dh7[3][NUMNODESMINI];
+-	double l1l6[NUMNODESP1];
++	IssmDouble dh1dh7[3][NUMNODESMINI];
++	IssmDouble l1l6[NUMNODESP1];
+ 
+ 	/*Get dh1dh6 in actual coordinate system: */
+ 	GetNodalFunctionsMINIDerivatives(&dh1dh7[0][0],xyz_list, gauss);
+@@ -134,7 +134,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetBPattyn {{{*/
+-void PentaRef::GetBPattyn(double* B, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetBPattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+ 	 * by: 
+@@ -148,7 +148,7 @@
+ 	 * We assume B has been allocated already, of size: 5x(NDOF2*NUMNODESP1)
+ 	 */
+ 
+-	double dbasis[3][NUMNODESP1];
++	IssmDouble dbasis[3][NUMNODESP1];
+ 
+ 	/*Get dbasis in actual coordinate system: */
+ 	GetNodalFunctionsP1Derivatives(&dbasis[0][0],xyz_list, gauss);
+@@ -174,7 +174,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetBprimePattyn {{{*/
+-void PentaRef::GetBprimePattyn(double* B, double* xyz_list, GaussPenta* gauss_coord){
++void PentaRef::GetBprimePattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss_coord){
+ 	/*Compute B  prime matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF2. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+ 	 * by: 
+@@ -187,7 +187,7 @@
+ 	 *
+ 	 * We assume B has been allocated already, of size: 5x(NDOF2*NUMNODESP1)
+ 	 */
+-	double dbasis[3][NUMNODESP1];
++	IssmDouble dbasis[3][NUMNODESP1];
+ 
+ 	/*Get dbasis in actual coordinate system: */
+ 	GetNodalFunctionsP1Derivatives(&dbasis[0][0],xyz_list, gauss_coord);
+@@ -212,7 +212,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetBprimeMacAyealStokes{{{*/
+-void PentaRef::GetBprimeMacAyealStokes(double* Bprime, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetBprimeMacAyealStokes(IssmDouble* Bprime, IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*Compute Bprime  matrix. Bprime=[Bprime1 Bprime2 Bprime3 Bprime4 Bprime5 Bprime6] where Bprimei is of size 5*NDOF2. 
+ 	 * For node i, Bprimei can be expressed in the actual coordinate system
+ 	 * by: 
+@@ -225,7 +225,7 @@
+ 	 */
+ 
+ 	int    i;
+-	double dh1dh7[3][NUMNODESMINI];
++	IssmDouble dh1dh7[3][NUMNODESMINI];
+ 
+ 	/*Get dh1dh6 in actual coordinate system: */
+ 	GetNodalFunctionsMINIDerivatives(&dh1dh7[0][0],xyz_list, gauss);
+@@ -252,7 +252,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetBStokes {{{*/
+-void PentaRef::GetBStokes(double* B, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetBStokes(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 3*NDOF4. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+@@ -270,8 +270,8 @@
+ 
+ 	int i;
+ 
+-	double dh1dh7[3][NUMNODESMINI];
+-	double l1l6[NUMNODESP1];
++	IssmDouble dh1dh7[3][NUMNODESMINI];
++	IssmDouble l1l6[NUMNODESP1];
+ 
+ 	/*Get dh1dh7 in actual coordinate system: */
+ 	GetNodalFunctionsMINIDerivatives(&dh1dh7[0][0],xyz_list, gauss);
+@@ -319,7 +319,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetBprimeStokes {{{*/
+-void PentaRef::GetBprimeStokes(double* B_prime, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetBprimeStokes(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*	Compute B'  matrix. B'=[B1' B2' B3' B4' B5' B6' Bb'] where Bi' is of size 3*NDOF2. 
+ 	 *	For node i, Bi' can be expressed in the actual coordinate system
+ 	 *	by: 
+@@ -337,8 +337,8 @@
+ 	 */
+ 
+ 	int i;
+-	double dh1dh7[3][NUMNODESMINI];
+-	double l1l6[NUMNODESP1];
++	IssmDouble dh1dh7[3][NUMNODESMINI];
++	IssmDouble l1l6[NUMNODESP1];
+ 
+ 	/*Get dh1dh7 in actual coordinate system: */
+ 	GetNodalFunctionsMINIDerivatives(&dh1dh7[0][0],xyz_list, gauss);
+@@ -386,7 +386,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetBAdvec{{{*/
+-void PentaRef::GetBAdvec(double* B_advec, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetBAdvec(IssmDouble* B_advec, IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1. 
+ 	 * For node i, Bi' can be expressed in the actual coordinate system
+ 	 * by: 
+@@ -399,7 +399,7 @@
+ 	 */
+ 
+ 	/*Same thing in the actual coordinate system: */
+-	double l1l6[6];
++	IssmDouble l1l6[6];
+ 
+ 	/*Get dh1dh2dh3 in actual coordinates system : */
+ 	GetNodalFunctionsP1(l1l6, gauss);
+@@ -413,7 +413,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetBConduct{{{*/
+-void PentaRef::GetBConduct(double* B_conduct, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetBConduct(IssmDouble* B_conduct, IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1. 
+ 	 * For node i, Bi' can be expressed in the actual coordinate system
+ 	 * by: 
+@@ -426,7 +426,7 @@
+ 	 */
+ 
+ 	/*Same thing in the actual coordinate system: */
+-	double dh1dh6[3][NUMNODESP1];
++	IssmDouble dh1dh6[3][NUMNODESP1];
+ 
+ 	/*Get dh1dh2dh3 in actual coordinates system : */
+ 	GetNodalFunctionsP1Derivatives(&dh1dh6[0][0],xyz_list,gauss);
+@@ -440,12 +440,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetBVert{{{*/
+-void PentaRef::GetBVert(double* B, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetBVert(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*	Compute B  matrix. B=[dh1/dz dh2/dz dh3/dz dh4/dz dh5/dz dh6/dz];
+ 		where hi is the interpolation function for node i.*/
+ 
+ 	int i;
+-	double dh1dh6[3][NUMNODESP1];
++	IssmDouble dh1dh6[3][NUMNODESP1];
+ 
+ 	/*Get dh1dh6 in actual coordinate system: */
+ 	GetNodalFunctionsP1Derivatives(&dh1dh6[0][0],xyz_list, gauss);
+@@ -458,7 +458,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetBprimeAdvec{{{*/
+-void PentaRef::GetBprimeAdvec(double* Bprime_advec, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetBprimeAdvec(IssmDouble* Bprime_advec, IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3 B4 B5 B6] where Bi is of size 5*NDOF1. 
+ 	 * For node i, Bi' can be expressed in the actual coordinate system
+ 	 * by: 
+@@ -471,7 +471,7 @@
+ 	 */
+ 
+ 	/*Same thing in the actual coordinate system: */
+-	double dh1dh6[3][NUMNODESP1];
++	IssmDouble dh1dh6[3][NUMNODESP1];
+ 
+ 	/*Get dh1dh2dh3 in actual coordinates system : */
+ 	GetNodalFunctionsP1Derivatives(&dh1dh6[0][0],xyz_list,gauss);
+@@ -485,7 +485,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetBprimeVert{{{*/
+-void PentaRef::GetBprimeVert(double* B, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetBprimeVert(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/* Compute Bprime  matrix. Bprime=[L1 L2 L3 L4 L5 L6] where Li is the nodal function for node i*/
+ 
+ 	GetNodalFunctionsP1(B, gauss);
+@@ -493,7 +493,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetL{{{*/
+-void PentaRef::GetL(double* L, GaussPenta* gauss, int numdof){
++void PentaRef::GetL(IssmDouble* L, GaussPenta* gauss, int numdof){
+ 	/*Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof. 
+ 	 ** For node i, Li can be expressed in the actual coordinate system
+ 	 ** by: 
+@@ -508,7 +508,7 @@
+ 	 **/
+ 
+ 	int i;
+-	double l1l6[6];
++	IssmDouble l1l6[6];
+ 
+ 	/*Get l1l6 in actual coordinate system: */
+ 	GetNodalFunctionsP1(l1l6,gauss);
+@@ -530,7 +530,7 @@
+ } 
+ /*}}}*/
+ /*FUNCTION PentaRef::GetLStokes{{{*/
+-void PentaRef::GetLStokes(double* LStokes, GaussPenta* gauss){
++void PentaRef::GetLStokes(IssmDouble* LStokes, GaussPenta* gauss){
+ 	/*
+ 	 * Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof. 
+ 	 * For node i, Li can be expressed in the actual coordinate system
+@@ -543,7 +543,7 @@
+ 	 */
+ 
+ 	const int num_dof=4;
+-	double l1l2l3[NUMNODESP1_2d];
++	IssmDouble l1l2l3[NUMNODESP1_2d];
+ 
+ 	/*Get l1l2l3 in actual coordinate system: */
+ 	l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
+@@ -565,7 +565,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetLprimeStokes {{{*/
+-void PentaRef::GetLprimeStokes(double* LprimeStokes, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetLprimeStokes(IssmDouble* LprimeStokes, IssmDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	/*
+ 	 * Compute Lprime  matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof. 
+@@ -605,8 +605,8 @@
+ 	int i;
+ 	int num_dof=4;
+ 
+-	double l1l2l3[NUMNODESP1_2d];
+-	double dh1dh6[3][NUMNODESP1];
++	IssmDouble l1l2l3[NUMNODESP1_2d];
++	IssmDouble dh1dh6[3][NUMNODESP1];
+ 
+ 	/*Get l1l2l3 in actual coordinate system: */
+ 	l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
+@@ -677,7 +677,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetLMacAyealStokes {{{*/
+-void PentaRef::GetLMacAyealStokes(double* LStokes, GaussPenta* gauss){
++void PentaRef::GetLMacAyealStokes(IssmDouble* LStokes, GaussPenta* gauss){
+ 	/*
+ 	 * Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof. 
+ 	 * For node i, Li can be expressed in the actual coordinate system
+@@ -696,7 +696,7 @@
+ 	int i;
+ 	int num_dof=2;
+ 
+-	double l1l2l3[NUMNODESP1_2d];
++	IssmDouble l1l2l3[NUMNODESP1_2d];
+ 
+ 
+ 	/*Get l1l2l3 in actual coordinate system: */
+@@ -727,7 +727,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetLprimeMacAyealStokes {{{*/
+-void PentaRef::GetLprimeMacAyealStokes(double* LprimeStokes, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetLprimeMacAyealStokes(IssmDouble* LprimeStokes, IssmDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	/*
+ 	 * Compute Lprime  matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof. 
+@@ -746,8 +746,8 @@
+ 	int i;
+ 	int num_dof=4;
+ 
+-	double l1l2l3[NUMNODESP1_2d];
+-	double dh1dh6[3][NUMNODESP1];
++	IssmDouble l1l2l3[NUMNODESP1_2d];
++	IssmDouble dh1dh6[3][NUMNODESP1];
+ 
+ 	/*Get l1l2l3 in actual coordinate system: */
+ 	l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
+@@ -794,7 +794,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetLStokesMacAyeal {{{*/
+-void PentaRef::GetLStokesMacAyeal(double* LStokes, GaussPenta* gauss){
++void PentaRef::GetLStokesMacAyeal(IssmDouble* LStokes, GaussPenta* gauss){
+ 	/*
+ 	 * Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof. 
+ 	 * For node i, Li can be expressed in the actual coordinate system
+@@ -809,7 +809,7 @@
+ 	int i;
+ 	int num_dof=4;
+ 
+-	double l1l2l3[NUMNODESP1_2d];
++	IssmDouble l1l2l3[NUMNODESP1_2d];
+ 
+ 
+ 	/*Get l1l2l3 in actual coordinate system: */
+@@ -840,7 +840,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetLprimeStokesMacAyeal {{{*/
+-void PentaRef::GetLprimeStokesMacAyeal(double* LprimeStokes, double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetLprimeStokesMacAyeal(IssmDouble* LprimeStokes, IssmDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	/*
+ 	 * Compute Lprime  matrix. Lprime=[Lp1 Lp2 Lp3] where Lpi is square and of size numdof. 
+@@ -855,8 +855,8 @@
+ 	int i;
+ 	int num_dof=2;
+ 
+-	double l1l2l3[NUMNODESP1_2d];
+-	double dh1dh6[3][NUMNODESP1];
++	IssmDouble l1l2l3[NUMNODESP1_2d];
++	IssmDouble dh1dh6[3][NUMNODESP1];
+ 
+ 	/*Get l1l2l3 in actual coordinate system: */
+ 	l1l2l3[0]=gauss->coord1*(1-gauss->coord4)/2.0;
+@@ -879,19 +879,19 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetJacobian {{{*/
+-void PentaRef::GetJacobian(double* J, double* xyz_list,GaussPenta* gauss){
++void PentaRef::GetJacobian(IssmDouble* J, IssmDouble* xyz_list,GaussPenta* gauss){
+ 
+ 	int i,j;
+ 
+ 	/*The Jacobian is constant over the element, discard the gaussian points. 
+ 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
+ 
+-	double A1,A2,A3; //area coordinates
+-	double xi,eta,zi; //parametric coordinates
++	IssmDouble A1,A2,A3; //area coordinates
++	IssmDouble xi,eta,zi; //parametric coordinates
+ 
+-	double x1,x2,x3,x4,x5,x6;
+-	double y1,y2,y3,y4,y5,y6;
+-	double z1,z2,z3,z4,z5,z6;
++	IssmDouble x1,x2,x3,x4,x5,x6;
++	IssmDouble y1,y2,y3,y4,y5,y6;
++	IssmDouble z1,z2,z3,z4,z5,z6;
+ 
+ 	/*Figure out xi,eta and zi (parametric coordinates), for this gaussian point: */
+ 	A1=gauss->coord1;
+@@ -938,10 +938,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetJacobianDeterminant {{{*/
+-void PentaRef::GetJacobianDeterminant(double*  Jdet, double* xyz_list,GaussPenta* gauss){
++void PentaRef::GetJacobianDeterminant(IssmDouble*  Jdet, IssmDouble* xyz_list,GaussPenta* gauss){
+ 	/*On a penta, Jacobian varies according to coordinates. We need to get the Jacobian, and take 
+ 	 * the determinant of it: */
+-	double J[3][3];
++	IssmDouble J[3][3];
+ 
+ 	/*Get Jacobian*/
+ 	GetJacobian(&J[0][0],xyz_list,gauss);
+@@ -953,11 +953,11 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetTriaJacobianDeterminant{{{*/
+-void PentaRef::GetTriaJacobianDeterminant(double*  Jdet, double* xyz_list,GaussPenta* gauss){
++void PentaRef::GetTriaJacobianDeterminant(IssmDouble*  Jdet, IssmDouble* xyz_list,GaussPenta* gauss){
+ 	/*The Jacobian determinant is constant over the element, discard the gaussian points. 
+ 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
+ 
+-	double x1,x2,x3,y1,y2,y3,z1,z2,z3;
++	IssmDouble x1,x2,x3,y1,y2,y3,z1,z2,z3;
+ 
+ 	x1=*(xyz_list+3*0+0);
+ 	y1=*(xyz_list+3*0+1);
+@@ -975,11 +975,11 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetSegmentJacobianDeterminant{{{*/
+-void PentaRef::GetSegmentJacobianDeterminant(double*  Jdet, double* xyz_list,GaussPenta* gauss){
++void PentaRef::GetSegmentJacobianDeterminant(IssmDouble*  Jdet, IssmDouble* xyz_list,GaussPenta* gauss){
+ 	/*The Jacobian determinant is constant over the element, discard the gaussian points. 
+ 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
+ 
+-	double x1,x2,y1,y2,z1,z2;
++	IssmDouble x1,x2,y1,y2,z1,z2;
+ 
+ 	x1=*(xyz_list+3*0+0);
+ 	y1=*(xyz_list+3*0+1);
+@@ -994,10 +994,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetJacobianInvert {{{*/
+-void PentaRef::GetJacobianInvert(double* Jinv, double* xyz_list,GaussPenta* gauss){
++void PentaRef::GetJacobianInvert(IssmDouble* Jinv, IssmDouble* xyz_list,GaussPenta* gauss){
+ 
+ 	/*Jacobian*/
+-	double J[3][3];
++	IssmDouble J[3][3];
+ 
+ 	/*Call Jacobian routine to get the jacobian:*/
+ 	GetJacobian(&J[0][0], xyz_list, gauss);
+@@ -1007,7 +1007,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetNodalFunctionsMINI{{{*/
+-void PentaRef::GetNodalFunctionsMINI(double* l1l7, GaussPenta* gauss){
++void PentaRef::GetNodalFunctionsMINI(IssmDouble* l1l7, GaussPenta* gauss){
+ 	/*This routine returns the values of the nodal functions  at the gaussian point.*/
+ 
+ 	l1l7[0]=gauss->coord1*(1.0-gauss->coord4)/2.0;
+@@ -1021,14 +1021,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetNodalFunctionsMINIDerivatives{{{*/
+-void PentaRef::GetNodalFunctionsMINIDerivatives(double* dh1dh7,double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetNodalFunctionsMINIDerivatives(IssmDouble* dh1dh7,IssmDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+ 	 * actual coordinate system): */
+ 
+ 	int       i;
+-	double    dh1dh7_ref[3][NUMNODESMINI];
+-	double    Jinv[3][3];
++	IssmDouble    dh1dh7_ref[3][NUMNODESMINI];
++	IssmDouble    Jinv[3][3];
+ 
+ 	/*Get derivative values with respect to parametric coordinate system: */
+ 	GetNodalFunctionsMINIDerivativesReference(&dh1dh7_ref[0][0], gauss); 
+@@ -1052,13 +1052,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetNodalFunctionsMINIDerivativesReference{{{*/
+-void PentaRef::GetNodalFunctionsMINIDerivativesReference(double* dl1dl7,GaussPenta* gauss){
++void PentaRef::GetNodalFunctionsMINIDerivativesReference(IssmDouble* dl1dl7,GaussPenta* gauss){
+ 
+ 	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+ 	 * natural coordinate system) at the gaussian point. */
+-	double r=gauss->coord2-gauss->coord1;
+-	double s=-3.0/SQRT3*(gauss->coord1+gauss->coord2-2.0/3.0);
+-	double zeta=gauss->coord4;
++	IssmDouble r=gauss->coord2-gauss->coord1;
++	IssmDouble s=-3.0/SQRT3*(gauss->coord1+gauss->coord2-2.0/3.0);
++	IssmDouble zeta=gauss->coord4;
+ 
+ 	/*First nodal function: */
+ 	*(dl1dl7+NUMNODESMINI*0+0)=-0.5*(1.0-zeta)/2.0;
+@@ -1098,7 +1098,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetNodalFunctionsP1 {{{*/
+-void PentaRef::GetNodalFunctionsP1(double* l1l6, GaussPenta* gauss){
++void PentaRef::GetNodalFunctionsP1(IssmDouble* l1l6, GaussPenta* gauss){
+ 	/*This routine returns the values of the nodal functions  at the gaussian point.*/
+ 
+ 	l1l6[0]=gauss->coord1*(1-gauss->coord4)/2.0;
+@@ -1111,12 +1111,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetNodalFunctionsP1Derivatives {{{*/
+-void PentaRef::GetNodalFunctionsP1Derivatives(double* dh1dh6,double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetNodalFunctionsP1Derivatives(IssmDouble* dh1dh6,IssmDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+ 	 * actual coordinate system): */
+-	double    dh1dh6_ref[NDOF3][NUMNODESP1];
+-	double    Jinv[NDOF3][NDOF3];
++	IssmDouble    dh1dh6_ref[NDOF3][NUMNODESP1];
++	IssmDouble    Jinv[NDOF3][NDOF3];
+ 
+ 	/*Get derivative values with respect to parametric coordinate system: */
+ 	GetNodalFunctionsP1DerivativesReference(&dh1dh6_ref[0][0], gauss); 
+@@ -1140,12 +1140,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetNodalFunctionsP1DerivativesReference {{{*/
+-void PentaRef::GetNodalFunctionsP1DerivativesReference(double* dl1dl6,GaussPenta* gauss){
++void PentaRef::GetNodalFunctionsP1DerivativesReference(IssmDouble* dl1dl6,GaussPenta* gauss){
+ 
+ 	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+ 	 * natural coordinate system) at the gaussian point. Those values vary along xi,eta,z */
+ 
+-	double A1,A2,A3,z;
++	IssmDouble A1,A2,A3,z;
+ 
+ 	A1=gauss->coord1; _assert_(A1>=0 && A1<=1);//first area coordinate value. In term of xi and eta: A1=(1-xi)/2-eta/(2*SQRT3);
+ 	A2=gauss->coord2; _assert_(A2>=0 && A2<=1);//second area coordinate value In term of xi and eta: A2=(1+xi)/2-eta/(2*SQRT3);
+@@ -1184,10 +1184,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetQuadNodalFunctions {{{*/
+-void PentaRef::GetQuadNodalFunctions(double* l1l4,GaussPenta* gauss,int index1,int index2,int index3,int index4){
++void PentaRef::GetQuadNodalFunctions(IssmDouble* l1l4,GaussPenta* gauss,int index1,int index2,int index3,int index4){
+ 	/*This routine returns the values of the nodal functions  at the gaussian point.*/
+ 
+-	double BasisFunctions[6];
++	IssmDouble BasisFunctions[6];
+ 
+ 	GetNodalFunctionsP1(&BasisFunctions[0],gauss);
+ 
+@@ -1204,10 +1204,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetQuadJacobianDeterminant{{{*/
+-void PentaRef::GetQuadJacobianDeterminant(double* Jdet,double xyz_list[4][3],GaussPenta* gauss){
++void PentaRef::GetQuadJacobianDeterminant(IssmDouble* Jdet,IssmDouble xyz_list[4][3],GaussPenta* gauss){
+ 	/*This routine returns the values of the nodal functions  at the gaussian point.*/
+ 
+-	double x1,x2,x3,x4,y1,y2,y3,y4,z1,z2,z3,z4;
++	IssmDouble x1,x2,x3,x4,y1,y2,y3,y4,z1,z2,z3,z4;
+ 
+ 	x1=xyz_list[0][0];
+ 	y1=xyz_list[0][1];
+@@ -1230,11 +1230,11 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetInputValue{{{*/
+-void PentaRef::GetInputValue(double* pvalue,double* plist,GaussPenta* gauss){
++void PentaRef::GetInputValue(IssmDouble* pvalue,IssmDouble* plist,GaussPenta* gauss){
+ 	/*P1 interpolation on Gauss point*/
+ 
+ 	/*intermediary*/
+-	double l1l6[6];
++	IssmDouble l1l6[6];
+ 
+ 	/*nodal functions: */
+ 	GetNodalFunctionsP1(&l1l6[0],gauss);
+@@ -1245,7 +1245,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetInputDerivativeValue{{{*/
+-void PentaRef::GetInputDerivativeValue(double* p, double* plist,double* xyz_list, GaussPenta* gauss){
++void PentaRef::GetInputDerivativeValue(IssmDouble* p, IssmDouble* plist,IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*From node values of parameter p (p_list[0], p_list[1], p_list[2], p_list[3], p_list[4] and p_list[4]), return parameter derivative value at gaussian point specified by gauss_coord:
+ 	 *   dp/dx=p_list[0]*dh1/dx+p_list[1]*dh2/dx+p_list[2]*dh3/dx+p_list[3]*dh4/dx+p_list[4]*dh5/dx+p_list[5]*dh6/dx;
+ 	 *   dp/dy=p_list[0]*dh1/dy+p_list[1]*dh2/dy+p_list[2]*dh3/dy+p_list[3]*dh4/dy+p_list[4]*dh5/dy+p_list[5]*dh6/dy;
+@@ -1253,7 +1253,7 @@
+ 	 *
+ 	 *   p is a vector of size 3x1 already allocated.
+ 	 */
+-	double dh1dh6[3][NUMNODESP1];
++	IssmDouble dh1dh6[3][NUMNODESP1];
+ 
+ 	/*Get nodal funnctions derivatives in actual coordinate system: */
+ 	GetNodalFunctionsP1Derivatives(&dh1dh6[0][0],xyz_list, gauss);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h	(revision 12470)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h	(revision 12471)
+@@ -54,23 +54,23 @@
+ 		Object* copy();
+ 		/*}}}*/
+ 		/*Update virtual functions resolution: {{{*/
+-		void  InputUpdateFromSolution(double* solutiong);
+-		void  InputUpdateFromVector(double* vector, int name, int type);
++		void  InputUpdateFromSolution(IssmDouble* solutiong);
++		void  InputUpdateFromVector(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+ 		void  InputUpdateFromVector(bool* vector, int name, int type);
+ 		#ifdef _HAVE_DAKOTA_
+-		void  InputUpdateFromVectorDakota(double* vector, int name, int type);
++		void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVectorDakota(int* vector, int name, int type);
+ 		void  InputUpdateFromVectorDakota(bool* vector, int name, int type);
+-		void  InputUpdateFromMatrixDakota(double* matrix, int nows, int ncols, int name, int type);
++		void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int nows, int ncols, int name, int type);
+ 		#endif
+-		void  InputUpdateFromConstant(double constant, int name);
++		void  InputUpdateFromConstant(IssmDouble constant, int name);
+ 		void  InputUpdateFromConstant(int constant, int name);
+ 		void  InputUpdateFromConstant(bool constant, int name);
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel);
+ 		/*}}}*/
+ 		/*Element virtual functions definitions: {{{*/
+-		void   AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,double* vertex_response,double* qmu_part);
++		void   AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part);
+ 		void   ComputeBasalStress(Vector* sigma_b);
+ 		void   ComputeStrainRate(Vector* eps);
+ 		void   ComputeStressTensor();
+@@ -84,58 +84,58 @@
+ 		bool   IsOnBed();
+ 		bool   IsFloating(); 
+ 		bool   IsNodeOnShelf(); 
+-		bool   IsNodeOnShelfFromFlags(double* flags);
++		bool   IsNodeOnShelfFromFlags(IssmDouble* flags);
+ 		bool   IsOnWater(); 
+ 		void   GetSolutionFromInputs(Vector* solution);
+ 		void   GetVectorFromInputs(Vector* vector, int name_enum);
+ 		void   GetVectorFromResults(Vector* vector,int offset,int interp);
+-		void   InputArtificialNoise(int enum_type,double min, double max);
+-		bool   InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums);
+-		void   InputCreate(double scalar,int name,int code);
+-		void   InputCreate(double* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code);
++		void   InputArtificialNoise(int enum_type,IssmDouble min, IssmDouble max);
++		bool   InputConvergence(IssmDouble* eps, int* enums,int num_enums,int* criterionenums,IssmDouble* criterionvalues,int num_criterionenums);
++		void   InputCreate(IssmDouble scalar,int name,int code);
++		void   InputCreate(IssmDouble* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code);
+ 		void   InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum=MeshElementsEnum);
+ 		void   InputDuplicate(int original_enum,int new_enum);
+-		void   InputScale(int enum_type,double scale_factor);
+-		void   InputToResult(int enum_type,int step,double time);
++		void   InputScale(int enum_type,IssmDouble scale_factor);
++		void   InputToResult(int enum_type,int step,IssmDouble time);
+ 		void   DeleteResults(void);
+ 		void   MaterialUpdateFromTemperature(void){_error_("not implemented yet");};
+-		void   MigrateGroundingLine(double* oldfloating,double* sheet_ungrounding);
+-		int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units);
++		void   MigrateGroundingLine(IssmDouble* oldfloating,IssmDouble* sheet_ungrounding);
++		int    NodalValue(IssmDouble* pvalue, int index, int natureofdataenum,bool process_units);
+ 		void   PotentialSheetUngrounding(Vector* potential_sheet_ungrounding);
+-		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   PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm);
++		void   RequestedOutput(int output_enum,int step,IssmDouble time);
++		void   ListResultsInfo(int** results_enums,int** results_size,IssmDouble** results_times,int** results_steps,int* num_results);
+ 		void   PatchFill(int* pcount, Patch* patch);
+ 		void   PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes);
+ 		void   ProcessResultsUnits(void);
+ 		void   ResetCoordinateSystem(void){_error_("not implemented yet");};
+-		double SurfaceArea(void);
++		IssmDouble SurfaceArea(void);
+ 		void   Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type);
+-		int    UpdatePotentialSheetUngrounding(double* vertices_potentially_ungrounding,Vector* vec_nodes_on_iceshelf,double* nodes_on_iceshelf);
+-		double TimeAdapt();
++		int    UpdatePotentialSheetUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf);
++		IssmDouble TimeAdapt();
+ 		int*   GetHorizontalNeighboorSids(void);
+-		void   SmearFunction(Vector* smearedvector,double (*WeightFunction)(double distance,double radius),double radius);
++		void   SmearFunction(Vector* smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius);
+ 
+ 		#ifdef _HAVE_RESPONSES_
+-		double IceVolume(void);
+-		void   MinVel(double* pminvel, bool process_units);
+-		void   MinVx(double* pminvx, bool process_units);
+-		void   MinVy(double* pminvy, bool process_units);
+-		void   MinVz(double* pminvz, bool process_units);
+-		double MassFlux(double* segment,bool process_units);
+-		void   MaxAbsVx(double* pmaxabsvx, bool process_units);
+-		void   MaxAbsVy(double* pmaxabsvy, bool process_units);
+-		void   MaxAbsVz(double* pmaxabsvz, bool process_units);
+-		void   ElementResponse(double* presponse,int response_enum,bool process_units);
+-		void   MaxVel(double* pmaxvel, bool process_units);
+-		void   MaxVx(double* pmaxvx, bool process_units);
+-		void   MaxVy(double* pmaxvy, bool process_units);
+-		void   MaxVz(double* pmaxvz, bool process_units);
++		IssmDouble IceVolume(void);
++		void   MinVel(IssmDouble* pminvel, bool process_units);
++		void   MinVx(IssmDouble* pminvx, bool process_units);
++		void   MinVy(IssmDouble* pminvy, bool process_units);
++		void   MinVz(IssmDouble* pminvz, bool process_units);
++		IssmDouble MassFlux(IssmDouble* segment,bool process_units);
++		void   MaxAbsVx(IssmDouble* pmaxabsvx, bool process_units);
++		void   MaxAbsVy(IssmDouble* pmaxabsvy, bool process_units);
++		void   MaxAbsVz(IssmDouble* pmaxabsvz, bool process_units);
++		void   ElementResponse(IssmDouble* presponse,int response_enum,bool process_units);
++		void   MaxVel(IssmDouble* pmaxvel, bool process_units);
++		void   MaxVx(IssmDouble* pmaxvx, bool process_units);
++		void   MaxVy(IssmDouble* pmaxvy, bool process_units);
++		void   MaxVz(IssmDouble* pmaxvz, bool process_units);
+ 		#endif
+ 
+ 
+ 		#ifdef _HAVE_CONTROL_
+-		double DragCoefficientAbsGradient(bool process_units,int weight_index);
++		IssmDouble DragCoefficientAbsGradient(bool process_units,int weight_index);
+ 		void   GradientIndexing(int* indexing,int control_index);
+ 		void   Gradj(Vector* gradient,int control_type,int control_index);
+ 		void   GradjBGradient(Vector* gradient,int weight_index,int control_index);
+@@ -147,19 +147,19 @@
+ 		void   GradjVxBalancedthickness(Vector* gradient,int control_index);
+ 		void   GradjVyBalancedthickness(Vector* gradient,int control_index);
+ 		void   GetVectorFromControlInputs(Vector* gradient,int control_enum,int control_index,const char* data);
+-		void   SetControlInputsFromVector(double* vector,int control_enum,int control_index);
++		void   SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index);
+ 		void   ControlInputGetGradient(Vector* gradient,int enum_type,int control_index);
+-		void   ControlInputScaleGradient(int enum_type,double scale);
+-		void   ControlInputSetGradient(double* gradient,int enum_type,int control_index);
+-		double RheologyBbarAbsGradient(bool process_units,int weight_index);
+-		double ThicknessAbsMisfit(     bool process_units,int weight_index);
+-		double SurfaceAbsVelMisfit(    bool process_units,int weight_index);
+-		double ThicknessAbsGradient(bool process_units,int weight_index);
+-		double SurfaceRelVelMisfit(    bool process_units,int weight_index);
+-		double SurfaceLogVelMisfit(    bool process_units,int weight_index);
+-		double SurfaceLogVxVyMisfit(   bool process_units,int weight_index);
+-		double SurfaceAverageVelMisfit(bool process_units,int weight_index);
+-		void   InputControlUpdate(double scalar,bool save_parameter);
++		void   ControlInputScaleGradient(int enum_type,IssmDouble scale);
++		void   ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index);
++		IssmDouble RheologyBbarAbsGradient(bool process_units,int weight_index);
++		IssmDouble ThicknessAbsMisfit(     bool process_units,int weight_index);
++		IssmDouble SurfaceAbsVelMisfit(    bool process_units,int weight_index);
++		IssmDouble ThicknessAbsGradient(bool process_units,int weight_index);
++		IssmDouble SurfaceRelVelMisfit(    bool process_units,int weight_index);
++		IssmDouble SurfaceLogVelMisfit(    bool process_units,int weight_index);
++		IssmDouble SurfaceLogVxVyMisfit(   bool process_units,int weight_index);
++		IssmDouble SurfaceAverageVelMisfit(bool process_units,int weight_index);
++		void   InputControlUpdate(IssmDouble scalar,bool save_parameter);
+ 		#endif
+ 
+ 		/*}}}*/
+@@ -179,22 +179,22 @@
+ 		ElementVector* CreatePVectorPrognostic_CG(void);
+ 		ElementVector* CreatePVectorPrognostic_DG(void);
+ 		ElementVector* CreatePVectorSlope(void);
+-		double         GetArea(void);
++		IssmDouble         GetArea(void);
+ 		int            GetElementType(void);
+ 		void	         GetDofList(int** pdoflist,int approximation_enum,int setenum);
+ 		void	         GetDofList1(int* doflist);
+ 		void           GetSidList(int* sidlist);
+ 		void           GetConnectivityList(int* connectivity);
+-		void           GetInputListOnVertices(double* pvalue,int enumtype);
+-		void           GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue);
+-		void           GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue,int index); //TO BE REMOVED
+-		void           GetInputValue(double* pvalue,Node* node,int enumtype);
+-		void           GetStrainRate2d(double* epsilon,double* xyz_list, GaussTria* gauss, Input* vx_input, Input* vy_input);
+-		void	         InputUpdateFromSolutionOneDof(double* solution,int enum_type);
+-		void	         InputUpdateFromSolutionPrognostic(double* solution);
++		void           GetInputListOnVertices(IssmDouble* pvalue,int enumtype);
++		void           GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue);
++		void           GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue,int index); //TO BE REMOVED
++		void           GetInputValue(IssmDouble* pvalue,Node* node,int enumtype);
++		void           GetStrainRate2d(IssmDouble* epsilon,IssmDouble* xyz_list, GaussTria* gauss, Input* vx_input, Input* vy_input);
++		void	         InputUpdateFromSolutionOneDof(IssmDouble* solution,int enum_type);
++		void	         InputUpdateFromSolutionPrognostic(IssmDouble* solution);
+ 		bool	         IsInput(int name);
+ 		void	         SetClone(int* minranks);
+-		void	         SurfaceNormal(double* surface_normal, double xyz_list[3][3]);
++		void	         SurfaceNormal(IssmDouble* surface_normal, IssmDouble xyz_list[3][3]);
+ 		
+ 		#ifdef _HAVE_DIAGNOSTIC_
+ 		ElementMatrix* CreateKMatrixDiagnosticMacAyeal(void);
+@@ -206,8 +206,8 @@
+ 		ElementMatrix* CreateJacobianDiagnosticMacayeal(void);
+ 		void	  GetSolutionFromInputsDiagnosticHoriz(Vector* solution);
+ 		void	  GetSolutionFromInputsDiagnosticHutter(Vector* solution);
+-		void	  InputUpdateFromSolutionDiagnosticHoriz( double* solution);
+-		void	  InputUpdateFromSolutionDiagnosticHutter( double* solution);
++		void	  InputUpdateFromSolutionDiagnosticHoriz( IssmDouble* solution);
++		void	  InputUpdateFromSolutionDiagnosticHutter( IssmDouble* solution);
+ 		#endif
+ 
+ 		#ifdef _HAVE_CONTROL_
+@@ -216,8 +216,8 @@
+ 		ElementVector* CreatePVectorAdjointHoriz(void);
+ 		ElementVector* CreatePVectorAdjointStokes(void);
+ 		ElementVector* CreatePVectorAdjointBalancethickness(void);
+-		void	  InputUpdateFromSolutionAdjointBalancethickness( double* solution);
+-		void	  InputUpdateFromSolutionAdjointHoriz( double* solution);
++		void	  InputUpdateFromSolutionAdjointBalancethickness( IssmDouble* solution);
++		void	  InputUpdateFromSolutionAdjointHoriz( IssmDouble* solution);
+ 		#endif
+ 
+ 		#ifdef _HAVE_HYDROLOGY_
+@@ -225,7 +225,7 @@
+ 		ElementVector* CreatePVectorHydrology(void);
+ 		void      CreateHydrologyWaterVelocityInput(void);
+ 		void	  GetSolutionFromInputsHydrology(Vector* solution);
+-		void	  InputUpdateFromSolutionHydrology(double* solution);
++		void	  InputUpdateFromSolutionHydrology(IssmDouble* solution);
+ 		#endif
+ 		#ifdef _HAVE_BALANCED_
+ 		#endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12470)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12471)
+@@ -144,17 +144,17 @@
+ 
+ /*Other*/
+ /*FUNCTION Penta::AverageOntoPartition {{{*/
+-void  Penta::AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,double* vertex_response,double* qmu_part){
++void  Penta::AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){
+ 	_error_("Not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::BedNormal {{{*/
+-void Penta::BedNormal(double* bed_normal, double xyz_list[3][3]){
++void Penta::BedNormal(IssmDouble* bed_normal, IssmDouble xyz_list[3][3]){
+ 
+ 	int i;
+-	double v13[3],v23[3];
+-	double normal[3];
+-	double normal_norm;
++	IssmDouble v13[3],v23[3];
++	IssmDouble normal[3];
++	IssmDouble normal_norm;
+ 
+ 	for (i=0;i<3;i++){
+ 		v13[i]=xyz_list[0][i]-xyz_list[2][i];
+@@ -180,8 +180,8 @@
+ 
+ 	/*Intermediaries */
+ 	int    count,ig;
+-	double basalfriction[NUMVERTICES]={0,0,0,0,0,0};
+-	double alpha2,vx,vy;
++	IssmDouble basalfriction[NUMVERTICES]={0,0,0,0,0,0};
++	IssmDouble alpha2,vx,vy;
+ 	Friction*  friction=NULL;
+ 	GaussPenta* gauss=NULL;
+ 
+@@ -232,18 +232,18 @@
+ 	int         dofp[1]={3};
+ 	int         analysis_type,approximation;
+ 	int         doflist[NUMVERTICES];
+-	double      xyz_list[NUMVERTICES][3];
+-	double      xyz_list_tria[3][3];
+-	double      rho_ice,gravity,stokesreconditioning;
+-	double      pressure,viscosity,bed,Jdet2d;
+-	double      bed_normal[3];
+-	double      basalforce[3];
+-	double      epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
+-	double      devstresstensor[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
+-	double      stresstensor[6]={0.0};
+-	double      sigma_xx,sigma_yy,sigma_zz;
+-	double      sigma_xy,sigma_xz,sigma_yz;
+-	double      surface=0,value=0;
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble      xyz_list_tria[3][3];
++	IssmDouble      rho_ice,gravity,stokesreconditioning;
++	IssmDouble      pressure,viscosity,bed,Jdet2d;
++	IssmDouble      bed_normal[3];
++	IssmDouble      basalforce[3];
++	IssmDouble      epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
++	IssmDouble      devstresstensor[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
++	IssmDouble      stresstensor[6]={0.0};
++	IssmDouble      sigma_xx,sigma_yy,sigma_zz;
++	IssmDouble      sigma_xy,sigma_xz,sigma_yz;
++	IssmDouble      surface=0,value=0;
+ 	GaussPenta* gauss;
+ 
+ 	/*retrive parameters: */
+@@ -325,15 +325,15 @@
+ void  Penta::ComputeStressTensor(){
+ 
+ 	int         iv;
+-	double      xyz_list[NUMVERTICES][3];
+-	double      pressure,viscosity;
+-	double      epsilon[6]; /* epsilon=[exx,eyy,exy];*/
+-	double      sigma_xx[NUMVERTICES];
+-	double		sigma_yy[NUMVERTICES];
+-	double		sigma_zz[NUMVERTICES];
+-	double      sigma_xy[NUMVERTICES];
+-	double		sigma_xz[NUMVERTICES];
+-	double		sigma_yz[NUMVERTICES];
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble      pressure,viscosity;
++	IssmDouble      epsilon[6]; /* epsilon=[exx,eyy,exy];*/
++	IssmDouble      sigma_xx[NUMVERTICES];
++	IssmDouble		sigma_yy[NUMVERTICES];
++	IssmDouble		sigma_zz[NUMVERTICES];
++	IssmDouble      sigma_xy[NUMVERTICES];
++	IssmDouble		sigma_xz[NUMVERTICES];
++	IssmDouble		sigma_yz[NUMVERTICES];
+ 	GaussPenta* gauss=NULL;
+ 
+ 	/* Get node coordinates and dof list: */
+@@ -763,11 +763,11 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetElementSizes{{{*/
+-void Penta::GetElementSizes(double* hx,double* hy,double* hz){
++void Penta::GetElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz){
+ 
+-	double xyz_list[NUMVERTICES][3];
+-	double xmin,ymin,zmin;
+-	double xmax,ymax,zmax;
++	IssmDouble xyz_list[NUMVERTICES][3];
++	IssmDouble xmin,ymin,zmin;
++	IssmDouble xmax,ymax,zmax;
+ 
+ 	/*Get xyz list: */
+ 	GetVerticesCoordinates(&xyz_list[0][0],nodes,NUMVERTICES);
+@@ -819,11 +819,11 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetInputListOnVertices(double* pvalue,int enumtype) {{{*/
+-void Penta::GetInputListOnVertices(double* pvalue,int enumtype){
++/*FUNCTION Penta::GetInputListOnVertices(IssmDouble* pvalue,int enumtype) {{{*/
++void Penta::GetInputListOnVertices(IssmDouble* pvalue,int enumtype){
+ 
+ 	/*Intermediaries*/
+-	double     value[NUMVERTICES];
++	IssmDouble     value[NUMVERTICES];
+ 	GaussPenta *gauss              = NULL;
+ 
+ 	/*Recover input*/
+@@ -844,11 +844,11 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue) {{{*/
+-void Penta::GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue){
++/*FUNCTION Penta::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue) {{{*/
++void Penta::GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){
+ 
+ 	/*Intermediaries*/
+-	double     value[NUMVERTICES];
++	IssmDouble     value[NUMVERTICES];
+ 	GaussPenta *gauss              = NULL;
+ 
+ 	/*Recover input*/
+@@ -873,8 +873,8 @@
+ 	delete gauss;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::GetInputValue(double* pvalue,Node* node,int enumtype) {{{*/
+-void Penta::GetInputValue(double* pvalue,Node* node,int enumtype){
++/*FUNCTION Penta::GetInputValue(IssmDouble* pvalue,Node* node,int enumtype) {{{*/
++void Penta::GetInputValue(IssmDouble* pvalue,Node* node,int enumtype){
+ 
+ 	Input* input=inputs->GetInput(enumtype);
+ 	if(!input) _error_("No input of type %s found in tria",EnumToStringx(enumtype));
+@@ -887,12 +887,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetPhi {{{*/
+-void Penta::GetPhi(double* phi, double*  epsilon, double viscosity){
++void Penta::GetPhi(IssmDouble* phi, IssmDouble*  epsilon, IssmDouble viscosity){
+ 	/*Compute deformational heating from epsilon and viscosity */
+ 
+-	double epsilon_matrix[3][3];
+-	double epsilon_eff;
+-	double epsilon_sqr[3][3];
++	IssmDouble epsilon_matrix[3][3];
++	IssmDouble epsilon_eff;
++	IssmDouble epsilon_sqr[3][3];
+ 
+ 	/* Build epsilon matrix */
+ 	epsilon_matrix[0][0]=*(epsilon+0);
+@@ -977,13 +977,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetStabilizationParameter {{{*/
+-double Penta::GetStabilizationParameter(double u, double v, double w, double diameter, double kappa){
++IssmDouble Penta::GetStabilizationParameter(IssmDouble u, IssmDouble v, IssmDouble w, IssmDouble diameter, IssmDouble kappa){
+ 	/*Compute stabilization parameter*/
+ 	/*kappa=thermalconductivity/(rho_ice*hearcapacity) for thermal model*/
+ 	/*kappa=enthalpydiffusionparameter for enthalpy model*/
+ 
+-	double normu;
+-	double tau_parameter;
++	IssmDouble normu;
++	IssmDouble tau_parameter;
+ 
+ 	normu=pow(pow(u,2)+pow(v,2)+pow(w,2),0.5);
+ 	if(normu*diameter/(3*2*kappa)<1){ 
+@@ -995,7 +995,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetStrainRate3dPattyn{{{*/
+-void Penta::GetStrainRate3dPattyn(double* epsilon,double* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input){
++void Penta::GetStrainRate3dPattyn(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input){
+ 	/*Compute the 3d Blatter/PattynStrain Rate (5 components):
+ 	 *
+ 	 * epsilon=[exx eyy exy exz eyz]
+@@ -1007,8 +1007,8 @@
+ 	 */
+ 
+ 	int i;
+-	double epsilonvx[5];
+-	double epsilonvy[5];
++	IssmDouble epsilonvx[5];
++	IssmDouble epsilonvy[5];
+ 
+ 	/*Check that both inputs have been found*/
+ 	if (!vx_input || !vy_input){
+@@ -1024,16 +1024,16 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetStrainRate3d{{{*/
+-void Penta::GetStrainRate3d(double* epsilon,double* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input, Input* vz_input){
++void Penta::GetStrainRate3d(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input, Input* vz_input){
+ 	/*Compute the 3d Strain Rate (6 components):
+ 	 *
+ 	 * epsilon=[exx eyy ezz exy exz eyz]
+ 	 */
+ 
+ 	int i;
+-	double epsilonvx[6];
+-	double epsilonvy[6];
+-	double epsilonvz[6];
++	IssmDouble epsilonvx[6];
++	IssmDouble epsilonvy[6];
++	IssmDouble epsilonvz[6];
+ 
+ 	/*Check that both inputs have been found*/
+ 	if (!vx_input || !vy_input || !vz_input){
+@@ -1099,12 +1099,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetZcoord {{{*/
+-double Penta::GetZcoord(GaussPenta* gauss){
++IssmDouble Penta::GetZcoord(GaussPenta* gauss){
+ 
+ 	int    i;
+-	double z;
+-	double xyz_list[NUMVERTICES][3];
+-	double z_list[NUMVERTICES];
++	IssmDouble z;
++	IssmDouble xyz_list[NUMVERTICES][3];
++	IssmDouble z_list[NUMVERTICES];
+ 
+ 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
+ 	for(i=0;i<NUMVERTICES;i++) z_list[i]=xyz_list[i][2];
+@@ -1126,7 +1126,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputArtificialNoise{{{*/
+-void  Penta::InputArtificialNoise(int enum_type,double min,double max){
++void  Penta::InputArtificialNoise(int enum_type,IssmDouble min,IssmDouble max){
+ 
+ 	Input* input=NULL;
+ 
+@@ -1139,7 +1139,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputConvergence{{{*/
+-bool Penta::InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){
++bool Penta::InputConvergence(IssmDouble* eps, int* enums,int num_enums,int* criterionenums,IssmDouble* criterionvalues,int num_criterionenums){
+ 
+ 	int i;
+ 	bool    converged=true;
+@@ -1170,8 +1170,8 @@
+ 	return converged;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputCreate(double scalar,int enum,int code);{{{*/
+-void Penta::InputCreate(double scalar,int name,int code){
++/*FUNCTION Penta::InputCreate(IssmDouble scalar,int enum,int code);{{{*/
++void Penta::InputCreate(IssmDouble scalar,int name,int code){
+ 
+ 	/*Check that name is an element input*/
+ 	if (!IsInput(name)) return;
+@@ -1182,27 +1182,27 @@
+ 	else if ((code==6) || (code==2)){ //integer
+ 		this->inputs->AddInput(new IntInput(name,(int)scalar));
+ 	}
+-	else if ((code==7) || (code==3)){ //double
+-		this->inputs->AddInput(new DoubleInput(name,(double)scalar));
++	else if ((code==7) || (code==3)){ //IssmDouble
++		this->inputs->AddInput(new DoubleInput(name,(IssmDouble)scalar));
+ 	}
+ 	else _error_("%s%i"," could not recognize nature of vector from code ",code);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputCreate(double* vector,int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){{{*/
+-void Penta::InputCreate(double* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){//index into elements
++/*FUNCTION Penta::InputCreate(IssmDouble* vector,int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){{{*/
++void Penta::InputCreate(IssmDouble* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code){//index into elements
+ 
+ 	/*Intermediaries*/
+ 	int    i,j,t;
+ 	int    penta_vertex_ids[6];
+ 	int    row;
+-	double nodeinputs[6];
+-	double time;
++	IssmDouble nodeinputs[6];
++	IssmDouble time;
+ 	TransientInput* transientinput=NULL;
+ 
+ 	int    numberofvertices;
+ 	int    numberofelements;
+-	double yts;
++	IssmDouble yts;
+ 
+ 	/*Fetch parameters: */
+ 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
+@@ -1221,7 +1221,7 @@
+ 		if(M==numberofvertices){
+ 
+ 			/*create input values: */
+-			for(i=0;i<6;i++)nodeinputs[i]=(double)vector[penta_vertex_ids[i]-1];
++			for(i=0;i<6;i++)nodeinputs[i]=(IssmDouble)vector[penta_vertex_ids[i]-1];
+ 
+ 			/*process units: */
+ 			UnitConversion(&nodeinputs[0], 6 ,ExtToIuEnum, vector_enum);
+@@ -1236,14 +1236,14 @@
+ 				/*create input values: */
+ 				for(i=0;i<6;i++){
+ 					row=penta_vertex_ids[i]-1;
+-					nodeinputs[i]=(double)vector[N*row+t];
++					nodeinputs[i]=(IssmDouble)vector[N*row+t];
+ 				}
+ 
+ 				/*process units: */
+ 				UnitConversion(&nodeinputs[0], 6 ,ExtToIuEnum, vector_enum);
+ 
+ 				/*time? :*/
+-				time=(double)vector[(M-1)*N+t]*yts;
++				time=(IssmDouble)vector[(M-1)*N+t]*yts;
+ 
+ 				if(t==0)transientinput=new TransientInput(vector_enum);
+ 				transientinput->AddTimeInput(new PentaP1Input(vector_enum,nodeinputs),time);
+@@ -1264,8 +1264,8 @@
+ 			else if (code==6){ //integer
+ 				this->inputs->AddInput(new IntInput(vector_enum,(int)vector[index]));
+ 			}
+-			else if (code==7){ //double
+-				this->inputs->AddInput(new DoubleInput(vector_enum,(double)vector[index]));
++			else if (code==7){ //IssmDouble
++				this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index]));
+ 			}
+ 			else _error_("%s%i"," could not recognize nature of vector from code ",code);
+ 		}
+@@ -1283,9 +1283,9 @@
+ void  Penta::InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum){
+ 
+ 	int  step,i;
+-	double  xyz_list[NUMVERTICES][3];
+-	double  Helem_list[NUMVERTICES];
+-	double  zeros_list[NUMVERTICES]={0.0};
++	IssmDouble  xyz_list[NUMVERTICES][3];
++	IssmDouble  Helem_list[NUMVERTICES];
++	IssmDouble  zeros_list[NUMVERTICES]={0.0};
+ 	Penta* penta=NULL;
+ 	Input* original_input=NULL;
+ 	Input* element_integrated_input=NULL;
+@@ -1457,7 +1457,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputScale{{{*/
+-void  Penta::InputScale(int enum_type,double scale_factor){
++void  Penta::InputScale(int enum_type,IssmDouble scale_factor){
+ 
+ 	Input* input=NULL;
+ 
+@@ -1470,7 +1470,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputToResult{{{*/
+-void  Penta::InputToResult(int enum_type,int step,double time){
++void  Penta::InputToResult(int enum_type,int step,IssmDouble time){
+ 
+ 	int    i;
+ 	bool   found = false;
+@@ -1504,8 +1504,8 @@
+ 	this->inputs->AddInput(new BoolInput(name,constant));
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromConstant(double value, int name);{{{*/
+-void  Penta::InputUpdateFromConstant(double constant, int name){
++/*FUNCTION Penta::InputUpdateFromConstant(IssmDouble value, int name);{{{*/
++void  Penta::InputUpdateFromConstant(IssmDouble constant, int name){
+ 	/*Check that name is an element input*/
+ 	if (!IsInput(name)) return;
+ 
+@@ -1528,11 +1528,11 @@
+ 	/*Intermediaries*/
+ 	IssmInt i,j;
+ 	int     penta_vertex_ids[6];
+-	double  nodeinputs[6];
+-	double  cmmininputs[6];
+-	double  cmmaxinputs[6];
++	IssmDouble  nodeinputs[6];
++	IssmDouble  cmmininputs[6];
++	IssmDouble  cmmaxinputs[6];
+ 
+-	double  yts;
++	IssmDouble  yts;
+ 	bool    control_analysis;
+ 	int     num_control_type;
+ 	int     num_cm_responses;
+@@ -1646,7 +1646,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolution {{{*/
+-void  Penta::InputUpdateFromSolution(double* solution){
++void  Penta::InputUpdateFromSolution(IssmDouble* solution){
+ 
+ 	int analysis_type;
+ 
+@@ -1715,20 +1715,20 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionPrognostic{{{*/
+-void  Penta::InputUpdateFromSolutionPrognostic(double* solution){
++void  Penta::InputUpdateFromSolutionPrognostic(IssmDouble* solution){
+ 
+ 	const int  numdof   = NDOF1*NUMVERTICES;
+ 	const int  numdof2d = NDOF1*NUMVERTICES2D;
+ 
+ 	int    i,hydroadjustment;
+ 	int*   doflist = NULL;
+-	double rho_ice,rho_water,minthickness;
+-	double newthickness[numdof];
+-	double newbed[numdof];
+-	double newsurface[numdof];
+-	double oldbed[NUMVERTICES];
+-	double oldsurface[NUMVERTICES];
+-	double oldthickness[NUMVERTICES];
++	IssmDouble rho_ice,rho_water,minthickness;
++	IssmDouble newthickness[numdof];
++	IssmDouble newbed[numdof];
++	IssmDouble newsurface[numdof];
++	IssmDouble oldbed[NUMVERTICES];
++	IssmDouble oldsurface[NUMVERTICES];
++	IssmDouble oldthickness[NUMVERTICES];
+ 	Penta  *penta   = NULL;
+ 
+ 	/*If not on bed, return*/
+@@ -1798,11 +1798,11 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionOneDof{{{*/
+-void  Penta::InputUpdateFromSolutionOneDof(double* solution,int enum_type){
++void  Penta::InputUpdateFromSolutionOneDof(IssmDouble* solution,int enum_type){
+ 
+ 	const int numdof = NDOF1*NUMVERTICES;
+ 
+-	double values[numdof];
++	IssmDouble values[numdof];
+ 	int*   doflist=NULL;
+ 
+ 	/*Get dof list: */
+@@ -1822,12 +1822,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionOneDofCollpased{{{*/
+-void  Penta::InputUpdateFromSolutionOneDofCollapsed(double* solution,int enum_type){
++void  Penta::InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solution,int enum_type){
+ 
+ 	const int  numdof   = NDOF1*NUMVERTICES;
+ 	const int  numdof2d = NDOF1*NUMVERTICES2D;
+ 
+-	double  values[numdof];
++	IssmDouble  values[numdof];
+ 	int*    doflist = NULL;
+ 	Penta  *penta   = NULL;
+ 
+@@ -1861,8 +1861,8 @@
+ 	xDelete<int>(doflist);
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromVector(double* vector, int name, int type);{{{*/
+-void  Penta::InputUpdateFromVector(double* vector, int name, int type){
++/*FUNCTION Penta::InputUpdateFromVector(IssmDouble* vector, int name, int type);{{{*/
++void  Penta::InputUpdateFromVector(IssmDouble* vector, int name, int type){
+ 
+ 	/*Check that name is an element input*/
+ 	if (!IsInput(name)) return;
+@@ -1874,7 +1874,7 @@
+ 		case VertexEnum:
+ 
+ 			/*New PentaVertexInpu*/
+-			double values[6];
++			IssmDouble values[6];
+ 
+ 			/*Get values on the 6 vertices*/
+ 			for (int i=0;i<6;i++){
+@@ -1977,7 +1977,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::IsNodeOnShelfFromFlags {{{*/
+-bool   Penta::IsNodeOnShelfFromFlags(double* flags){
++bool   Penta::IsNodeOnShelfFromFlags(IssmDouble* flags){
+ 
+ 	int  i;
+ 	bool shelf=false;
+@@ -2008,14 +2008,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::ListResultsInfo{{{*/
+-void Penta::ListResultsInfo(int** in_resultsenums,int** in_resultssizes,double** in_resultstimes,int** in_resultssteps,int* in_num_results){
++void Penta::ListResultsInfo(int** in_resultsenums,int** in_resultssizes,IssmDouble** in_resultstimes,int** in_resultssteps,int* in_num_results){
+ 
+ 	/*Intermediaries*/
+ 	int     i;
+ 	int     numberofresults = 0;
+ 	int     *resultsenums   = NULL;
+ 	int     *resultssizes   = NULL;
+-	double  *resultstimes   = NULL;
++	IssmDouble  *resultstimes   = NULL;
+ 	int     *resultssteps   = NULL;
+ 
+ 	/*Checks*/
+@@ -2032,7 +2032,7 @@
+ 		/*Allocate output*/
+ 		resultsenums=xNew<int>(numberofresults);
+ 		resultssizes=xNew<int>(numberofresults);
+-		resultstimes=xNew<double>(numberofresults);
++		resultstimes=xNew<IssmDouble>(numberofresults);
+ 		resultssteps=xNew<int>(numberofresults);
+ 
+ 		/*populate enums*/
+@@ -2059,14 +2059,14 @@
+ 
+ }/*}}}*/
+ /*FUNCTION Penta::MigrateGroundingLine{{{*/
+-void  Penta::MigrateGroundingLine(double* old_floating_ice,double* sheet_ungrounding){
++void  Penta::MigrateGroundingLine(IssmDouble* old_floating_ice,IssmDouble* sheet_ungrounding){
+ 
+ 	int     i,migration_style,unground;
+ 	bool    elementonshelf = false;
+-	double  bed_hydro,yts,gl_melting_rate;
+-	double  rho_water,rho_ice,density;
+-	double  melting[NUMVERTICES];
+-	double  h[NUMVERTICES],s[NUMVERTICES],b[NUMVERTICES],ba[NUMVERTICES];
++	IssmDouble  bed_hydro,yts,gl_melting_rate;
++	IssmDouble  rho_water,rho_ice,density;
++	IssmDouble  melting[NUMVERTICES];
++	IssmDouble  h[NUMVERTICES],s[NUMVERTICES],b[NUMVERTICES],ba[NUMVERTICES];
+ 
+ 	if(!IsOnBed()) return;
+ 
+@@ -2142,13 +2142,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::MinEdgeLength{{{*/
+-double Penta::MinEdgeLength(double xyz_list[6][3]){
++IssmDouble Penta::MinEdgeLength(IssmDouble xyz_list[6][3]){
+ 	/*Return the minimum lenght of the nine egdes of the penta*/
+ 
+ 	int    i,node0,node1;
+ 	int    edges[9][2]={{0,1},{0,2},{1,2},{3,4},{3,5},{4,5},{0,3},{1,4},{2,5}}; //list of the nine edges
+-	double length;
+-	double minlength=-1;
++	IssmDouble length;
++	IssmDouble minlength=-1;
+ 
+ 	for(i=0;i<9;i++){
+ 		/*Find the two nodes for this edge*/
+@@ -2170,11 +2170,11 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::NodalValue {{{*/
+-int    Penta::NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units){
++int    Penta::NodalValue(IssmDouble* pvalue, int index, int natureofdataenum,bool process_units){
+ 
+ 	int i;
+ 	int found=0;
+-	double value;
++	IssmDouble value;
+ 	Input* data=NULL;
+ 	GaussPenta* gauss=NULL;
+ 
+@@ -2252,60 +2252,60 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::PositiveDegreeDay{{{*/
+-void  Penta::PositiveDegreeDay(double* pdds,double* pds,double signorm){
++void  Penta::PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm){
+ 
+ 
+    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
++   IssmDouble agd[NUMVERTICES];  // surface and basal
++   IssmDouble saccu[NUMVERTICES] = {0};     // yearly surface accumulation
++   IssmDouble smelt[NUMVERTICES] = {0};     // yearly melt
++   IssmDouble precrunoff[NUMVERTICES];      // yearly runoff
++   IssmDouble prect; // total precipitation during 1 year taking into account des. ef.
++   IssmDouble water; //water=rain + snowmelt 
++   IssmDouble runoff; //meltwater only, does not include rain 
++   IssmDouble 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
++   IssmDouble  rho_water,rho_ice,density;
++   IssmDouble lapser=6.5/1000, sealev=0;    // lapse rate. degrees per meter.
++   IssmDouble desfac = 0.5;                 //desert elevation factor
++   IssmDouble s0p[NUMVERTICES]={0};         //should be set to elevation from precip source
++   IssmDouble s0t[NUMVERTICES]={0};         //should be set to elevation from temperature source
++   IssmDouble st;             // elevation between altitude of the temp record and current altitude
++   IssmDouble 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 signormc = signorm - 0.5;     // sigma of the temperature distribution for cloudy day
+-   double siglimc, 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
++   IssmDouble siglim;          // sigma limit for the integration which is equal to 2.5 sigmanorm
++   IssmDouble signormc = signorm - 0.5;     // sigma of the temperature distribution for cloudy day
++   IssmDouble siglimc, siglim0, siglim0c;
++   IssmDouble PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C)
++   IssmDouble DT = 0.02;
++   IssmDouble 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};  
++   IssmDouble q, qmpt; // q is desert/elev. fact, hnpfac is huybrect fact, and pd is normal dist.
++   IssmDouble qm[NUMVERTICES] = {0};        // snow part of the precipitation 
++   IssmDouble qmt[NUMVERTICES] = {0};       // precipitation without desertification effect adjustment
++   IssmDouble qmp[NUMVERTICES] = {0};       // desertification taken into account
++   IssmDouble pdd[NUMVERTICES] = {0};     
++   IssmDouble frzndd[NUMVERTICES] = {0};  
+ 
+-   double tstar;                        // monthly mean surface temp
+-   double Tsum[NUMVERTICES]= {0};       // average summer (JJA) temperature
+-   double Tsurf[NUMVERTICES] = {0};     // average annual temperature    
++   IssmDouble tstar;                        // monthly mean surface temp
++   IssmDouble Tsum[NUMVERTICES]= {0};       // average summer (JJA) temperature
++   IssmDouble 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;
++   IssmDouble h[NUMVERTICES],s[NUMVERTICES],ttmp[NUMVERTICES],prectmp[NUMVERTICES]; // ,b[NUMVERTICES]
++   IssmDouble t[NUMVERTICES][12],prec[NUMVERTICES][12];
++   IssmDouble 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).
++   IssmDouble snwm;  // snow that could have been melted in a year.
++   IssmDouble snwmf; //  ablation factor for snow per positive degree day.
++   IssmDouble 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;
++   IssmDouble dfrz=1.5, CovrLm=2009./3.35e+5, dCovrLm=dfrz*CovrLm; //m*J kg^-1 C^-1 /(J kg^-1)=m/C yr
++   IssmDouble supice,supcap,diffndd;
++   IssmDouble fsupT=0.5,  fsupndd=0.5;  // Tsurf mode factors for supice
++   IssmDouble pddtj[NUMVERTICES], hmx2;
+ 
+    /*Recover info at the vertices: */
+    GetInputListOnVertices(&h[0],ThicknessEnum);
+@@ -2480,9 +2480,9 @@
+ void  Penta::PotentialSheetUngrounding(Vector* potential_sheet_ungrounding){
+ 
+ 	int     i;
+-	double  h[NUMVERTICES],ba[NUMVERTICES];
+-	double  bed_hydro;
+-	double  rho_water,rho_ice,density;
++	IssmDouble  h[NUMVERTICES],ba[NUMVERTICES];
++	IssmDouble  bed_hydro;
++	IssmDouble  rho_water,rho_ice,density;
+ 	bool    elementonshelf = false;
+ 
+ 	/*material parameters: */
+@@ -2517,15 +2517,15 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::ReduceMatrixStokes {{{*/
+-void Penta::ReduceMatrixStokes(double* Ke_reduced, double* Ke_temp){
++void Penta::ReduceMatrixStokes(IssmDouble* Ke_reduced, IssmDouble* Ke_temp){
+ 
+ 	int    i,j;
+-	double Kii[24][24];
+-	double Kib[24][3];
+-	double Kbb[3][3];
+-	double Kbi[3][24];
+-	double Kbbinv[3][3];
+-	double Kright[24][24];
++	IssmDouble Kii[24][24];
++	IssmDouble Kib[24][3];
++	IssmDouble Kbb[3][3];
++	IssmDouble Kbi[3][24];
++	IssmDouble Kbbinv[3][3];
++	IssmDouble Kright[24][24];
+ 
+ 	/*Create the four matrices used for reduction */
+ 	for(i=0;i<24;i++){
+@@ -2559,15 +2559,15 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::ReduceVectorStokes {{{*/
+-void Penta::ReduceVectorStokes(double* Pe_reduced, double* Ke_temp, double* Pe_temp){
++void Penta::ReduceVectorStokes(IssmDouble* Pe_reduced, IssmDouble* Ke_temp, IssmDouble* Pe_temp){
+ 
+ 	int    i,j;
+-	double Pi[24];
+-	double Pb[3];
+-	double Kbb[3][3];
+-	double Kib[24][3];
+-	double Kbbinv[3][3];
+-	double Pright[24];
++	IssmDouble Pi[24];
++	IssmDouble Pb[3];
++	IssmDouble Kbb[3][3];
++	IssmDouble Kib[24][3];
++	IssmDouble Kbbinv[3][3];
++	IssmDouble Pright[24];
+ 
+ 	/*Create the four matrices used for reduction */
+ 	for(i=0;i<24;i++) Pi[i]=*(Pe_temp+i);
+@@ -2594,7 +2594,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::RequestedOutput{{{*/
+-void Penta::RequestedOutput(int output_enum,int step,double time){
++void Penta::RequestedOutput(int output_enum,int step,IssmDouble time){
+ 			
+ 	if(IsInput(output_enum)){
+ 		/*just transfer this input to results, and we are done: */
+@@ -2648,9 +2648,9 @@
+ void  Penta::ResetCoordinateSystem(void){
+ 
+ 	int    approximation;
+-	double slopex[NUMVERTICES];
+-	double slopey[NUMVERTICES];
+-	double xz_plane[6];
++	IssmDouble slopex[NUMVERTICES];
++	IssmDouble slopey[NUMVERTICES];
++	IssmDouble xz_plane[6];
+ 
+ 	/*For Stokes only: we want the CS to be tangential to the bedrock*/
+ 	inputs->GetInputValue(&approximation,ApproximationEnum);
+@@ -2738,10 +2738,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::SurfaceArea {{{*/
+-double Penta::SurfaceArea(void){
++IssmDouble Penta::SurfaceArea(void){
+ 
+ 	int    approximation;
+-	double S;
++	IssmDouble S;
+ 	Tria*  tria=NULL;
+ 
+ 	/*retrieve inputs :*/
+@@ -2775,12 +2775,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::SurfaceNormal {{{*/
+-void Penta::SurfaceNormal(double* surface_normal, double xyz_list[3][3]){
++void Penta::SurfaceNormal(IssmDouble* surface_normal, IssmDouble xyz_list[3][3]){
+ 
+ 	int    i;
+-	double v13[3],v23[3];
+-	double normal[3];
+-	double normal_norm;
++	IssmDouble v13[3],v23[3];
++	IssmDouble normal[3];
++	IssmDouble normal_norm;
+ 
+ 	for (i=0;i<3;i++){
+ 		v13[i]=xyz_list[0][i]-xyz_list[2][i];
+@@ -2799,13 +2799,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::TimeAdapt{{{*/
+-double  Penta::TimeAdapt(void){
++IssmDouble  Penta::TimeAdapt(void){
+ 
+ 	int    i;
+-	double C,dx,dy,dz,dt;
+-	double maxabsvx,maxabsvy,maxabsvz;
+-	double maxx,minx,maxy,miny,maxz,minz;
+-	double xyz_list[NUMVERTICES][3];
++	IssmDouble C,dx,dy,dz,dt;
++	IssmDouble maxabsvx,maxabsvy,maxabsvz;
++	IssmDouble maxx,minx,maxy,miny,maxz,minz;
++	IssmDouble xyz_list[NUMVERTICES][3];
+ 
+ 	/*get CFL coefficient:*/
+ 	this->parameters->FindParam(&C,TimesteppingCflCoefficientEnum);
+@@ -2850,12 +2850,12 @@
+ 	int     penta_type;
+ 	int     penta_node_ids[6];
+ 	int     penta_vertex_ids[6];
+-	double  nodeinputs[6];
+-	double  yts;
++	IssmDouble  nodeinputs[6];
++	IssmDouble  yts;
+ 	int     stabilization;
+ 	bool    dakota_analysis;
+ 	bool    isstokes;
+-	double  beta,heatcapacity,referencetemperature,meltingpoint,latentheat;
++	IssmDouble  beta,heatcapacity,referencetemperature,meltingpoint,latentheat;
+ 
+ 	/*Fetch parameters: */
+ 	iomodel->Constant(&yts,ConstantsYtsEnum);
+@@ -2997,7 +2997,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::UpdatePotentialSheetUngrounding{{{*/
+-int Penta::UpdatePotentialSheetUngrounding(double* vertices_potentially_ungrounding,Vector* vec_nodes_on_iceshelf,double* nodes_on_iceshelf){
++int Penta::UpdatePotentialSheetUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf){
+ 
+ 	int i;
+ 	int nflipped=0;
+@@ -3024,12 +3024,12 @@
+ 
+ 	/*Intermediaries*/
+ 	int    iv;
+-	double phi;
+-	double viscosity;
+-	double xyz_list[NUMVERTICES][3];
+-	double epsilon[6];
+-	double     viscousheating[NUMVERTICES]={0,0,0,0,0,0};
+-	double     thickness;
++	IssmDouble phi;
++	IssmDouble viscosity;
++	IssmDouble xyz_list[NUMVERTICES][3];
++	IssmDouble epsilon[6];
++	IssmDouble     viscousheating[NUMVERTICES]={0,0,0,0,0,0};
++	IssmDouble     thickness;
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -3065,18 +3065,18 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::SmearFunction {{{*/
+-void  Penta::SmearFunction(Vector* smearedvector,double (*WeightFunction)(double distance,double radius),double radius){
++void  Penta::SmearFunction(Vector* smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius){
+ 	_error_("not implemented yet");
+ }
+ /*}}}*/
+ 
+ #ifdef _HAVE_RESPONSES_
+ /*FUNCTION Penta::IceVolume {{{*/
+-double Penta::IceVolume(void){
++IssmDouble Penta::IceVolume(void){
+ 
+ 	/*The volume of a troncated prism is base * 1/3 sum(length of edges)*/
+-	double base,height;
+-	double xyz_list[NUMVERTICES][3];
++	IssmDouble base,height;
++	IssmDouble xyz_list[NUMVERTICES][3];
+ 
+ 	if(IsOnWater())return 0;
+ 
+@@ -3095,10 +3095,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::MinVel{{{*/
+-void  Penta::MinVel(double* pminvel, bool process_units){
++void  Penta::MinVel(IssmDouble* pminvel, bool process_units){
+ 
+ 	/*Get minimum:*/
+-	double minvel=this->inputs->Min(VelEnum);
++	IssmDouble minvel=this->inputs->Min(VelEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) minvel=UnitConversion(minvel,IuToExtEnum,VelEnum);
+@@ -3108,10 +3108,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::MinVx{{{*/
+-void  Penta::MinVx(double* pminvx, bool process_units){
++void  Penta::MinVx(IssmDouble* pminvx, bool process_units){
+ 
+ 	/*Get minimum:*/
+-	double minvx=this->inputs->Min(VxEnum);
++	IssmDouble minvx=this->inputs->Min(VxEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) minvx=UnitConversion(minvx,IuToExtEnum,VxEnum);
+@@ -3121,10 +3121,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::MinVy{{{*/
+-void  Penta::MinVy(double* pminvy, bool process_units){
++void  Penta::MinVy(IssmDouble* pminvy, bool process_units){
+ 
+ 	/*Get minimum:*/
+-	double minvy=this->inputs->Min(VyEnum);
++	IssmDouble minvy=this->inputs->Min(VyEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) minvy=UnitConversion(minvy,IuToExtEnum,VyEnum);
+@@ -3134,10 +3134,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::MinVz{{{*/
+-void  Penta::MinVz(double* pminvz, bool process_units){
++void  Penta::MinVz(IssmDouble* pminvz, bool process_units){
+ 
+ 	/*Get minimum:*/
+-	double minvz=this->inputs->Min(VzEnum);
++	IssmDouble minvz=this->inputs->Min(VzEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) minvz=UnitConversion(minvz,IuToExtEnum,VzEnum);
+@@ -3147,9 +3147,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::MassFlux {{{*/
+-double Penta::MassFlux( double* segment,bool process_units){
++IssmDouble Penta::MassFlux( IssmDouble* segment,bool process_units){
+ 
+-	double mass_flux=0;
++	IssmDouble mass_flux=0;
+ 
+ 	if(!IsOnBed()) return mass_flux;
+ 
+@@ -3171,10 +3171,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::MaxAbsVx{{{*/
+-void  Penta::MaxAbsVx(double* pmaxabsvx, bool process_units){
++void  Penta::MaxAbsVx(IssmDouble* pmaxabsvx, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxabsvx=this->inputs->MaxAbs(VxEnum);
++	IssmDouble maxabsvx=this->inputs->MaxAbs(VxEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxabsvx=UnitConversion(maxabsvx,IuToExtEnum,VxEnum);
+@@ -3184,10 +3184,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::MaxAbsVy{{{*/
+-void  Penta::MaxAbsVy(double* pmaxabsvy, bool process_units){
++void  Penta::MaxAbsVy(IssmDouble* pmaxabsvy, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxabsvy=this->inputs->MaxAbs(VyEnum);
++	IssmDouble maxabsvy=this->inputs->MaxAbs(VyEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxabsvy=UnitConversion(maxabsvy,IuToExtEnum,VyEnum);
+@@ -3197,10 +3197,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::MaxAbsVz{{{*/
+-void  Penta::MaxAbsVz(double* pmaxabsvz, bool process_units){
++void  Penta::MaxAbsVz(IssmDouble* pmaxabsvz, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxabsvz=this->inputs->MaxAbs(VzEnum);
++	IssmDouble maxabsvz=this->inputs->MaxAbs(VzEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxabsvz=UnitConversion(maxabsvz,IuToExtEnum,VyEnum);
+@@ -3210,10 +3210,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::MaxVel{{{*/
+-void  Penta::MaxVel(double* pmaxvel, bool process_units){
++void  Penta::MaxVel(IssmDouble* pmaxvel, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxvel=this->inputs->Max(VelEnum);
++	IssmDouble maxvel=this->inputs->Max(VelEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxvel=UnitConversion(maxvel,IuToExtEnum,VelEnum);
+@@ -3224,10 +3224,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::MaxVx{{{*/
+-void  Penta::MaxVx(double* pmaxvx, bool process_units){
++void  Penta::MaxVx(IssmDouble* pmaxvx, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxvx=this->inputs->Max(VxEnum);
++	IssmDouble maxvx=this->inputs->Max(VxEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxvx=UnitConversion(maxvx,IuToExtEnum,VxEnum);
+@@ -3237,10 +3237,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::MaxVy{{{*/
+-void  Penta::MaxVy(double* pmaxvy, bool process_units){
++void  Penta::MaxVy(IssmDouble* pmaxvy, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxvy=this->inputs->Max(VyEnum);
++	IssmDouble maxvy=this->inputs->Max(VyEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxvy=UnitConversion(maxvy,IuToExtEnum,VyEnum);
+@@ -3250,10 +3250,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::MaxVz{{{*/
+-void  Penta::MaxVz(double* pmaxvz, bool process_units){
++void  Penta::MaxVz(IssmDouble* pmaxvz, bool process_units){
+ 
+ 	/*Get maximum:*/
+-	double maxvz=this->inputs->Max(VzEnum);
++	IssmDouble maxvz=this->inputs->Max(VzEnum);
+ 
+ 	/*process units if requested: */
+ 	if(process_units) maxvz=UnitConversion(maxvz,IuToExtEnum,VzEnum);
+@@ -3263,7 +3263,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::ElementResponse{{{*/
+-void Penta::ElementResponse(double* presponse,int response_enum,bool process_units){
++void Penta::ElementResponse(IssmDouble* presponse,int response_enum,bool process_units){
+ 
+ 	switch(response_enum){
+ 		case MaterialsRheologyBbarEnum:
+@@ -3272,7 +3272,7 @@
+ 		case VelEnum:
+ 
+ 			/*Get input:*/
+-			double vel;
++			IssmDouble vel;
+ 			Input* vel_input;
+ 
+ 			vel_input=this->inputs->GetInput(VelEnum); _assert_(vel_input);
+@@ -3315,24 +3315,24 @@
+ 	/*Intermediaries */
+ 	int        stabilization;
+ 	int        i,j,ig,found=0;
+-	double     Jdet,u,v,w,um,vm,wm;
+-	double     h,hx,hy,hz,vx,vy,vz,vel;
+-	double     gravity,rho_ice,rho_water;
+-	double     epsvel=2.220446049250313e-16;
+-	double     heatcapacity,thermalconductivity,dt;
+-	double     pressure,enthalpy;
+-	double     latentheat,kappa;
+-	double     tau_parameter,diameter;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     B_conduct[3][numdof];
+-	double     B_advec[3][numdof];
+-	double     Bprime_advec[3][numdof];
+-	double     L[numdof];
+-	double     dbasis[3][6];
+-	double     D_scalar_conduct,D_scalar_advec;
+-	double     D_scalar_trans,D_scalar_stab;
+-	double     D[3][3];
+-	double     K[3][3]={0.0};
++	IssmDouble     Jdet,u,v,w,um,vm,wm;
++	IssmDouble     h,hx,hy,hz,vx,vy,vz,vel;
++	IssmDouble     gravity,rho_ice,rho_water;
++	IssmDouble     epsvel=2.220446049250313e-16;
++	IssmDouble     heatcapacity,thermalconductivity,dt;
++	IssmDouble     pressure,enthalpy;
++	IssmDouble     latentheat,kappa;
++	IssmDouble     tau_parameter,diameter;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     B_conduct[3][numdof];
++	IssmDouble     B_advec[3][numdof];
++	IssmDouble     Bprime_advec[3][numdof];
++	IssmDouble     L[numdof];
++	IssmDouble     dbasis[3][6];
++	IssmDouble     D_scalar_conduct,D_scalar_advec;
++	IssmDouble     D_scalar_trans,D_scalar_stab;
++	IssmDouble     D[3][3];
++	IssmDouble     K[3][3]={0.0};
+ 	Tria*      tria=NULL;
+ 	GaussPenta *gauss=NULL;
+ 
+@@ -3471,13 +3471,13 @@
+ 
+ 	/*Intermediaries */
+ 	int       i,j,ig;
+-	double    mixed_layer_capacity,thermal_exchange_velocity;
+-	double    rho_ice,rho_water,heatcapacity;
+-	double    Jdet2d,dt;
+-	double    xyz_list[NUMVERTICES][3];
+-	double	 xyz_list_tria[NUMVERTICES2D][3];
+-	double    basis[NUMVERTICES];
+-	double    D_scalar;
++	IssmDouble    mixed_layer_capacity,thermal_exchange_velocity;
++	IssmDouble    rho_ice,rho_water,heatcapacity;
++	IssmDouble    Jdet2d,dt;
++	IssmDouble    xyz_list[NUMVERTICES][3];
++	IssmDouble	 xyz_list_tria[NUMVERTICES2D][3];
++	IssmDouble    basis[NUMVERTICES];
++	IssmDouble    D_scalar;
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Element matrix and return if necessary*/
+@@ -3552,21 +3552,21 @@
+ 	/*Intermediaries */
+ 	int        stabilization;
+ 	int        i,j,ig,found=0;
+-	double     Jdet,u,v,w,um,vm,wm,vel;
+-	double     h,hx,hy,hz,vx,vy,vz;
+-	double     gravity,rho_ice,rho_water,kappa;
+-	double     heatcapacity,thermalconductivity,dt;
+-	double     tau_parameter,diameter;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     B_conduct[3][numdof];
+-	double     B_advec[3][numdof];
+-	double     Bprime_advec[3][numdof];
+-	double     L[numdof];
+-	double     dbasis[3][6];
+-	double     D_scalar_conduct,D_scalar_advec;
+-	double     D_scalar_trans,D_scalar_stab;
+-	double     D[3][3];
+-	double     K[3][3]={0.0};
++	IssmDouble     Jdet,u,v,w,um,vm,wm,vel;
++	IssmDouble     h,hx,hy,hz,vx,vy,vz;
++	IssmDouble     gravity,rho_ice,rho_water,kappa;
++	IssmDouble     heatcapacity,thermalconductivity,dt;
++	IssmDouble     tau_parameter,diameter;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     B_conduct[3][numdof];
++	IssmDouble     B_advec[3][numdof];
++	IssmDouble     Bprime_advec[3][numdof];
++	IssmDouble     L[numdof];
++	IssmDouble     dbasis[3][6];
++	IssmDouble     D_scalar_conduct,D_scalar_advec;
++	IssmDouble     D_scalar_trans,D_scalar_stab;
++	IssmDouble     D[3][3];
++	IssmDouble     K[3][3]={0.0};
+ 	Tria*      tria=NULL;
+ 	GaussPenta *gauss=NULL;
+ 
+@@ -3704,13 +3704,13 @@
+ 
+ 	/*Intermediaries */
+ 	int       i,j,ig;
+-	double    mixed_layer_capacity,thermal_exchange_velocity;
+-	double    rho_ice,rho_water,heatcapacity;
+-	double    Jdet2d,dt;
+-	double    xyz_list[NUMVERTICES][3];
+-	double	 xyz_list_tria[NUMVERTICES2D][3];
+-	double    basis[NUMVERTICES];
+-	double    D_scalar;
++	IssmDouble    mixed_layer_capacity,thermal_exchange_velocity;
++	IssmDouble    rho_ice,rho_water,heatcapacity;
++	IssmDouble    Jdet2d,dt;
++	IssmDouble    xyz_list[NUMVERTICES][3];
++	IssmDouble	 xyz_list_tria[NUMVERTICES2D][3];
++	IssmDouble    basis[NUMVERTICES];
++	IssmDouble    D_scalar;
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Element matrix and return if necessary*/
+@@ -3775,19 +3775,19 @@
+ 	/*Intermediaries*/
+ 	int    i,j,ig,found=0;
+ 	int    friction_type,stabilization;
+-	double Jdet,phi,dt;
+-	double rho_ice,heatcapacity;
+-	double thermalconductivity,kappa;
+-	double viscosity,pressure;
+-	double enthalpy,enthalpypicard;
+-	double tau_parameter,diameter;
+-	double u,v,w;
+-	double scalar_def,scalar_transient;
+-	double temperature_list[NUMVERTICES];
+-	double xyz_list[NUMVERTICES][3];
+-	double L[numdof];
+-	double dbasis[3][6];
+-	double epsilon[6];
++	IssmDouble Jdet,phi,dt;
++	IssmDouble rho_ice,heatcapacity;
++	IssmDouble thermalconductivity,kappa;
++	IssmDouble viscosity,pressure;
++	IssmDouble enthalpy,enthalpypicard;
++	IssmDouble tau_parameter,diameter;
++	IssmDouble u,v,w;
++	IssmDouble scalar_def,scalar_transient;
++	IssmDouble temperature_list[NUMVERTICES];
++	IssmDouble xyz_list[NUMVERTICES][3];
++	IssmDouble L[numdof];
++	IssmDouble dbasis[3][6];
++	IssmDouble epsilon[6];
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -3870,13 +3870,13 @@
+ 
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+-	double     Jdet2d;
+-	double     heatcapacity,h_pmp;
+-	double     mixed_layer_capacity,thermal_exchange_velocity;
+-	double     rho_ice,rho_water,pressure,dt,scalar_ocean;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     xyz_list_tria[NUMVERTICES2D][3];
+-	double     basis[NUMVERTICES];
++	IssmDouble     Jdet2d;
++	IssmDouble     heatcapacity,h_pmp;
++	IssmDouble     mixed_layer_capacity,thermal_exchange_velocity;
++	IssmDouble     rho_ice,rho_water,pressure,dt,scalar_ocean;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     xyz_list_tria[NUMVERTICES2D][3];
++	IssmDouble     basis[NUMVERTICES];
+ 	GaussPenta* gauss=NULL;
+ 
+ 	/* Ice/ocean heat exchange flux on ice shelf base */
+@@ -3928,14 +3928,14 @@
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+ 	int        analysis_type;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     xyz_list_tria[NUMVERTICES2D][3]={0.0};
+-	double     Jdet2d,dt;
+-	double     rho_ice,heatcapacity,geothermalflux_value;
+-	double     basalfriction,alpha2,vx,vy;
+-	double     scalar,enthalpy,enthalpyup;
+-	double     pressure,pressureup;
+-	double     basis[NUMVERTICES];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     xyz_list_tria[NUMVERTICES2D][3]={0.0};
++	IssmDouble     Jdet2d,dt;
++	IssmDouble     rho_ice,heatcapacity,geothermalflux_value;
++	IssmDouble     basalfriction,alpha2,vx,vy;
++	IssmDouble     scalar,enthalpy,enthalpyup;
++	IssmDouble     pressure,pressureup;
++	IssmDouble     basis[NUMVERTICES];
+ 	Friction*  friction=NULL;
+ 	GaussPenta* gauss=NULL;
+ 	GaussPenta* gaussup=NULL;
+@@ -4038,18 +4038,18 @@
+ 	/*Intermediaries*/
+ 	int    i,j,ig,found=0;
+ 	int    friction_type,stabilization;
+-	double Jdet,phi,dt;
+-	double rho_ice,heatcapacity;
+-	double thermalconductivity,kappa;
+-	double viscosity,temperature;
+-	double tau_parameter,diameter;
+-	double u,v,w;
+-	double scalar_def,scalar_transient;
+-	double temperature_list[NUMVERTICES];
+-	double xyz_list[NUMVERTICES][3];
+-	double L[numdof];
+-	double dbasis[3][6];
+-	double epsilon[6];
++	IssmDouble Jdet,phi,dt;
++	IssmDouble rho_ice,heatcapacity;
++	IssmDouble thermalconductivity,kappa;
++	IssmDouble viscosity,temperature;
++	IssmDouble tau_parameter,diameter;
++	IssmDouble u,v,w;
++	IssmDouble scalar_def,scalar_transient;
++	IssmDouble temperature_list[NUMVERTICES];
++	IssmDouble xyz_list[NUMVERTICES][3];
++	IssmDouble L[numdof];
++	IssmDouble dbasis[3][6];
++	IssmDouble epsilon[6];
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -4124,13 +4124,13 @@
+ 
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+-	double     Jdet2d;
+-	double     mixed_layer_capacity,thermal_exchange_velocity;
+-	double     rho_ice,rho_water,pressure,dt,scalar_ocean;
+-	double     heatcapacity,t_pmp;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     xyz_list_tria[NUMVERTICES2D][3];
+-	double     basis[NUMVERTICES];
++	IssmDouble     Jdet2d;
++	IssmDouble     mixed_layer_capacity,thermal_exchange_velocity;
++	IssmDouble     rho_ice,rho_water,pressure,dt,scalar_ocean;
++	IssmDouble     heatcapacity,t_pmp;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     xyz_list_tria[NUMVERTICES2D][3];
++	IssmDouble     basis[NUMVERTICES];
+ 	GaussPenta* gauss=NULL;
+ 
+ 	/* Ice/ocean heat exchange flux on ice shelf base */
+@@ -4182,13 +4182,13 @@
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+ 	int        analysis_type;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     xyz_list_tria[NUMVERTICES2D][3]={0.0};
+-	double     Jdet2d,dt;
+-	double     rho_ice,heatcapacity,geothermalflux_value;
+-	double     basalfriction,alpha2,vx,vy;
+-	double     basis[NUMVERTICES];
+-	double     scalar;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     xyz_list_tria[NUMVERTICES2D][3]={0.0};
++	IssmDouble     Jdet2d,dt;
++	IssmDouble     rho_ice,heatcapacity,geothermalflux_value;
++	IssmDouble     basalfriction,alpha2,vx,vy;
++	IssmDouble     basis[NUMVERTICES];
++	IssmDouble     scalar;
+ 	Friction*  friction=NULL;
+ 	GaussPenta* gauss=NULL;
+ 
+@@ -4247,8 +4247,8 @@
+ 
+ 	int          i;
+ 	int*         doflist=NULL;
+-	double       values[numdof];
+-	double       temp;
++	IssmDouble       values[numdof];
++	IssmDouble       temp;
+ 	GaussPenta   *gauss=NULL;
+ 
+ 	/*Get dof list: */
+@@ -4278,8 +4278,8 @@
+ 
+ 	int          i;
+ 	int*         doflist=NULL;
+-	double       values[numdof];
+-	double       enthalpy;
++	IssmDouble       values[numdof];
++	IssmDouble       enthalpy;
+ 	GaussPenta   *gauss=NULL;
+ 
+ 	/*Get dof list: */
+@@ -4303,18 +4303,18 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionThermal {{{*/
+-void  Penta::InputUpdateFromSolutionThermal(double* solution){
++void  Penta::InputUpdateFromSolutionThermal(IssmDouble* solution){
+ 
+ 	const int    numdof=NDOF1*NUMVERTICES;
+ 
+ 	bool   converged;
+ 	int    i,rheology_law;
+-	double xyz_list[NUMVERTICES][3];
+-	double values[numdof];
+-	double B[numdof];
+-	double B_average,s_average;
++	IssmDouble xyz_list[NUMVERTICES][3];
++	IssmDouble values[numdof];
++	IssmDouble B[numdof];
++	IssmDouble B_average,s_average;
+ 	int*   doflist=NULL;
+-	//double pressure[numdof];
++	//IssmDouble pressure[numdof];
+ 
+ 	/*Get dof list: */
+ 	GetDofList(&doflist,NoneApproximationEnum,GsetEnum);
+@@ -4374,19 +4374,19 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionEnthalpy {{{*/
+-void  Penta::InputUpdateFromSolutionEnthalpy(double* solution){
++void  Penta::InputUpdateFromSolutionEnthalpy(IssmDouble* solution){
+ 
+ 	const int    numdof=NDOF1*NUMVERTICES;
+ 
+ 	bool   converged=false;
+ 	int    i,rheology_law;
+-	double xyz_list[NUMVERTICES][3];
+-	double values[numdof];
+-	double pressure[NUMVERTICES];
+-	double temperatures[numdof];
+-	double waterfraction[numdof];
+-	double B[numdof];
+-	double B_average,s_average;
++	IssmDouble xyz_list[NUMVERTICES][3];
++	IssmDouble values[numdof];
++	IssmDouble pressure[NUMVERTICES];
++	IssmDouble temperatures[numdof];
++	IssmDouble waterfraction[numdof];
++	IssmDouble B[numdof];
++	IssmDouble B_average,s_average;
+ 	int*   doflist=NULL;
+ 
+ 	/*Get dof list: */
+@@ -4475,7 +4475,7 @@
+ 
+ }/*}}}*/
+ /*FUNCTION Penta::ControlInputScaleGradient{{{*/
+-void Penta::ControlInputScaleGradient(int enum_type,double scale){
++void Penta::ControlInputScaleGradient(int enum_type,IssmDouble scale){
+ 
+ 	Input* input=NULL;
+ 
+@@ -4491,10 +4491,10 @@
+ 	((ControlInput*)input)->ScaleGradient(scale);
+ }/*}}}*/
+ /*FUNCTION Penta::ControlInputSetGradient{{{*/
+-void Penta::ControlInputSetGradient(double* gradient,int enum_type,int control_index){
++void Penta::ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index){
+ 
+ 	int    doflist1[NUMVERTICES];
+-	double grad_list[NUMVERTICES];
++	IssmDouble grad_list[NUMVERTICES];
+ 	Input* grad_input=NULL;
+ 	Input* input=NULL;
+ 
+@@ -4565,15 +4565,15 @@
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+ 	bool       incomplete_adjoint;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     Jdet;
+-	double     eps1dotdphii,eps1dotdphij;
+-	double     eps2dotdphii,eps2dotdphij;
+-	double     mu_prime;
+-	double     epsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
+-	double     eps1[3],eps2[3];
+-	double     phi[NUMVERTICES];
+-	double     dphi[3][NUMVERTICES];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     Jdet;
++	IssmDouble     eps1dotdphii,eps1dotdphij;
++	IssmDouble     eps2dotdphii,eps2dotdphij;
++	IssmDouble     mu_prime;
++	IssmDouble     epsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
++	IssmDouble     eps1[3],eps2[3];
++	IssmDouble     phi[NUMVERTICES];
++	IssmDouble     dphi[3][NUMVERTICES];
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Jacobian with regular Pattyn (first part of the Gateau derivative)*/
+@@ -4633,16 +4633,16 @@
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+ 	bool       incomplete_adjoint;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     Jdet;
+-	double     eps1dotdphii,eps1dotdphij;
+-	double     eps2dotdphii,eps2dotdphij;
+-	double     eps3dotdphii,eps3dotdphij;
+-	double     mu_prime;
+-	double     epsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
+-	double     eps1[3],eps2[3],eps3[3];
+-	double     phi[NUMVERTICES];
+-	double     dphi[3][NUMVERTICES];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     Jdet;
++	IssmDouble     eps1dotdphii,eps1dotdphij;
++	IssmDouble     eps2dotdphii,eps2dotdphij;
++	IssmDouble     eps3dotdphii,eps3dotdphij;
++	IssmDouble     mu_prime;
++	IssmDouble     epsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
++	IssmDouble     eps1[3],eps2[3],eps3[3];
++	IssmDouble     phi[NUMVERTICES];
++	IssmDouble     dphi[3][NUMVERTICES];
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Jacobian with regular Stokes (first part of the Gateau derivative)*/
+@@ -4888,14 +4888,14 @@
+ 	int        i,j,ig;
+ 	int        analysis_type;
+ 	int        doflist1[NUMVERTICES];
+-	double     vx,vy,lambda,mu,alpha_complement,Jdet;
+-	double     bed,thickness,Neff,drag;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     xyz_list_tria[NUMVERTICES2D][3]={0.0};
+-	double     dk[NDOF3]; 
+-	double     grade_g[NUMVERTICES]={0.0};
+-	double     grade_g_gaussian[NUMVERTICES];
+-	double     basis[6];
++	IssmDouble     vx,vy,lambda,mu,alpha_complement,Jdet;
++	IssmDouble     bed,thickness,Neff,drag;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     xyz_list_tria[NUMVERTICES2D][3]={0.0};
++	IssmDouble     dk[NDOF3]; 
++	IssmDouble     grade_g[NUMVERTICES]={0.0};
++	IssmDouble     grade_g_gaussian[NUMVERTICES];
++	IssmDouble     basis[6];
+ 	Friction*  friction=NULL;
+ 	GaussPenta  *gauss=NULL;
+ 
+@@ -4959,16 +4959,16 @@
+ 	int        i,j,ig;
+ 	int        analysis_type;
+ 	int        doflist1[NUMVERTICES];
+-	double     bed,thickness,Neff;
+-	double     lambda,mu,xi,Jdet,vx,vy,vz;
+-	double     alpha_complement,drag;
+-	double     surface_normal[3],bed_normal[3];
+-	double     xyz_list[NUMVERTICES][3];
+-	double     xyz_list_tria[NUMVERTICES2D][3]={0.0};
+-	double     dk[NDOF3]; 
+-	double     basis[6];
+-	double     grade_g[NUMVERTICES]={0.0};
+-	double     grade_g_gaussian[NUMVERTICES];
++	IssmDouble     bed,thickness,Neff;
++	IssmDouble     lambda,mu,xi,Jdet,vx,vy,vz;
++	IssmDouble     alpha_complement,drag;
++	IssmDouble     surface_normal[3],bed_normal[3];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     xyz_list_tria[NUMVERTICES2D][3]={0.0};
++	IssmDouble     dk[NDOF3]; 
++	IssmDouble     basis[6];
++	IssmDouble     grade_g[NUMVERTICES]={0.0};
++	IssmDouble     grade_g_gaussian[NUMVERTICES];
+ 	Friction*  friction=NULL;
+ 	GaussPenta* gauss=NULL;
+ 
+@@ -5098,7 +5098,7 @@
+ 	this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum);
+ } /*}}}*/
+ /*FUNCTION Penta::InputControlUpdate{{{*/
+-void  Penta::InputControlUpdate(double scalar,bool save_parameter){
++void  Penta::InputControlUpdate(IssmDouble scalar,bool save_parameter){
+ 
+ 	/*Intermediary*/
+ 	int    num_controls;
+@@ -5136,16 +5136,16 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionAdjointStokes {{{*/
+-void  Penta::InputUpdateFromSolutionAdjointStokes(double* solution){
++void  Penta::InputUpdateFromSolutionAdjointStokes(IssmDouble* solution){
+ 
+ 	const int    numdof=NDOF4*NUMVERTICES;
+ 
+ 	int    i;
+-	double values[numdof];
+-	double lambdax[NUMVERTICES];
+-	double lambday[NUMVERTICES];
+-	double lambdaz[NUMVERTICES];
+-	double lambdap[NUMVERTICES];
++	IssmDouble values[numdof];
++	IssmDouble lambdax[NUMVERTICES];
++	IssmDouble lambday[NUMVERTICES];
++	IssmDouble lambdaz[NUMVERTICES];
++	IssmDouble lambdap[NUMVERTICES];
+ 	int*   doflist=NULL;
+ 
+ 	/*Get dof list: */
+@@ -5179,14 +5179,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionAdjointHoriz {{{*/
+-void  Penta::InputUpdateFromSolutionAdjointHoriz(double* solution){
++void  Penta::InputUpdateFromSolutionAdjointHoriz(IssmDouble* solution){
+ 
+ 	const int numdof=NDOF2*NUMVERTICES;
+ 
+ 	int    i;
+-	double values[numdof];
+-	double lambdax[NUMVERTICES];
+-	double lambday[NUMVERTICES];
++	IssmDouble values[numdof];
++	IssmDouble lambdax[NUMVERTICES];
++	IssmDouble lambday[NUMVERTICES];
+ 	int*   doflist=NULL;
+ 
+ 	/*Get dof list: */
+@@ -5214,10 +5214,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::SurfaceAverageVelMisfit {{{*/
+-double Penta::SurfaceAverageVelMisfit(bool process_units,int weight_index){
++IssmDouble Penta::SurfaceAverageVelMisfit(bool process_units,int weight_index){
+ 
+ 	int    approximation;
+-	double J;
++	IssmDouble J;
+ 	Tria*  tria=NULL;
+ 
+ 	/*retrieve inputs :*/
+@@ -5251,10 +5251,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::SurfaceAbsVelMisfit {{{*/
+-double Penta::SurfaceAbsVelMisfit(bool process_units,int weight_index){
++IssmDouble Penta::SurfaceAbsVelMisfit(bool process_units,int weight_index){
+ 
+ 	int    approximation;
+-	double J;
++	IssmDouble J;
+ 	Tria*  tria=NULL;
+ 
+ 	/*retrieve inputs :*/
+@@ -5288,10 +5288,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::SurfaceLogVelMisfit {{{*/
+-double Penta::SurfaceLogVelMisfit(bool process_units,int weight_index){
++IssmDouble Penta::SurfaceLogVelMisfit(bool process_units,int weight_index){
+ 
+ 	int    approximation;
+-	double J;
++	IssmDouble J;
+ 	Tria*  tria=NULL;
+ 
+ 	/*retrieve inputs :*/
+@@ -5325,9 +5325,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::SurfaceLogVxVyMisfit {{{*/
+-double Penta::SurfaceLogVxVyMisfit(bool process_units,int weight_index){
++IssmDouble Penta::SurfaceLogVxVyMisfit(bool process_units,int weight_index){
+ 
+-	double J;
++	IssmDouble J;
+ 	Tria* tria=NULL;
+ 
+ 	/*inputs: */
+@@ -5364,10 +5364,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::SurfaceRelVelMisfit {{{*/
+-double Penta::SurfaceRelVelMisfit(bool process_units,int weight_index){
++IssmDouble Penta::SurfaceRelVelMisfit(bool process_units,int weight_index){
+ 
+ 	int    approximation;
+-	double J;
++	IssmDouble J;
+ 	Tria*  tria=NULL;
+ 
+ 	/*retrieve inputs :*/
+@@ -5401,16 +5401,16 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::ThicknessAbsGradient{{{*/
+-double Penta::ThicknessAbsGradient(bool process_units,int weight_index){
++IssmDouble Penta::ThicknessAbsGradient(bool process_units,int weight_index){
+ 
+ 	_error_("Not implemented yet");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::ThicknessAbsMisfit {{{*/
+-double Penta::ThicknessAbsMisfit(bool process_units,int weight_index){
++IssmDouble Penta::ThicknessAbsMisfit(bool process_units,int weight_index){
+ 
+ 	int    approximation;
+-	double J;
++	IssmDouble J;
+ 	Tria*  tria=NULL;
+ 
+ 	/*retrieve inputs :*/
+@@ -5427,9 +5427,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::DragCoefficientAbsGradient{{{*/
+-double Penta::DragCoefficientAbsGradient(bool process_units,int weight_index){
++IssmDouble Penta::DragCoefficientAbsGradient(bool process_units,int weight_index){
+ 
+-	double J;
++	IssmDouble J;
+ 	Tria*  tria=NULL;
+ 
+ 	/*If on water, on shelf or not on bed, skip: */
+@@ -5442,9 +5442,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::RheologyBbarAbsGradient{{{*/
+-double Penta::RheologyBbarAbsGradient(bool process_units,int weight_index){
++IssmDouble Penta::RheologyBbarAbsGradient(bool process_units,int weight_index){
+ 
+-	double J;
++	IssmDouble J;
+ 	Tria*  tria=NULL;
+ 
+ 	/*If on water, on shelf or not on bed, skip: */
+@@ -5480,9 +5480,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::SetControlInputsFromVector{{{*/
+-void  Penta::SetControlInputsFromVector(double* vector,int control_enum,int control_index){
++void  Penta::SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index){
+ 
+-	double  values[NUMVERTICES];
++	IssmDouble  values[NUMVERTICES];
+ 	int     doflist1[NUMVERTICES];
+ 	Input  *input     = NULL;
+ 	Input  *new_input = NULL;
+@@ -5517,8 +5517,8 @@
+ #endif
+ 
+ #ifdef _HAVE_DAKOTA_
+-/*FUNCTION Penta::InputUpdateFromVectorDakota(double* vector, int name, int type);{{{*/
+-void  Penta::InputUpdateFromVectorDakota(double* vector, int name, int type){
++/*FUNCTION Penta::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);{{{*/
++void  Penta::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){
+ 	
+ 	int i,j;
+ 
+@@ -5530,7 +5530,7 @@
+ 		case VertexEnum:
+ 
+ 			/*New PentaP1Input*/
+-			double values[6];
++			IssmDouble values[6];
+ 
+ 			/*Get values on the 6 vertices*/
+ 			for (i=0;i<6;i++){
+@@ -5541,11 +5541,11 @@
+ 			switch(name){
+ 				case ThicknessEnum:
+ 					/*Update thickness + surface: assume bed is constant. On ice shelves, takes hydrostatic equilibrium {{{*/
+-					double  thickness[6];
+-					double  thickness_init[6];
+-					double  hydrostatic_ratio[6];
+-					double  surface[6];
+-					double  bed[6];
++					IssmDouble  thickness[6];
++					IssmDouble  thickness_init[6];
++					IssmDouble  hydrostatic_ratio[6];
++					IssmDouble  surface[6];
++					IssmDouble  bed[6];
+ 					
+ 					/*retrieve inputs: */
+ 					GetInputListOnVertices(&thickness_init[0],ThicknessEnum);
+@@ -5559,7 +5559,7 @@
+ 					/*build new bed and surface: */
+ 					if (this->IsFloating()){
+ 						/*hydrostatic equilibrium: */
+-						double rho_ice,rho_water,di;
++						IssmDouble rho_ice,rho_water,di;
+ 						rho_ice=this->matpar->GetRhoIce();
+ 						rho_water=this->matpar->GetRhoWater();
+ 
+@@ -5629,15 +5629,15 @@
+ 	_error_(" not supported yet!");
+ }
+ /*}}}*/
+-/*FUNCTION Penta::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type);{{{*/
+-void  Penta::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
++/*FUNCTION Penta::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type);{{{*/
++void  Penta::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){
+ 	
+ 	int i,j,t;
+ 	TransientInput* transientinput=NULL;
+-	double values[6];
+-	double time;
++	IssmDouble values[6];
++	IssmDouble time;
+ 	int row;
+-	double yts;
++	IssmDouble yts;
+ 
+ 	/*Check that name is an element input*/
+ 	if (!IsInput(name)) return;
+@@ -5655,11 +5655,11 @@
+ 				/*create input values: */
+ 				for(i=0;i<6;i++){
+ 					row=this->nodes[i]->GetSidList();
+-					values[i]=(double)matrix[ncols*row+t];
++					values[i]=(IssmDouble)matrix[ncols*row+t];
+ 				}
+ 
+ 				/*time? :*/
+-				time=(double)matrix[(nrows-1)*ncols+t]*yts;
++				time=(IssmDouble)matrix[(nrows-1)*ncols+t]*yts;
+ 
+ 				if(t==0) transientinput=new TransientInput(name);
+ 				transientinput->AddTimeInput(new PentaP1Input(name,values),time);
+@@ -5741,16 +5741,16 @@
+ 
+ 	/*Intermediaries */
+ 	int         i,j,ig;
+-	double      Jdet;
+-	double      viscosity,oldviscosity,newviscosity,viscosity_overshoot; //viscosity
+-	double      epsilon[5],oldepsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
+-	double      xyz_list[NUMVERTICES][3];
+-	double      B[3][numdofp];
+-	double      Bprime[3][numdofm];
+-	double      D[3][3]={0.0};            // material matrix, simple scalar matrix.
+-	double      D_scalar;
+-	double      Ke_gg[numdofp][numdofm]={0.0}; //local element stiffness matrix 
+-	double      Ke_gg_gaussian[numdofp][numdofm]; //stiffness matrix evaluated at the gaussian point.
++	IssmDouble      Jdet;
++	IssmDouble      viscosity,oldviscosity,newviscosity,viscosity_overshoot; //viscosity
++	IssmDouble      epsilon[5],oldepsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble      B[3][numdofp];
++	IssmDouble      Bprime[3][numdofm];
++	IssmDouble      D[3][3]={0.0};            // material matrix, simple scalar matrix.
++	IssmDouble      D_scalar;
++	IssmDouble      Ke_gg[numdofp][numdofm]={0.0}; //local element stiffness matrix 
++	IssmDouble      Ke_gg_gaussian[numdofp][numdofm]; //stiffness matrix evaluated at the gaussian point.
+ 	GaussPenta *gauss=NULL;
+ 	GaussTria  *gauss_tria=NULL;
+ 	Node       *node_list[numnodes];
+@@ -5833,17 +5833,17 @@
+ 	
+ 	/*Intermediaries */
+ 	int       i,j,ig,analysis_type;
+-	double    Jdet2d,slope_magnitude,alpha2;
+-	double    xyz_list[NUMVERTICES][3];
+-	double    xyz_list_tria[NUMVERTICES2D][3]={0.0};
+-	double    slope[3]={0.0,0.0,0.0};
+-	double    MAXSLOPE=.06; // 6 %
+-	double    MOUNTAINKEXPONENT=10;
+-	double    L[2][numdof];
+-	double    DL[2][2]                  ={{ 0,0 },{0,0}}; //for basal drag
+-	double    DL_scalar;
+-	double    Ke_gg[numdof][numdof]     ={0.0};
+-	double    Ke_gg_gaussian[numdof][numdof]; //stiffness matrix contribution from drag
++	IssmDouble    Jdet2d,slope_magnitude,alpha2;
++	IssmDouble    xyz_list[NUMVERTICES][3];
++	IssmDouble    xyz_list_tria[NUMVERTICES2D][3]={0.0};
++	IssmDouble    slope[3]={0.0,0.0,0.0};
++	IssmDouble    MAXSLOPE=.06; // 6 %
++	IssmDouble    MOUNTAINKEXPONENT=10;
++	IssmDouble    L[2][numdof];
++	IssmDouble    DL[2][2]                  ={{ 0,0 },{0,0}}; //for basal drag
++	IssmDouble    DL_scalar;
++	IssmDouble    Ke_gg[numdof][numdof]     ={0.0};
++	IssmDouble    Ke_gg_gaussian[numdof][numdof]; //stiffness matrix contribution from drag
+ 	Friction  *friction = NULL;
+ 	GaussPenta *gauss=NULL;
+ 	Node       *node_list[numnodes];
+@@ -5891,7 +5891,7 @@
+ 		slope_magnitude=sqrt(pow(slope[0],2)+pow(slope[1],2));
+ 
+ 		if (slope_magnitude>MAXSLOPE){
+-			alpha2=pow((double)10,MOUNTAINKEXPONENT);
++			alpha2=pow((IssmDouble)10,MOUNTAINKEXPONENT);
+ 		}
+ 
+ 		GetTriaJacobianDeterminant(&Jdet2d, &xyz_list_tria[0][0],gauss);
+@@ -5946,21 +5946,21 @@
+ 
+ 	/*Intermediaries */
+ 	int         i,j,ig;
+-	double      Jdet;
+-	double      viscosity,stokesreconditioning; //viscosity
+-	double      epsilon[6]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
+-	double      xyz_list[NUMVERTICES][3];
+-	double      B[4][numdofs+3];
+-	double      Bprime[4][numdofm];
+-	double      B2[3][numdofm];
+-	double      Bprime2[3][numdofs+3];
+-	double      D[4][4]={0.0};            // material matrix, simple scalar matrix.
+-	double      D2[3][3]={0.0};            // material matrix, simple scalar matrix.
+-	double      D_scalar;
+-	double      Ke_gg[numdofs][numdofm]={0.0}; //local element stiffness matrix 
+-	double      Ke_gg2[numdofm][numdofs]={0.0}; //local element stiffness matrix 
+-	double      Ke_gg_gaussian[numdofs+3][numdofm]; //stiffness matrix evaluated at the gaussian point.
+-	double      Ke_gg_gaussian2[numdofm][numdofs+3]; //stiffness matrix evaluated at the gaussian point.
++	IssmDouble      Jdet;
++	IssmDouble      viscosity,stokesreconditioning; //viscosity
++	IssmDouble      epsilon[6]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble      B[4][numdofs+3];
++	IssmDouble      Bprime[4][numdofm];
++	IssmDouble      B2[3][numdofm];
++	IssmDouble      Bprime2[3][numdofs+3];
++	IssmDouble      D[4][4]={0.0};            // material matrix, simple scalar matrix.
++	IssmDouble      D2[3][3]={0.0};            // material matrix, simple scalar matrix.
++	IssmDouble      D_scalar;
++	IssmDouble      Ke_gg[numdofs][numdofm]={0.0}; //local element stiffness matrix 
++	IssmDouble      Ke_gg2[numdofm][numdofs]={0.0}; //local element stiffness matrix 
++	IssmDouble      Ke_gg_gaussian[numdofs+3][numdofm]; //stiffness matrix evaluated at the gaussian point.
++	IssmDouble      Ke_gg_gaussian2[numdofm][numdofs+3]; //stiffness matrix evaluated at the gaussian point.
+ 	GaussPenta *gauss=NULL;
+ 	GaussTria  *gauss_tria=NULL;
+ 	Node       *node_list[numnodes];
+@@ -6053,20 +6053,20 @@
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+ 	int        analysis_type,approximation;
+-	double     stokesreconditioning;
+-	double     viscosity,alpha2_gauss,Jdet2d;
+-	double	  bed_normal[3];
+-	double     epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
+-	double     xyz_list[NUMVERTICES][3];
+-	double	  xyz_list_tria[NUMVERTICES2D][3];
+-	double     LMacAyealStokes[8][numdof2dm];
+-	double     LprimeMacAyealStokes[8][numdof2d];
+-	double     DLMacAyealStokes[8][8]={0.0};
+-	double     LStokesMacAyeal[4][numdof2d];
+-	double     LprimeStokesMacAyeal[4][numdof2dm];
+-	double     DLStokesMacAyeal[4][4]={0.0};
+-	double     Ke_drag_gaussian[numdof2dm][numdof2d];
+-	double     Ke_drag_gaussian2[numdof2d][numdof2dm];
++	IssmDouble     stokesreconditioning;
++	IssmDouble     viscosity,alpha2_gauss,Jdet2d;
++	IssmDouble	  bed_normal[3];
++	IssmDouble     epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble	  xyz_list_tria[NUMVERTICES2D][3];
++	IssmDouble     LMacAyealStokes[8][numdof2dm];
++	IssmDouble     LprimeMacAyealStokes[8][numdof2d];
++	IssmDouble     DLMacAyealStokes[8][8]={0.0};
++	IssmDouble     LStokesMacAyeal[4][numdof2d];
++	IssmDouble     LprimeStokesMacAyeal[4][numdof2dm];
++	IssmDouble     DLStokesMacAyeal[4][4]={0.0};
++	IssmDouble     Ke_drag_gaussian[numdof2dm][numdof2d];
++	IssmDouble     Ke_drag_gaussian2[numdof2d][numdof2dm];
+ 	Friction*  friction=NULL;
+ 	GaussPenta *gauss=NULL;
+ 	Node       *node_list[numnodes];
+@@ -6241,7 +6241,7 @@
+ 	/*Intermediaries*/
+ 	int       connectivity[2];
+ 	int       i,i0,i1,j0,j1;
+-	double    one0,one1;
++	IssmDouble    one0,one1;
+ 
+ 	/*Initialize Element matrix*/
+ 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
+@@ -6258,8 +6258,8 @@
+ 		/*Find connectivity for the two nodes*/
+ 		connectivity[0]=nodes[i]->GetConnectivity();
+ 		connectivity[1]=nodes[i+3]->GetConnectivity();
+-		one0=1/(double)connectivity[0];
+-		one1=1/(double)connectivity[1];
++		one0=1/(IssmDouble)connectivity[0];
++		one1=1/(IssmDouble)connectivity[1];
+ 
+ 		/*Create matrix for these two nodes*/
+ 		if (IsOnBed() && IsOnSurface()){
+@@ -6340,16 +6340,16 @@
+ 
+ 	/*Intermediaries */
+ 	int         i,j,ig,approximation;
+-	double      Jdet;
+-	double      viscosity, oldviscosity, newviscosity, viscosity_overshoot;
+-	double      epsilon[5],oldepsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
+-	double      epsilons[6]; //6 for stokes
+-	double      xyz_list[NUMVERTICES][3];
+-	double      B[3][numdof2d];
+-	double      Bprime[3][numdof2d];
+-	double      D[3][3]={0.0};            // material matrix, simple scalar matrix.
+-	double      D_scalar;
+-	double      Ke_gg_gaussian[numdof2d][numdof2d]; //stiffness matrix evaluated at the gaussian point.
++	IssmDouble      Jdet;
++	IssmDouble      viscosity, oldviscosity, newviscosity, viscosity_overshoot;
++	IssmDouble      epsilon[5],oldepsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
++	IssmDouble      epsilons[6]; //6 for stokes
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble      B[3][numdof2d];
++	IssmDouble      Bprime[3][numdof2d];
++	IssmDouble      D[3][3]={0.0};            // material matrix, simple scalar matrix.
++	IssmDouble      D_scalar;
++	IssmDouble      Ke_gg_gaussian[numdof2d][numdof2d]; //stiffness matrix evaluated at the gaussian point.
+ 	Tria*       tria=NULL;
+ 	Penta*      pentabase=NULL;
+ 	GaussPenta *gauss=NULL;
+@@ -6493,14 +6493,14 @@
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+ 	int        approximation;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     Jdet;
+-	double     viscosity,oldviscosity,newviscosity,viscosity_overshoot; //viscosity
+-	double     epsilon[5],oldepsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
+-	double     D_scalar;
+-	double     D[5][5]={0.0};            // material matrix, simple scalar matrix.
+-	double     B[5][numdof];
+-	double     Bprime[5][numdof];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     Jdet;
++	IssmDouble     viscosity,oldviscosity,newviscosity,viscosity_overshoot; //viscosity
++	IssmDouble     epsilon[5],oldepsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
++	IssmDouble     D_scalar;
++	IssmDouble     D[5][5]={0.0};            // material matrix, simple scalar matrix.
++	IssmDouble     B[5][numdof];
++	IssmDouble     Bprime[5][numdof];
+ 	Tria*      tria=NULL;
+ 	GaussPenta *gauss=NULL;
+ 
+@@ -6558,15 +6558,15 @@
+ 	/*Intermediaries */
+ 	int       i,j,ig;
+ 	int       analysis_type;
+-	double    xyz_list[NUMVERTICES][3];
+-	double    xyz_list_tria[NUMVERTICES2D][3]={0.0};
+-	double    slope_magnitude,alpha2,Jdet;
+-	double    slope[3]={0.0,0.0,0.0};
+-	double    MAXSLOPE=.06; // 6 %
+-	double    MOUNTAINKEXPONENT=10;
+-	double    L[2][numdof];
+-	double    DL[2][2]={{ 0,0 },{0,0}}; //for basal drag
+-	double    DL_scalar;
++	IssmDouble    xyz_list[NUMVERTICES][3];
++	IssmDouble    xyz_list_tria[NUMVERTICES2D][3]={0.0};
++	IssmDouble    slope_magnitude,alpha2,Jdet;
++	IssmDouble    slope[3]={0.0,0.0,0.0};
++	IssmDouble    MAXSLOPE=.06; // 6 %
++	IssmDouble    MOUNTAINKEXPONENT=10;
++	IssmDouble    L[2][numdof];
++	IssmDouble    DL[2][2]={{ 0,0 },{0,0}}; //for basal drag
++	IssmDouble    DL_scalar;
+ 	Friction  *friction = NULL;
+ 	GaussPenta *gauss=NULL;
+ 
+@@ -6603,7 +6603,7 @@
+ 		// If we have a slope > 6% for this element,  it means  we are on a mountain. In this particular case, 
+ 		//velocity should be = 0. To achieve this result, we set alpha2_list to a very high value: */
+ 		if (slope_magnitude>MAXSLOPE){
+-			alpha2=pow((double)10,MOUNTAINKEXPONENT);
++			alpha2=pow((IssmDouble)10,MOUNTAINKEXPONENT);
+ 		}
+ 		
+ 		DL_scalar=alpha2*gauss->weight*Jdet;
+@@ -6659,14 +6659,14 @@
+ 
+ 	/*Intermediaries */
+ 	int        i,j,ig,approximation;
+-	double     Jdet,viscosity,stokesreconditioning;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
+-	double     B[8][27];
+-	double     B_prime[8][27];
+-	double     D_scalar;
+-	double     D[8][8]={0.0};
+-	double     Ke_temp[27][27]={0.0}; //for the six nodes and the bubble 
++	IssmDouble     Jdet,viscosity,stokesreconditioning;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
++	IssmDouble     B[8][27];
++	IssmDouble     B_prime[8][27];
++	IssmDouble     D_scalar;
++	IssmDouble     D[8][8]={0.0};
++	IssmDouble     Ke_temp[27][27]={0.0}; //for the six nodes and the bubble 
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*If on water or not Stokes, skip stiffness: */
+@@ -6725,14 +6725,14 @@
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+ 	int        analysis_type,approximation;
+-	double     alpha2,Jdet2d;
+-	double     stokesreconditioning,viscosity;
+-	double     epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
+-	double     xyz_list[NUMVERTICES][3];
+-	double	  xyz_list_tria[NUMVERTICES2D][3];
+-	double     LStokes[2][numdof2d];
+-	double     DLStokes[2][2]={0.0};
+-	double     Ke_drag_gaussian[numdof2d][numdof2d];
++	IssmDouble     alpha2,Jdet2d;
++	IssmDouble     stokesreconditioning,viscosity;
++	IssmDouble     epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble	  xyz_list_tria[NUMVERTICES2D][3];
++	IssmDouble     LStokes[2][numdof2d];
++	IssmDouble     DLStokes[2][2]={0.0};
++	IssmDouble     Ke_drag_gaussian[numdof2d][numdof2d];
+ 	Friction*  friction=NULL;
+ 	GaussPenta *gauss=NULL;
+ 
+@@ -6810,11 +6810,11 @@
+ 
+ 	/*Intermediaries */
+ 	int         i,j,ig;
+-	double      Jdet;
+-	double      xyz_list[NUMVERTICES][3];
+-	double      B[NDOF1][NUMVERTICES];
+-	double      Bprime[NDOF1][NUMVERTICES];
+-	double      DL_scalar;
++	IssmDouble      Jdet;
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble      B[NDOF1][NUMVERTICES];
++	IssmDouble      Bprime[NDOF1][NUMVERTICES];
++	IssmDouble      DL_scalar;
+ 	GaussPenta  *gauss=NULL;
+ 
+ 	/*Initialize Element matrix*/
+@@ -6856,11 +6856,11 @@
+ 
+ 	/*Intermediaries */
+ 	int       i,j,ig;
+-	double    xyz_list[NUMVERTICES][3];
+-	double    xyz_list_tria[NUMVERTICES2D][3];
+-	double    surface_normal[3];
+-	double    Jdet2d,DL_scalar;
+-	double    basis[NUMVERTICES];
++	IssmDouble    xyz_list[NUMVERTICES][3];
++	IssmDouble    xyz_list_tria[NUMVERTICES2D][3];
++	IssmDouble    surface_normal[3];
++	IssmDouble    Jdet2d,DL_scalar;
++	IssmDouble    basis[NUMVERTICES];
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Element matrix*/
+@@ -6916,13 +6916,13 @@
+ 	/*Intermediaries */
+ 	int         i,j,ig;
+ 	int         approximation;
+-	double      viscosity,Jdet;
+-	double      stokesreconditioning;
+-	double      epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
+-	double      dw[3];
+-	double      xyz_list[NUMVERTICES][3];
+-	double      basis[6]; //for the six nodes of the penta
+-	double      dbasis[3][6]; //for the six nodes of the penta
++	IssmDouble      viscosity,Jdet;
++	IssmDouble      stokesreconditioning;
++	IssmDouble      epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
++	IssmDouble      dw[3];
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble      basis[6]; //for the six nodes of the penta
++	IssmDouble      dbasis[3][6]; //for the six nodes of the penta
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Element vector and return if necessary*/
+@@ -6978,15 +6978,15 @@
+ 	/*Intermediaries*/
+ 	int         i,j,ig;
+ 	int         approximation,analysis_type;
+-	double      Jdet,Jdet2d;
+-	double      stokesreconditioning;
+-	double	   bed_normal[3];
+-	double      epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
+-	double      viscosity, w, alpha2_gauss;
+-	double      dw[3];
+-	double	   xyz_list_tria[NUMVERTICES2D][3];
+-	double      xyz_list[NUMVERTICES][3];
+-	double      basis[6]; //for the six nodes of the penta
++	IssmDouble      Jdet,Jdet2d;
++	IssmDouble      stokesreconditioning;
++	IssmDouble	   bed_normal[3];
++	IssmDouble      epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
++	IssmDouble      viscosity, w, alpha2_gauss;
++	IssmDouble      dw[3];
++	IssmDouble	   xyz_list_tria[NUMVERTICES2D][3];
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble      basis[6]; //for the six nodes of the penta
+ 	Tria*       tria=NULL;
+ 	Friction*   friction=NULL;
+ 	GaussPenta  *gauss=NULL;
+@@ -7067,13 +7067,13 @@
+ 	/*Intermediaries */
+ 	int         i,j,ig;
+ 	int         approximation;
+-	double      viscosity,Jdet;
+-	double      stokesreconditioning;
+-	double      epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
+-	double      dw[3];
+-	double      xyz_list[NUMVERTICES][3];
+-	double      basis[6]; //for the six nodes of the penta
+-	double      dbasis[3][6]; //for the six nodes of the penta
++	IssmDouble      viscosity,Jdet;
++	IssmDouble      stokesreconditioning;
++	IssmDouble      epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
++	IssmDouble      dw[3];
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble      basis[6]; //for the six nodes of the penta
++	IssmDouble      dbasis[3][6]; //for the six nodes of the penta
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Element vector and return if necessary*/
+@@ -7129,15 +7129,15 @@
+ 	/*Intermediaries*/
+ 	int         i,j,ig;
+ 	int         approximation,analysis_type;
+-	double      Jdet,Jdet2d;
+-	double      stokesreconditioning;
+-	double	   bed_normal[3];
+-	double      epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
+-	double      viscosity, w, alpha2_gauss;
+-	double      dw[3];
+-	double	   xyz_list_tria[NUMVERTICES2D][3];
+-	double      xyz_list[NUMVERTICES][3];
+-	double      basis[6]; //for the six nodes of the penta
++	IssmDouble      Jdet,Jdet2d;
++	IssmDouble      stokesreconditioning;
++	IssmDouble	   bed_normal[3];
++	IssmDouble      epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
++	IssmDouble      viscosity, w, alpha2_gauss;
++	IssmDouble      dw[3];
++	IssmDouble	   xyz_list_tria[NUMVERTICES2D][3];
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble      basis[6]; //for the six nodes of the penta
+ 	Tria*       tria=NULL;
+ 	Friction*   friction=NULL;
+ 	GaussPenta  *gauss=NULL;
+@@ -7279,14 +7279,14 @@
+ 	int          i,j,k,ig;
+ 	int          node0,node1;
+ 	int          connectivity[2];
+-	double       Jdet;
+-	double       xyz_list[NUMVERTICES][3];
+-	double       xyz_list_segment[2][3];
+-	double       z_list[NUMVERTICES];
+-	double       z_segment[2],slope[2];
+-	double       slope2,constant_part;
+-	double       rho_ice,gravity,n,B;
+-	double       ub,vb,z_g,surface,thickness;
++	IssmDouble       Jdet;
++	IssmDouble       xyz_list[NUMVERTICES][3];
++	IssmDouble       xyz_list_segment[2][3];
++	IssmDouble       z_list[NUMVERTICES];
++	IssmDouble       z_segment[2],slope[2];
++	IssmDouble       slope2,constant_part;
++	IssmDouble       rho_ice,gravity,n,B;
++	IssmDouble       ub,vb,z_g,surface,thickness;
+ 	GaussPenta*  gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -7334,22 +7334,22 @@
+ 			GetSegmentJacobianDeterminant(&Jdet,&xyz_list_segment[0][0],gauss);
+ 
+ 			if (IsOnSurface()){
+-				for(j=0;j<NDOF2;j++) pe->values[2*node1+j]+=constant_part*pow((surface-z_g)/B,n)*slope[j]*Jdet*gauss->weight/(double)connectivity[1];
++				for(j=0;j<NDOF2;j++) pe->values[2*node1+j]+=constant_part*pow((surface-z_g)/B,n)*slope[j]*Jdet*gauss->weight/(IssmDouble)connectivity[1];
+ 			}
+ 			else{//connectivity is too large, should take only half on it
+-				for(j=0;j<NDOF2;j++) pe->values[2*node1+j]+=constant_part*pow((surface-z_g)/B,n)*slope[j]*Jdet*gauss->weight*2/(double)connectivity[1];
++				for(j=0;j<NDOF2;j++) pe->values[2*node1+j]+=constant_part*pow((surface-z_g)/B,n)*slope[j]*Jdet*gauss->weight*2/(IssmDouble)connectivity[1];
+ 			}
+ 		}
+ 		delete gauss;
+ 
+ 		//Deal with lower surface
+ 		if (IsOnBed()){
+-			constant_part=-1.58*pow((double)10.0,-(double)10.0)*rho_ice*gravity*thickness;
++			constant_part=-1.58*pow((IssmDouble)10.0,-(IssmDouble)10.0)*rho_ice*gravity*thickness;
+ 			ub=constant_part*slope[0];
+ 			vb=constant_part*slope[1];
+ 
+-			pe->values[2*node0]+=ub/(double)connectivity[0];
+-			pe->values[2*node0+1]+=vb/(double)connectivity[0];
++			pe->values[2*node0]+=ub/(IssmDouble)connectivity[0];
++			pe->values[2*node0+1]+=vb/(IssmDouble)connectivity[0];
+ 		}
+ 	}
+ 
+@@ -7379,11 +7379,11 @@
+ 
+ 	/*Intermediaries*/
+ 	int         i,j,ig;
+-	double      Jdet;
+-	double      slope[3]; //do not put 2! this goes into GetInputDerivativeValue, which addresses slope[3] also!
+-	double      driving_stress_baseline,thickness;
+-	double      xyz_list[NUMVERTICES][3];
+-	double      basis[6];
++	IssmDouble      Jdet;
++	IssmDouble      slope[3]; //do not put 2! this goes into GetInputDerivativeValue, which addresses slope[3] also!
++	IssmDouble      driving_stress_baseline,thickness;
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble      basis[6];
+ 	GaussPenta  *gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -7442,19 +7442,19 @@
+ 	/*Intermediaries*/
+ 	int        i,j,ig;
+ 	int        approximation;
+-	double     Jdet,viscosity;
+-	double     gravity,rho_ice,stokesreconditioning;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
+-	double     l1l7[7]; //for the six nodes and the bubble 
+-	double     B[8][numdofbubble];
+-	double     B_prime[8][numdofbubble];
+-	double     B_prime_bubble[8][3];
+-	double     D[8][8]={0.0};
+-	double     D_scalar;
+-	double     Pe_gaussian[numdofbubble]={0.0}; //for the six nodes and the bubble 
+-	double     Ke_temp[numdofbubble][3]={0.0}; //for the six nodes and the bubble 
+-	double     Ke_gaussian[numdofbubble][3];
++	IssmDouble     Jdet,viscosity;
++	IssmDouble     gravity,rho_ice,stokesreconditioning;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     epsilon[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/
++	IssmDouble     l1l7[7]; //for the six nodes and the bubble 
++	IssmDouble     B[8][numdofbubble];
++	IssmDouble     B_prime[8][numdofbubble];
++	IssmDouble     B_prime_bubble[8][3];
++	IssmDouble     D[8][8]={0.0};
++	IssmDouble     D_scalar;
++	IssmDouble     Pe_gaussian[numdofbubble]={0.0}; //for the six nodes and the bubble 
++	IssmDouble     Ke_temp[numdofbubble][3]={0.0}; //for the six nodes and the bubble 
++	IssmDouble     Ke_gaussian[numdofbubble][3];
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Element vector and return if necessary*/
+@@ -7519,14 +7519,14 @@
+ 	/*Intermediaries*/
+ 	int         i,j,ig;
+ 	int         approximation,shelf_dampening;
+-	double      gravity,rho_water,bed,water_pressure;
+-	double      damper,normal_vel,vx,vy,vz,dt;
+-	double		xyz_list_tria[NUMVERTICES2D][3];
+-	double      xyz_list[NUMVERTICES][3];
+-	double		bed_normal[3];
+-	double      dz[3];
+-	double      basis[6]; //for the six nodes of the penta
+-	double      Jdet2d;
++	IssmDouble      gravity,rho_water,bed,water_pressure;
++	IssmDouble      damper,normal_vel,vx,vy,vz,dt;
++	IssmDouble		xyz_list_tria[NUMVERTICES2D][3];
++	IssmDouble      xyz_list[NUMVERTICES][3];
++	IssmDouble		bed_normal[3];
++	IssmDouble      dz[3];
++	IssmDouble      basis[6]; //for the six nodes of the penta
++	IssmDouble      Jdet2d;
+ 	GaussPenta  *gauss=NULL;
+ 
+ 	/*Initialize Element vector and return if necessary*/
+@@ -7604,11 +7604,11 @@
+ 	/*Intermediaries*/
+ 	int        i,ig;
+ 	int        approximation;
+-	double     Jdet;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     dudx,dvdy,dwdz;
+-	double     du[3],dv[3],dw[3];
+-	double     basis[6];
++	IssmDouble     Jdet;
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     dudx,dvdy,dwdz;
++	IssmDouble     du[3],dv[3],dw[3];
++	IssmDouble     basis[6];
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Element vector*/
+@@ -7661,12 +7661,12 @@
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+ 	int        approximation;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     xyz_list_tria[NUMVERTICES2D][3];
+-	double     Jdet2d;
+-	double     vx,vy,vz,dbdx,dbdy,basalmeltingvalue;
+-	double     slope[3];
+-	double     basis[NUMVERTICES];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     xyz_list_tria[NUMVERTICES2D][3];
++	IssmDouble     Jdet2d;
++	IssmDouble     vx,vy,vz,dbdx,dbdy,basalmeltingvalue;
++	IssmDouble     slope[3];
++	IssmDouble     basis[NUMVERTICES];
+ 	GaussPenta* gauss=NULL;
+ 
+ 	if (!IsOnBed()) return NULL;
+@@ -7767,15 +7767,15 @@
+ 
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     Jdet;
+-	double     eps1dotdphii,eps1dotdphij;
+-	double     eps2dotdphii,eps2dotdphij;
+-	double     mu_prime;
+-	double     epsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
+-	double     eps1[3],eps2[3];
+-	double     phi[NUMVERTICES];
+-	double     dphi[3][NUMVERTICES];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     Jdet;
++	IssmDouble     eps1dotdphii,eps1dotdphij;
++	IssmDouble     eps2dotdphii,eps2dotdphij;
++	IssmDouble     mu_prime;
++	IssmDouble     epsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
++	IssmDouble     eps1[3],eps2[3];
++	IssmDouble     phi[NUMVERTICES];
++	IssmDouble     dphi[3][NUMVERTICES];
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Jacobian with regular Pattyn (first part of the Gateau derivative)*/
+@@ -7832,16 +7832,16 @@
+ 
+ 	/*Intermediaries */
+ 	int        i,j,ig;
+-	double     xyz_list[NUMVERTICES][3];
+-	double     Jdet;
+-	double     eps1dotdphii,eps1dotdphij;
+-	double     eps2dotdphii,eps2dotdphij;
+-	double     eps3dotdphii,eps3dotdphij;
+-	double     mu_prime;
+-	double     epsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
+-	double     eps1[3],eps2[3],eps3[3];
+-	double     phi[NUMVERTICES];
+-	double     dphi[3][NUMVERTICES];
++	IssmDouble     xyz_list[NUMVERTICES][3];
++	IssmDouble     Jdet;
++	IssmDouble     eps1dotdphii,eps1dotdphij;
++	IssmDouble     eps2dotdphii,eps2dotdphij;
++	IssmDouble     eps3dotdphii,eps3dotdphij;
++	IssmDouble     mu_prime;
++	IssmDouble     epsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
++	IssmDouble     eps1[3],eps2[3],eps3[3];
++	IssmDouble     phi[NUMVERTICES];
++	IssmDouble     dphi[3][NUMVERTICES];
+ 	GaussPenta *gauss=NULL;
+ 
+ 	/*Initialize Jacobian with regular Stokes (first part of the Gateau derivative)*/
+@@ -7908,8 +7908,8 @@
+ 	int          i;
+ 	int          approximation;
+ 	int*         doflist=NULL;
+-	double       vx,vy;
+-	double       values[numdof];
++	IssmDouble       vx,vy;
++	IssmDouble       values[numdof];
+ 	GaussPenta*  gauss;
+ 
+ 	/*Get approximation enum and dof list: */
+@@ -7949,8 +7949,8 @@
+ 
+ 	int          i;
+ 	int*         doflist=NULL;
+-	double       vx,vy;
+-	double       values[numdof];
++	IssmDouble       vx,vy;
++	IssmDouble       values[numdof];
+ 	GaussPenta*  gauss=NULL;
+ 
+ 	/*Get dof list: */
+@@ -7985,8 +7985,8 @@
+ 
+ 	int          i;
+ 	int*         doflist=NULL;
+-	double       vz;
+-	double       values[numdof];
++	IssmDouble       vz;
++	IssmDouble       values[numdof];
+ 	GaussPenta*  gauss=NULL;
+ 
+ 	/*Get dof list: */
+@@ -8018,9 +8018,9 @@
+ 
+ 	int          i;
+ 	int*         doflist=NULL;
+-	double       vx,vy,vz,p;
+-	double       stokesreconditioning;
+-	double       values[numdof];
++	IssmDouble       vx,vy,vz,p;
++	IssmDouble       stokesreconditioning;
++	IssmDouble       values[numdof];
+ 	GaussPenta   *gauss;
+ 
+ 	/*Get dof list: */
+@@ -8057,7 +8057,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHoriz {{{*/
+-void  Penta::InputUpdateFromSolutionDiagnosticHoriz(double* solution){
++void  Penta::InputUpdateFromSolutionDiagnosticHoriz(IssmDouble* solution){
+ 
+ 	int  approximation;
+ 
+@@ -8093,20 +8093,20 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyeal {{{*/
+-void  Penta::InputUpdateFromSolutionDiagnosticMacAyeal(double* solution){
++void  Penta::InputUpdateFromSolutionDiagnosticMacAyeal(IssmDouble* solution){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+ 
+ 	int     i;
+-	double  rho_ice,g;
+-	double  values[numdof];
+-	double  vx[NUMVERTICES];
+-	double  vy[NUMVERTICES];
+-	double  vz[NUMVERTICES];
+-	double  vel[NUMVERTICES];
+-	double  pressure[NUMVERTICES];
+-	double  surface[NUMVERTICES];
+-	double  xyz_list[NUMVERTICES][3];
++	IssmDouble  rho_ice,g;
++	IssmDouble  values[numdof];
++	IssmDouble  vx[NUMVERTICES];
++	IssmDouble  vy[NUMVERTICES];
++	IssmDouble  vz[NUMVERTICES];
++	IssmDouble  vel[NUMVERTICES];
++	IssmDouble  pressure[NUMVERTICES];
++	IssmDouble  surface[NUMVERTICES];
++	IssmDouble  xyz_list[NUMVERTICES][3];
+ 	int    *doflist = NULL;
+ 	Penta  *penta   = NULL;
+ 
+@@ -8174,22 +8174,22 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealPattyn {{{*/
+-void  Penta::InputUpdateFromSolutionDiagnosticMacAyealPattyn(double* solution){
++void  Penta::InputUpdateFromSolutionDiagnosticMacAyealPattyn(IssmDouble* solution){
+ 
+ 	const int    numdof=NDOF2*NUMVERTICES;
+ 	const int    numdof2d=NDOF2*NUMVERTICES2D;
+ 
+ 	int     i;
+-	double  rho_ice,g;
+-	double  macayeal_values[numdof];
+-	double  pattyn_values[numdof];
+-	double  vx[NUMVERTICES];
+-	double  vy[NUMVERTICES];
+-	double  vz[NUMVERTICES];
+-	double  vel[NUMVERTICES];
+-	double  pressure[NUMVERTICES];
+-	double  surface[NUMVERTICES];
+-	double  xyz_list[NUMVERTICES][3];
++	IssmDouble  rho_ice,g;
++	IssmDouble  macayeal_values[numdof];
++	IssmDouble  pattyn_values[numdof];
++	IssmDouble  vx[NUMVERTICES];
++	IssmDouble  vy[NUMVERTICES];
++	IssmDouble  vz[NUMVERTICES];
++	IssmDouble  vel[NUMVERTICES];
++	IssmDouble  pressure[NUMVERTICES];
++	IssmDouble  surface[NUMVERTICES];
++	IssmDouble  xyz_list[NUMVERTICES][3];
+ 	int*    doflistp = NULL;
+ 	int*    doflistm = NULL;
+ 	Penta   *penta   = NULL;
+@@ -8258,24 +8258,24 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticMacAyealStokes {{{*/
+-void  Penta::InputUpdateFromSolutionDiagnosticMacAyealStokes(double* solution){
++void  Penta::InputUpdateFromSolutionDiagnosticMacAyealStokes(IssmDouble* solution){
+ 
+ 	const int    numdofm=NDOF2*NUMVERTICES;
+ 	const int    numdofs=NDOF4*NUMVERTICES;
+ 	const int    numdof2d=NDOF2*NUMVERTICES2D;
+ 
+ 	int     i;
+-	double  stokesreconditioning;
+-	double  macayeal_values[numdofm];
+-	double  stokes_values[numdofs];
+-	double  vx[NUMVERTICES];
+-	double  vy[NUMVERTICES];
+-	double  vz[NUMVERTICES];
+-	double  vzmacayeal[NUMVERTICES];
+-	double  vzstokes[NUMVERTICES];
+-	double  vel[NUMVERTICES];
+-	double  pressure[NUMVERTICES];
+-	double  xyz_list[NUMVERTICES][3];
++	IssmDouble  stokesreconditioning;
++	IssmDouble  macayeal_values[numdofm];
++	IssmDouble  stokes_values[numdofs];
++	IssmDouble  vx[NUMVERTICES];
++	IssmDouble  vy[NUMVERTICES];
++	IssmDouble  vz[NUMVERTICES];
++	IssmDouble  vzmacayeal[NUMVERTICES];
++	IssmDouble  vzstokes[NUMVERTICES];
++	IssmDouble  vel[NUMVERTICES];
++	IssmDouble  pressure[NUMVERTICES];
++	IssmDouble  xyz_list[NUMVERTICES][3];
+ 	int*    doflistm        = NULL;
+ 	int*    doflists        = NULL;
+ 	Penta   *penta          = NULL;
+@@ -8358,20 +8358,20 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticPattyn {{{*/
+-void  Penta::InputUpdateFromSolutionDiagnosticPattyn(double* solution){
++void  Penta::InputUpdateFromSolutionDiagnosticPattyn(IssmDouble* solution){
+ 	
+ 	const int    numdof=NDOF2*NUMVERTICES;
+ 
+ 	int    i;
+-	double rho_ice,g;
+-	double values[numdof];
+-	double vx[NUMVERTICES];
+-	double vy[NUMVERTICES];
+-	double vz[NUMVERTICES];
+-	double vel[NUMVERTICES];
+-	double pressure[NUMVERTICES];
+-	double surface[NUMVERTICES];
+-	double xyz_list[NUMVERTICES][3];
++	IssmDouble rho_ice,g;
++	IssmDouble values[numdof];
++	IssmDouble vx[NUMVERTICES];
++	IssmDouble vy[NUMVERTICES];
++	IssmDouble vz[NUMVERTICES];
++	IssmDouble vel[NUMVERTICES];
++	IssmDouble pressure[NUMVERTICES];
++	IssmDouble surface[NUMVERTICES];
++	IssmDouble xyz_list[NUMVERTICES][3];
+ 	int*   doflist = NULL;
+ 
+ 	/*Get dof list: */
+@@ -8432,23 +8432,23 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticPattynStokes {{{*/
+-void  Penta::InputUpdateFromSolutionDiagnosticPattynStokes(double* solution){
++void  Penta::InputUpdateFromSolutionDiagnosticPattynStokes(IssmDouble* solution){
+ 
+ 	const int    numdofp=NDOF2*NUMVERTICES;
+ 	const int    numdofs=NDOF4*NUMVERTICES;
+ 
+ 	int    i;
+-	double pattyn_values[numdofp];
+-	double stokes_values[numdofs];
+-	double vx[NUMVERTICES];
+-	double vy[NUMVERTICES];
+-	double vz[NUMVERTICES];
+-	double vzpattyn[NUMVERTICES];
+-	double vzstokes[NUMVERTICES];
+-	double vel[NUMVERTICES];
+-	double pressure[NUMVERTICES];
+-	double xyz_list[NUMVERTICES][3];
+-	double stokesreconditioning;
++	IssmDouble pattyn_values[numdofp];
++	IssmDouble stokes_values[numdofs];
++	IssmDouble vx[NUMVERTICES];
++	IssmDouble vy[NUMVERTICES];
++	IssmDouble vz[NUMVERTICES];
++	IssmDouble vzpattyn[NUMVERTICES];
++	IssmDouble vzstokes[NUMVERTICES];
++	IssmDouble vel[NUMVERTICES];
++	IssmDouble pressure[NUMVERTICES];
++	IssmDouble xyz_list[NUMVERTICES][3];
++	IssmDouble stokesreconditioning;
+ 	int*   doflistp      = NULL;
+ 	int*   doflists      = NULL;
+ 	Penta  *penta        = NULL;
+@@ -8526,20 +8526,20 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHutter {{{*/
+-void  Penta::InputUpdateFromSolutionDiagnosticHutter(double* solution){
++void  Penta::InputUpdateFromSolutionDiagnosticHutter(IssmDouble* solution){
+ 	
+ 	const int    numdof=NDOF2*NUMVERTICES;
+ 
+ 	int     i;
+-	double  rho_ice,g;
+-	double  values[numdof];
+-	double  vx[NUMVERTICES];
+-	double  vy[NUMVERTICES];
+-	double  vz[NUMVERTICES];
+-	double  vel[NUMVERTICES];
+-	double  pressure[NUMVERTICES];
+-	double  surface[NUMVERTICES];
+-	double  xyz_list[NUMVERTICES][3];
++	IssmDouble  rho_ice,g;
++	IssmDouble  values[numdof];
++	IssmDouble  vx[NUMVERTICES];
++	IssmDouble  vy[NUMVERTICES];
++	IssmDouble  vz[NUMVERTICES];
++	IssmDouble  vel[NUMVERTICES];
++	IssmDouble  pressure[NUMVERTICES];
++	IssmDouble  surface[NUMVERTICES];
++	IssmDouble  xyz_list[NUMVERTICES][3];
+ 	int*    doflist = NULL;
+ 
+ 	/*Get dof list: */
+@@ -8589,24 +8589,24 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticVert {{{*/
+-void  Penta::InputUpdateFromSolutionDiagnosticVert(double* solution){
++void  Penta::InputUpdateFromSolutionDiagnosticVert(IssmDouble* solution){
+ 
+ 	const int numdof=NDOF1*NUMVERTICES;
+ 	
+ 	int      i;
+ 	int      approximation;
+-	double   rho_ice,g;
+-	double   values[numdof];
+-	double   vx[NUMVERTICES];
+-	double   vy[NUMVERTICES];
+-	double   vz[NUMVERTICES];
+-	double   vzmacayeal[NUMVERTICES];
+-	double   vzpattyn[NUMVERTICES];
+-	double   vzstokes[NUMVERTICES];
+-	double   vel[NUMVERTICES];
+-	double   pressure[NUMVERTICES];
+-	double   surface[NUMVERTICES];
+-	double   xyz_list[NUMVERTICES][3];
++	IssmDouble   rho_ice,g;
++	IssmDouble   values[numdof];
++	IssmDouble   vx[NUMVERTICES];
++	IssmDouble   vy[NUMVERTICES];
++	IssmDouble   vz[NUMVERTICES];
++	IssmDouble   vzmacayeal[NUMVERTICES];
++	IssmDouble   vzpattyn[NUMVERTICES];
++	IssmDouble   vzstokes[NUMVERTICES];
++	IssmDouble   vel[NUMVERTICES];
++	IssmDouble   pressure[NUMVERTICES];
++	IssmDouble   surface[NUMVERTICES];
++	IssmDouble   xyz_list[NUMVERTICES][3];
+ 	int*     doflist      = NULL;
+ 
+ 
+@@ -8693,18 +8693,18 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromSolutionDiagnosticStokes {{{*/
+-void  Penta::InputUpdateFromSolutionDiagnosticStokes(double* solution){
++void  Penta::InputUpdateFromSolutionDiagnosticStokes(IssmDouble* solution){
+ 	
+ 	const int numdof=NDOF4*NUMVERTICES;
+ 
+ 	int     i;
+-	double  values[numdof];
+-	double  vx[NUMVERTICES];
+-	double  vy[NUMVERTICES];
+-	double  vz[NUMVERTICES];
+-	double  vel[NUMVERTICES];
+-	double  pressure[NUMVERTICES];
+-	double  stokesreconditioning;
++	IssmDouble  values[numdof];
++	IssmDouble  vx[NUMVERTICES];
++	IssmDouble  vy[NUMVERTICES];
++	IssmDouble  vz[NUMVERTICES];
++	IssmDouble  vel[NUMVERTICES];
++	IssmDouble  pressure[NUMVERTICES];
++	IssmDouble  stokesreconditioning;
+ 	int*    doflist=NULL;
+ 
+ 	/*Get dof list: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.h	(revision 12470)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.h	(revision 12471)
+@@ -22,42 +22,42 @@
+ 		void SetElementType(int type,int type_counter);
+ 
+ 		/*Numerics*/
+-		void GetNodalFunctionsP1(double* l1l6, GaussPenta* gauss);
+-		void GetNodalFunctionsMINI(double* l1l7, GaussPenta* gauss);
+-		void GetNodalFunctionsP1Derivatives(double* dh1dh6,double* xyz_list, GaussPenta* gauss);
+-		void GetNodalFunctionsMINIDerivatives(double* dh1dh7,double* xyz_list, GaussPenta* gauss);
+-		void GetNodalFunctionsP1DerivativesReference(double* dl1dl6,GaussPenta* gauss);
+-		void GetNodalFunctionsMINIDerivativesReference(double* dl1dl7,GaussPenta* gauss);
+-		void GetQuadNodalFunctions(double* l1l4,GaussPenta* gauss,int index1,int index2,int index3,int index4);
+-		void GetQuadJacobianDeterminant(double*  Jdet, double xyz_list[4][3],GaussPenta* gauss);
+-		void GetJacobian(double* J, double* xyz_list,GaussPenta* gauss);
+-		void GetJacobianDeterminant(double*  Jdet, double* xyz_list,GaussPenta* gauss);
+-		void GetTriaJacobianDeterminant(double*  Jdet, double* xyz_list,GaussPenta* gauss);
+-		void GetSegmentJacobianDeterminant(double*  Jdet, double* xyz_list,GaussPenta* gauss);
+-		void GetJacobianInvert(double*  Jinv, double* xyz_list,GaussPenta* gauss);
+-		void GetBMacAyealPattyn(double* B, double* xyz_list, GaussPenta* gauss);
+-		void GetBMacAyealStokes(double* B, double* xyz_list, GaussPenta* gauss);
+-		void GetBPattyn(double* B, double* xyz_list, GaussPenta* gauss);
+-		void GetBStokes(double* B, double* xyz_list, GaussPenta* gauss);
+-		void GetBprimeMacAyealStokes(double* Bprime, double* xyz_list, GaussPenta* gauss);
+-		void GetBprimePattyn(double* B, double* xyz_list, GaussPenta* gauss);
+-		void GetBprimeStokes(double* B_prime, double* xyz_list, GaussPenta* gauss);
+-		void GetBprimeVert(double* B, double* xyz_list, GaussPenta* gauss);
+-		void GetBAdvec(double* B_advec, double* xyz_list, GaussPenta* gauss);
+-		void GetBConduct(double* B_conduct, double* xyz_list, GaussPenta* gauss);
+-		void GetBVert(double* B, double* xyz_list, GaussPenta* gauss);
+-		void GetBprimeAdvec(double* Bprime_advec, double* xyz_list, GaussPenta* gauss);
+-		void GetL(double* L, GaussPenta* gauss,int numdof);
+-		void GetLStokes(double* LStokes, GaussPenta* gauss);
+-		void GetLprimeStokes(double* LprimeStokes, double* xyz_list, GaussPenta* gauss);
+-		void GetLMacAyealStokes(double* LMacAyealStokes, GaussPenta* gauss);
+-		void GetLprimeMacAyealStokes(double* LprimeMacAyealStokes, double* xyz_list, GaussPenta* gauss);
+-		void GetLStokesMacAyeal(double* LStokesMacAyeal, GaussPenta* gauss);
+-		void GetLprimeStokesMacAyeal(double* LprimeStokesMacAyeal, double* xyz_list, GaussPenta* gauss);
+-		void GetInputValue(double* pvalue,double* plist, GaussPenta* gauss);
+-		void GetInputValue(double* pvalue,double* plist,GaussTria* gauss){_error_("only PentaGauss are supported");};
+-		void GetInputDerivativeValue(double* pvalues, double* plist,double* xyz_list, GaussPenta* gauss);
+-		void GetInputDerivativeValue(double* pvalues, double* plist,double* xyz_list, GaussTria* gauss){_error_("only PentaGauss are supported");};
++		void GetNodalFunctionsP1(IssmDouble* l1l6, GaussPenta* gauss);
++		void GetNodalFunctionsMINI(IssmDouble* l1l7, GaussPenta* gauss);
++		void GetNodalFunctionsP1Derivatives(IssmDouble* dh1dh6,IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetNodalFunctionsMINIDerivatives(IssmDouble* dh1dh7,IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetNodalFunctionsP1DerivativesReference(IssmDouble* dl1dl6,GaussPenta* gauss);
++		void GetNodalFunctionsMINIDerivativesReference(IssmDouble* dl1dl7,GaussPenta* gauss);
++		void GetQuadNodalFunctions(IssmDouble* l1l4,GaussPenta* gauss,int index1,int index2,int index3,int index4);
++		void GetQuadJacobianDeterminant(IssmDouble*  Jdet, IssmDouble xyz_list[4][3],GaussPenta* gauss);
++		void GetJacobian(IssmDouble* J, IssmDouble* xyz_list,GaussPenta* gauss);
++		void GetJacobianDeterminant(IssmDouble*  Jdet, IssmDouble* xyz_list,GaussPenta* gauss);
++		void GetTriaJacobianDeterminant(IssmDouble*  Jdet, IssmDouble* xyz_list,GaussPenta* gauss);
++		void GetSegmentJacobianDeterminant(IssmDouble*  Jdet, IssmDouble* xyz_list,GaussPenta* gauss);
++		void GetJacobianInvert(IssmDouble*  Jinv, IssmDouble* xyz_list,GaussPenta* gauss);
++		void GetBMacAyealPattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetBMacAyealStokes(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetBPattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetBStokes(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetBprimeMacAyealStokes(IssmDouble* Bprime, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetBprimePattyn(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetBprimeStokes(IssmDouble* B_prime, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetBprimeVert(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetBAdvec(IssmDouble* B_advec, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetBConduct(IssmDouble* B_conduct, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetBVert(IssmDouble* B, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetBprimeAdvec(IssmDouble* Bprime_advec, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetL(IssmDouble* L, GaussPenta* gauss,int numdof);
++		void GetLStokes(IssmDouble* LStokes, GaussPenta* gauss);
++		void GetLprimeStokes(IssmDouble* LprimeStokes, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetLMacAyealStokes(IssmDouble* LMacAyealStokes, GaussPenta* gauss);
++		void GetLprimeMacAyealStokes(IssmDouble* LprimeMacAyealStokes, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetLStokesMacAyeal(IssmDouble* LStokesMacAyeal, GaussPenta* gauss);
++		void GetLprimeStokesMacAyeal(IssmDouble* LprimeStokesMacAyeal, IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetInputValue(IssmDouble* pvalue,IssmDouble* plist, GaussPenta* gauss);
++		void GetInputValue(IssmDouble* pvalue,IssmDouble* plist,GaussTria* gauss){_error_("only PentaGauss are supported");};
++		void GetInputDerivativeValue(IssmDouble* pvalues, IssmDouble* plist,IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetInputDerivativeValue(IssmDouble* pvalues, IssmDouble* plist,IssmDouble* xyz_list, GaussTria* gauss){_error_("only PentaGauss are supported");};
+ 
+ };
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.h	(revision 12470)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.h	(revision 12471)
+@@ -58,22 +58,22 @@
+ 		/*}}}*/
+ 		/*Update virtual functions definitions: {{{*/
+ 		void  InputUpdateFromConstant(bool constant, int name);
+-		void  InputUpdateFromConstant(double constant, int name);
++		void  InputUpdateFromConstant(IssmDouble constant, int name);
+ 		void  InputUpdateFromConstant(int constant, int name);
+-		void  InputUpdateFromSolution(double* solutiong);
++		void  InputUpdateFromSolution(IssmDouble* solutiong);
+ 		void  InputUpdateFromVector(bool* vector, int name, int type);
+-		void  InputUpdateFromVector(double* vector, int name, int type);
++		void  InputUpdateFromVector(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+ 		#ifdef _HAVE_DAKOTA_
+ 		void  InputUpdateFromVectorDakota(bool* vector, int name, int type);
+-		void  InputUpdateFromVectorDakota(double* vector, int name, int type);
++		void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVectorDakota(int* vector, int name, int type);
+-		void  InputUpdateFromMatrixDakota(double* matrix, int nows, int ncols, int name, int type);
++		void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int nows, int ncols, int name, int type);
+ 		#endif
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel);
+ 		/*}}}*/
+ 		/*Element virtual functions definitions: {{{*/
+-		void   AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,double* vertex_response,double* qmu_part);
++		void   AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part);
+ 		void   BasalFrictionCreateInput(void);
+ 		void   ComputeBasalStress(Vector* sigma_b);
+ 		void   ComputeStrainRate(Vector* eps);
+@@ -86,57 +86,57 @@
+ 		void   DeleteResults(void);
+ 		int    GetNodeIndex(Node* node);
+ 		void   GetSolutionFromInputs(Vector* solution);
+-		double GetZcoord(GaussPenta* gauss);
++		IssmDouble GetZcoord(GaussPenta* gauss);
+ 		void   GetVectorFromInputs(Vector* vector,int name_enum);
+ 		void   GetVectorFromResults(Vector* vector,int offset,int interp);
+ 		
+ 		int    Sid();
+-		void   InputArtificialNoise(int enum_type,double min, double max);
+-		bool   InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums);
+-		void   InputCreate(double scalar,int name,int code);
+-		void   InputCreate(double* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code);
++		void   InputArtificialNoise(int enum_type,IssmDouble min, IssmDouble max);
++		bool   InputConvergence(IssmDouble* eps, int* enums,int num_enums,int* criterionenums,IssmDouble* criterionvalues,int num_criterionenums);
++		void   InputCreate(IssmDouble scalar,int name,int code);
++		void   InputCreate(IssmDouble* vector, int index,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code);
+ 		void   InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum=MeshElementsEnum);
+ 		void   InputDuplicate(int original_enum,int new_enum);
+-		void   InputScale(int enum_type,double scale_factor);
++		void   InputScale(int enum_type,IssmDouble scale_factor);
+ 		
+-		void   InputToResult(int enum_type,int step,double time);
+-		void   MigrateGroundingLine(double* old_floating_ice,double* sheet_ungrounding);
++		void   InputToResult(int enum_type,int step,IssmDouble time);
++		void   MigrateGroundingLine(IssmDouble* old_floating_ice,IssmDouble* sheet_ungrounding);
+ 		void   PotentialSheetUngrounding(Vector* potential_sheet_ungrounding);
+-		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   RequestedOutput(int output_enum,int step,IssmDouble time);
++		void   ListResultsInfo(int** results_enums,int** results_size,IssmDouble** results_times,int** results_steps,int* num_results);
+ 		void   PatchFill(int* pcount, Patch* patch);
+ 		void   PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes);
+-		void   PositiveDegreeDay(double* pdds,double* pds,double signorm);
++		void   PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm);
+ 		void   ProcessResultsUnits(void);
+ 		void   ResetCoordinateSystem(void);
+-		double SurfaceArea(void);
++		IssmDouble SurfaceArea(void);
+ 		void   Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type);
+-		int    UpdatePotentialSheetUngrounding(double* potential_sheet_ungrounding,Vector* vec_nodes_on_iceshelf,double* nodes_on_iceshelf);
+-		int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units);
+-		double TimeAdapt();
++		int    UpdatePotentialSheetUngrounding(IssmDouble* potential_sheet_ungrounding,Vector* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf);
++		int    NodalValue(IssmDouble* pvalue, int index, int natureofdataenum,bool process_units);
++		IssmDouble TimeAdapt();
+ 		int*   GetHorizontalNeighboorSids(void);
+ 		void   ViscousHeatingCreateInput(void);
+-		void   SmearFunction(Vector* smearedvector,double (*WeightFunction)(double distance,double radius),double radius);
++		void   SmearFunction(Vector* smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius);
+ 
+ 		 #ifdef _HAVE_RESPONSES_
+-		double IceVolume(void);
+-		void   MinVel(double* pminvel, bool process_units);
+-		void   MinVx(double* pminvx, bool process_units);
+-		void   MinVy(double* pminvy, bool process_units);
+-		void   MinVz(double* pminvz, bool process_units);
+-		double MassFlux(double* segment,bool process_units);
+-		void   MaxAbsVx(double* pmaxabsvx, bool process_units);
+-		void   MaxAbsVy(double* pmaxabsvy, bool process_units);
+-		void   MaxAbsVz(double* pmaxabsvz, bool process_units);
+-		void   MaxVel(double* pmaxvel, bool process_units);
+-		void   ElementResponse(double* presponse,int response_enum,bool process_units);
+-		void   MaxVx(double* pmaxvx, bool process_units);
+-		void   MaxVy(double* pmaxvy, bool process_units);
+-		void   MaxVz(double* pmaxvz, bool process_units);
++		IssmDouble IceVolume(void);
++		void   MinVel(IssmDouble* pminvel, bool process_units);
++		void   MinVx(IssmDouble* pminvx, bool process_units);
++		void   MinVy(IssmDouble* pminvy, bool process_units);
++		void   MinVz(IssmDouble* pminvz, bool process_units);
++		IssmDouble MassFlux(IssmDouble* segment,bool process_units);
++		void   MaxAbsVx(IssmDouble* pmaxabsvx, bool process_units);
++		void   MaxAbsVy(IssmDouble* pmaxabsvy, bool process_units);
++		void   MaxAbsVz(IssmDouble* pmaxabsvz, bool process_units);
++		void   MaxVel(IssmDouble* pmaxvel, bool process_units);
++		void   ElementResponse(IssmDouble* presponse,int response_enum,bool process_units);
++		void   MaxVx(IssmDouble* pmaxvx, bool process_units);
++		void   MaxVy(IssmDouble* pmaxvy, bool process_units);
++		void   MaxVz(IssmDouble* pmaxvz, bool process_units);
+ 		#endif
+ 
+ 		#ifdef _HAVE_CONTROL_
+-		double DragCoefficientAbsGradient(bool process_units,int weight_index);
++		IssmDouble DragCoefficientAbsGradient(bool process_units,int weight_index);
+ 		void   GradientIndexing(int* indexing,int control_index);
+ 		void   Gradj(Vector* gradient,int control_type,int control_index);
+ 		void   GradjDragMacAyeal(Vector* gradient,int control_index);
+@@ -146,23 +146,23 @@
+ 		void   GradjBbarPattyn(Vector* gradient,int control_index);
+ 		void   GradjBbarStokes(Vector* gradient,int control_index);
+ 		void   GetVectorFromControlInputs(Vector* gradient,int control_enum,int control_index,const char* data);
+-		void   SetControlInputsFromVector(double* vector,int control_enum,int control_index);
++		void   SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index);
+ 		void   ControlInputGetGradient(Vector* gradient,int enum_type,int control_index);
+-		void   ControlInputScaleGradient(int enum_type,double scale);
+-		void   ControlInputSetGradient(double* gradient,int enum_type,int control_index);
+-		double RheologyBbarAbsGradient(bool process_units,int weight_index);
+-		double ThicknessAbsMisfit(     bool process_units,int weight_index);
+-		double SurfaceAbsVelMisfit(    bool process_units,int weight_index);
+-		double SurfaceRelVelMisfit(    bool process_units,int weight_index);
+-		double SurfaceLogVelMisfit(    bool process_units,int weight_index);
+-		double SurfaceLogVxVyMisfit(   bool process_units,int weight_index);
+-		double SurfaceAverageVelMisfit(bool process_units,int weight_index);
+-		double ThicknessAbsGradient(bool process_units,int weight_index);
+-		void   InputControlUpdate(double scalar,bool save_parameter);
++		void   ControlInputScaleGradient(int enum_type,IssmDouble scale);
++		void   ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index);
++		IssmDouble RheologyBbarAbsGradient(bool process_units,int weight_index);
++		IssmDouble ThicknessAbsMisfit(     bool process_units,int weight_index);
++		IssmDouble SurfaceAbsVelMisfit(    bool process_units,int weight_index);
++		IssmDouble SurfaceRelVelMisfit(    bool process_units,int weight_index);
++		IssmDouble SurfaceLogVelMisfit(    bool process_units,int weight_index);
++		IssmDouble SurfaceLogVxVyMisfit(   bool process_units,int weight_index);
++		IssmDouble SurfaceAverageVelMisfit(bool process_units,int weight_index);
++		IssmDouble ThicknessAbsGradient(bool process_units,int weight_index);
++		void   InputControlUpdate(IssmDouble scalar,bool save_parameter);
+ 		#endif
+ 		/*}}}*/
+ 		/*Penta specific routines:{{{*/
+-		void	  BedNormal(double* bed_normal, double xyz_list[3][3]);
++		void	  BedNormal(IssmDouble* bed_normal, IssmDouble xyz_list[3][3]);
+ 		ElementMatrix* CreateKMatrixPrognostic(void);
+ 		ElementMatrix* CreateKMatrixSlope(void);
+ 		ElementVector* CreatePVectorPrognostic(void);
+@@ -172,35 +172,35 @@
+ 		void    GetSidList(int* sidlist);
+ 		void    GetConnectivityList(int* connectivity);
+ 		int     GetElementType(void);
+-		void    GetElementSizes(double* hx,double* hy,double* hz);
+-		void    GetInputListOnVertices(double* pvalue,int enumtype);
+-		void    GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue);
+-		void    GetInputValue(double* pvalue,Node* node,int enumtype);
+-		void	  GetPhi(double* phi, double*  epsilon, double viscosity);
++		void    GetElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz);
++		void    GetInputListOnVertices(IssmDouble* pvalue,int enumtype);
++		void    GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue);
++		void    GetInputValue(IssmDouble* pvalue,Node* node,int enumtype);
++		void	  GetPhi(IssmDouble* phi, IssmDouble*  epsilon, IssmDouble viscosity);
+ 		void	  GetSolutionFromInputsEnthalpy(Vector* solutiong);
+-		double  GetStabilizationParameter(double u, double v, double w, double diameter, double kappa);
+-		void    GetStrainRate3dPattyn(double* epsilon,double* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input);
+-		void    GetStrainRate3d(double* epsilon,double* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input, Input* vz_input);
++		IssmDouble  GetStabilizationParameter(IssmDouble u, IssmDouble v, IssmDouble w, IssmDouble diameter, IssmDouble kappa);
++		void    GetStrainRate3dPattyn(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input);
++		void    GetStrainRate3d(IssmDouble* epsilon,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input, Input* vz_input);
+ 		Penta*  GetUpperElement(void);
+ 		Penta*  GetLowerElement(void);
+ 		Penta*  GetBasalElement(void);
+ 		void	  InputExtrude(int enum_type,int object_type);
+-		void    InputUpdateFromSolutionPrognostic(double* solutiong);
+-		void    InputUpdateFromSolutionOneDof(double* solutiong,int enum_type);
+-		void    InputUpdateFromSolutionOneDofCollapsed(double* solutiong,int enum_type);
++		void    InputUpdateFromSolutionPrognostic(IssmDouble* solutiong);
++		void    InputUpdateFromSolutionOneDof(IssmDouble* solutiong,int enum_type);
++		void    InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solutiong,int enum_type);
+ 		bool	  IsInput(int name);
+ 		bool	  IsOnSurface(void);
+ 		bool	  IsOnBed(void);
+ 		bool    IsFloating(void); 
+ 		bool    IsNodeOnShelf(); 
+-		bool    IsNodeOnShelfFromFlags(double* flags);
++		bool    IsNodeOnShelfFromFlags(IssmDouble* flags);
+ 		bool    IsOnWater(void); 
+-		double  MinEdgeLength(double xyz_list[6][3]);
+-		void	  ReduceMatrixStokes(double* Ke_reduced, double* Ke_temp);
+-		void	  ReduceVectorStokes(double* Pe_reduced, double* Ke_temp, double* Pe_temp);
++		IssmDouble  MinEdgeLength(IssmDouble xyz_list[6][3]);
++		void	  ReduceMatrixStokes(IssmDouble* Ke_reduced, IssmDouble* Ke_temp);
++		void	  ReduceVectorStokes(IssmDouble* Pe_reduced, IssmDouble* Ke_temp, IssmDouble* Pe_temp);
+ 		void	  SetClone(int* minranks);
+ 		Tria*	  SpawnTria(int g0, int g1, int g2);
+-		void	  SurfaceNormal(double* surface_normal, double xyz_list[3][3]);
++		void	  SurfaceNormal(IssmDouble* surface_normal, IssmDouble xyz_list[3][3]);
+ 
+ 		#ifdef _HAVE_DIAGNOSTIC_
+ 		ElementMatrix* CreateKMatrixCouplingMacAyealPattyn(void);
+@@ -235,15 +235,15 @@
+ 		ElementMatrix* CreateJacobianDiagnosticMacayeal2d(void);
+ 		ElementMatrix* CreateJacobianDiagnosticPattyn(void);
+ 		ElementMatrix* CreateJacobianDiagnosticStokes(void);
+-		void           InputUpdateFromSolutionDiagnosticHoriz( double* solutiong);
+-		void           InputUpdateFromSolutionDiagnosticMacAyeal( double* solutiong);
+-		void           InputUpdateFromSolutionDiagnosticMacAyealPattyn( double* solutiong);
+-		void           InputUpdateFromSolutionDiagnosticMacAyealStokes( double* solutiong);
+-		void           InputUpdateFromSolutionDiagnosticPattyn( double* solutiong);
+-		void           InputUpdateFromSolutionDiagnosticPattynStokes( double* solutiong);
+-		void           InputUpdateFromSolutionDiagnosticHutter( double* solutiong);
+-		void           InputUpdateFromSolutionDiagnosticVert( double* solutiong);
+-		void           InputUpdateFromSolutionDiagnosticStokes( double* solutiong);
++		void           InputUpdateFromSolutionDiagnosticHoriz( IssmDouble* solutiong);
++		void           InputUpdateFromSolutionDiagnosticMacAyeal( IssmDouble* solutiong);
++		void           InputUpdateFromSolutionDiagnosticMacAyealPattyn( IssmDouble* solutiong);
++		void           InputUpdateFromSolutionDiagnosticMacAyealStokes( IssmDouble* solutiong);
++		void           InputUpdateFromSolutionDiagnosticPattyn( IssmDouble* solutiong);
++		void           InputUpdateFromSolutionDiagnosticPattynStokes( IssmDouble* solutiong);
++		void           InputUpdateFromSolutionDiagnosticHutter( IssmDouble* solutiong);
++		void           InputUpdateFromSolutionDiagnosticVert( IssmDouble* solutiong);
++		void           InputUpdateFromSolutionDiagnosticStokes( IssmDouble* solutiong);
+ 		void	         GetSolutionFromInputsDiagnosticHoriz(Vector* solutiong);
+ 		void	         GetSolutionFromInputsDiagnosticHutter(Vector* solutiong);
+ 		void	         GetSolutionFromInputsDiagnosticStokes(Vector* solutiong);
+@@ -277,8 +277,8 @@
+ 		ElementVector* CreatePVectorAdjointMacAyeal(void);
+ 		ElementVector* CreatePVectorAdjointPattyn(void);
+ 		ElementVector* CreatePVectorAdjointStokes(void);
+-		void    InputUpdateFromSolutionAdjointHoriz( double* solutiong);
+-		void    InputUpdateFromSolutionAdjointStokes( double* solutiong);
++		void    InputUpdateFromSolutionAdjointHoriz( IssmDouble* solutiong);
++		void    InputUpdateFromSolutionAdjointStokes( IssmDouble* solutiong);
+ 		#endif
+ 
+ 		#ifdef _HAVE_HYDROLOGY_
+@@ -302,8 +302,8 @@
+ 		ElementVector* CreatePVectorThermalShelf(void);
+ 		ElementVector* CreatePVectorThermalSheet(void);
+ 		void	       GetSolutionFromInputsThermal(Vector* solutiong);
+-		void           InputUpdateFromSolutionThermal( double* solutiong);
+-		void           InputUpdateFromSolutionEnthalpy( double* solutiong);
++		void           InputUpdateFromSolutionThermal( IssmDouble* solutiong);
++		void           InputUpdateFromSolutionEnthalpy( IssmDouble* solutiong);
+ 		#endif
+ 		#ifdef _HAVE_BALANCED_
+ 		ElementMatrix* CreateKMatrixBalancethickness(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.cpp	(revision 12470)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.cpp	(revision 12471)
+@@ -56,7 +56,7 @@
+ 
+ /*Reference Element numerics*/
+ /*FUNCTION TriaRef::GetBMacAyeal {{{*/
+-void TriaRef::GetBMacAyeal(double* B, double* xyz_list, GaussTria* gauss){
++void TriaRef::GetBMacAyeal(IssmDouble* B, IssmDouble* xyz_list, GaussTria* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+ 	 * by: 
+@@ -69,7 +69,7 @@
+ 	 */
+ 
+ 	int i;
+-	double dbasis[NDOF2][NUMNODES];
++	IssmDouble dbasis[NDOF2][NUMNODES];
+ 
+ 	/*Get dh1dh2dh3 in actual coordinate system: */
+ 	GetNodalFunctionsDerivatives(&dbasis[0][0],xyz_list,gauss);
+@@ -86,7 +86,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetBMacAyealStokes {{{*/
+-void TriaRef::GetBMacAyealStokes(double* B, double* xyz_list, GaussTria* gauss){
++void TriaRef::GetBMacAyealStokes(IssmDouble* B, IssmDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+@@ -100,7 +100,7 @@
+ 	 */
+ 
+ 	/*Same thing in the actual coordinate system: */
+-	double dbasis[NDOF2][NUMNODES];
++	IssmDouble dbasis[NDOF2][NUMNODES];
+ 
+ 	/*Get dh1dh2dh3 in actual coordinates system : */
+ 	GetNodalFunctionsDerivatives(&dbasis[0][0],xyz_list,gauss);
+@@ -117,7 +117,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetSegmentBFlux{{{*/
+-void TriaRef::GetSegmentBFlux(double* B,GaussTria* gauss, int index1,int index2){
++void TriaRef::GetSegmentBFlux(IssmDouble* B,GaussTria* gauss, int index1,int index2){
+ 	/*Compute B  matrix. B=[phi1 phi2 -phi3 -phi4]
+ 	 *
+ 	 * and phi1=phi3 phi2=phi4
+@@ -125,7 +125,7 @@
+ 	 * We assume B has been allocated already, of size: 1x4
+ 	 */
+ 
+-	double l1l3[NUMNODES];
++	IssmDouble l1l3[NUMNODES];
+ 
+ 	GetNodalFunctions(&l1l3[0],gauss);
+ 
+@@ -136,7 +136,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetSegmentBprimeFlux{{{*/
+-void TriaRef::GetSegmentBprimeFlux(double* Bprime,GaussTria* gauss, int index1,int index2){
++void TriaRef::GetSegmentBprimeFlux(IssmDouble* Bprime,GaussTria* gauss, int index1,int index2){
+ 	/*Compute Bprime  matrix. Bprime=[phi1 phi2 phi3 phi4]
+ 	 *
+ 	 * and phi1=phi3 phi2=phi4
+@@ -144,7 +144,7 @@
+ 	 * We assume Bprime has been allocated already, of size: 1x4
+ 	 */
+ 
+-	double l1l3[NUMNODES];
++	IssmDouble l1l3[NUMNODES];
+ 
+ 	GetNodalFunctions(&l1l3[0],gauss);
+ 
+@@ -155,7 +155,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetBPrognostic{{{*/
+-void TriaRef::GetBPrognostic(double* B_prog, double* xyz_list, GaussTria* gauss){
++void TriaRef::GetBPrognostic(IssmDouble* B_prog, IssmDouble* xyz_list, GaussTria* gauss){
+ 	/*Compute B  matrix. B=[B1 B2 B3] where Bi is of size 3*NDOF2. 
+ 	 * For node i, Bi can be expressed in the actual coordinate system
+ 	 * by: 
+@@ -166,7 +166,7 @@
+ 	 * We assume B_prog has been allocated already, of size: 2x(NDOF1*NUMNODES)
+ 	 */
+ 
+-	double basis[NUMNODES];
++	IssmDouble basis[NUMNODES];
+ 
+ 	/*Get dh1dh2dh3 in actual coordinate system: */
+ 	GetNodalFunctions(&basis[0],gauss);
+@@ -179,7 +179,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetBprimeMacAyeal {{{*/
+-void TriaRef::GetBprimeMacAyeal(double* Bprime, double* xyz_list, GaussTria* gauss){
++void TriaRef::GetBprimeMacAyeal(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*Compute B'  matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2. 
+ 	 * For node i, Bi' can be expressed in the actual coordinate system
+@@ -193,7 +193,7 @@
+ 	 */
+ 
+ 	/*Same thing in the actual coordinate system: */
+-	double dbasis[NDOF2][NUMNODES];
++	IssmDouble dbasis[NDOF2][NUMNODES];
+ 
+ 	/*Get dh1dh2dh3 in actual coordinates system : */
+ 	GetNodalFunctionsDerivatives(&dbasis[0][0],xyz_list,gauss);
+@@ -210,7 +210,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetBprimeMacAyealStokes {{{*/
+-void TriaRef::GetBprimeMacAyealStokes(double* Bprime, double* xyz_list, GaussTria* gauss){
++void TriaRef::GetBprimeMacAyealStokes(IssmDouble* Bprime, IssmDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*Compute Bprime  matrix. Bprime=[Bprime1 Bprime2 Bprime3] where Bprimei is of size 3*NDOF2. 
+ 	 * For node i, Bprimei can be expressed in the actual coordinate system
+@@ -225,7 +225,7 @@
+ 	 */
+ 
+ 	/*Same thing in the actual coordinate system: */
+-	double dbasis[NDOF2][NUMNODES];
++	IssmDouble dbasis[NDOF2][NUMNODES];
+ 
+ 	/*Get dh1dh2dh3 in actual coordinates system : */
+ 	GetNodalFunctionsDerivatives(&dbasis[0][0],xyz_list,gauss);
+@@ -244,7 +244,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetBprimePrognostic{{{*/
+-void TriaRef::GetBprimePrognostic(double* Bprime_prog, double* xyz_list, GaussTria* gauss){
++void TriaRef::GetBprimePrognostic(IssmDouble* Bprime_prog, IssmDouble* xyz_list, GaussTria* gauss){
+ 	/*Compute B'  matrix. B'=[B1' B2' B3'] where Bi' is of size 3*NDOF2. 
+ 	 * For node i, Bi' can be expressed in the actual coordinate system
+ 	 * by: 
+@@ -256,7 +256,7 @@
+ 	 */
+ 
+ 	/*Same thing in the actual coordinate system: */
+-	double dbasis[NDOF2][NUMNODES];
++	IssmDouble dbasis[NDOF2][NUMNODES];
+ 
+ 	/*Get dh1dh2dh3 in actual coordinates system : */
+ 	GetNodalFunctionsDerivatives(&dbasis[0][0],xyz_list,gauss);
+@@ -269,7 +269,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetL{{{*/
+-void TriaRef::GetL(double* L, double* xyz_list,GaussTria* gauss,int numdof){
++void TriaRef::GetL(IssmDouble* L, IssmDouble* xyz_list,GaussTria* gauss,int numdof){
+ 	/*Compute L  matrix. L=[L1 L2 L3] where Li is square and of size numdof. 
+ 	 * For node i, Li can be expressed in the actual coordinate system
+ 	 * by: 
+@@ -284,7 +284,7 @@
+ 	 */
+ 
+ 	int i;
+-	double basis[3];
++	IssmDouble basis[3];
+ 
+ 	/*Get basis in actual coordinate system: */
+ 	GetNodalFunctions(basis,gauss);
+@@ -306,10 +306,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetJacobian{{{*/
+-void TriaRef::GetJacobian(double* J, double* xyz_list,GaussTria* gauss){
++void TriaRef::GetJacobian(IssmDouble* J, IssmDouble* xyz_list,GaussTria* gauss){
+ 	/*The Jacobian is constant over the element, discard the gaussian points. 
+ 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
+-	double x1,y1,x2,y2,x3,y3;
++	IssmDouble x1,y1,x2,y2,x3,y3;
+ 
+ 	x1=*(xyz_list+NUMNODES*0+0);
+ 	y1=*(xyz_list+NUMNODES*0+1);
+@@ -326,10 +326,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetSegmentJacobianDeterminant{{{*/
+-void TriaRef::GetSegmentJacobianDeterminant(double* Jdet, double* xyz_list,GaussTria* gauss){
++void TriaRef::GetSegmentJacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTria* gauss){
+ 	/*The Jacobian determinant is constant over the element, discard the gaussian points. 
+ 	 * J is assumed to have been allocated*/
+-	double x1,y1,x2,y2;
++	IssmDouble x1,y1,x2,y2;
+ 
+ 	x1=*(xyz_list+3*0+0);
+ 	y1=*(xyz_list+3*0+1);
+@@ -342,10 +342,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetJacobianDeterminant2d{{{*/
+-void TriaRef::GetJacobianDeterminant2d(double* Jdet, double* xyz_list,GaussTria* gauss){
++void TriaRef::GetJacobianDeterminant2d(IssmDouble* Jdet, IssmDouble* xyz_list,GaussTria* gauss){
+ 	/*The Jacobian determinant is constant over the element, discard the gaussian points. 
+ 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
+-	double J[2][2];
++	IssmDouble J[2][2];
+ 
+ 	/*Get Jacobian*/
+ 	GetJacobian(&J[0][0],xyz_list,gauss);
+@@ -357,11 +357,11 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetJacobianDeterminant3d {{{*/
+-void TriaRef::GetJacobianDeterminant3d(double*  Jdet, double* xyz_list,GaussTria* gauss){
++void TriaRef::GetJacobianDeterminant3d(IssmDouble*  Jdet, IssmDouble* xyz_list,GaussTria* gauss){
+ 	/*The Jacobian determinant is constant over the element, discard the gaussian points. 
+ 	 * J is assumed to have been allocated of size NDOF2xNDOF2.*/
+ 
+-	double x1,x2,x3,y1,y2,y3,z1,z2,z3;
++	IssmDouble x1,x2,x3,y1,y2,y3,z1,z2,z3;
+ 
+ 	x1=*(xyz_list+3*0+0);
+ 	y1=*(xyz_list+3*0+1);
+@@ -379,10 +379,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetJacobianInvert{{{*/
+-void TriaRef::GetJacobianInvert(double*  Jinv, double* xyz_list,GaussTria* gauss){
++void TriaRef::GetJacobianInvert(IssmDouble*  Jinv, IssmDouble* xyz_list,GaussTria* gauss){
+ 
+ 	/*Jacobian*/
+-	double J[2][2];
++	IssmDouble J[2][2];
+ 
+ 	/*Call Jacobian routine to get the jacobian:*/
+ 	GetJacobian(&J[0][0], xyz_list, gauss);
+@@ -393,7 +393,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetNodalFunctions{{{*/
+-void TriaRef::GetNodalFunctions(double* basis,GaussTria* gauss){
++void TriaRef::GetNodalFunctions(IssmDouble* basis,GaussTria* gauss){
+ 	/*This routine returns the values of the nodal functions  at the gaussian point.*/
+ 
+ 	basis[0]=gauss->coord1;
+@@ -403,10 +403,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetSegmentNodalFunctions{{{*/
+-void TriaRef::GetSegmentNodalFunctions(double* basis,GaussTria* gauss,int index1,int index2){
++void TriaRef::GetSegmentNodalFunctions(IssmDouble* basis,GaussTria* gauss,int index1,int index2){
+ 	/*This routine returns the values of the nodal functions  at the gaussian point.*/
+ 
+-	double BasisFunctions[3];
++	IssmDouble BasisFunctions[3];
+ 
+ 	GetNodalFunctions(&BasisFunctions[0],gauss);
+ 
+@@ -417,13 +417,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetNodalFunctionsDerivatives{{{*/
+-void TriaRef::GetNodalFunctionsDerivatives(double* dbasis,double* xyz_list, GaussTria* gauss){
++void TriaRef::GetNodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+ 	 * actual coordinate system): */
+ 	int       i;
+-	double    dbasis_ref[NDOF2][NUMNODES];
+-	double    Jinv[NDOF2][NDOF2];
++	IssmDouble    dbasis_ref[NDOF2][NUMNODES];
++	IssmDouble    Jinv[NDOF2][NDOF2];
+ 
+ 	/*Get derivative values with respect to parametric coordinate system: */
+ 	GetNodalFunctionsDerivativesReference(&dbasis_ref[0][0], gauss); 
+@@ -444,7 +444,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetNodalFunctionsDerivativesReference{{{*/
+-void TriaRef::GetNodalFunctionsDerivativesReference(double* dl1dl3,GaussTria* gauss){
++void TriaRef::GetNodalFunctionsDerivativesReference(IssmDouble* dl1dl3,GaussTria* gauss){
+ 	/*This routine returns the values of the nodal functions derivatives  (with respect to the 
+ 	 * natural coordinate system) at the gaussian point. */
+ 
+@@ -463,7 +463,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetInputDerivativeValue{{{*/
+-void TriaRef::GetInputDerivativeValue(double* p, double* plist,double* xyz_list, GaussTria* gauss){
++void TriaRef::GetInputDerivativeValue(IssmDouble* p, IssmDouble* plist,IssmDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*From node values of parameter p (plist[0],plist[1],plist[2]), return parameter derivative value at gaussian 
+ 	 * point specified by gauss_basis:
+@@ -474,7 +474,7 @@
+ 	 */
+ 
+ 	/*Nodal Derivatives*/
+-	double dbasis[2][3]; //nodal derivative functions in actual coordinate system.
++	IssmDouble dbasis[2][3]; //nodal derivative functions in actual coordinate system.
+ 
+ 	/*Get dh1dh2dh3 in actual coordinate system: */
+ 	GetNodalFunctionsDerivatives(&dbasis[0][0],xyz_list, gauss);
+@@ -486,13 +486,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaRef::GetInputValue{{{*/
+-void TriaRef::GetInputValue(double* p, double* plist, GaussTria* gauss){
++void TriaRef::GetInputValue(IssmDouble* p, IssmDouble* plist, GaussTria* gauss){
+ 
+ 	/*From node values of parameter p (plist[0],plist[1],plist[2]), return parameter value at gaussian 
+ 	 * point specifie by gauss: */
+ 
+ 	/*nodal functions annd output: */
+-	double basis[3];
++	IssmDouble basis[3];
+ 
+ 	/*Get nodal functions*/
+ 	GetNodalFunctions(basis, gauss);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12471-12472.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12471-12472.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12471-12472.diff	(revision 12679)
@@ -0,0 +1,2746 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12472)
+@@ -128,30 +128,30 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matice::GetB {{{*/
+-double Matice::GetB(){
++IssmDouble Matice::GetB(){
+ 
+ 	/*Output*/
+-	double B;
++	IssmDouble B;
+ 
+ 	inputs->GetInputAverage(&B,MaterialsRheologyBEnum);
+ 	return B;
+ }
+ /*}}}*/
+ /*FUNCTION Matice::GetBbar {{{*/
+-double Matice::GetBbar(){
++IssmDouble Matice::GetBbar(){
+ 
+ 	/*Output*/
+-	double Bbar;
++	IssmDouble Bbar;
+ 
+ 	inputs->GetInputAverage(&Bbar,MaterialsRheologyBbarEnum);
+ 	return Bbar;
+ }
+ /*}}}*/
+ /*FUNCTION Matice::GetN {{{*/
+-double Matice::GetN(){
++IssmDouble Matice::GetN(){
+ 
+ 	/*Output*/
+-	double n;
++	IssmDouble n;
+ 
+ 	inputs->GetInputAverage(&n,MaterialsRheologyNEnum);
+ 	return n;
+@@ -190,7 +190,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matice::GetViscosity2d {{{*/
+-void  Matice::GetViscosity2d(double* pviscosity, double* epsilon){
++void  Matice::GetViscosity2d(IssmDouble* pviscosity, IssmDouble* epsilon){
+ 	/*From a string tensor and a material object, return viscosity, using Glen's flow law.
+ 												    B
+ 	  viscosity= -------------------------------------------------------------------
+@@ -204,14 +204,14 @@
+ 	  */
+ 
+ 	/*output: */
+-	double viscosity;
++	IssmDouble viscosity;
+ 
+ 	/*input strain rate: */
+-	double exx,eyy,exy;
++	IssmDouble exx,eyy,exy;
+ 
+ 	/*Intermediary: */
+-	double A,e;
+-	double B,n;
++	IssmDouble A,e;
++	IssmDouble B,n;
+ 
+ 	/*Get B and n*/
+ 	B=GetBbar();
+@@ -223,7 +223,7 @@
+ 	}
+ 	else{
+ 		if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0)){
+-			viscosity=0.5*pow((double)10,(double)14);
++			viscosity=0.5*pow((IssmDouble)10,(IssmDouble)14);
+ 		}
+ 		else{
+ 			/*Retrive strain rate components: */
+@@ -235,7 +235,7 @@
+ 			A=pow(exx,2)+pow(eyy,2)+pow(exy,2)+exx*eyy;
+ 			if(A==0){
+ 				/*Maxiviscositym viscosity for 0 shear areas: */
+-				viscosity=2.5*pow((double)10,(double)17);
++				viscosity=2.5*pow((IssmDouble)10,(IssmDouble)17);
+ 			}
+ 			else{
+ 				e=(n-1)/(2*n);
+@@ -254,7 +254,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matice::GetViscosity3d {{{*/
+-void  Matice::GetViscosity3d(double* pviscosity3d, double* epsilon){
++void  Matice::GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* epsilon){
+ 
+ 	/*Return viscosity accounting for steady state power law creep [Thomas and MacAyeal, 1982]: 
+ 	 *
+@@ -270,14 +270,14 @@
+ 	 */
+ 	
+ 	/*output: */
+-	double viscosity3d;
++	IssmDouble viscosity3d;
+ 
+ 	/*input strain rate: */
+-	double exx,eyy,exy,exz,eyz;
++	IssmDouble exx,eyy,exy,exz,eyz;
+ 
+ 	/*Intermediaries: */
+-	double A,e;
+-	double B,n;
++	IssmDouble A,e;
++	IssmDouble B,n;
+ 
+ 	/*Get B and n*/
+ 	B=GetB();
+@@ -290,7 +290,7 @@
+ 	else{
+ 		if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0) && 
+ 				(epsilon[3]==0) && (epsilon[4]==0)){
+-			viscosity3d=0.5*pow((double)10,(double)14);
++			viscosity3d=0.5*pow((IssmDouble)10,(IssmDouble)14);
+ 		}
+ 		else{
+ 
+@@ -305,7 +305,7 @@
+ 			A=pow(exx,2)+pow(eyy,2)+pow(exy,2)+pow(exz,2)+pow(eyz,2)+exx*eyy;
+ 			if(A==0){
+ 				/*Maxiviscosity3dm viscosity for 0 shear areas: */
+-				viscosity3d=2.25*pow((double)10,(double)17);
++				viscosity3d=2.25*pow((IssmDouble)10,(IssmDouble)17);
+ 			}
+ 			else{
+ 				e=(n-1)/2/n;
+@@ -325,7 +325,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matice::GetViscosity3dStokes {{{*/
+-void  Matice::GetViscosity3dStokes(double* pviscosity3d, double* epsilon){
++void  Matice::GetViscosity3dStokes(IssmDouble* pviscosity3d, IssmDouble* epsilon){
+ 	/*Return viscosity accounting for steady state power law creep [Thomas and MacAyeal, 1982]: 
+ 	 *
+ 	 *                                          B
+@@ -340,18 +340,18 @@
+ 	 */
+ 	
+ 	/*output: */
+-	double viscosity3d;
++	IssmDouble viscosity3d;
+ 
+ 	/*input strain rate: */
+-	double exx,eyy,exy,exz,eyz,ezz;
++	IssmDouble exx,eyy,exy,exz,eyz,ezz;
+ 
+ 	/*Intermediaries: */
+-	double A,e;
+-	double B,n;
+-	double eps0;
++	IssmDouble A,e;
++	IssmDouble B,n;
++	IssmDouble eps0;
+ 
+ 	/*Get B and n*/
+-	eps0=pow((double)10,(double)-27);
++	eps0=pow((IssmDouble)10,(IssmDouble)-27);
+ 	B=GetB();
+ 	n=GetN();
+ 	
+@@ -362,7 +362,7 @@
+ 	else{
+ 		if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0) && 
+ 				(epsilon[3]==0) && (epsilon[4]==0) && (epsilon[5]==0)){
+-			viscosity3d=0.5*pow((double)10,(double)14);
++			viscosity3d=0.5*pow((IssmDouble)10,(IssmDouble)14);
+ 		}
+ 		else{
+ 
+@@ -378,7 +378,7 @@
+ 			A=pow(exx,2)+pow(eyy,2)+pow(exy,2)+pow(exz,2)+pow(eyz,2)+exx*eyy+pow(eps0,2);
+ 			if(A==0){
+ 				/*Maxiviscosity3dm viscosity for 0 shear areas: */
+-				viscosity3d=2.25*pow((double)10,(double)17);
++				viscosity3d=2.25*pow((IssmDouble)10,(IssmDouble)17);
+ 			}
+ 			else{
+ 				e=(n-1)/2/n;
+@@ -397,7 +397,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matice::GetViscosityComplement {{{*/
+-void  Matice::GetViscosityComplement(double* pviscosity_complement, double* epsilon){
++void  Matice::GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* epsilon){
+ 	/*Return viscosity accounting for steady state power law creep [Thomas and MacAyeal, 1982]: 
+ 	 *
+ 	 *  										                1
+@@ -409,14 +409,14 @@
+ 	 */
+ 	
+ 	/*output: */
+-	double viscosity_complement;
++	IssmDouble viscosity_complement;
+ 
+ 	/*input strain rate: */
+-	double exx,eyy,exy;
++	IssmDouble exx,eyy,exy;
+ 
+ 	/*Intermediary value A and exponent e: */
+-	double A,e;
+-	double B,n;
++	IssmDouble A,e;
++	IssmDouble B,n;
+ 
+ 	/*Get B and n*/
+ 	B=GetBbar();
+@@ -431,7 +431,7 @@
+ 		A=pow(exx,2)+pow(eyy,2)+pow(exy,2)+exx*eyy;
+ 		if(A==0){
+ 			/*Maximum viscosity_complement for 0 shear areas: */
+-			viscosity_complement=2.25*pow((double)10,(double)17);
++			viscosity_complement=2.25*pow((IssmDouble)10,(IssmDouble)17);
+ 		}
+ 		else{
+ 			e=(n-1)/(2*n);
+@@ -440,7 +440,7 @@
+ 		}
+ 	}
+ 	else{
+-		viscosity_complement=4.5*pow((double)10,(double)17);
++		viscosity_complement=4.5*pow((IssmDouble)10,(IssmDouble)17);
+ 	}
+ 
+ 	/*Checks in debugging mode*/
+@@ -453,14 +453,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matice::GetViscosityDerivativeEpsSquare{{{*/
+-void  Matice::GetViscosityDerivativeEpsSquare(double* pmu_prime, double* epsilon){
++void  Matice::GetViscosityDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* epsilon){
+ 
+ 	/*output: */
+-	double mu_prime;
+-	double mu,n,eff2;
++	IssmDouble mu_prime;
++	IssmDouble mu,n,eff2;
+ 
+ 	/*input strain rate: */
+-	double exx,eyy,exy,exz,eyz;
++	IssmDouble exx,eyy,exy,exz,eyz;
+ 
+ 	/*Get visocisty and n*/
+ 	GetViscosity3d(&mu,epsilon);
+@@ -468,7 +468,7 @@
+ 
+ 	if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0) && 
+ 				(epsilon[3]==0) && (epsilon[4]==0)){
+-		mu_prime=0.5*pow((double)10,(double)14);
++		mu_prime=0.5*pow((IssmDouble)10,(IssmDouble)14);
+ 	}
+ 	else{
+ 		/*Retrive strain rate components: */
+@@ -487,21 +487,21 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matice::GetViscosity2dDerivativeEpsSquare{{{*/
+-void  Matice::GetViscosity2dDerivativeEpsSquare(double* pmu_prime, double* epsilon){
++void  Matice::GetViscosity2dDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* epsilon){
+ 
+ 	/*output: */
+-	double mu_prime;
+-	double mu,n,eff2;
++	IssmDouble mu_prime;
++	IssmDouble mu,n,eff2;
+ 
+ 	/*input strain rate: */
+-	double exx,eyy,exy,exz;
++	IssmDouble exx,eyy,exy,exz;
+ 
+ 	/*Get visocisty and n*/
+ 	GetViscosity2d(&mu,epsilon);
+ 	n=GetN();
+ 
+ 	if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0)){
+-		mu_prime=0.5*pow((double)10,(double)14);
++		mu_prime=0.5*pow((IssmDouble)10,(IssmDouble)14);
+ 	}
+ 	else{
+ 		/*Retrive strain rate components: */
+@@ -525,8 +525,8 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromVector(double* vector, int name, int type) {{{*/
+-void  Matice::InputUpdateFromVector(double* vector, int name, int type){
++/*FUNCTION Matice::InputUpdateFromVector(IssmDouble* vector, int name, int type) {{{*/
++void  Matice::InputUpdateFromVector(IssmDouble* vector, int name, int type){
+ 
+ 	/*Intermediaries*/
+ 	Element *element      = NULL;
+@@ -544,7 +544,7 @@
+ 			switch(element->ObjectEnum()){
+ 
+ 				case TriaEnum:
+-					double values[3];
++					IssmDouble values[3];
+ 					for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetVertexDof()];
+ 					this->inputs->AddInput(new TriaP1Input(name,values));
+ 					return;
+@@ -565,8 +565,8 @@
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromVectorDakota(double* vector, int name, int type) {{{*/
+-void  Matice::InputUpdateFromVectorDakota(double* vector, int name, int type){
++/*FUNCTION Matice::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type) {{{*/
++void  Matice::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){
+ 
+ 	/*Intermediaries*/
+ 	Element *element      = NULL;
+@@ -586,7 +586,7 @@
+ 			switch(element->ObjectEnum()){
+ 
+ 				case TriaEnum:
+-					double values[3];
++					IssmDouble values[3];
+ 					for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetSidList()]; //use sid list, to index into serial oriented vector 
+ 					this->inputs->AddInput(new TriaP1Input(name,values));
+ 					/*Special case for rheology B in 2D: Pourave land for this solution{{{*/
+@@ -617,7 +617,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matice::InputUpdateFromMatrixDakota(int* vector, int name, int type) {{{*/
+-void  Matice::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols,int name, int type){
++void  Matice::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols,int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -631,8 +631,8 @@
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matice::InputUpdateFromConstant(double constant, int name) {{{*/
+-void  Matice::InputUpdateFromConstant(double constant, int name){
++/*FUNCTION Matice::InputUpdateFromConstant(IssmDouble constant, int name) {{{*/
++void  Matice::InputUpdateFromConstant(IssmDouble constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -647,7 +647,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matice::InputUpdateFromSolution{{{*/
+-void  Matice::InputUpdateFromSolution(double* solution){
++void  Matice::InputUpdateFromSolution(IssmDouble* solution){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -670,9 +670,9 @@
+ 
+ 		/*Intermediaries*/
+ 		const int num_vertices = 3; //Tria has 3 vertices
+-		double    nodeinputs[num_vertices];
+-		double    cmmininputs[num_vertices];
+-		double    cmmaxinputs[num_vertices];
++		IssmDouble    nodeinputs[num_vertices];
++		IssmDouble    cmmininputs[num_vertices];
++		IssmDouble    cmmaxinputs[num_vertices];
+ 
+ 		/*Get B*/
+ 		if (iomodel->Data(MaterialsRheologyBEnum)) {
+@@ -712,9 +712,9 @@
+ 
+ 		/*Intermediaries*/
+ 		const int num_vertices = 6; //Penta has 6 vertices
+-		double    nodeinputs[num_vertices];
+-		double    cmmininputs[num_vertices];
+-		double    cmmaxinputs[num_vertices];
++		IssmDouble    nodeinputs[num_vertices];
++		IssmDouble    cmmininputs[num_vertices];
++		IssmDouble    cmmaxinputs[num_vertices];
+ 
+ 		/*Get B*/
+ 		if (iomodel->Data(MaterialsRheologyBEnum)) {
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.cpp	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.cpp	(revision 12472)
+@@ -103,8 +103,8 @@
+ /*}}}*/
+ 
+ /*Update virtual functions definitions:*/
+-/*FUNCTION Matpar::InputUpdateFromVector(double* vector, int name, int type) {{{*/
+-void   Matpar::InputUpdateFromVector(double* vector, int name, int type){
++/*FUNCTION Matpar::InputUpdateFromVector(IssmDouble* vector, int name, int type) {{{*/
++void   Matpar::InputUpdateFromVector(IssmDouble* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -118,8 +118,8 @@
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matpar::InputUpdateFromVectorDakota(double* vector, int name, int type) {{{*/
+-void   Matpar::InputUpdateFromVectorDakota(double* vector, int name, int type){
++/*FUNCTION Matpar::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type) {{{*/
++void   Matpar::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -134,12 +134,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::InputUpdateFromMatrixDakota(int* vector, int name, int type) {{{*/
+-void  Matpar::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols,int name, int type){
++void  Matpar::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols,int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Matpar::InputUpdateFromConstant(double constant, int name) {{{*/
+-void   Matpar::InputUpdateFromConstant(double constant, int name){
++/*FUNCTION Matpar::InputUpdateFromConstant(IssmDouble constant, int name) {{{*/
++void   Matpar::InputUpdateFromConstant(IssmDouble constant, int name){
+ 
+ 	switch(name){
+ 		case MaterialsRhoIceEnum:
+@@ -198,7 +198,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::InputUpdateFromSolution{{{*/
+-void   Matpar::InputUpdateFromSolution(double* solution){
++void   Matpar::InputUpdateFromSolution(IssmDouble* solution){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -212,108 +212,108 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetBeta {{{*/
+-double Matpar::GetBeta(){
++IssmDouble Matpar::GetBeta(){
+ 	return beta;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetG {{{*/
+-double Matpar::GetG(){
++IssmDouble Matpar::GetG(){
+ 	return g;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetHeatCapacity {{{*/
+-double Matpar::GetHeatCapacity(){
++IssmDouble Matpar::GetHeatCapacity(){
+ 	return heatcapacity;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetLatentHeat {{{*/
+-double Matpar::GetLatentHeat(){
++IssmDouble Matpar::GetLatentHeat(){
+ 	return latentheat;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetMeltingPoint {{{*/
+-double Matpar::GetMeltingPoint(){
++IssmDouble Matpar::GetMeltingPoint(){
+ 	return meltingpoint;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetReferenceTemperature {{{*/
+-double Matpar::GetReferenceTemperature(){
++IssmDouble Matpar::GetReferenceTemperature(){
+ 	return referencetemperature;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetMixedLayerCapacity {{{*/
+-double Matpar::GetMixedLayerCapacity(){
++IssmDouble Matpar::GetMixedLayerCapacity(){
+ 	return mixed_layer_capacity;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetRhoIce {{{*/
+-double Matpar::GetRhoIce(){
++IssmDouble Matpar::GetRhoIce(){
+ 	
+ 	return rho_ice;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetRhoWater {{{*/
+-double Matpar::GetRhoWater(){
++IssmDouble Matpar::GetRhoWater(){
+ 	return rho_water;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetRhoFreshwater {{{*/
+-double Matpar::GetRhoFreshwater(){
++IssmDouble Matpar::GetRhoFreshwater(){
+ 	return rho_freshwater;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetMuWater {{{*/
+-double Matpar::GetMuWater(){
++IssmDouble Matpar::GetMuWater(){
+ 	return mu_water;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetThermalConductivity {{{*/
+-double Matpar::GetThermalConductivity(){
++IssmDouble Matpar::GetThermalConductivity(){
+ 	return thermalconductivity;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetThermalExchangeVelocity {{{*/
+-double Matpar::GetThermalExchangeVelocity(){
++IssmDouble Matpar::GetThermalExchangeVelocity(){
+ 	return thermal_exchange_velocity;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetKn {{{*/		 
+-double Matpar::GetKn(){			 
++IssmDouble Matpar::GetKn(){			 
+ 	return kn;		 
+ }		 
+ /*}}}*/			 
+ /*FUNCTION Matpar::GetHydrologyP {{{*/			 
+-double Matpar::GetHydrologyP(){		 
++IssmDouble Matpar::GetHydrologyP(){		 
+ 	return hydro_p;			 
+ }		 
+ /*}}}*/			 
+ /*FUNCTION Matqar::GetHydrologyQ {{{*/			 
+-double Matpar::GetHydrologyQ(){		 
++IssmDouble Matpar::GetHydrologyQ(){		 
+ 	return hydro_q;			 
+ }		 
+ /*}}}*/			 
+ /*FUNCTION Matpar::GetHydrologyCR {{{*/		 
+-double Matpar::GetHydrologyCR(){		 
++IssmDouble Matpar::GetHydrologyCR(){		 
+ 	return hydro_CR;		 
+ }		 
+ /*}}}*/			 
+ /*FUNCTION Matpar::GetHydrologyN {{{*/			 
+-double Matpar::GetHydrologyN(){		 
++IssmDouble Matpar::GetHydrologyN(){		 
+ 	return hydro_n;			 
+ }		 
+ /*}}}*/ 
+ /*FUNCTION Matpar::TMeltingPoint {{{*/
+-double Matpar::TMeltingPoint(double pressure){
++IssmDouble Matpar::TMeltingPoint(IssmDouble pressure){
+ 	return meltingpoint-beta*pressure;
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::PureIceEnthalpy{{{*/
+-double Matpar::PureIceEnthalpy(double pressure){
++IssmDouble Matpar::PureIceEnthalpy(IssmDouble pressure){
+ 	return heatcapacity*(TMeltingPoint(pressure)-referencetemperature);
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::GetEnthalpyDiffusionParameter{{{*/
+-double Matpar::GetEnthalpyDiffusionParameter(double enthalpy,double pressure){
++IssmDouble Matpar::GetEnthalpyDiffusionParameter(IssmDouble enthalpy,IssmDouble pressure){
+ 	if(enthalpy<PureIceEnthalpy(pressure)){
+ 		return thermalconductivity/(rho_ice*heatcapacity);
+ 	}
+@@ -323,10 +323,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::EnthalpyToThermal {{{*/
+-void Matpar::EnthalpyToThermal(double* ptemperature,double* pwaterfraction,double enthalpy,double pressure){
++void Matpar::EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure){
+ 
+ 	/*Ouput*/
+-	double temperature,waterfraction;
++	IssmDouble temperature,waterfraction;
+ 	
+ 	if(enthalpy<PureIceEnthalpy(pressure)){
+ 		temperature=referencetemperature+enthalpy/heatcapacity;
+@@ -343,10 +343,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matpar::ThermalToEnthalpy {{{*/
+-void Matpar::ThermalToEnthalpy(double * penthalpy,double temperature,double waterfraction,double pressure){
++void Matpar::ThermalToEnthalpy(IssmDouble * penthalpy,IssmDouble temperature,IssmDouble waterfraction,IssmDouble pressure){
+ 
+ 	/*Ouput*/
+-	double enthalpy;
++	IssmDouble enthalpy;
+ 	
+ 	if(temperature<TMeltingPoint(pressure)){
+ 		enthalpy=heatcapacity*(temperature-referencetemperature);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.h	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.h	(revision 12472)
+@@ -38,17 +38,17 @@
+ 		Object* copy();
+ 		/*}}}*/
+ 		/*Update virtual functions definitions: {{{*/
+-		void  InputUpdateFromVector(double* vector, int name, int type);
++		void  InputUpdateFromVector(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+ 		void  InputUpdateFromVector(bool* vector, int name, int type);
+-		void  InputUpdateFromMatrixDakota(double* matrix, int nrow, int ncols, int name, int type);
+-		void  InputUpdateFromVectorDakota(double* vector, int name, int type);
++		void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrow, int ncols, int name, int type);
++		void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVectorDakota(int* vector, int name, int type);
+ 		void  InputUpdateFromVectorDakota(bool* vector, int name, int type);
+-		void  InputUpdateFromConstant(double constant, int name);
++		void  InputUpdateFromConstant(IssmDouble constant, int name);
+ 		void  InputUpdateFromConstant(int constant, int name);
+ 		void  InputUpdateFromConstant(bool constant, int name);
+-		void  InputUpdateFromSolution(double* solution);
++		void  InputUpdateFromSolution(IssmDouble* solution);
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel);
+ 		/*}}}*/
+ 		/*Material virtual functions resolution: {{{*/
+@@ -58,15 +58,15 @@
+ 		/*}}}*/
+ 		/*Matice Numerics: {{{*/
+ 		void   SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin);
+-		void   GetViscosity2d(double* pviscosity, double* pepsilon);
+-		void   GetViscosity3d(double* pviscosity3d, double* pepsilon);
+-		void   GetViscosity3dStokes(double* pviscosity3d, double* epsilon);
+-		void   GetViscosityComplement(double* pviscosity_complement, double* pepsilon);
+-		void   GetViscosityDerivativeEpsSquare(double* pmu_prime, double* pepsilon);
+-		void   GetViscosity2dDerivativeEpsSquare(double* pmu_prime, double* pepsilon);
+-		double GetB();
+-		double GetBbar();
+-		double GetN();
++		void   GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon);
++		void   GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon);
++		void   GetViscosity3dStokes(IssmDouble* pviscosity3d, IssmDouble* epsilon);
++		void   GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon);
++		void   GetViscosityDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* pepsilon);
++		void   GetViscosity2dDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* pepsilon);
++		IssmDouble GetB();
++		IssmDouble GetBbar();
++		IssmDouble GetN();
+ 		bool   IsInput(int name);
+ 		/*}}}*/
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.h	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.h	(revision 12472)
+@@ -15,26 +15,26 @@
+ 
+ 	private: 
+ 		int	  mid;
+-		double  rho_ice; 
+-		double  rho_water;
+-		double  rho_freshwater;
+-		double  mu_water;
+-		double  heatcapacity;
+-		double  thermalconductivity;
+-		double  latentheat;
+-		double  beta;
+-		double  meltingpoint;
+-		double  referencetemperature;
+-		double  mixed_layer_capacity;
+-		double  thermal_exchange_velocity;
+-		double  g;
++		IssmDouble  rho_ice; 
++		IssmDouble  rho_water;
++		IssmDouble  rho_freshwater;
++		IssmDouble  mu_water;
++		IssmDouble  heatcapacity;
++		IssmDouble  thermalconductivity;
++		IssmDouble  latentheat;
++		IssmDouble  beta;
++		IssmDouble  meltingpoint;
++		IssmDouble  referencetemperature;
++		IssmDouble  mixed_layer_capacity;
++		IssmDouble  thermal_exchange_velocity;
++		IssmDouble  g;
+ 
+ 		/*hydrology: */		 
+-		double  kn;			 
+-		double  hydro_p;		 
+-		double  hydro_q;		 
+-		double  hydro_CR;			 
+-		double  hydro_n; 
++		IssmDouble  kn;			 
++		IssmDouble  hydro_p;		 
++		IssmDouble  hydro_q;		 
++		IssmDouble  hydro_CR;			 
++		IssmDouble  hydro_n; 
+ 
+ 	public:
+ 		Matpar();
+@@ -50,17 +50,17 @@
+ 		Object* copy();
+ 		/*}}}*/
+ 		/*Update virtual functions resolution: {{{*/
+-		void   InputUpdateFromVector(double* vector, int name, int type);
++		void   InputUpdateFromVector(IssmDouble* vector, int name, int type);
+ 		void   InputUpdateFromVector(int* vector, int name, int type);
+ 		void   InputUpdateFromVector(bool* vector, int name, int type);
+-		void   InputUpdateFromMatrixDakota(double* matrix,int nrows,int ncols, int name, int type);
+-		void   InputUpdateFromVectorDakota(double* vector, int name, int type);
++		void   InputUpdateFromMatrixDakota(IssmDouble* matrix,int nrows,int ncols, int name, int type);
++		void   InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
+ 		void   InputUpdateFromVectorDakota(int* vector, int name, int type);
+ 		void   InputUpdateFromVectorDakota(bool* vector, int name, int type);
+-		void   InputUpdateFromConstant(double constant, int name);
++		void   InputUpdateFromConstant(IssmDouble constant, int name);
+ 		void   InputUpdateFromConstant(int constant, int name);
+ 		void   InputUpdateFromConstant(bool constant, int name);
+-		void   InputUpdateFromSolution(double* solution);
++		void   InputUpdateFromSolution(IssmDouble* solution);
+ 		void   InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
+ 		/*}}}*/
+ 		/*Material virtual functions resolution: {{{*/
+@@ -69,29 +69,29 @@
+ 		void   GetVectorFromInputs(Vector* vector,int input_enum){return;}
+ 		/*}}}*/
+ 		/*Numerics: {{{*/
+-		double GetG();
+-		double GetRhoIce();
+-		double GetRhoWater();
+-		double GetRhoFreshwater();
+-		double GetMuWater();
+-		double GetMixedLayerCapacity();
+-		double GetThermalExchangeVelocity();
+-		double GetHeatCapacity();
+-		double GetThermalConductivity();
+-		double GetLatentHeat();
+-		double GetBeta();
+-		double GetMeltingPoint();
+-		double GetReferenceTemperature();
+-		double GetKn();
+-		double GetHydrologyP();
+-		double GetHydrologyQ();
+-		double GetHydrologyCR();
+-		double GetHydrologyN();
+-		double TMeltingPoint(double pressure);
+-		double PureIceEnthalpy(double pressure);
+-		double GetEnthalpyDiffusionParameter(double enthalpy,double pressure);
+-		void   EnthalpyToThermal(double* ptemperature,double* pwaterfraction,double enthalpy,double pressure);
+-		void   ThermalToEnthalpy(double* penthalpy,double temperature,double waterfraction,double pressure);
++		IssmDouble GetG();
++		IssmDouble GetRhoIce();
++		IssmDouble GetRhoWater();
++		IssmDouble GetRhoFreshwater();
++		IssmDouble GetMuWater();
++		IssmDouble GetMixedLayerCapacity();
++		IssmDouble GetThermalExchangeVelocity();
++		IssmDouble GetHeatCapacity();
++		IssmDouble GetThermalConductivity();
++		IssmDouble GetLatentHeat();
++		IssmDouble GetBeta();
++		IssmDouble GetMeltingPoint();
++		IssmDouble GetReferenceTemperature();
++		IssmDouble GetKn();
++		IssmDouble GetHydrologyP();
++		IssmDouble GetHydrologyQ();
++		IssmDouble GetHydrologyCR();
++		IssmDouble GetHydrologyN();
++		IssmDouble TMeltingPoint(IssmDouble pressure);
++		IssmDouble PureIceEnthalpy(IssmDouble pressure);
++		IssmDouble GetEnthalpyDiffusionParameter(IssmDouble enthalpy,IssmDouble pressure);
++		void   EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure);
++		void   ThermalToEnthalpy(IssmDouble* penthalpy,IssmDouble temperature,IssmDouble waterfraction,IssmDouble pressure);
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12472)
+@@ -100,7 +100,7 @@
+ 
+ 	/*Gset and values*/
+ 	this->gglobaldoflist=xNew<int>(this->nrows);
+-	this->values=xNewZeroInit<double>(this->nrows*this->ncols);
++	this->values=xNewZeroInit<IssmDouble>(this->nrows*this->ncols);
+ 	for(i=0;i<Ke1->nrows;i++){
+ 		for(j=0;j<Ke1->ncols;j++){
+ 			this->values[i*this->ncols+j] += Ke1->values[i*Ke1->ncols+j];
+@@ -204,7 +204,7 @@
+ 	this->ncols=this->nrows;
+ 
+ 	/*fill values with 0: */
+-	this->values=xNewZeroInit<double>(this->nrows*this->ncols);
++	this->values=xNewZeroInit<IssmDouble>(this->nrows*this->ncols);
+ 
+ 	/*g list*/
+ 	this->gglobaldoflist=GetGlobalDofList(nodes,numnodes,GsetEnum,approximation);
+@@ -230,7 +230,7 @@
+ /*FUNCTION ElementMatrix::~ElementMatrix(){{{*/
+ ElementMatrix::~ElementMatrix(){
+ 	
+-	xDelete<double>(this->values);
++	xDelete<IssmDouble>(this->values);
+ 	xDelete<int>(this->gglobaldoflist);
+ 	xDelete<int>(this->row_flocaldoflist);
+ 	xDelete<int>(this->row_fglobaldoflist);
+@@ -248,7 +248,7 @@
+ void ElementMatrix::AddToGlobal(Matrix* Kff, Matrix* Kfs){
+ 
+ 	int i,j;
+-	double* localvalues=NULL;
++	IssmDouble* localvalues=NULL;
+ 
+ 	/*If Kfs is not provided, call the other function*/
+ 	if(!Kfs){
+@@ -264,7 +264,7 @@
+ 
+ 		if(this->row_fsize){
+ 			/*first, retrieve values that are in the f-set from the g-set values matrix: */
+-			localvalues=xNew<double>(this->row_fsize*this->row_fsize);
++			localvalues=xNew<IssmDouble>(this->row_fsize*this->row_fsize);
+ 			for(i=0;i<this->row_fsize;i++){
+ 				for(j=0;j<this->row_fsize;j++){
+ 					*(localvalues+this->row_fsize*i+j)=*(this->values+this->ncols*this->row_flocaldoflist[i]+this->row_flocaldoflist[j]);
+@@ -274,13 +274,13 @@
+ 			Kff->SetValues(this->row_fsize,this->row_fglobaldoflist,this->row_fsize,this->row_fglobaldoflist,localvalues,ADD_VAL);
+ 
+ 			/*Free ressources:*/
+-			xDelete<double>(localvalues);
++			xDelete<IssmDouble>(localvalues);
+ 		}
+ 
+ 
+ 		if((this->row_ssize!=0) && (this->row_fsize!=0)){
+ 			/*first, retrieve values that are in the f and s-set from the g-set values matrix: */
+-			localvalues=xNew<double>(this->row_fsize*this->row_ssize);
++			localvalues=xNew<IssmDouble>(this->row_fsize*this->row_ssize);
+ 			for(i=0;i<this->row_fsize;i++){
+ 				for(j=0;j<this->row_ssize;j++){
+ 					*(localvalues+this->row_ssize*i+j)=*(this->values+this->ncols*this->row_flocaldoflist[i]+this->row_slocaldoflist[j]);
+@@ -290,7 +290,7 @@
+ 			Kfs->SetValues(this->row_fsize,this->row_fglobaldoflist,this->row_ssize,this->row_sglobaldoflist,localvalues,ADD_VAL);
+ 
+ 			/*Free ressources:*/
+-			xDelete<double>(localvalues);
++			xDelete<IssmDouble>(localvalues);
+ 		}
+ 	}
+ 	else{
+@@ -303,7 +303,7 @@
+ void ElementMatrix::AddToGlobal(Matrix* Jff){
+ 
+ 	int i,j;
+-	double* localvalues=NULL;
++	IssmDouble* localvalues=NULL;
+ 
+ 	/*Check that Jff is not NULL*/
+ 	_assert_(Jff); 
+@@ -316,7 +316,7 @@
+ 
+ 		if(this->row_fsize){
+ 			/*first, retrieve values that are in the f-set from the g-set values matrix: */
+-			localvalues=xNew<double>(this->row_fsize*this->row_fsize);
++			localvalues=xNew<IssmDouble>(this->row_fsize*this->row_fsize);
+ 			for(i=0;i<this->row_fsize;i++){
+ 				for(j=0;j<this->row_fsize;j++){
+ 					*(localvalues+this->row_fsize*i+j)=*(this->values+this->ncols*this->row_flocaldoflist[i]+this->row_flocaldoflist[j]);
+@@ -326,7 +326,7 @@
+ 			Jff->SetValues(this->row_fsize,this->row_fglobaldoflist,this->row_fsize,this->row_fglobaldoflist,localvalues,ADD_VAL);
+ 
+ 			/*Free ressources:*/
+-			xDelete<double>(localvalues);
++			xDelete<IssmDouble>(localvalues);
+ 		}
+ 
+ 	}
+@@ -427,18 +427,18 @@
+ 	this->ncols =Ke->ncols;
+ 	this->dofsymmetrical=Ke->dofsymmetrical;
+ 
+-	this->values=xNew<double>(this->nrows*this->ncols);
+-	memcpy(this->values,Ke->values,this->nrows*this->ncols*sizeof(double));
++	this->values=xNew<IssmDouble>(this->nrows*this->ncols);
++	xMemCpy<IssmDouble>(this->values,Ke->values,this->nrows*this->ncols);
+ 
+ 	this->gglobaldoflist=xNew<int>(this->nrows);
+-	memcpy(this->gglobaldoflist,Ke->gglobaldoflist,this->nrows*sizeof(int));
++	xMemCpy<int>(this->gglobaldoflist,Ke->gglobaldoflist,this->nrows);
+ 
+ 	this->row_fsize=Ke->row_fsize;
+ 	if(this->row_fsize){
+ 		this->row_flocaldoflist=xNew<int>(this->row_fsize);
+-		memcpy(this->row_flocaldoflist,Ke->row_flocaldoflist,this->row_fsize*sizeof(int));
++		xMemCpy<int>(this->row_flocaldoflist,Ke->row_flocaldoflist,this->row_fsize);
+ 		this->row_fglobaldoflist=xNew<int>(this->row_fsize);
+-		memcpy(this->row_fglobaldoflist,Ke->row_fglobaldoflist,this->row_fsize*sizeof(int));
++		xMemCpy<int>(this->row_fglobaldoflist,Ke->row_fglobaldoflist,this->row_fsize);
+ 	}
+ 	else{
+ 		this->row_flocaldoflist=NULL;
+@@ -448,9 +448,9 @@
+ 	this->row_ssize=Ke->row_ssize;
+ 	if(this->row_ssize){
+ 		this->row_slocaldoflist=xNew<int>(this->row_ssize);
+-		memcpy(this->row_slocaldoflist,Ke->row_slocaldoflist,this->row_ssize*sizeof(int));
++		xMemCpy<int>(this->row_slocaldoflist,Ke->row_slocaldoflist,this->row_ssize);
+ 		this->row_sglobaldoflist=xNew<int>(this->row_ssize);
+-		memcpy(this->row_sglobaldoflist,Ke->row_sglobaldoflist,this->row_ssize*sizeof(int));
++		xMemCpy<int>(this->row_sglobaldoflist,Ke->row_sglobaldoflist,this->row_ssize);
+ 	}
+ 	else{
+ 		this->row_slocaldoflist=NULL;
+@@ -460,9 +460,9 @@
+ 	this->col_fsize=Ke->col_fsize;
+ 	if(this->col_fsize){
+ 		this->col_flocaldoflist=xNew<int>(this->col_fsize);
+-		memcpy(this->col_flocaldoflist,Ke->col_flocaldoflist,this->col_fsize*sizeof(int));
++		xMemCpy<int>(this->col_flocaldoflist,Ke->col_flocaldoflist,this->col_fsize);
+ 		this->col_fglobaldoflist=xNew<int>(this->col_fsize);
+-		memcpy(this->col_fglobaldoflist,Ke->col_fglobaldoflist,this->col_fsize*sizeof(int));
++		xMemCpy<int>(this->col_fglobaldoflist,Ke->col_fglobaldoflist,this->col_fsize);
+ 	}
+ 	else{
+ 		this->col_flocaldoflist=NULL;
+@@ -472,9 +472,9 @@
+ 	this->col_ssize=Ke->col_ssize;
+ 	if(this->col_ssize){
+ 		this->col_slocaldoflist=xNew<int>(this->col_ssize);
+-		memcpy(this->col_slocaldoflist,Ke->col_slocaldoflist,this->col_ssize*sizeof(int));
++		xMemCpy<int>(this->col_slocaldoflist,Ke->col_slocaldoflist,this->col_ssize);
+ 		this->col_sglobaldoflist=xNew<int>(this->col_ssize);
+-		memcpy(this->col_sglobaldoflist,Ke->col_sglobaldoflist,this->col_ssize*sizeof(int));
++		xMemCpy<int>(this->col_sglobaldoflist,Ke->col_sglobaldoflist,this->col_ssize);
+ 	}
+ 	else{
+ 		this->col_slocaldoflist=NULL;
+@@ -483,7 +483,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION ElementMatrix::SetDiag{{{*/
+-void ElementMatrix::SetDiag(double scalar){
++void ElementMatrix::SetDiag(IssmDouble scalar){
+ 
+ 	int i;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.h	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.h	(revision 12472)
+@@ -21,7 +21,7 @@
+ 	public:
+ 	
+ 		int      nrows;
+-		double*  values;
++		IssmDouble*  values;
+ 		
+ 		//gset
+ 		int*     gglobaldoflist;
+@@ -44,7 +44,7 @@
+ 		void Echo(void);
+ 		void CheckConsistency(void);
+ 		void Init(ElementVector* pe);
+-		void SetValue(double scalar);
++		void SetValue(IssmDouble scalar);
+ 		/*}}}*/
+ };
+ #endif //#ifndef _ELEMENT_VECTOR_H_
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.cpp	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.cpp	(revision 12472)
+@@ -43,12 +43,12 @@
+ 	this->vector=new SeqVec(pM,fromlocalsize);
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	this->avector=xNew<adouble>(pM);
++	this->avector=xNew<IssmDouble>(pM);
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Vector::Vector(double* serial_vec,int M){{{*/
+-Vector::Vector(double* serial_vec,int M){
++/*FUNCTION Vector::Vector(IssmDouble* serial_vec,int M){{{*/
++Vector::Vector(IssmDouble* serial_vec,int M){
+ 
+ 	#ifdef _HAVE_PETSC_
+ 		int* idxm=xNew<int>(M);
+@@ -64,7 +64,7 @@
+ 		this->vector=new SeqVec(serial_vec,M);
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-		this->avector=xNew<adouble>(M);
++		this->avector=xNew<IssmDouble>(M);
+ 	#endif
+ }
+ /*}}}*/
+@@ -108,7 +108,7 @@
+ 	delete this->vector;
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	xDelete<adouble>(this->avector);
++	xDelete<IssmDouble>(this->avector);
+ 	#endif
+ }
+ /*}}}*/
+@@ -145,7 +145,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vector::SetValues{{{*/
+-void Vector::SetValues(int ssize, int* list, double* values, InsMode mode){
++void Vector::SetValues(int ssize, int* list, IssmDouble* values, InsMode mode){
+ 		
+ 		
+ 	#ifdef _HAVE_PETSC_
+@@ -158,7 +158,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vector::SetValue{{{*/
+-void Vector::SetValue(int dof, double value, InsMode mode){
++void Vector::SetValue(int dof, IssmDouble value, InsMode mode){
+ 		
+ 	#ifdef _HAVE_PETSC_
+ 		_assert_(this->vector);
+@@ -170,7 +170,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vector::GetValue{{{*/
+-void Vector::GetValue(double* pvalue,int dof){
++void Vector::GetValue(IssmDouble* pvalue,int dof){
+ 		
+ 	#ifdef _HAVE_PETSC_
+ 		_assert_(this->vector);
+@@ -237,7 +237,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vector::Set{{{*/
+-void Vector::Set(double value){
++void Vector::Set(IssmDouble value){
+ 	
+ 	#ifdef _HAVE_PETSC_
+ 		_assert_(this->vector);
+@@ -249,7 +249,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vector::AXPY{{{*/
+-void Vector::AXPY(Vector* X, double a){
++void Vector::AXPY(Vector* X, IssmDouble a){
+ 	
+ 	#ifdef _HAVE_PETSC_
+ 		_assert_(this->vector);
+@@ -260,7 +260,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vector::AYPX{{{*/
+-void Vector::AYPX(Vector* X, double a){
++void Vector::AYPX(Vector* X, IssmDouble a){
+ 	
+ 	#ifdef _HAVE_PETSC_
+ 		_assert_(this->vector);
+@@ -272,9 +272,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vector::ToMPISerial{{{*/
+-double* Vector::ToMPISerial(void){
++IssmDouble* Vector::ToMPISerial(void){
+ 
+-	double* vec_serial=NULL;
++	IssmDouble* vec_serial=NULL;
+ 
+ 	#ifdef _HAVE_PETSC_
+ 		VecToMPISerial(&vec_serial, this->vector);
+@@ -298,9 +298,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vector::Norm{{{*/
+-double Vector::Norm(NormMode norm_type){
++IssmDouble Vector::Norm(NormMode norm_type){
+ 	
+-	double norm=0;
++	IssmDouble norm=0;
+ 	#ifdef _HAVE_PETSC_
+ 		_assert_(this->vector);
+ 		VecNorm(this->vector,ISSMToPetscNormMode(norm_type),&norm);
+@@ -311,7 +311,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vector::Scale{{{*/
+-void Vector::Scale(double scale_factor){
++void Vector::Scale(IssmDouble scale_factor){
+ 	
+ 	#ifdef _HAVE_PETSC_
+ 		_assert_(this->vector);
+@@ -322,9 +322,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vector::Dot{{{*/
+-double Vector::Dot(Vector* vector){
++IssmDouble Vector::Dot(Vector* vector){
+ 
+-	double dot;
++	IssmDouble dot;
+ 	#ifdef _HAVE_PETSC_
+ 		_assert_(this->vector);
+ 		VecDot(this->vector,vector->vector,&dot);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.h	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.h	(revision 12472)
+@@ -23,7 +23,7 @@
+ 		int      nrows;
+ 		int      ncols;
+ 		bool     dofsymmetrical;
+-		double*  values;
++		IssmDouble*  values;
+ 
+ 		//gset
+ 		int*     gglobaldoflist;
+@@ -63,7 +63,7 @@
+ 		void CheckConsistency(void);
+ 		void Transpose(void);
+ 		void Init(ElementMatrix* Ke);
+-		void SetDiag(double scalar);
++		void SetDiag(IssmDouble scalar);
+ 		/*}}}*/
+ };
+ #endif //#ifndef _ELEMENT_MATRIX_H_
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12472)
+@@ -44,12 +44,12 @@
+ 	this->matrix=new SeqMat(M,N);
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	this->amatrix=xNew<adouble>(M*N);
++	this->amatrix=xNew<IssmDouble>(M*N);
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::Matrix(int M,int N,double sparsity){{{*/
+-Matrix::Matrix(int M,int N,double sparsity){
++/*FUNCTION Matrix::Matrix(int M,int N,IssmDouble sparsity){{{*/
++Matrix::Matrix(int M,int N,IssmDouble sparsity){
+ 
+ 	#ifdef _HAVE_PETSC_
+ 	this->matrix=NewMat(M,N,sparsity);
+@@ -57,12 +57,12 @@
+ 	this->matrix=new SeqMat(M,N,sparsity);
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	this->amatrix=xNew<adouble>;
++	this->amatrix=xNew<IssmDouble>;
+ 	#endif
+ }
+ /*}}}*/
+-/*FUNCTION Matrix::Matrix(double* serial_mat, int M,int N,double sparsity){{{*/
+-Matrix::Matrix(double* serial_mat, int M,int N,double sparsity){
++/*FUNCTION Matrix::Matrix(IssmDouble* serial_mat, int M,int N,IssmDouble sparsity){{{*/
++Matrix::Matrix(IssmDouble* serial_mat, int M,int N,IssmDouble sparsity){
+ 
+ 	#ifdef _HAVE_PETSC_
+ 	int     i;
+@@ -84,7 +84,7 @@
+ 	this->matrix=new SeqMat(serial_mat,M,N,sparsity);
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	this->amatrix=xNew<adouble>(M*N);
++	this->amatrix=xNew<IssmDouble>(M*N);
+ 	#endif
+ }
+ /*}}}*/
+@@ -97,7 +97,7 @@
+ 	this->matrix=new SeqMat(M,N,connectivity,numberofdofspernode);
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	this->amatrix=xNew<adouble>(M*N);
++	this->amatrix=xNew<IssmDouble>(M*N);
+ 	#endif
+ }
+ /*}}}*/
+@@ -110,7 +110,7 @@
+ 	delete this->matrix;
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	xDelete<adouble>(this->amatrix);
++	xDelete<IssmDouble>(this->amatrix);
+ 	#endif
+ }
+ /*}}}*/
+@@ -155,9 +155,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matrix::Norm{{{*/
+-double Matrix::Norm(NormMode norm_type){
++IssmDouble Matrix::Norm(NormMode norm_type){
+ 	
+-	double norm=0;
++	IssmDouble norm=0;
+ 	#ifdef _HAVE_PETSC_
+ 		_assert_(this->matrix);
+ 		MatNorm(this->matrix,ISSMToPetscNormMode(norm_type),&norm);
+@@ -219,9 +219,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matrix::ToSerial{{{*/
+-double* Matrix::ToSerial(void){
++IssmDouble* Matrix::ToSerial(void){
+ 
+-	double* output=NULL;
++	IssmDouble* output=NULL;
+ 
+ 	#ifdef _HAVE_PETSC_
+ 		MatToSerial(&output,this->matrix);
+@@ -232,7 +232,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Matrix::SetValues{{{*/
+-void Matrix::SetValues(int m,int* idxm,int n,int* idxn,double* values,InsMode mode){
++void Matrix::SetValues(int m,int* idxm,int n,int* idxn,IssmDouble* values,InsMode mode){
+ 
+ 	#ifdef _HAVE_PETSC_
+ 		MatSetValues(this->matrix,m,idxm,n,idxn,values,ISSMToPetscInsertMode(mode));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.h	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.h	(revision 12472)
+@@ -32,13 +32,13 @@
+ 			SeqVec* vector;
+ 		#endif
+ 		#ifdef _HAVE_ADOLC_
+-			adouble* avector;
++			IssmDouble* avector;
+ 		#endif
+ 
+ 		/*Vector constructors, destructors {{{*/
+ 		Vector();
+ 		Vector(int M,bool fromlocalsize=false);
+-		Vector(double* serial_vec,int pM);
++		Vector(IssmDouble* serial_vec,int pM);
+ 		#ifdef _HAVE_PETSC_
+ 		Vector(Vec petsc_vec);
+ 		#endif
+@@ -49,23 +49,23 @@
+ 		/*}}}*/
+ 		/*Vector specific routines {{{*/
+ 		void Echo(void);
+-		void    AXPY(Vector *X, double a);
+-		void    AYPX(Vector *X, double a);
++		void    AXPY(Vector *X, IssmDouble a);
++		void    AYPX(Vector *X, IssmDouble a);
+ 		void    Assemble(void);
+ 		void    Copy(Vector *to);
+-		double  Dot(Vector *vector);
++		IssmDouble  Dot(Vector *vector);
+ 		Vector *Duplicate(void);
+-		void    GetValue(double *pvalue, int dof);
++		void    GetValue(IssmDouble *pvalue, int dof);
+ 		void    GetSize(int *pM);
+ 		void    GetLocalSize(int *pM);
+ 		bool    IsEmpty(void);
+-		double  Norm(NormMode norm_type);
++		IssmDouble  Norm(NormMode norm_type);
+ 		void    PointwiseDivide(Vector  *x,Vector*y);
+-		void    Scale(double scale_factor);
+-		void    Set(double value);
+-		void    SetValues(int ssize, int *list, double*values, InsMode mode);
+-		void    SetValue(int dof, double value, InsMode mode);
+-		double *ToMPISerial(void);
++		void    Scale(IssmDouble scale_factor);
++		void    Set(IssmDouble value);
++		void    SetValues(int ssize, int *list, IssmDouble*values, InsMode mode);
++		void    SetValue(int dof, IssmDouble value, InsMode mode);
++		IssmDouble *ToMPISerial(void);
+ 		/*}}}*/
+ };
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.h	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.h	(revision 12472)
+@@ -34,27 +34,27 @@
+ 		SeqMat* matrix; 
+ 		#endif
+ 		#ifdef _HAVE_ADOLC_
+-		adouble* amatrix;
++		IssmDouble* amatrix;
+ 		#endif
+ 
+ 		/*Matrix constructors, destructors {{{*/
+ 		Matrix();
+ 		Matrix(int M,int N);
+-		Matrix(int M,int N,double sparsity);
+-		Matrix(double* serial_mat,int M,int N,double sparsity);
++		Matrix(int M,int N,IssmDouble sparsity);
++		Matrix(IssmDouble* serial_mat,int M,int N,IssmDouble sparsity);
+ 		Matrix(int M,int N,int connectivity,int numberofdofspernode);
+ 		~Matrix();
+ 		/*}}}*/
+ 		/*Matrix specific routines {{{*/
+ 		void Echo(void);
+ 		void Assemble(void);
+-		double Norm(NormMode norm_type);
++		IssmDouble Norm(NormMode norm_type);
+ 		void GetSize(int* pM,int* pN);
+ 		void GetLocalSize(int* pM,int* pN);
+ 		void MatMult(Vector* X,Vector* AX);
+ 		Matrix* Duplicate(void);
+-		double* ToSerial(void);
+-		void SetValues(int m,int* idxm,int n,int* idxn,double* values,InsMode mode);
++		IssmDouble* ToSerial(void);
++		void SetValues(int m,int* idxm,int n,int* idxn,IssmDouble* values,InsMode mode);
+ 		void Convert(MatrixType type);
+ 		/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12472)
+@@ -74,7 +74,7 @@
+ 
+ 	/*Gset and values*/
+ 	this->gglobaldoflist=xNew<int>(this->nrows);
+-	this->values=xNewZeroInit<double>(this->nrows);
++	this->values=xNewZeroInit<IssmDouble>(this->nrows);
+ 	for(i=0;i<pe1->nrows;i++){
+ 		this->values[i] += pe1->values[i];
+ 		this->gglobaldoflist[i]=pe1->gglobaldoflist[i];
+@@ -137,7 +137,7 @@
+ 	this->nrows=GetNumberOfDofs(nodes,numnodes,GsetEnum,approximation);
+ 
+ 	/*fill values with 0: */
+-	this->values=xNewZeroInit<double>(this->nrows);
++	this->values=xNewZeroInit<IssmDouble>(this->nrows);
+ 	
+ 	/*g list*/
+ 	this->gglobaldoflist=GetGlobalDofList(nodes,numnodes,GsetEnum,approximation);
+@@ -151,7 +151,7 @@
+ /*FUNCTION ElementVector::~ElementVector(){{{*/
+ ElementVector::~ElementVector(){
+ 	
+-	xDelete<double>(this->values);
++	xDelete<IssmDouble>(this->values);
+ 	xDelete<int>(this->gglobaldoflist);
+ 	xDelete<int>(this->flocaldoflist);
+ 	xDelete<int>(this->fglobaldoflist);
+@@ -163,14 +163,14 @@
+ void ElementVector::AddToGlobal(Vector* pf){
+ 
+ 	int i;
+-	double* localvalues=NULL;
++	IssmDouble* 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=xNew<double>(this->fsize);
++		localvalues=xNew<IssmDouble>(this->fsize);
+ 		for(i=0;i<this->fsize;i++){
+ 			localvalues[i]=this->values[this->flocaldoflist[i]];
+ 		}
+@@ -178,7 +178,7 @@
+ 		pf->SetValues(this->fsize,this->fglobaldoflist,localvalues,ADD_VAL);
+ 
+ 		/*Free ressources:*/
+-		xDelete<double>(localvalues);
++		xDelete<IssmDouble>(localvalues);
+ 	}
+ 	
+ }
+@@ -187,11 +187,11 @@
+ void ElementVector::InsertIntoGlobal(Vector* pf){
+ 
+ 	int i;
+-	double* localvalues=NULL;
++	IssmDouble* localvalues=NULL;
+ 
+ 	if(this->fsize){
+ 		/*first, retrieve values that are in the f-set from the g-set values vector: */
+-		localvalues=xNew<double>(this->fsize);
++		localvalues=xNew<IssmDouble>(this->fsize);
+ 		for(i=0;i<this->fsize;i++){
+ 			localvalues[i]=this->values[this->flocaldoflist[i]];
+ 		}
+@@ -199,7 +199,7 @@
+ 		pf->SetValues(this->fsize,this->fglobaldoflist,localvalues,INS_VAL);
+ 
+ 		/*Free ressources:*/
+-		xDelete<double>(localvalues);
++		xDelete<IssmDouble>(localvalues);
+ 	}
+ 
+ }
+@@ -244,18 +244,18 @@
+ 
+ 	this->nrows =pe->nrows;
+ 
+-	this->values=xNew<double>(this->nrows);
+-	memcpy(this->values,pe->values,this->nrows*sizeof(double));
++	this->values=xNew<IssmDouble>(this->nrows);
++	xMemCpy<IssmDouble>(this->values,pe->values,this->nrows);
+ 
+ 	this->gglobaldoflist=xNew<int>(this->nrows);
+-	memcpy(this->gglobaldoflist,pe->gglobaldoflist,this->nrows*sizeof(int));
++	xMemCpy<int>(this->gglobaldoflist,pe->gglobaldoflist,this->nrows);
+ 
+ 	this->fsize=pe->fsize;
+ 	if(this->fsize){
+ 		this->flocaldoflist=xNew<int>(this->fsize);
+-		memcpy(this->flocaldoflist,pe->flocaldoflist,this->fsize*sizeof(int));
++		xMemCpy<int>(this->flocaldoflist,pe->flocaldoflist,this->fsize);
+ 		this->fglobaldoflist=xNew<int>(this->fsize);
+-		memcpy(this->fglobaldoflist,pe->fglobaldoflist,this->fsize*sizeof(int));
++		xMemCpy<int>(this->fglobaldoflist,pe->fglobaldoflist,this->fsize);
+ 	}
+ 	else{
+ 		this->flocaldoflist=NULL;
+@@ -264,7 +264,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION ElementVector::SetValue{{{*/
+-void ElementVector::SetValue(double scalar){
++void ElementVector::SetValue(IssmDouble scalar){
+ 
+ 	int i;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.h	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.h	(revision 12472)
+@@ -52,17 +52,17 @@
+ 		Object* copy();
+ 		/*}}}*/
+ 		/*Update virtual functions definitions: {{{*/
+-		void  InputUpdateFromVector(double* vector, int name, int type);
++		void  InputUpdateFromVector(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+ 		void  InputUpdateFromVector(bool* vector, int name, int type);
+-		void  InputUpdateFromMatrixDakota(double* matrix,int ncols,int nrows, int name, int type);
+-		void  InputUpdateFromVectorDakota(double* vector, int name, int type);
++		void  InputUpdateFromMatrixDakota(IssmDouble* matrix,int ncols,int nrows, int name, int type);
++		void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVectorDakota(int* vector, int name, int type);
+ 		void  InputUpdateFromVectorDakota(bool* vector, int name, int type);
+-		void  InputUpdateFromConstant(double constant, int name);
++		void  InputUpdateFromConstant(IssmDouble constant, int name);
+ 		void  InputUpdateFromConstant(int constant, int name);
+ 		void  InputUpdateFromConstant(bool constant, int name);
+-		void  InputUpdateFromSolution(double* solution);
++		void  InputUpdateFromSolution(IssmDouble* solution);
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
+ 		/*}}}*/
+ 		/*Load virtual functions definitions: {{{*/
+@@ -71,15 +71,15 @@
+ 		void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
+ 		void  CreatePVector(Vector* pf);
+ 		void  CreateJacobianMatrix(Matrix* Jff);
+-		void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, double kmax);
+-		void  PenaltyCreatePVector(Vector*  pf, double kmax);
+-		void  PenaltyCreateJacobianMatrix(Matrix* Jff,double kmax);
++		void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, IssmDouble kmax);
++		void  PenaltyCreatePVector(Vector*  pf, IssmDouble kmax);
++		void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax);
+ 		bool  InAnalysis(int analysis_type);
+ 		/*}}}*/
+ 		/*Load management: {{{*/
+ 		void GetDofList(int** pdoflist,int approximation_enum,int setenum);
+-		void GetSegmentNormal(double* normal,double xyz_list[2][3]);
+-		void GetQuadNormal(double* normal,double xyz_list[4][3]);
++		void GetSegmentNormal(IssmDouble* normal,IssmDouble xyz_list[2][3]);
++		void GetQuadNormal(IssmDouble* normal,IssmDouble xyz_list[4][3]);
+ 		#ifdef _HAVE_CONTROL_
+ 		ElementVector* CreatePVectorAdjointHoriz(void);
+ 		#endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12472)
+@@ -59,7 +59,7 @@
+ 	numericalflux_mparid=numberofelements+1; //matlab indexing
+ 
+ 	/*First, see wether this is an internal or boundary edge (if e2=NaN)*/
+-	if (isnan((double)iomodel->Data(MeshEdgesEnum)[4*i+3])){ //edges are [node1 node2 elem1 elem2]
++	if (isnan((IssmDouble)iomodel->Data(MeshEdgesEnum)[4*i+3])){ //edges are [node1 node2 elem1 elem2]
+ 		/* Boundary edge, only one element */
+ 		e1=(int)iomodel->Data(MeshEdgesEnum)[4*i+2];
+ 		e2=(int)UNDEF;
+@@ -311,7 +311,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Numericalflux::PenaltyCreateKMatrix {{{*/
+-void  Numericalflux::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs,double kmax){
++void  Numericalflux::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs,IssmDouble kmax){
+ 
+ 	/*No stiffness loads applied, do nothing: */
+ 	return;
+@@ -319,7 +319,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Numericalflux::PenaltyCreatePVector{{{*/
+-void  Numericalflux::PenaltyCreatePVector(Vector* pf,double kmax){
++void  Numericalflux::PenaltyCreatePVector(Vector* pf,IssmDouble kmax){
+ 
+ 	/*No penalty loads applied, do nothing: */
+ 	return;
+@@ -358,13 +358,13 @@
+ 
+ 	/* Intermediaries*/
+ 	int        i,j,ig,index1,index2;
+-	double     DL1,DL2,Jdet,dt,vx,vy,UdotN;
+-	double     xyz_list[NUMVERTICES_INTERNAL][3];
+-	double     normal[2];
+-	double     B[numdof];
+-	double     Bprime[numdof];
+-	double     Ke_g1[numdof][numdof];
+-	double     Ke_g2[numdof][numdof];
++	IssmDouble     DL1,DL2,Jdet,dt,vx,vy,UdotN;
++	IssmDouble     xyz_list[NUMVERTICES_INTERNAL][3];
++	IssmDouble     normal[2];
++	IssmDouble     B[numdof];
++	IssmDouble     Bprime[numdof];
++	IssmDouble     Ke_g1[numdof][numdof];
++	IssmDouble     Ke_g2[numdof][numdof];
+ 	GaussTria *gauss;
+ 
+ 	/*Initialize Element matrix and return if necessary*/
+@@ -423,11 +423,11 @@
+ 
+ 	/* Intermediaries*/
+ 	int        i,j,ig,index1,index2;
+-	double     DL,Jdet,dt,vx,vy,mean_vx,mean_vy,UdotN;
+-	double     xyz_list[NUMVERTICES_BOUNDARY][3];
+-	double     normal[2];
+-	double     L[numdof];
+-	double     Ke_g[numdof][numdof];
++	IssmDouble     DL,Jdet,dt,vx,vy,mean_vx,mean_vy,UdotN;
++	IssmDouble     xyz_list[NUMVERTICES_BOUNDARY][3];
++	IssmDouble     normal[2];
++	IssmDouble     L[numdof];
++	IssmDouble     Ke_g[numdof][numdof];
+ 	GaussTria *gauss;
+ 
+ 	/*Initialize Element matrix and return if necessary*/
+@@ -511,13 +511,13 @@
+ 
+ 	/* Intermediaries*/
+ 	int        i,j,ig,index1,index2;
+-	double     DL1,DL2,Jdet,vx,vy,UdotN;
+-	double     xyz_list[NUMVERTICES_INTERNAL][3];
+-	double     normal[2];
+-	double     B[numdof];
+-	double     Bprime[numdof];
+-	double     Ke_g1[numdof][numdof];
+-	double     Ke_g2[numdof][numdof];
++	IssmDouble     DL1,DL2,Jdet,vx,vy,UdotN;
++	IssmDouble     xyz_list[NUMVERTICES_INTERNAL][3];
++	IssmDouble     normal[2];
++	IssmDouble     B[numdof];
++	IssmDouble     Bprime[numdof];
++	IssmDouble     Ke_g1[numdof][numdof];
++	IssmDouble     Ke_g2[numdof][numdof];
+ 	GaussTria *gauss;
+ 
+ 	/*Initialize Element matrix and return if necessary*/
+@@ -575,11 +575,11 @@
+ 
+ 	/* Intermediaries*/
+ 	int        i,j,ig,index1,index2;
+-	double     DL,Jdet,vx,vy,mean_vx,mean_vy,UdotN;
+-	double     xyz_list[NUMVERTICES_BOUNDARY][3];
+-	double     normal[2];
+-	double     L[numdof];
+-	double     Ke_g[numdof][numdof];
++	IssmDouble     DL,Jdet,vx,vy,mean_vx,mean_vy,UdotN;
++	IssmDouble     xyz_list[NUMVERTICES_BOUNDARY][3];
++	IssmDouble     normal[2];
++	IssmDouble     L[numdof];
++	IssmDouble     Ke_g[numdof][numdof];
+ 	GaussTria *gauss;
+ 
+ 	/*Initialize Element matrix and return if necessary*/
+@@ -702,10 +702,10 @@
+ 
+ 	/* Intermediaries*/
+ 	int        i,j,ig,index1,index2;
+-	double     DL,Jdet,dt,vx,vy,mean_vx,mean_vy,UdotN,thickness;
+-	double     xyz_list[NUMVERTICES_BOUNDARY][3];
+-	double     normal[2];
+-	double     L[numdof];
++	IssmDouble     DL,Jdet,dt,vx,vy,mean_vx,mean_vy,UdotN,thickness;
++	IssmDouble     xyz_list[NUMVERTICES_BOUNDARY][3];
++	IssmDouble     normal[2];
++	IssmDouble     L[numdof];
+ 	GaussTria *gauss;
+ 
+ 	/*Initialize Load Vector and return if necessary*/
+@@ -796,10 +796,10 @@
+ 
+ 	/* Intermediaries*/
+ 	int        i,j,ig,index1,index2;
+-	double     DL,Jdet,vx,vy,mean_vx,mean_vy,UdotN,thickness;
+-	double     xyz_list[NUMVERTICES_BOUNDARY][3];
+-	double     normal[2];
+-	double     L[numdof];
++	IssmDouble     DL,Jdet,vx,vy,mean_vx,mean_vy,UdotN,thickness;
++	IssmDouble     xyz_list[NUMVERTICES_BOUNDARY][3];
++	IssmDouble     normal[2];
++	IssmDouble     L[numdof];
+ 	GaussTria *gauss;
+ 
+ 	/*Initialize Load Vector and return if necessary*/
+@@ -863,11 +863,11 @@
+ }
+ /*}}}*/
+ /*FUNCTION Numericalflux::GetNormal {{{*/
+-void Numericalflux:: GetNormal(double* normal,double xyz_list[4][3]){
++void Numericalflux:: GetNormal(IssmDouble* normal,IssmDouble xyz_list[4][3]){
+ 
+ 	/*Build unit outward pointing vector*/
+-	double vector[2];
+-	double norm;
++	IssmDouble vector[2];
++	IssmDouble norm;
+ 
+ 	vector[0]=xyz_list[1][0] - xyz_list[0][0];
+ 	vector[1]=xyz_list[1][1] - xyz_list[0][1];
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.cpp	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.cpp	(revision 12472)
+@@ -156,7 +156,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penpair::PenaltyCreateKMatrix {{{*/
+-void  Penpair::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs,double kmax){
++void  Penpair::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs,IssmDouble kmax){
+ 
+ 	/*Retrieve parameters: */
+ 	ElementMatrix* Ke=NULL;
+@@ -182,13 +182,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penpair::PenaltyCreatePVector {{{*/
+-void  Penpair::PenaltyCreatePVector(Vector* pf,double kmax){
++void  Penpair::PenaltyCreatePVector(Vector* pf,IssmDouble kmax){
+ 	/*No loads applied, do nothing: */
+ 	return;
+ }
+ /*}}}*/
+ /*FUNCTION Penpair::PenaltyCreateJacobianMatrix{{{*/
+-void  Penpair::PenaltyCreateJacobianMatrix(Matrix* Jff,double kmax){
++void  Penpair::PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){
+ 	this->PenaltyCreateKMatrix(Jff,NULL,kmax);
+ }
+ /*}}}*/
+@@ -200,8 +200,8 @@
+ /*}}}*/
+ 
+ /*Update virtual functions definitions:*/
+-/*FUNCTION Penpair::InputUpdateFromConstant(double constant, int name) {{{*/
+-void  Penpair::InputUpdateFromConstant(double constant, int name){
++/*FUNCTION Penpair::InputUpdateFromConstant(IssmDouble constant, int name) {{{*/
++void  Penpair::InputUpdateFromConstant(IssmDouble constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -215,8 +215,8 @@
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Penpair::InputUpdateFromVector(double* vector, int name, int type) {{{*/
+-void  Penpair::InputUpdateFromVector(double* vector, int name, int type){
++/*FUNCTION Penpair::InputUpdateFromVector(IssmDouble* vector, int name, int type) {{{*/
++void  Penpair::InputUpdateFromVector(IssmDouble* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -233,7 +233,7 @@
+ 
+ /*Penpair management:*/
+ /*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticHoriz{{{*/
+-ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticHoriz(double kmax){
++ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticHoriz(IssmDouble kmax){
+ 
+ 	int    approximation0=nodes[0]->GetApproximation();
+ 	int    approximation1=nodes[1]->GetApproximation();
+@@ -268,10 +268,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticMacAyealPattyn {{{*/
+-ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticMacAyealPattyn(double kmax){
++ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticMacAyealPattyn(IssmDouble kmax){
+ 	
+ 	const int numdof=NUMVERTICES*NDOF2;
+-	double penalty_offset;
++	IssmDouble penalty_offset;
+ 
+ 	/*Initialize Element vector and return if necessary*/
+ 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters);
+@@ -280,25 +280,25 @@
+ 	parameters->FindParam(&penalty_offset,DiagnosticPenaltyFactorEnum);
+ 
+ 	//Create elementary matrix: add penalty to 
+-	Ke->values[0*numdof+0]=+kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[0*numdof+2]=-kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[2*numdof+0]=-kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[2*numdof+2]=+kmax*pow((double)10.0,penalty_offset);
++	Ke->values[0*numdof+0]=+kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[0*numdof+2]=-kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[2*numdof+0]=-kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[2*numdof+2]=+kmax*pow((IssmDouble)10.0,penalty_offset);
+ 
+-	Ke->values[1*numdof+1]=+kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[1*numdof+3]=-kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[3*numdof+1]=-kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[3*numdof+3]=+kmax*pow((double)10.0,penalty_offset);
++	Ke->values[1*numdof+1]=+kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[1*numdof+3]=-kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[3*numdof+1]=-kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[3*numdof+3]=+kmax*pow((IssmDouble)10.0,penalty_offset);
+ 
+ 	/*Clean up and return*/
+ 	return Ke;
+ }
+ /*}}}*/
+ /*FUNCTION Penpair::PenaltyCreateKMatrixDiagnosticStokes {{{*/
+-ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticStokes(double kmax){
++ElementMatrix* Penpair::PenaltyCreateKMatrixDiagnosticStokes(IssmDouble kmax){
+ 	
+ 	const int numdof=NUMVERTICES*NDOF4;
+-	double penalty_offset;
++	IssmDouble penalty_offset;
+ 
+ 	/*Initialize Element vector and return if necessary*/
+ 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters);
+@@ -307,35 +307,35 @@
+ 	parameters->FindParam(&penalty_offset,DiagnosticPenaltyFactorEnum);
+ 
+ 	//Create elementary matrix: add penalty to 
+-	Ke->values[0*numdof+0]=+kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[0*numdof+4]=-kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[4*numdof+0]=-kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[4*numdof+4]=+kmax*pow((double)10.0,penalty_offset);
++	Ke->values[0*numdof+0]=+kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[0*numdof+4]=-kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[4*numdof+0]=-kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[4*numdof+4]=+kmax*pow((IssmDouble)10.0,penalty_offset);
+ 
+-	Ke->values[1*numdof+1]=+kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[1*numdof+5]=-kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[5*numdof+1]=-kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[5*numdof+5]=+kmax*pow((double)10.0,penalty_offset);
++	Ke->values[1*numdof+1]=+kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[1*numdof+5]=-kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[5*numdof+1]=-kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[5*numdof+5]=+kmax*pow((IssmDouble)10.0,penalty_offset);
+ 	
+-	Ke->values[2*numdof+2]=+kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[2*numdof+6]=-kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[6*numdof+2]=-kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[6*numdof+6]=+kmax*pow((double)10.0,penalty_offset);
++	Ke->values[2*numdof+2]=+kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[2*numdof+6]=-kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[6*numdof+2]=-kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[6*numdof+6]=+kmax*pow((IssmDouble)10.0,penalty_offset);
+ 
+-	Ke->values[3*numdof+3]=+kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[3*numdof+7]=-kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[7*numdof+3]=-kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[7*numdof+7]=+kmax*pow((double)10.0,penalty_offset);
++	Ke->values[3*numdof+3]=+kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[3*numdof+7]=-kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[7*numdof+3]=-kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[7*numdof+7]=+kmax*pow((IssmDouble)10.0,penalty_offset);
+ 
+ 	/*Clean up and return*/
+ 	return Ke;
+ }
+ /*}}}*/
+ /*FUNCTION Penpair::PenaltyCreateKMatrixPrognostic {{{*/
+-ElementMatrix* Penpair::PenaltyCreateKMatrixPrognostic(double kmax){
++ElementMatrix* Penpair::PenaltyCreateKMatrixPrognostic(IssmDouble kmax){
+ 
+ 	const int numdof=NUMVERTICES*NDOF1;
+-	double penalty_factor;
++	IssmDouble penalty_factor;
+ 
+ 	/*Initialize Element vector and return if necessary*/
+ 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters);
+@@ -344,10 +344,10 @@
+ 	parameters->FindParam(&penalty_factor,PrognosticPenaltyFactorEnum);
+ 
+ 	//Create elementary matrix: add penalty to 
+-	Ke->values[0*numdof+0]=+kmax*pow((double)10.0,penalty_factor);
+-	Ke->values[0*numdof+1]=-kmax*pow((double)10.0,penalty_factor);
+-	Ke->values[1*numdof+0]=-kmax*pow((double)10.0,penalty_factor);
+-	Ke->values[1*numdof+1]=+kmax*pow((double)10.0,penalty_factor);
++	Ke->values[0*numdof+0]=+kmax*pow((IssmDouble)10.0,penalty_factor);
++	Ke->values[0*numdof+1]=-kmax*pow((IssmDouble)10.0,penalty_factor);
++	Ke->values[1*numdof+0]=-kmax*pow((IssmDouble)10.0,penalty_factor);
++	Ke->values[1*numdof+1]=+kmax*pow((IssmDouble)10.0,penalty_factor);
+ 
+ 	/*Clean up and return*/
+ 	return Ke;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.h	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.h	(revision 12472)
+@@ -37,9 +37,9 @@
+ 		int      counter;
+ 		bool     prestable;
+ 		bool     material_converged;
+-		double   normal[2];
+-		double   length;
+-		double   fraction;
++		IssmDouble   normal[2];
++		IssmDouble   length;
++		IssmDouble   fraction;
+ 		int      state;
+ 		
+ 		Parameters* parameters; //pointer to solution parameters
+@@ -60,17 +60,17 @@
+ 		Object* copy();
+ 		/*}}}*/
+ 		/*Update virtual functions resolution: {{{*/
+-		void    InputUpdateFromVector(double* vector, int name, int type);
++		void    InputUpdateFromVector(IssmDouble* vector, int name, int type);
+ 		void    InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
+ 		void    InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
+-		void    InputUpdateFromMatrixDakota(double* matrix, int nrows,int ncols, int name, int type){_error_("Not implemented yet!");}
+-		void    InputUpdateFromVectorDakota(double* vector, int name, int type){_error_("Not implemented yet!");}
++		void    InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows,int ncols, int name, int type){_error_("Not implemented yet!");}
++		void    InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error_("Not implemented yet!");}
+ 		void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
+ 		void    InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}
+-		void    InputUpdateFromConstant(double constant, int name);
++		void    InputUpdateFromConstant(IssmDouble constant, int name);
+ 		void    InputUpdateFromConstant(int constant, int name){_error_("Not implemented yet!");}
+ 		void    InputUpdateFromConstant(bool constant, int name);
+-		void    InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");}
++		void    InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
+ 		/*}}}*/
+ 		/*Load virtual functions definitions: {{{*/
+@@ -79,22 +79,22 @@
+ 		void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
+ 		void  CreatePVector(Vector* pf);
+ 		void  CreateJacobianMatrix(Matrix* Jff){_error_("Not implemented yet");};
+-		void  PenaltyCreateJacobianMatrix(Matrix* Jff,double kmax){_error_("Not implemented yet");};
+-		void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, double kmax);
+-		void  PenaltyCreatePVector(Vector* pf, double kmax);
++		void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error_("Not implemented yet");};
++		void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, IssmDouble kmax);
++		void  PenaltyCreatePVector(Vector* pf, IssmDouble kmax);
+ 		bool  InAnalysis(int analysis_type);
+ 		/*}}}*/
+ 		/*Riftfront specific routines: {{{*/
+ 		bool  PreStable();
+-		ElementMatrix* PenaltyCreateKMatrixDiagnosticHoriz(double kmax);
+-		ElementVector* PenaltyCreatePVectorDiagnosticHoriz(double kmax);
++		ElementMatrix* PenaltyCreateKMatrixDiagnosticHoriz(IssmDouble kmax);
++		ElementVector* PenaltyCreatePVectorDiagnosticHoriz(IssmDouble kmax);
+ 		void  SetPreStable();
+ 		int   PreConstrain(int* punstable);
+ 		int   Constrain(int* punstable);
+ 		void  FreezeConstraints(void);
+ 		bool  IsFrozen(void);
+-		int   Penetration(double* ppenetration);
+-		int   MaxPenetration(double* ppenetration);
++		int   Penetration(IssmDouble* ppenetration);
++		int   MaxPenetration(IssmDouble* ppenetration);
+ 		int   PotentialUnstableConstraint(int* punstable);
+ 		int   IsMaterialStable(void);
+ 		bool  IsInput(int name);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.h	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.h	(revision 12472)
+@@ -48,17 +48,17 @@
+ 		Object* copy();
+ 		/*}}}*/
+ 		/*Update virtual functions resolution: {{{*/
+-		void    InputUpdateFromVector(double* vector, int name, int type){/*Do nothing*/}
++		void    InputUpdateFromVector(IssmDouble* vector, int name, int type){/*Do nothing*/}
+ 		void    InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
+ 		void    InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
+-		void    InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){/*Do nothing*/}
+-		void    InputUpdateFromVectorDakota(double* vector, int name, int type){/*Do nothing*/}
++		void    InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){/*Do nothing*/}
++		void    InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){/*Do nothing*/}
+ 		void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
+ 		void    InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}
+-		void    InputUpdateFromConstant(double constant, int name){/*Do nothing*/};
++		void    InputUpdateFromConstant(IssmDouble constant, int name){/*Do nothing*/};
+ 		void    InputUpdateFromConstant(int constant, int name){/*Do nothing*/};
+ 		void    InputUpdateFromConstant(bool constant, int name){_error_("Not implemented yet!");}
+-		void    InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");}
++		void    InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
+ 		/*}}}*/
+ 		/*Load virtual functions definitions: {{{*/
+@@ -67,13 +67,13 @@
+ 		void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
+ 		void  CreatePVector(Vector* pf);
+ 		void  CreateJacobianMatrix(Matrix* Jff){_error_("Not implemented yet");};
+-		void  PenaltyCreateJacobianMatrix(Matrix* Jff,double kmax){_error_("Not implemented yet");};
+-		void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, double kmax);
+-		void  PenaltyCreatePVector(Vector* pf, double kmax);
++		void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error_("Not implemented yet");};
++		void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, IssmDouble kmax);
++		void  PenaltyCreatePVector(Vector* pf, IssmDouble kmax);
+ 		bool  InAnalysis(int analysis_type);
+ 		/*}}}*/
+ 		/*Numericalflux management:{{{*/
+-		void  GetNormal(double* normal,double xyz_list[4][3]);
++		void  GetNormal(IssmDouble* normal,IssmDouble xyz_list[4][3]);
+ 		ElementMatrix* CreateKMatrixPrognostic(void);
+ 		ElementMatrix* CreateKMatrixPrognosticInternal(void);
+ 		ElementMatrix* CreateKMatrixPrognosticBoundary(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.h	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.h	(revision 12472)
+@@ -40,17 +40,17 @@
+ 		Object* copy();
+ 		/*}}}*/
+ 		/*Update virtual functions resolution: {{{*/
+-		void  InputUpdateFromVector(double* vector, int name, int type);
++		void  InputUpdateFromVector(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+ 		void  InputUpdateFromVector(bool* vector, int name, int type);
+-		void  InputUpdateFromMatrixDakota(double* matrix, int nrow, int ncols,int name, int type){_error_("Not implemented yet!");}
+-		void  InputUpdateFromVectorDakota(double* vector, int name, int type){_error_("Not implemented yet!");}
++		void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrow, int ncols,int name, int type){_error_("Not implemented yet!");}
++		void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error_("Not implemented yet!");}
+ 		void  InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
+ 		void  InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}
+-		void  InputUpdateFromConstant(double constant, int name);
++		void  InputUpdateFromConstant(IssmDouble constant, int name);
+ 		void  InputUpdateFromConstant(int constant, int name);
+ 		void  InputUpdateFromConstant(bool constant, int name);
+-		void  InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");}
++		void  InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
+ 		/*}}}*/
+ 			/*Load virtual functions definitions: {{{*/
+@@ -59,16 +59,16 @@
+ 		void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
+ 		void  CreatePVector(Vector* pf);
+ 		void  CreateJacobianMatrix(Matrix* Jff);
+-		void  PenaltyCreateKMatrix(Matrix* Kff,Matrix* Kfs,double kmax);
+-		void  PenaltyCreatePVector(Vector* pf, double kmax);
+-		void  PenaltyCreateJacobianMatrix(Matrix* Jff,double kmax);
++		void  PenaltyCreateKMatrix(Matrix* Kff,Matrix* Kfs,IssmDouble kmax);
++		void  PenaltyCreatePVector(Vector* pf, IssmDouble kmax);
++		void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax);
+ 		bool  InAnalysis(int analysis_type);
+ 		/*}}}*/
+ 			/*Penpair management: {{{*/
+-		ElementMatrix* PenaltyCreateKMatrixDiagnosticHoriz(double kmax);
+-		ElementMatrix* PenaltyCreateKMatrixDiagnosticMacAyealPattyn(double kmax);
+-		ElementMatrix* PenaltyCreateKMatrixDiagnosticStokes(double kmax);
+-		ElementMatrix* PenaltyCreateKMatrixPrognostic(double kmax);
++		ElementMatrix* PenaltyCreateKMatrixDiagnosticHoriz(IssmDouble kmax);
++		ElementMatrix* PenaltyCreateKMatrixDiagnosticMacAyealPattyn(IssmDouble kmax);
++		ElementMatrix* PenaltyCreateKMatrixDiagnosticStokes(IssmDouble kmax);
++		ElementMatrix* PenaltyCreateKMatrixPrognostic(IssmDouble kmax);
+ 		/*}}}*/
+ };
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Load.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Load.h	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Load.h	(revision 12472)
+@@ -31,9 +31,9 @@
+ 		virtual void  CreateKMatrix(Matrix* Kff, Matrix* Kfs)=0;
+ 		virtual void  CreatePVector(Vector* pf)=0;
+ 		virtual void  CreateJacobianMatrix(Matrix* Jff)=0;
+-		virtual void  PenaltyCreateJacobianMatrix(Matrix* Jff,double kmax)=0;
+-		virtual void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs, double kmax)=0;
+-		virtual void  PenaltyCreatePVector(Vector* pf, double kmax)=0;
++		virtual void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax)=0;
++		virtual void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs, IssmDouble kmax)=0;
++		virtual void  PenaltyCreatePVector(Vector* pf, IssmDouble kmax)=0;
+ 		virtual bool  InAnalysis(int analysis_type)=0;
+ 		/*}}}*/
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.cpp	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.cpp	(revision 12472)
+@@ -216,7 +216,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Pengrid::PenaltyCreateMatrix {{{*/
+-void  Pengrid::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs,double kmax){
++void  Pengrid::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs,IssmDouble kmax){
+ 
+ 	/*Retrieve parameters: */
+ 	ElementMatrix* Ke=NULL;
+@@ -249,7 +249,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Pengrid::PenaltyCreatePVector {{{*/
+-void  Pengrid::PenaltyCreatePVector(Vector* pf,double kmax){
++void  Pengrid::PenaltyCreatePVector(Vector* pf,IssmDouble kmax){
+ 
+ 	/*Retrieve parameters: */
+ 	ElementVector* pe=NULL;
+@@ -288,8 +288,8 @@
+ /*}}}*/
+ 
+ /*Update virtual functions definitions:*/
+-/*FUNCTION Pengrid::InputUpdateFromVector(double* vector, int name, int type) {{{*/
+-void  Pengrid::InputUpdateFromVector(double* vector, int name, int type){
++/*FUNCTION Pengrid::InputUpdateFromVector(IssmDouble* vector, int name, int type) {{{*/
++void  Pengrid::InputUpdateFromVector(IssmDouble* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -303,13 +303,13 @@
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::InputUpdateFromMatrixDakota(double* vector, int nrows, int ncols, int name, int type) {{{*/
+-void  Pengrid::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
++/*FUNCTION Pengrid::InputUpdateFromMatrixDakota(IssmDouble* vector, int nrows, int ncols, int name, int type) {{{*/
++void  Pengrid::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::InputUpdateFromVectorDakota(double* vector, int name, int type) {{{*/
+-void  Pengrid::InputUpdateFromVectorDakota(double* vector, int name, int type){
++/*FUNCTION Pengrid::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type) {{{*/
++void  Pengrid::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -323,8 +323,8 @@
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Pengrid::InputUpdateFromConstant(double constant, int name) {{{*/
+-void  Pengrid::InputUpdateFromConstant(double constant, int name){
++/*FUNCTION Pengrid::InputUpdateFromConstant(IssmDouble constant, int name) {{{*/
++void  Pengrid::InputUpdateFromConstant(IssmDouble constant, int name){
+ 	switch(name){
+ 
+ 		case MeltingOffsetEnum:
+@@ -352,7 +352,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Pengrid::InputUpdateFromSolution{{{*/
+-void  Pengrid::InputUpdateFromSolution(double* solution){
++void  Pengrid::InputUpdateFromSolution(IssmDouble* solution){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/		
+@@ -390,9 +390,9 @@
+ 
+ 	int    found=0;
+ 	const int numnodes=1;
+-	double pressure;
+-	double temperature;
+-	double t_pmp;
++	IssmDouble pressure;
++	IssmDouble temperature;
++	IssmDouble t_pmp;
+ 	int    new_active;
+ 	int    unstable=0;
+ 	int    reset_penalties=0;
+@@ -454,11 +454,11 @@
+ /*}}}*/
+ #ifdef _HAVE_DIAGNOSTIC_
+ /*FUNCTION Pengrid::PenaltyCreateKMatrixDiagnosticStokes {{{*/
+-ElementMatrix* Pengrid::PenaltyCreateKMatrixDiagnosticStokes(double kmax){
++ElementMatrix* Pengrid::PenaltyCreateKMatrixDiagnosticStokes(IssmDouble kmax){
+ 	
+ 	const int numdof = NUMVERTICES *NDOF4;
+-	double    slope[2];
+-	double    penalty_offset;
++	IssmDouble    slope[2];
++	IssmDouble    penalty_offset;
+ 	int       approximation;
+ 
+ 	Penta* penta=(Penta*)element;
+@@ -474,9 +474,9 @@
+ 	penta->GetInputValue(&slope[1],node,BedSlopeYEnum);
+ 
+ 	/*Create elementary matrix: add penalty to constrain wb (wb=ub*db/dx+vb*db/dy)*/
+-	Ke->values[2*NDOF4+0]=-slope[0]*kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[2*NDOF4+1]=-slope[1]*kmax*pow((double)10.0,penalty_offset);
+-	Ke->values[2*NDOF4+2]= kmax*pow((double)10,penalty_offset);
++	Ke->values[2*NDOF4+0]=-slope[0]*kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[2*NDOF4+1]=-slope[1]*kmax*pow((IssmDouble)10.0,penalty_offset);
++	Ke->values[2*NDOF4+2]= kmax*pow((IssmDouble)10,penalty_offset);
+ 
+ 	/*Transform Coordinate System*/
+ 	TransformStiffnessMatrixCoord(Ke,&node,NUMVERTICES,XYZPEnum);
+@@ -488,11 +488,11 @@
+ #endif
+ #ifdef _HAVE_THERMAL_
+ /*FUNCTION Pengrid::PenaltyCreateKMatrixMelting {{{*/
+-ElementMatrix* Pengrid::PenaltyCreateKMatrixMelting(double kmax){
++ElementMatrix* Pengrid::PenaltyCreateKMatrixMelting(IssmDouble kmax){
+ 
+ 	const int numdof=NUMVERTICES*NDOF1;
+-	double pressure,temperature,t_pmp;
+-	double penalty_factor;
++	IssmDouble pressure,temperature,t_pmp;
++	IssmDouble penalty_factor;
+ 
+ 	Penta* penta=(Penta*)element;
+ 
+@@ -510,7 +510,7 @@
+ 
+ 	/*Add penalty load*/
+ 	if (temperature<t_pmp){ //If T<Tpmp, there must be no melting. Therefore, melting should be  constrained to 0 when T<Tpmp, instead of using spcs, use penalties
+-		Ke->values[0]=kmax*pow((double)10,penalty_factor);
++		Ke->values[0]=kmax*pow((IssmDouble)10,penalty_factor);
+ 	}
+ 
+ 	/*Clean up and return*/
+@@ -518,10 +518,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION Pengrid::PenaltyCreateKMatrixThermal {{{*/
+-ElementMatrix* Pengrid::PenaltyCreateKMatrixThermal(double kmax){
++ElementMatrix* Pengrid::PenaltyCreateKMatrixThermal(IssmDouble kmax){
+ 
+ 	const int numdof=NUMVERTICES*NDOF1;
+-	double    penalty_factor;
++	IssmDouble    penalty_factor;
+ 
+ 	/*Initialize Element matrix and return if necessary*/
+ 	if(!this->active) return NULL;
+@@ -530,21 +530,21 @@
+ 	/*recover parameters: */
+ 	parameters->FindParam(&penalty_factor,ThermalPenaltyFactorEnum);
+ 
+-	Ke->values[0]=kmax*pow((double)10,penalty_factor);
++	Ke->values[0]=kmax*pow((IssmDouble)10,penalty_factor);
+ 
+ 	/*Clean up and return*/
+ 	return Ke;
+ }
+ /*}}}*/
+ /*FUNCTION Pengrid::PenaltyCreatePVectorMelting {{{*/
+-ElementVector* Pengrid::PenaltyCreatePVectorMelting(double kmax){
++ElementVector* Pengrid::PenaltyCreatePVectorMelting(IssmDouble kmax){
+ 	
+ 	const int numdof=NUMVERTICES*NDOF1;
+-	double pressure;
+-	double temperature;
+-	double melting_offset;
+-	double t_pmp;
+-	double dt,penalty_factor;
++	IssmDouble pressure;
++	IssmDouble temperature;
++	IssmDouble melting_offset;
++	IssmDouble t_pmp;
++	IssmDouble dt,penalty_factor;
+ 
+ 	/*recover pointers: */
+ 	Penta* penta=(Penta*)element;
+@@ -571,8 +571,8 @@
+ 		pe->values[0]=0;
+ 	}
+ 	else{
+-		if (dt) pe->values[0]=melting_offset*pow((double)10,penalty_factor)*(temperature-t_pmp)/dt;
+-		else    pe->values[0]=melting_offset*pow((double)10,penalty_factor)*(temperature-t_pmp);
++		if (dt) pe->values[0]=melting_offset*pow((IssmDouble)10,penalty_factor)*(temperature-t_pmp)/dt;
++		else    pe->values[0]=melting_offset*pow((IssmDouble)10,penalty_factor)*(temperature-t_pmp);
+ 	}
+ 
+ 	/*Clean up and return*/
+@@ -580,12 +580,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION Pengrid::PenaltyCreatePVectorThermal {{{*/
+-ElementVector* Pengrid::PenaltyCreatePVectorThermal(double kmax){
++ElementVector* Pengrid::PenaltyCreatePVectorThermal(IssmDouble kmax){
+ 
+ 	const int numdof=NUMVERTICES*NDOF1;
+-	double pressure;
+-	double t_pmp;
+-	double penalty_factor;
++	IssmDouble pressure;
++	IssmDouble t_pmp;
++	IssmDouble penalty_factor;
+ 
+ 	Penta* penta=(Penta*)element;
+ 
+@@ -600,7 +600,7 @@
+ 	/*Compute pressure melting point*/
+ 	t_pmp=matpar->GetMeltingPoint()-matpar->GetBeta()*pressure;
+ 
+-	pe->values[0]=kmax*pow((double)10,penalty_factor)*t_pmp;
++	pe->values[0]=kmax*pow((IssmDouble)10,penalty_factor)*t_pmp;
+ 
+ 	/*Clean up and return*/
+ 	return pe;
+@@ -614,7 +614,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Pengrid::UpdateInputs {{{*/
+-void  Pengrid::UpdateInputs(double* solution){
++void  Pengrid::UpdateInputs(IssmDouble* solution){
+ 	_error_("not supported yet!");
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12472)
+@@ -278,19 +278,19 @@
+ }
+ /*}}}*/
+ /*FUNCTION Icefront::PenaltyCreateKMatrix {{{*/
+-void  Icefront::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs, double kmax){
++void  Icefront::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs, IssmDouble kmax){
+ 	/*do nothing: */
+ 	return;
+ }
+ /*}}}*/
+ /*FUNCTION Icefront::PenaltyCreatePVector{{{*/
+-void  Icefront::PenaltyCreatePVector(Vector* pf,double kmax){
++void  Icefront::PenaltyCreatePVector(Vector* pf,IssmDouble kmax){
+ 	/*do nothing: */
+ 	return;
+ }
+ /*}}}*/
+ /*FUNCTION Icefront::PenaltyCreateJacobianMatrix{{{*/
+-void  Icefront::PenaltyCreateJacobianMatrix(Matrix* Jff,double kmax){
++void  Icefront::PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){
+ 	this->PenaltyCreateKMatrix(Jff,NULL,kmax);
+ }
+ /*}}}*/
+@@ -302,8 +302,8 @@
+ /*}}}*/
+ 
+ /*Update virtual functions definitions:*/
+-/*FUNCTION Icefront::InputUpdateFromVector(double* vector, int name, int type) {{{*/
+-void  Icefront::InputUpdateFromVector(double* vector, int name, int type){
++/*FUNCTION Icefront::InputUpdateFromVector(IssmDouble* vector, int name, int type) {{{*/
++void  Icefront::InputUpdateFromVector(IssmDouble* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -317,13 +317,13 @@
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type) {{{*/
+-void  Icefront::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
++/*FUNCTION Icefront::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type) {{{*/
++void  Icefront::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::InputUpdateFromVectorDakota(double* vector, int name, int type) {{{*/
+-void  Icefront::InputUpdateFromVectorDakota(double* vector, int name, int type){
++/*FUNCTION Icefront::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type) {{{*/
++void  Icefront::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -337,8 +337,8 @@
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+-/*FUNCTION Icefront::InputUpdateFromConstant(double constant, int name) {{{*/
+-void  Icefront::InputUpdateFromConstant(double constant, int name){
++/*FUNCTION Icefront::InputUpdateFromConstant(IssmDouble constant, int name) {{{*/
++void  Icefront::InputUpdateFromConstant(IssmDouble constant, int name){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -353,7 +353,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Icefront::InputUpdateFromSolution{{{*/
+-void  Icefront::InputUpdateFromSolution(double* solution){
++void  Icefront::InputUpdateFromSolution(IssmDouble* solution){
+ 	/*Nothing updated yet*/
+ }
+ /*}}}*/
+@@ -391,12 +391,12 @@
+ 
+ 	/*Intermediary*/
+ 	int        ig,index1,index2,fill;
+-	double     Jdet;
+-	double     thickness,bed,pressure,ice_pressure,rho_water,rho_ice,gravity;
+-	double     water_pressure,air_pressure,surface_under_water,base_under_water;
+-	double     xyz_list[numnodes][3];
+-	double     normal[2];
+-	double     L[2];
++	IssmDouble     Jdet;
++	IssmDouble     thickness,bed,pressure,ice_pressure,rho_water,rho_ice,gravity;
++	IssmDouble     water_pressure,air_pressure,surface_under_water,base_under_water;
++	IssmDouble     xyz_list[numnodes][3];
++	IssmDouble     normal[2];
++	IssmDouble     L[2];
+ 	GaussTria *gauss;
+ 
+ 	Tria* tria=((Tria*)element);
+@@ -512,12 +512,12 @@
+ 	/*Intermediaries*/
+ 	int         i,j,ig,index1,index2,index3,index4;
+ 	int         fill;
+-	double      surface,pressure,ice_pressure,rho_water,rho_ice,gravity;
+-	double      water_pressure,air_pressure;
+-	double      Jdet,z_g;
+-	double      xyz_list[NUMVERTICESQUA][3];
+-	double      normal[3];
+-	double      l1l4[4];
++	IssmDouble      surface,pressure,ice_pressure,rho_water,rho_ice,gravity;
++	IssmDouble      water_pressure,air_pressure;
++	IssmDouble      Jdet,z_g;
++	IssmDouble      xyz_list[NUMVERTICESQUA][3];
++	IssmDouble      normal[3];
++	IssmDouble      l1l4[4];
+ 	GaussPenta *gauss = NULL;
+ 
+ 	Penta* penta=(Penta*)element;
+@@ -542,8 +542,8 @@
+ 	index4=element->GetNodeIndex(nodes[3]);
+ 
+ 	/* Start  looping on the number of gaussian points: */
+-	double zmax=xyz_list[0][2]; for(i=1;i<NUMVERTICESQUA;i++) if(xyz_list[i][2]>zmax) zmax=xyz_list[i][2];
+-	double zmin=xyz_list[0][2]; for(i=1;i<NUMVERTICESQUA;i++) if(xyz_list[i][2]<zmin) zmin=xyz_list[i][2];
++	IssmDouble zmax=xyz_list[0][2]; for(i=1;i<NUMVERTICESQUA;i++) if(xyz_list[i][2]>zmax) zmax=xyz_list[i][2];
++	IssmDouble zmin=xyz_list[0][2]; for(i=1;i<NUMVERTICESQUA;i++) if(xyz_list[i][2]<zmin) zmin=xyz_list[i][2];
+ 	if(zmax>0 && zmin<0) gauss=new GaussPenta(index1,index2,index3,index4,3,10); //refined in vertical because of the sea level discontinuity
+ 	else                 gauss=new GaussPenta(index1,index2,index3,index4,3,3);
+ 	for(ig=gauss->begin();ig<gauss->end();ig++){
+@@ -589,12 +589,12 @@
+ 	/*Intermediaries*/
+ 	int         i,j,ig,index1,index2,index3,index4;
+ 	int         fill;
+-	double      pressure,rho_water,gravity;
+-	double      water_pressure,air_pressure;
+-	double      Jdet,z_g;
+-	double      xyz_list[NUMVERTICESQUA][3];
+-	double      normal[3];
+-	double      l1l4[4];
++	IssmDouble      pressure,rho_water,gravity;
++	IssmDouble      water_pressure,air_pressure;
++	IssmDouble      Jdet,z_g;
++	IssmDouble      xyz_list[NUMVERTICESQUA][3];
++	IssmDouble      normal[3];
++	IssmDouble      l1l4[4];
+ 	GaussPenta *gauss = NULL;
+ 
+ 	Penta* penta=(Penta*)element;
+@@ -617,8 +617,8 @@
+ 	index4=element->GetNodeIndex(nodes[3]);
+ 
+ 	/* Start  looping on the number of gaussian points: */
+-	double zmax=xyz_list[0][2]; for(i=1;i<NUMVERTICESQUA;i++) if(xyz_list[i][2]>zmax) zmax=xyz_list[i][2];
+-	double zmin=xyz_list[0][2]; for(i=1;i<NUMVERTICESQUA;i++) if(xyz_list[i][2]<zmin) zmin=xyz_list[i][2];
++	IssmDouble zmax=xyz_list[0][2]; for(i=1;i<NUMVERTICESQUA;i++) if(xyz_list[i][2]>zmax) zmax=xyz_list[i][2];
++	IssmDouble zmin=xyz_list[0][2]; for(i=1;i<NUMVERTICESQUA;i++) if(xyz_list[i][2]<zmin) zmin=xyz_list[i][2];
+ 	if(zmax>0 && zmin<0) gauss=new GaussPenta(index1,index2,index3,index4,3,30); //refined in vertical because of the sea level discontinuity
+ 	else                 gauss=new GaussPenta(index1,index2,index3,index4,3,3);
+ 	for(ig=gauss->begin();ig<gauss->end();ig++){
+@@ -704,12 +704,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION Icefront::GetSegmentNormal {{{*/
+-void Icefront:: GetSegmentNormal(double* normal,double xyz_list[4][3]){
++void Icefront:: GetSegmentNormal(IssmDouble* normal,IssmDouble xyz_list[4][3]){
+ 
+ 	/*Build unit outward pointing vector*/
+ 	const int numnodes=NUMVERTICESSEG;
+-	double vector[2];
+-	double norm;
++	IssmDouble vector[2];
++	IssmDouble norm;
+ 
+ 	vector[0]=xyz_list[1][0] - xyz_list[0][0];
+ 	vector[1]=xyz_list[1][1] - xyz_list[0][1];
+@@ -721,12 +721,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION Icefront::GetQuadNormal {{{*/
+-void Icefront:: GetQuadNormal(double* normal,double xyz_list[4][3]){
++void Icefront:: GetQuadNormal(IssmDouble* normal,IssmDouble xyz_list[4][3]){
+ 
+ 	/*Build unit outward pointing vector*/
+-	double AB[3];
+-	double AC[3];
+-	double norm;
++	IssmDouble AB[3];
++	IssmDouble AC[3];
++	IssmDouble norm;
+ 
+ 	AB[0]=xyz_list[1][0] - xyz_list[0][0];
+ 	AB[1]=xyz_list[1][1] - xyz_list[0][1];
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12472)
+@@ -33,7 +33,7 @@
+ 	this->analysis_type=in_analysis_type;
+ 	this->inputs=inputs_in;
+ 	this->element_type=xNew<char>(strlen(element_type_in)+1);
+-	memcpy(this->element_type,element_type_in,(strlen(element_type_in)+1)*sizeof(char));
++	xMemCpy<char>(this->element_type,element_type_in,(strlen(element_type_in)+1));
+ 
+ 	this->matpar=matpar_in;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.h	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.h	(revision 12472)
+@@ -53,17 +53,17 @@
+ 		Object* copy();
+ 		/*}}}*/
+ 		/*Update virtual functions resolution: {{{*/
+-		void  InputUpdateFromVector(double* vector, int name, int type);
++		void  InputUpdateFromVector(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+ 		void  InputUpdateFromVector(bool* vector, int name, int type);
+-		void  InputUpdateFromMatrixDakota(double* matrix ,int nrows, int ncols, int name, int type);
+-		void  InputUpdateFromVectorDakota(double* vector, int name, int type);
++		void  InputUpdateFromMatrixDakota(IssmDouble* matrix ,int nrows, int ncols, int name, int type);
++		void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVectorDakota(int* vector, int name, int type);
+ 		void  InputUpdateFromVectorDakota(bool* vector, int name, int type);
+-		void  InputUpdateFromConstant(double constant, int name);
++		void  InputUpdateFromConstant(IssmDouble constant, int name);
+ 		void  InputUpdateFromConstant(int constant, int name);
+ 		void  InputUpdateFromConstant(bool constant, int name);
+-		void  InputUpdateFromSolution(double* solution);
++		void  InputUpdateFromSolution(IssmDouble* solution);
+ 		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
+ 		/*}}}*/
+ 		/*Load virtual functions definitions: {{{*/
+@@ -72,24 +72,24 @@
+ 		void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
+ 		void  CreatePVector(Vector* pf);
+ 		void  CreateJacobianMatrix(Matrix* Jff){_error_("Not implemented yet");};
+-		void  PenaltyCreateJacobianMatrix(Matrix* Jff,double kmax){_error_("Not implemented yet");};
+-		void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, double kmax);
+-		void  PenaltyCreatePVector(Vector* pf, double kmax);
++		void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error_("Not implemented yet");};
++		void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, IssmDouble kmax);
++		void  PenaltyCreatePVector(Vector* pf, IssmDouble kmax);
+ 		bool  InAnalysis(int analysis_type);
+ 		/*}}}*/
+ 		/*Pengrid management {{{*/
+ 		#ifdef _HAVE_DIAGNOSTIC_
+-		ElementMatrix* PenaltyCreateKMatrixDiagnosticStokes(double kmax);
++		ElementMatrix* PenaltyCreateKMatrixDiagnosticStokes(IssmDouble kmax);
+ 		#endif
+ 		#ifdef _HAVE_THERMAL_
+-		ElementMatrix* PenaltyCreateKMatrixThermal(double kmax);
+-		ElementMatrix* PenaltyCreateKMatrixMelting(double kmax);
+-		ElementVector* PenaltyCreatePVectorThermal(double kmax);
+-		ElementVector* PenaltyCreatePVectorMelting(double kmax);
++		ElementMatrix* PenaltyCreateKMatrixThermal(IssmDouble kmax);
++		ElementMatrix* PenaltyCreateKMatrixMelting(IssmDouble kmax);
++		ElementVector* PenaltyCreatePVectorThermal(IssmDouble kmax);
++		ElementVector* PenaltyCreatePVectorMelting(IssmDouble kmax);
+ 		#endif
+ 		void  ConstraintActivate(int* punstable);
+ 		void  ConstraintActivateThermal(int* punstable);
+-		void  UpdateInputs(double* solution);
++		void  UpdateInputs(IssmDouble* solution);
+ 		void  ResetConstraint(void);
+ 		/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12471)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12472)
+@@ -44,8 +44,8 @@
+ 	int    riftfront_matpar_id;
+ 	int    riftfront_type;
+ 	int    riftfront_fill;
+-	double riftfront_friction;
+-	double riftfront_fractionincrement;
++	IssmDouble riftfront_friction;
++	IssmDouble riftfront_fractionincrement;
+ 	bool   riftfront_shelf;
+ 	int    numberofelements;
+ 	int    penalty_lock;
+@@ -134,7 +134,7 @@
+ 
+ 	Input* input=NULL;
+ 	int fill;
+-	double friction,fractionincrement;
++	IssmDouble friction,fractionincrement;
+ 
+ 	
+ 	/*recover some inputs first: */
+@@ -257,8 +257,8 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Riftfront::InputUpdateFromConstant(double constant,int name) {{{*/
+-void  Riftfront::InputUpdateFromConstant(double constant,int name){
++/*FUNCTION Riftfront::InputUpdateFromConstant(IssmDouble constant,int name) {{{*/
++void  Riftfront::InputUpdateFromConstant(IssmDouble constant,int name){
+ 
+ 	/*Check that name is a Riftfront input*/
+ 	if (!IsInput(name)) return;
+@@ -268,8 +268,8 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION Riftfront::InputUpdateFromConstant(double* constant,int name) {{{*/
+-void    Riftfront::InputUpdateFromVector(double* vector, int name, int type){
++/*FUNCTION Riftfront::InputUpdateFromConstant(IssmDouble* constant,int name) {{{*/
++void    Riftfront::InputUpdateFromVector(IssmDouble* vector, int name, int type){
+ 
+ 	/*Check that name is a Riftfront input*/
+ 	if (!IsInput(name)) return;
+@@ -308,7 +308,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Riftfront::PenaltyCreateKMatrix {{{*/
+-void  Riftfront::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs,double kmax){
++void  Riftfront::PenaltyCreateKMatrix(Matrix* Kff, Matrix* Kfs,IssmDouble kmax){
+ 
+ 	/*Retrieve parameters: */
+ 	ElementMatrix* Ke=NULL;
+@@ -334,7 +334,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Riftfront::PenaltyCreatePVector {{{*/
+-void  Riftfront::PenaltyCreatePVector(Vector* pf,double kmax){
++void  Riftfront::PenaltyCreatePVector(Vector* pf,IssmDouble kmax){
+ 
+ 	/*Retrieve parameters: */
+ 	ElementVector* pe=NULL;
+@@ -380,16 +380,16 @@
+ 
+ /*Riftfront numerics*/
+ /*FUNCTION Riftfront::PenaltyCreateKMatrixDiagnosticHoriz {{{*/
+-ElementMatrix* Riftfront::PenaltyCreateKMatrixDiagnosticHoriz(double kmax){
++ElementMatrix* Riftfront::PenaltyCreateKMatrixDiagnosticHoriz(IssmDouble kmax){
+ 
+ 	const int   numdof = NDOF2*NUMVERTICES;
+ 	int         i,j;
+ 	int         dofs[1]             = {0};
+-	double      Ke_gg[4][4];
+-	double      thickness;
+-	double      h[2];
+-	double      penalty_offset;
+-	double      friction;
++	IssmDouble      Ke_gg[4][4];
++	IssmDouble      thickness;
++	IssmDouble      h[2];
++	IssmDouble      penalty_offset;
++	IssmDouble      friction;
+ 
+ 	/*Objects: */
+ 	Tria       *tria1               = NULL;
+@@ -463,22 +463,22 @@
+ }
+ /*}}}*/
+ /*FUNCTION Riftfront::PenaltyCreatePVectorDiagnosticHoriz {{{*/
+-ElementVector* Riftfront::PenaltyCreatePVectorDiagnosticHoriz(double kmax){
++ElementVector* Riftfront::PenaltyCreatePVectorDiagnosticHoriz(IssmDouble kmax){
+ 
+ 	const int   numdof = NDOF2*NUMVERTICES;
+ 	int         i,j;
+-	double      rho_ice;
+-	double      rho_water;
+-	double      gravity;
+-	double      thickness;
+-	double      h[2];
+-	double      bed;
+-	double      b[2];
+-	double      pressure;
+-	double      pressure_litho;
+-	double      pressure_air;
+-	double      pressure_melange;
+-	double      pressure_water;
++	IssmDouble      rho_ice;
++	IssmDouble      rho_water;
++	IssmDouble      gravity;
++	IssmDouble      thickness;
++	IssmDouble      h[2];
++	IssmDouble      bed;
++	IssmDouble      b[2];
++	IssmDouble      pressure;
++	IssmDouble      pressure_litho;
++	IssmDouble      pressure_air;
++	IssmDouble      pressure_melange;
++	IssmDouble      pressure_water;
+ 	int         fill;
+ 	bool        shelf;
+ 
+@@ -520,15 +520,15 @@
+ 	if(fill==WaterEnum){
+ 		if(shelf){
+ 			/*We are on an ice shelf, hydrostatic equilibrium is used to determine the pressure for water fill: */
+-			pressure=rho_ice*gravity*pow(thickness,(double)2)/(double)2  - rho_water*gravity*pow(bed,(double)2)/(double)2; 
++			pressure=rho_ice*gravity*pow(thickness,(IssmDouble)2)/(IssmDouble)2  - rho_water*gravity*pow(bed,(IssmDouble)2)/(IssmDouble)2; 
+ 		}
+ 		else{
+ 			//We are on an icesheet, we assume the water column fills the entire front: */
+-			pressure=rho_ice*gravity*pow(thickness,(double)2)/(double)2  - rho_water*gravity*pow(thickness,(double)2)/(double)2; 
++			pressure=rho_ice*gravity*pow(thickness,(IssmDouble)2)/(IssmDouble)2  - rho_water*gravity*pow(thickness,(IssmDouble)2)/(IssmDouble)2; 
+ 		}
+ 	}
+ 	else if(fill==AirEnum){
+-		pressure=rho_ice*gravity*pow(thickness,(double)2)/(double)2;   //icefront on an ice sheet, pressure imbalance ice vs air.
++		pressure=rho_ice*gravity*pow(thickness,(IssmDouble)2)/(IssmDouble)2;   //icefront on an ice sheet, pressure imbalance ice vs air.
+ 	}
+ 	else if(fill==IceEnum){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice)
+ 		pressure=0;
+@@ -537,9 +537,9 @@
+ 
+ 		if(!shelf) _error_("%s%i%s","fill type ",fill," not supported on ice sheets yet.");
+ 
+-		pressure_litho=rho_ice*gravity*pow(thickness,(double)2)/(double)2;
++		pressure_litho=rho_ice*gravity*pow(thickness,(IssmDouble)2)/(IssmDouble)2;
+ 		pressure_air=0;
+-		pressure_melange=rho_ice*gravity*pow(fraction*thickness,(double)2)/(double)2;
++		pressure_melange=rho_ice*gravity*pow(fraction*thickness,(IssmDouble)2)/(IssmDouble)2;
+ 		pressure_water=1.0/2.0*rho_water*gravity*  ( pow(bed,2.0)-pow(rho_ice/rho_water*fraction*thickness,2.0) );
+ 
+ 		pressure=pressure_litho-pressure_air-pressure_melange-pressure_water;
+@@ -568,16 +568,16 @@
+ int Riftfront::Constrain(int* punstable){
+ 
+ 	const int   numnodes        = 2;
+-	double      max_penetration;
+-	double      penetration;
++	IssmDouble      max_penetration;
++	IssmDouble      penetration;
+ 	int         activate;
+ 	int         found;
+ 	int         unstable;
+-	double      vx1;
+-	double      vy1;
+-	double      vx2;
+-	double      vy2;
+-	double      fractionincrement;
++	IssmDouble      vx1;
++	IssmDouble      vy1;
++	IssmDouble      vx2;
++	IssmDouble      vy2;
++	IssmDouble      fractionincrement;
+ 
+ 	/*Objects: */
+ 	Tria       *tria1           = NULL;
+@@ -631,7 +631,7 @@
+ 		this->counter=0;
+ 		/*increase melange fraction: */
+ 		this->fraction+=fractionincrement;
+-		if (this->fraction>1)this->fraction=(double)1.0;
++		if (this->fraction>1)this->fraction=(IssmDouble)1.0;
+ 		//printf("riftfront %i fraction: %g\n",this->Id(),this->fraction);
+ 	}
+ 
+@@ -674,7 +674,7 @@
+ int   Riftfront::IsMaterialStable(void){
+ 
+ 	int found=0;
+-	double converged=0;
++	IssmDouble converged=0;
+ 
+ 	this->inputs->GetInputValue(&converged,ConvergedEnum);
+ 
+@@ -689,16 +689,16 @@
+ }
+ /*}}}*/
+ /*FUNCTION Riftfront::MaxPenetration {{{*/
+-int   Riftfront::MaxPenetration(double* ppenetration){
++int   Riftfront::MaxPenetration(IssmDouble* ppenetration){
+ 
+ 	const int     numnodes=2;
+-	double        max_penetration;
+-	double        penetration=0;
++	IssmDouble        max_penetration;
++	IssmDouble        penetration=0;
+ 	int           found;
+-	double      vx1;
+-	double      vy1;
+-	double      vx2;
+-	double      vy2;
++	IssmDouble      vx1;
++	IssmDouble      vy1;
++	IssmDouble      vx2;
++	IssmDouble      vy2;
+ 
+ 	/*Objects: */
+ 	Tria       *tria1           = NULL;
+@@ -735,14 +735,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION Riftfront::Penetration {{{*/
+-int   Riftfront::Penetration(double* ppenetration){
++int   Riftfront::Penetration(IssmDouble* ppenetration){
+ 
+-	double    vx1;
+-	double    vy1;
+-	double    vx2;
+-	double    vy2;
++	IssmDouble    vx1;
++	IssmDouble    vy1;
++	IssmDouble    vx2;
++	IssmDouble    vy2;
+ 
+-	double    penetration;
++	IssmDouble    penetration;
+ 	int       found;
+ 
+ 	/*Objects: */
+@@ -778,15 +778,15 @@
+ 
+ 
+ 	const int   numnodes        = 2;
+-	double      max_penetration;
+-	double      penetration;
++	IssmDouble      max_penetration;
++	IssmDouble      penetration;
+ 	int         activate;
+ 	int         unstable;
+ 	int         found;
+-	double      vx1;
+-	double      vy1;
+-	double      vx2;
+-	double      vy2;
++	IssmDouble      vx1;
++	IssmDouble      vy1;
++	IssmDouble      vx2;
++	IssmDouble      vy2;
+ 
+ 	/*Objects: */
+ 	Tria       *tria1           = NULL;
+@@ -830,13 +830,13 @@
+ int   Riftfront::PreConstrain(int* punstable){
+ 
+ 	const int   numnodes    = 2;
+-	double      penetration;
++	IssmDouble      penetration;
+ 	int         unstable;
+ 	int         found;
+-	double      vx1;
+-	double      vy1;
+-	double      vx2;
+-	double      vy2;
++	IssmDouble      vx1;
++	IssmDouble      vy1;
++	IssmDouble      vx2;
++	IssmDouble      vy2;
+ 
+ 	/*Objects: */
+ 	Tria       *tria1       = NULL;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12472-12473.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12472-12473.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12472-12473.diff	(revision 12679)
@@ -0,0 +1,294 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12472)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12473)
+@@ -39,11 +39,11 @@
+ 		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(IssmPDouble* pvalue){_error_("An OptionStruct object cannot return a IssmPDouble");};
+ 		void  Get(bool* pvalue){  _error_("An OptionStruct object cannot return a bool");};
+ 		void  Get(char** pvalue){ _error_("An OptionStruct object cannot return a string");};
+ 		void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionStruct object cannot return a string vec");};
+-		void  Get(double** pvalue,int *pnumel){ _error_("An OptionStruct object cannot return a double vec");};
++		void  Get(IssmPDouble** pvalue,int *pnumel){ _error_("An OptionStruct object cannot return a IssmPDouble vec");};
+ 		void  Get(Options** pvalue);
+ 		void  Get(Options*** ppvalue,int *pnumel);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12472)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12473)
+@@ -1,5 +1,5 @@
+ /*!\file OptionDouble.cpp
+- * \brief: implementation of the optionsdouble object
++ * \brief: implementation of the optionsIssmPDouble object
+  */
+ 
+ /*Headers:*/
+@@ -30,7 +30,7 @@
+ /*FUNCTION OptionDouble::~OptionDouble(){{{*/
+ OptionDouble::~OptionDouble(){
+ 
+-	if (values) xDelete<double>(values);
++	if (values) xDelete<IssmPDouble>(values);
+ 
+ }
+ /*}}}*/
+@@ -49,7 +49,7 @@
+ 		if(numel == 1) _printf_(flag,"        values: %g\n" ,values[0]);
+ 		else {
+ 			StringFromSize(cstr,size,ndims);
+-			_printf_(flag,"        values: %s %s\n" ,cstr,"double");
++			_printf_(flag,"        values: %s %s\n" ,cstr,"IssmPDouble");
+ 		}
+ 	}
+ 	else _printf_(flag,"        values: [empty]\n" );
+@@ -77,7 +77,7 @@
+ 	_printf_(flag,"%sOptionDouble DeepEcho:\n",indent);
+ 	Option::DeepEcho(indent);
+ 
+-	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
++	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+ 	strcat(indent2,"  ");
+ 
+ 	if (values) {
+@@ -131,28 +131,28 @@
+ 	*pvalue=(int)this->values[0];
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::Get(double* pvalue) {{{*/
+-void OptionDouble::Get(double* pvalue){
++/*FUNCTION OptionDouble::Get(IssmPDouble* pvalue) {{{*/
++void OptionDouble::Get(IssmPDouble* 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 double",this->name,this->NumEl());
++		_error_("option \"%s\" has %i elements and cannot return a single IssmPDouble",this->name,this->NumEl());
+ 	}
+ 
+ 	/*Assign output pointer*/
+ 	*pvalue=this->values[0];
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::Get(double** pvalue,int* numel) {{{*/
+-void OptionDouble::Get(double** pvalue,int* numel){
++/*FUNCTION OptionDouble::Get(IssmPDouble** pvalue,int* numel) {{{*/
++void OptionDouble::Get(IssmPDouble** pvalue,int* numel){
+ 
+ 	/*We should first check that the size is at least one*/
+ 	if(this->NumEl()<=0){
+-		_error_("option \"%s\" is empty and cannot return a double vector",this->name);
++		_error_("option \"%s\" is empty and cannot return a IssmPDouble vector",this->name);
+ 	}
+ 
+ 	/*Copy vector*/
+-	double* outvalue=xNew<double>(this->NumEl());
++	IssmPDouble* outvalue=xNew<IssmPDouble>(this->NumEl());
+ 	for(int i=0;i<this->NumEl();i++) outvalue[i]=this->values[i];
+ 
+ 	/*Assign output pointer*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12472)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12473)
+@@ -77,7 +77,7 @@
+ 	_printf_(flag,"%sOptionLogical DeepEcho:\n",indent);
+ 	Option::DeepEcho(indent);
+ 
+-	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
++	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+ 	strcat(indent2,"  ");
+ 
+ 	if (values) {
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp	(revision 12472)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp	(revision 12473)
+@@ -30,8 +30,8 @@
+ 
+ 	/*calculate the dimensions (being careful of integer division)  */
+ 	for (i=ndims-1; i>=0; i--) {
+-		aprod=(int)(((double)aprod+0.5)/(double)size[i]);
+-		dims[i]=(int)floor(((double)index+0.5)/(double)aprod);
++		aprod=(int)(((IssmPDouble)aprod+0.5)/(IssmPDouble)size[i]);
++		dims[i]=(int)floor(((IssmPDouble)index+0.5)/(IssmPDouble)aprod);
+ 		index-=dims[i]*aprod;
+ 	}
+ 
+@@ -68,8 +68,8 @@
+ 
+ 	/*calculate the dimensions (being careful of integer division)  */
+ 	for (i=0; i<ndims; i++) {
+-		aprod=(int)(((double)aprod+0.5)/(double)size[i]);
+-		dims[i]=(int)floor(((double)index+0.5)/(double)aprod);
++		aprod=(int)(((IssmPDouble)aprod+0.5)/(IssmPDouble)size[i]);
++		dims[i]=(int)floor(((IssmPDouble)index+0.5)/(IssmPDouble)aprod);
+ 		index-=dims[i]*aprod;
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12472)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12473)
+@@ -81,7 +81,7 @@
+ 	_printf_(flag,"%sOptionChar DeepEcho:\n",indent);
+ 	Option::DeepEcho(indent);
+ 
+-	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
++	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+ 	strcat(indent2,"  ");
+ 
+ 	if (values) {
+@@ -138,7 +138,7 @@
+ 	stringsize=strlen(this->values)+1;
+ 
+ 	outstring=xNew<char>(stringsize);
+-	memcpy(outstring,this->values,stringsize*sizeof(char));
++	xMemCpy<char>(outstring,this->values,stringsize);
+ 
+ 	*pvalue=outstring;
+ }
+@@ -164,7 +164,7 @@
+ 	*ppvalue=xNew<char*>(nstr);
+ 	for (i=0; i<nstr; i++) {
+ 		outstring=xNew<char>(stringsize);
+-		memcpy(outstring,&(this->values[ipt]),(stringsize-1)*sizeof(char));
++		xMemCpy<char>(outstring,&(this->values[ipt]),(stringsize-1));
+ 		outstring[stringsize-1]='\0';
+ 		(*ppvalue)[i]=outstring;
+ 		ipt+=stringsize-1;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12472)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12473)
+@@ -77,7 +77,7 @@
+ 	_printf_(flag,"%sOptionCell DeepEcho:\n",indent);
+ 	Option::DeepEcho(indent);
+ 
+-	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
++	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+ 	strcat(indent2,"  ");
+ 
+ 	if (values->Size()) {
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12472)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12473)
+@@ -1,5 +1,5 @@
+ /*! \file OptionDouble.h 
+- *  \brief: header file for optiondouble object
++ *  \brief: header file for optionIssmPDouble object
+  */
+ 
+ #ifndef _OPTIONDOUBLE_H_
+@@ -17,7 +17,7 @@
+ 
+ 	public:
+ 
+-		double* values;
++		IssmPDouble* values;
+ 
+ 		/*OptionDouble constructors, destructors {{{*/
+ 		OptionDouble();
+@@ -39,11 +39,11 @@
+ 		int   NDims();
+ 		int*  Size();
+ 		void  Get(int* pvalue);
+-		void  Get(double* pvalue);
++		void  Get(IssmPDouble* 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");};
+ 		void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionDouble object cannot return a string vec");};
+-		void  Get(double** pvalue,int* pnumel);
++		void  Get(IssmPDouble** pvalue,int* pnumel);
+ 		void  Get(Options** pvalue){ _error_("An OptionDouble object cannot return an Options DataSet");};
+ 		void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionDouble object cannot return an Options DataSet vec");};
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12472)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12473)
+@@ -39,11 +39,11 @@
+ 		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(IssmPDouble* pvalue){_error_("An OptionLogical object cannot return a IssmPDouble");};
+ 		void  Get(bool* pvalue);
+ 		void  Get(char** pvalue){ _error_("An OptionLogical object cannot return a string");};
+ 		void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionLogical object cannot return a string vec");};
+-		void  Get(double** pvalue,int *pnumel){ _error_("An OptionLogical object cannot return a double vec");};
++		void  Get(IssmPDouble** pvalue,int *pnumel){ _error_("An OptionLogical object cannot return a IssmPDouble vec");};
+ 		void  Get(Options** pvalue){ _error_("An OptionLogical object cannot return an Options DataSet");};
+ 		void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionLogical object cannot return an Options DataSet vec");};
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12472)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12473)
+@@ -39,11 +39,11 @@
+ 		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(IssmPDouble* pvalue){_error_("An OptionChar object cannot return a IssmPDouble");};
+ 		void  Get(bool* pvalue){  _error_("An OptionChar object cannot return a bool");};
+ 		void  Get(char** pvalue);
+ 		void  Get(char*** ppvalue,int *pnumel);
+-		void  Get(double** pvalue,int *pnumel){ _error_("An OptionChar object cannot return a double vec");};
++		void  Get(IssmPDouble** pvalue,int *pnumel){ _error_("An OptionChar object cannot return a IssmPDouble vec");};
+ 		void  Get(Options** pvalue){ _error_("An OptionChar object cannot return an Options DataSet");};
+ 		void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionChar object cannot return an Options DataSet vec");};
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.h	(revision 12472)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.h	(revision 12473)
+@@ -42,11 +42,11 @@
+ 		virtual int   NDims()=0;
+ 		virtual int*  Size()=0;
+ 		virtual void  Get(int* pvalue)=0;
+-		virtual void  Get(double* pvalue)=0;
++		virtual void  Get(IssmPDouble* pvalue)=0;
+ 		virtual void  Get(bool* pvalue)=0;
+ 		virtual void  Get(char** pvalue)=0;
+ 		virtual void  Get(char*** ppvalue,int *pnumel)=0;
+-		virtual void  Get(double** pvalue,int *pnumel)=0;
++		virtual void  Get(IssmPDouble** pvalue,int *pnumel)=0;
+ 		virtual void  Get(Options** pvalue)=0;
+ 		virtual void  Get(Options*** ppvalue,int *pnumel)=0;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12472)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12473)
+@@ -39,11 +39,11 @@
+ 		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(IssmPDouble* pvalue){_error_("An OptionCell object cannot return a IssmPDouble");};
+ 		void  Get(bool* pvalue){  _error_("An OptionCell object cannot return a bool");};
+ 		void  Get(char** pvalue){ _error_("An OptionCell object cannot return a string");};
+ 		void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionCell object cannot return a string vec");};
+-		void  Get(double** pvalue,int *pnumel){ _error_("An OptionCell object cannot return a double vec");};
++		void  Get(IssmPDouble** pvalue,int *pnumel){ _error_("An OptionCell object cannot return a IssmPDouble vec");};
+ 		void  Get(Options** pvalue);
+ 		void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionCell object cannot return an Options DataSet vec");};
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12472)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12473)
+@@ -82,7 +82,7 @@
+ 	_printf_(flag,"%sOptionStruct DeepEcho:\n",indent);
+ 	Option::DeepEcho(indent);
+ 
+-	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
++	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+ 	strcat(indent2,"  ");
+ 
+ 	if (values) {
Index: /issm/oecreview/Archive/12321-12677/ISSM-12473-12474.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12473-12474.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12473-12474.diff	(revision 12679)
@@ -0,0 +1,1150 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.h	(revision 12474)
+@@ -46,29 +46,29 @@
+ 		void  GetParameterValue(int* pinteger){_error_("DoubleVec param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM);
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("DoubleVec param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));};
+-		void  GetParameterValue(double* pdouble){_error_("DoubleVec param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("DoubleVec param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char** pstring){_error_("DoubleVec param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleVec param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM);
+-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN);
+-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM);
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN);
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Vector** pvec){_error_("DoubleVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Matrix** pmat){_error_("DoubleVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(FILE** pfid){_error_("DoubleVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
+ 
+ 		void  SetValue(bool boolean){_error_("DoubleVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int integer){_error_("DoubleVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double scalar){_error_("DoubleVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble scalar){_error_("DoubleVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char* string){_error_("DoubleVec param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M){_error_("DoubleVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M);
+-		void  SetValue(double* pdoublearray,int M,int N){_error_("DoubleVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M);
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("DoubleVec param of enum %i (%s) cannot hold a IssmDouble mat array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M){_error_("DoubleVec param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));};
+ 		void  SetValue(int* pintarray,int M,int N){_error_("DoubleVec param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Vector* vec){_error_("DoubleVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Matrix* mat){_error_("DoubleVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(FILE* fid){_error_("DoubleVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
+ 		void  UnitConversion(int direction_enum);
+ 		
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.h	(revision 12474)
+@@ -46,29 +46,29 @@
+ 		void  GetParameterValue(int* pinteger);
+ 		void  GetParameterValue(int** pintarray,int* pM);
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN);
+-		void  GetParameterValue(double* pdouble){*pdouble=value;}
++		void  GetParameterValue(IssmDouble* pIssmDouble){*pIssmDouble=value;}
+ 		void  GetParameterValue(char** pstring){_error_("Double param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char*** pstringarray,int* pM){_error_("Double param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM);
+-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN);
+-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Double param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM);
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN);
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Double param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Vector** pvec){_error_("Double param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Matrix** pmat){_error_("Double param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(FILE** pfid){_error_("Double param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
+ 
+-		void  SetValue(bool boolean){this->value=(double)boolean;}
+-		void  SetValue(int integer){this->value=(double)integer;}
+-		void  SetValue(double scalar){this->value=(double)scalar;}
++		void  SetValue(bool boolean){this->value=(IssmDouble)boolean;}
++		void  SetValue(int integer){this->value=(IssmDouble)integer;}
++		void  SetValue(IssmDouble scalar){this->value=(IssmDouble)scalar;}
+ 		void  SetValue(char* string){_error_("Double param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M){_error_("Double param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M){_error_("Double param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* pdoublearray,int M,int N){_error_("Double param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Double param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Double param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M){_error_("Double param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* pintarray,int M,int N){_error_("Double param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Vector* vec){_error_("Double param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Matrix* mat){_error_("Double param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(FILE* fid){_error_("Double param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Double param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Double param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h	(revision 12474)
+@@ -23,7 +23,7 @@
+ 
+ 	private: 
+ 		int      enum_type;
+-		double** array; //array of matrices
++		IssmDouble** array; //array of matrices
+ 		int      M; //size of array
+ 		int*     mdim_array; //m-dimensions of matrices in the array
+ 		int*     ndim_array; //n-dimensions -f matrices in the array
+@@ -31,7 +31,7 @@
+ 	public:
+ 		/*DoubleMatArrayParam constructors, destructors: {{{*/
+ 		DoubleMatArrayParam();
+-		DoubleMatArrayParam(int enum_type,double** array, int M, int* mdim_array, int* ndim_array);
++		DoubleMatArrayParam(int enum_type,IssmDouble** array, int M, int* mdim_array, int* ndim_array);
+ 		~DoubleMatArrayParam();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -48,29 +48,29 @@
+ 		void  GetParameterValue(int* pinteger){_error_("DoubleMatArray param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("DoubleMatArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double* pdouble){_error_("DoubleMatArray param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("DoubleMatArray param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char** pstring){_error_("DoubleMatArray param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("DoubleMatArray param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims);
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("DoubleMatArray param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims);
+ 		void  GetParameterValue(Vector** pvec){_error_("DoubleMatArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Matrix** pmat){_error_("DoubleMatArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(FILE** pfid){_error_("DoubleMatArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
+ 
+ 		void  SetValue(bool boolean){_error_("DoubleMatArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int integer){_error_("DoubleMatArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double scalar){_error_("DoubleMatArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble scalar){_error_("DoubleMatArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char* string){_error_("DoubleMatArray param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M,int N){_error_("DoubleMatArray param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a IssmDouble vec array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error_("DoubleMatArray param of enum %i (%s) cannot hold a IssmDouble mat array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a int vec array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M,int N){_error_("DoubleMatArray param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Vector* vec){_error_("DoubleMatArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Matrix* mat){_error_("DoubleMatArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(FILE* fid){_error_("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array);
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array);
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.h	(revision 12474)
+@@ -23,7 +23,7 @@
+ 
+ 	protected: 
+ 		int enum_type;
+-		double* value;
++		IssmDouble* value;
+ 		int M;
+ 		int N;
+ 
+@@ -47,31 +47,31 @@
+ 		void  GetParameterValue(int* pinteger){_error_("DoubleMat param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN);
+-		void  GetParameterValue(double* pdouble){_error_("DoubleMat param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("DoubleMat param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char** pstring){_error_("DoubleMat param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM,int* pN);
+-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN);
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Vector** pvec){_error_("DoubleMat param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Matrix** pmat){_error_("DoubleMat param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(FILE** pfid){_error_("DoubleMat param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
+ 
+ 		void  SetValue(bool boolean){_error_("DoubleMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int integer){_error_("DoubleMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double scalar){_error_("DoubleMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble scalar){_error_("DoubleMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char* string){_error_("DoubleMat param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M,int N);
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a IssmDouble vec array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M,int N);
+ 		void  SetValue(int* intarray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a int vec array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M,int N){_error_("DoubleMat param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));};
+ 		void  SetValue(Vector* vec){_error_("DoubleMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Matrix* mat){_error_("DoubleMat param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(FILE* fid){_error_("DoubleMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
+ 		void  UnitConversion(int direction_enum);
+-		double* GetPointer(void);
++		IssmDouble* GetPointer(void);
+ 
+ 		void GetParameterName(char**pname);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/Param.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/Param.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/Param.h	(revision 12474)
+@@ -30,29 +30,29 @@
+ 		virtual void  GetParameterValue(int* pinteger)=0;
+ 		virtual void  GetParameterValue(int** pintarray,int* pM)=0;
+ 		virtual void  GetParameterValue(int** pintarray,int* pM,int* pN)=0;
+-		virtual void  GetParameterValue(double* pdouble)=0;
++		virtual void  GetParameterValue(IssmDouble* pIssmDouble)=0;
+ 		virtual void  GetParameterValue(char** pstring)=0;
+ 		virtual void  GetParameterValue(char*** pstringarray,int* pM)=0;
+-		virtual void  GetParameterValue(double** pdoublearray,int* pM)=0;
+-		virtual void  GetParameterValue(double** pdoublearray,int* pM,int* pN)=0;
+-		virtual void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims)=0;
++		virtual void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM)=0;
++		virtual void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN)=0;
++		virtual void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims)=0;
+ 		virtual void  GetParameterValue(Vector** pvec)=0;
+ 		virtual void  GetParameterValue(Matrix** pmat)=0;
+ 		virtual void  GetParameterValue(FILE** pfid)=0;
+ 		
+ 		virtual void  SetValue(bool boolean)=0;
+ 		virtual void  SetValue(int integer)=0;
+-		virtual void  SetValue(double scalar)=0;
++		virtual void  SetValue(IssmDouble scalar)=0;
+ 		virtual void  SetValue(char* string)=0;
+ 		virtual void  SetValue(char** stringarray,int M)=0;
+-		virtual void  SetValue(double* doublearray,int M)=0;
+-		virtual void  SetValue(double* pdoublearray,int M,int N)=0;
++		virtual void  SetValue(IssmDouble* IssmDoublearray,int M)=0;
++		virtual void  SetValue(IssmDouble* pIssmDoublearray,int M,int N)=0;
+ 		virtual void  SetValue(int* intarray,int M)=0;
+ 		virtual void  SetValue(int* pintarray,int M,int N)=0;
+ 		virtual void  SetValue(Vector* vec)=0;
+ 		virtual void  SetValue(Matrix* mat)=0;
+ 		virtual void  SetValue(FILE* fid)=0;
+-		virtual void  SetValue(double** array, int M, int* mdim_array, int* ndim_array)=0;
++		virtual void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array)=0;
+ 		virtual void  UnitConversion(int direction_enum)=0;
+ 		virtual void  GetParameterName(char**pname)=0;
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.h	(revision 12474)
+@@ -42,32 +42,32 @@
+ 		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){  _error_("FileParam of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int* pinteger){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double* pdouble){_error_("FileParam of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(int* pinteger){_error_("FileParam of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(int** pintarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("FileParam of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("FileParam of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char** pstring){_error_("FileParam of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char*** pstringarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM){_error_("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("FileParam of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("File param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("FileParam of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("FileParam of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("File param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Vector** pvec){_error_("FileParam of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Matrix** pmat){_error_("FileParam of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(FILE** pfid){*pfid=value;};
+ 
+ 		void  SetValue(bool boolean){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int integer){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double scalar){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble scalar){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char* string){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M){_error_("FileParam of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M){_error_("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* pdoublearray,int M,int N){_error_("FileParam of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("FileParam of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("FileParam of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M){_error_("FileParam of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* pintarray,int M,int N){_error_("FileParam of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Vector* vec){_error_("FileParam of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Matrix* mat){_error_("FileParam of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(FILE* fid){_error_("File param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("File param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("File param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12474)
+@@ -33,13 +33,13 @@
+ 
+ 	if(M){
+ 		values=xNew<int>(M);
+-		memcpy(values,in_values,M*sizeof(int));
++		xMemCpy<int>(values,in_values,M);
+ 	}
+ 	else values=NULL;
+ }
+ /*}}}*/
+-/*FUNCTION IntVecParam::IntVecParam(int enum_type,double* values,int M){{{*/
+-IntVecParam::IntVecParam(int in_enum_type,double* in_values, int in_M){
++/*FUNCTION IntVecParam::IntVecParam(int enum_type,IssmDouble* values,int M){{{*/
++IntVecParam::IntVecParam(int in_enum_type,IssmDouble* in_values, int in_M){
+ 
+ 	enum_type=in_enum_type;
+ 	M=in_M;
+@@ -112,7 +112,7 @@
+ 
+ 	if(M){
+ 		output=xNew<int>(M);
+-		memcpy(output,values,M*sizeof(int));
++		xMemCpy<int>(output,values,M);
+ 	}
+ 
+ 	/*Assign output pointers:*/
+@@ -133,7 +133,7 @@
+ 
+ 	if(in_M){
+ 		this->values=xNew<int>(in_M);
+-		memcpy(this->values,intarray,in_M*sizeof(int));
++		xMemCpy<int>(this->values,intarray,in_M);
+ 	}
+ 	else this->values=NULL;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12474)
+@@ -33,7 +33,7 @@
+ 	N=in_N;
+ 
+ 	value=xNew<int>(M*N);
+-	memcpy(value,in_value,M*N*sizeof(int));
++	xMemCpy<int>(value,in_value,M*N);
+ }
+ /*}}}*/
+ /*FUNCTION IntMatParam::~IntMatParam(){{{*/
+@@ -98,7 +98,7 @@
+ 	int* output=NULL;
+ 
+ 	output=xNew<int>(M*N);
+-	memcpy(output,value,M*N*sizeof(int));
++	xMemCpy<int>(output,value,M*N);
+ 
+ 	/*Assign output pointers:*/
+ 	if(pM) *pM=M;
+@@ -118,7 +118,7 @@
+ 	xDelete<int>(this->value);
+ 
+ 	this->value=xNew<int>(in_M*in_N);
+-	memcpy(this->value,intarray,in_M*in_N*sizeof(int));
++	xMemCpy<int>(this->value,intarray,in_M*in_N);
+ 
+ 	this->M=in_M;
+ 	this->N=in_N;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.h	(revision 12474)
+@@ -30,7 +30,7 @@
+ 		/*IntVecParam constructors, destructors: {{{*/
+ 		IntVecParam();
+ 		IntVecParam(int enum_type,int* values,int M);
+-		IntVecParam(int enum_type,double* values,int M);
++		IntVecParam(int enum_type,IssmDouble* values,int M);
+ 		~IntVecParam();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -47,29 +47,29 @@
+ 		void  GetParameterValue(int* pinteger){_error_("IntVec param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM);
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("IntVec param of enum %i (%s) cannot return a matrix",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double* pdouble){_error_("IntVec param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("IntVec param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char** pstring){_error_("IntVec param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char*** pstringarray,int* pM){_error_("IntVec param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM){_error_("IntVec param of enum %i (%s) cannot return a double array (maybe in serial?)",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("IntVec param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("IntVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("IntVec param of enum %i (%s) cannot return a IssmDouble array (maybe in serial?)",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("IntVec param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("IntVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Vector** pvec){_error_("IntVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Matrix** pmat){_error_("IntVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(FILE** pfid){_error_("IntVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
+ 
+ 		void  SetValue(bool boolean){_error_("IntVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int integer){_error_("IntVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double scalar){_error_("IntVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble scalar){_error_("IntVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char* string){_error_("IntVec param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M){_error_("IntVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M){_error_("IntVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* pdoublearray,int M,int N){_error_("IntVec param of enum %i (%s) cannot hold a double mat array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("IntVec param of enum %i (%s) cannot hold a IssmDouble mat array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("IntVec param of enum %i (%s) cannot hold a IssmDouble mat array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M);
+ 		void  SetValue(int* pintarray,int M,int N){_error_("IntVec param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Vector* vec){_error_("IntVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Matrix* mat){_error_("IntVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(FILE* fid){_error_("IntVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("IntVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("IntVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
+ 		void  UnitConversion(int direction_enum);
+ 		
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12474)
+@@ -46,12 +46,12 @@
+ 		void  GetParameterValue(int* pinteger){*pinteger=value;}
+ 		void  GetParameterValue(int** pintarray,int* pM){_error_("Int param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Int param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double* pdouble){_error_("Int param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Int param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char** pstring){_error_("Int param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char*** pstringarray,int* pM){_error_("Int param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM){_error_("Int param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("Int param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Int param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Int param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Int param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Int param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Vector** pvec){_error_("Int param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Matrix** pmat){_error_("Int param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(FILE** pfid){_error_("Int param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
+@@ -60,15 +60,15 @@
+ 		void  SetValue(int integer){this->value=integer;}
+ 		void  SetValue(int* intarray,int M){_error_("Int param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M,int N){_error_("Int param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double scalar){this->value=(int)scalar;}
++		void  SetValue(IssmDouble scalar){this->value=(int)scalar;}
+ 		void  SetValue(char* string){_error_("Int param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M){_error_("Int param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M){_error_("Int param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* pdoublearray,int M,int N){_error_("Int param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Int param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Int param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Vector* vec){_error_("Int param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Matrix* mat){_error_("Int param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(FILE* fid){_error_("Int param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Int param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Int param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12474)
+@@ -45,29 +45,29 @@
+ 		void  GetParameterValue(int* pinteger){_error_("Bool param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM){_error_("Bool param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Bool param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double* pdouble){_error_("Bool param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Bool param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char** pstring){_error_("Bool param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char*** pstringarray,int* pM){_error_("Bool param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM){_error_("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("Bool param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Bool param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Bool param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Bool param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Bool param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Vector** pvec){_error_("Bool param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Matrix** pmat){_error_("Bool param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(FILE** pfid){_error_("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
+ 
+ 		void  SetValue(bool boolean){this->value=boolean;}
+ 		void  SetValue(int integer){this->value=(bool)integer;}
+-		void  SetValue(double scalar){this->value=(bool)scalar;}
++		void  SetValue(IssmDouble scalar){this->value=(bool)scalar;}
+ 		void  SetValue(char* string){_error_("Bool param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M){_error_("Bool param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M){_error_("Bool param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* pdoublearray,int M,int N){_error_("Bool param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Bool param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Bool param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M){_error_("Bool param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* pintarray,int M,int N){_error_("Bool param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Vector* vec){_error_("Bool param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Matrix* mat){_error_("Bool param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(FILE* fid){_error_("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Bool param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Bool param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
+ 		void  UnitConversion(int direction_enum);
+ 		
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.h	(revision 12474)
+@@ -47,29 +47,29 @@
+ 		void  GetParameterValue(int* pinteger){_error_("IntMat param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM){_error_("IntMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN);
+-		void  GetParameterValue(double* pdouble){_error_("IntMat param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("IntMat param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char** pstring){_error_("IntMat param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char*** pstringarray,int* pM){_error_("IntMat param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM){_error_("IntMat param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM,int* pN){_error_("IntMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));};
+-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("IntMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("IntMat param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){_error_("IntMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));};
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("IntMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Vector** pvec){_error_("IntMat param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Matrix** pmat){_error_("IntMat param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(FILE** pfid){_error_("IntMat param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
+ 
+ 		void  SetValue(bool boolean){_error_("IntMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int integer){_error_("IntMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double scalar){_error_("IntMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble scalar){_error_("IntMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char* string){_error_("IntMat param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M){_error_("IntMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M){_error_("IntMat param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M,int N){_error_("IntMat param of enum %i (%s) cannot hold a double vec array",enum_type,EnumToStringx(enum_type));};
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("IntMat param of enum %i (%s) cannot hold a IssmDouble vec array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error_("IntMat param of enum %i (%s) cannot hold a IssmDouble vec array",enum_type,EnumToStringx(enum_type));};
+ 		void  SetValue(int* intarray,int M){_error_("IntMat param of enum %i (%s) cannot hold a int vec array",enum_type,EnumToStringx(enum_type));};
+ 		void  SetValue(int* intarray,int M,int N);
+ 		void  SetValue(Vector* vec){_error_("IntMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Matrix* mat){_error_("IntMat param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(FILE* fid){_error_("IntMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("IntMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("IntMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.cpp	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.cpp	(revision 12474)
+@@ -20,7 +20,7 @@
+ /*}}}*/
+ 
+ /*FUNCTION DoubleTransientMatParam::DoubleTransientMatParam(int enum_type,IssmDoubleMat value){{{*/
+-DoubleTransientMatParam::DoubleTransientMatParam(int in_enum_type,double* in_value, int in_M,int in_N):DoubleMatParam(in_enum_type,in_value,in_M,in_N){
++DoubleTransientMatParam::DoubleTransientMatParam(int in_enum_type,IssmDouble* in_value, int in_M,int in_N):DoubleMatParam(in_enum_type,in_value,in_M,in_N){
+ }
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12474)
+@@ -40,7 +40,7 @@
+ 			char* string=NULL;
+ 			size=strlen(in_values[i])+1;
+ 			string=xNew<char>(size);
+-			memcpy(string,in_values[i],size*sizeof(char));
++			xMemCpy<char>(string,in_values[i],size);
+ 			value[i]=string;
+ 		}
+ 	}
+@@ -126,7 +126,7 @@
+ 			stringsize=strlen(string)+1;
+ 
+ 			string2=xNew<char>(stringsize);
+-			memcpy(string2,string,stringsize*sizeof(char));
++			xMemCpy<char>(string2,string,stringsize);
+ 
+ 			outstrings[i]=string2;
+ 		}
+@@ -166,7 +166,7 @@
+ 		stringsize=strlen(string)+1;
+ 
+ 		string2=xNew<char>(stringsize);
+-		memcpy(string2,string,stringsize*sizeof(char));
++		xMemCpy<char>(string2,string,stringsize);
+ 
+ 		this->value[i]=string2;
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12474)
+@@ -30,7 +30,7 @@
+ 
+ 	enum_type=in_enum_type;
+ 	value=xNew<char>(strlen(in_value)+1);
+-	memcpy(value,in_value,(strlen(in_value)+1)*sizeof(char));
++	xMemCpy<char>(value,in_value,(strlen(in_value)+1));
+ 
+ 	
+ }
+@@ -88,7 +88,7 @@
+ 	stringsize=strlen(this->value)+1;
+ 
+ 	outstring=xNew<char>(stringsize);
+-	memcpy(outstring,this->value,stringsize*sizeof(char));
++	xMemCpy<char>(outstring,this->value,stringsize);
+ 
+ 	*pstring=outstring;
+ 
+@@ -110,7 +110,7 @@
+ 	/*copy: */
+ 	stringsize=strlen(string)+1;
+ 	this->value=xNew<char>(stringsize);
+-	memcpy(this->value,string,stringsize*sizeof(char));
++	xMemCpy<char>(this->value,string,stringsize);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.h	(revision 12474)
+@@ -46,29 +46,29 @@
+ 		void  GetParameterValue(int* pinteger){_error_("Vector param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM){_error_("Vector param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Vector param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double* pdouble){_error_("Vector param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Vector param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char** pstring){_error_("Vector param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char*** pstringarray,int* pM){_error_("Vector param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM){_error_("Vector param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("Vector param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Vector param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Vector param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Vector param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Vector param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Matrix** pmat){_error_("Vector param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Vector** poutput);
+ 		void  GetParameterValue(FILE** pfid){_error_("Vector of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
+ 
+ 		void  SetValue(bool boolean){_error_("Vector of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int integer){_error_("Vector of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double scalar){_error_("Vector of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble scalar){_error_("Vector of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char* string){_error_("Vector of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M){_error_("Vector of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M){_error_("Vector of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* pdoublearray,int M,int N){_error_("Vector of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Vector of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Vector of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M){_error_("Vector of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* pintarray,int M,int N){_error_("Vector of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Vector* vec);
+ 		void  SetValue(Matrix* mat){_error_("Vector of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(FILE* fid){_error_("Vector of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Vector param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Vector param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12474)
+@@ -26,18 +26,18 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleVecParam::DoubleVecParam(int enum_type,IssmDoubleVec values,int M){{{*/
+-DoubleVecParam::DoubleVecParam(int in_enum_type,double* in_values, int in_M){
++DoubleVecParam::DoubleVecParam(int in_enum_type,IssmDouble* in_values, int in_M){
+ 
+ 	enum_type=in_enum_type;
+ 	M=in_M;
+ 
+-	values=xNew<double>(M);
+-	memcpy(values,in_values,M*sizeof(double));
++	values=xNew<IssmDouble>(M);
++	xMemCpy<IssmDouble>(values,in_values,M);
+ }
+ /*}}}*/
+ /*FUNCTION DoubleVecParam::~DoubleVecParam(){{{*/
+ DoubleVecParam::~DoubleVecParam(){
+-	xDelete<double>(values);
++	xDelete<IssmDouble>(values);
+ 	return;
+ }
+ /*}}}*/
+@@ -90,35 +90,35 @@
+ /*}}}*/
+ 
+ /*DoubleVecParam virtual functions definitions: */
+-/*FUNCTION DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM){{{*/
+-void  DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM){
+-	double* output=NULL;
++/*FUNCTION DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){{{*/
++void  DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){
++	IssmDouble* output=NULL;
+ 	int M;
+ 
+ 	M=this->M;
+-	output=xNew<double>(M);
+-	memcpy(output,values,M*sizeof(double));
++	output=xNew<IssmDouble>(M);
++	xMemCpy<IssmDouble>(output,values,M);
+ 
+ 	/*Assign output pointers:*/
+ 	if(pM) *pM=M;
+-	*pdoublearray=output;
++	*pIssmDoublearray=output;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM){{{*/
+-void  DoubleVecParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){
+-	double* output=NULL;
++/*FUNCTION DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){{{*/
++void  DoubleVecParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){
++	IssmDouble* output=NULL;
+ 	int M;
+ 	int N;
+ 
+ 	N=1;
+ 	M=this->M;
+-	output=xNew<double>(M);
+-	memcpy(output,values,M*sizeof(double));
++	output=xNew<IssmDouble>(M);
++	xMemCpy<IssmDouble>(output,values,M);
+ 
+ 	/*Assign output pointers:*/
+ 	if(pM) *pM=M;
+ 	if(pN) *pN=N;
+-	*pdoublearray=output;
++	*pIssmDoublearray=output;
+ }
+ /*}}}*/
+ /*FUNCTION DoubleVecParam::GetParameterValue(int** pintarray,int* pM){{{*/
+@@ -132,13 +132,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleVecParam::SetValue{{{*/
+-void  DoubleVecParam::SetValue(double* doublearray,int in_M){
++void  DoubleVecParam::SetValue(IssmDouble* IssmDoublearray,int in_M){
+ 
+ 	/*avoid leak: */
+-	xDelete<double>(this->values);
++	xDelete<IssmDouble>(this->values);
+ 
+-	this->values=xNew<double>(in_M);
+-	memcpy(this->values,doublearray,in_M*sizeof(double));
++	this->values=xNew<IssmDouble>(in_M);
++	xMemCpy<IssmDouble>(this->values,IssmDoublearray,in_M);
+ 
+ 	this->M=in_M;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.h	(revision 12474)
+@@ -46,29 +46,29 @@
+ 		void  GetParameterValue(int* pinteger){_error_("Matrix param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM){_error_("Matrix param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Matrix param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double* pdouble){_error_("Matrix param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Matrix param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char** pstring){_error_("Matrix param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char*** pstringarray,int* pM){_error_("Matrix param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM){_error_("Matrix param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("Matrix param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Matrix param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Matrix param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Matrix param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Matrix param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Vector** pvec){_error_("Matrix param of enum %i (%s) cannot return a vec",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Matrix** poutput);
+ 		void  GetParameterValue(FILE** pfid){_error_("Matrix param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
+ 
+ 		void  SetValue(bool boolean){_error_("Matrix param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int integer){_error_("Matrix param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double scalar){_error_("Matrix param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble scalar){_error_("Matrix param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char* string){_error_("Matrix param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M){_error_("Matrix param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M){_error_("Matrix param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* pdoublearray,int M,int N){_error_("Matrix param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Matrix param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Matrix param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M){_error_("Matrix param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* pintarray,int M,int N){_error_("Matrix param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Vector* vec){_error_("Matrix param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Matrix* mat);
+ 		void  SetValue(FILE* fid){_error_("Matrix param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("Matrix param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Matrix param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12474)
+@@ -99,14 +99,14 @@
+ 	_error_("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::GetParameterValue(double** pdoublearray,int* pM){{{*/
+-void DoubleParam::GetParameterValue(double** pdoublearray,int* pM){
+-	_error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToStringx(enum_type));
++/*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){{{*/
++void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){
++	_error_("Double param of enum %i (%s) cannot return an array of IssmDouble",enum_type,EnumToStringx(enum_type));
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){{{*/
+-void DoubleParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){
+-	_error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToStringx(enum_type));
++/*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){{{*/
++void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){
++	_error_("Double param of enum %i (%s) cannot return an array of IssmDouble",enum_type,EnumToStringx(enum_type));
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::UnitConversion{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.h	(revision 12474)
+@@ -48,29 +48,29 @@
+ 		void  GetParameterValue(int* pinteger){_error_("StringArray param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM){_error_("StringArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("StringArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double* pdouble){_error_("StringArray param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("StringArray param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char** pstring){_error_("StringArray param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char*** pstringarray,int* pM);
+-		void  GetParameterValue(double** pdoublearray,int* pM){_error_("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("StringArray param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("Vec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("StringArray param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("StringArray param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Vec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Vector** pvec){_error_("StringArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Matrix** pmat){_error_("StringArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(FILE** pfid){_error_("StringArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
+ 
+ 		void  SetValue(bool boolean){_error_("StringArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int integer){_error_("StringArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double scalar){_error_("StringArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble scalar){_error_("StringArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char* string){_error_("StringArray param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M);
+-		void  SetValue(double* doublearray,int M){_error_("StringArray param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* pdoublearray,int M,int N){_error_("StringArray param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("StringArray param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("StringArray param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M){_error_("StringArray param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* pintarray,int M,int N){_error_("StringArray param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Vector* vec){_error_("StringArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Matrix* mat){_error_("StringArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(FILE* fid){_error_("StringArray param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("StringArray param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("StringArray param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12474)
+@@ -25,17 +25,17 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatArrayParam::DoubleMatArrayParam(int enum_type,double** array, int M, int* mdim_array, int* ndim_array){{{*/
+-DoubleMatArrayParam::DoubleMatArrayParam(int in_enum_type,double** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){
++/*FUNCTION DoubleMatArrayParam::DoubleMatArrayParam(int enum_type,IssmDouble** array, int M, int* mdim_array, int* ndim_array){{{*/
++DoubleMatArrayParam::DoubleMatArrayParam(int in_enum_type,IssmDouble** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){
+ 
+ 	int i;
+-	double* matrix=NULL;
++	IssmDouble* matrix=NULL;
+ 	int     m,n;
+ 
+ 	enum_type=in_enum_type;
+ 	M=in_M;
+ 	if(M){
+-		array=xNew<double*>(M);
++		array=xNew<IssmDouble*>(M);
+ 		mdim_array=xNew<int>(M);
+ 		ndim_array=xNew<int>(M);
+ 
+@@ -47,8 +47,8 @@
+ 			ndim_array[i]=n;
+ 
+ 			if(m*n){
+-				matrix=xNew<double>(m*n);
+-				memcpy(matrix,in_array[i],m*n*sizeof(double));
++				matrix=xNew<IssmDouble>(m*n);
++				xMemCpy<IssmDouble>(matrix,in_array[i],m*n);
+ 			}
+ 			else{
+ 				matrix=NULL;
+@@ -67,17 +67,17 @@
+ DoubleMatArrayParam::~DoubleMatArrayParam(){
+ 
+ 	int i;
+-	double* matrix=NULL;
++	IssmDouble* matrix=NULL;
+ 
+ 	xDelete<int>(mdim_array);
+ 	xDelete<int>(ndim_array);
+ 
+ 	for(i=0;i<M;i++){
+ 		matrix=array[i];
+-		xDelete<double>(matrix);
++		xDelete<IssmDouble>(matrix);
+ 	}
+ 	
+-	xDelete<double*>(array);
++	xDelete<IssmDouble*>(array);
+ 	return;
+ }
+ /*}}}*/
+@@ -98,7 +98,7 @@
+ 
+ 	int i,j,k;
+ 	int m,n;
+-	double* matrix=NULL;
++	IssmDouble* matrix=NULL;
+ 	
+ 	printf("DoubleMatArrayParam:\n");
+ 	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+@@ -142,15 +142,15 @@
+ /*}}}*/
+ 
+ /*DoubleMatArrayParam virtual functions definitions: */
+-/*FUNCTION DoubleMatArrayParam::GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){{{*/
+-void  DoubleMatArrayParam::GetParameterValue(double*** pout_array, int* pout_M,int** pout_mdim_array, int** pout_ndim_array){
++/*FUNCTION DoubleMatArrayParam::GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){{{*/
++void  DoubleMatArrayParam::GetParameterValue(IssmDouble*** pout_array, int* pout_M,int** pout_mdim_array, int** pout_ndim_array){
+ 
+ 	int i,m,n;
+-	double* matrix=NULL;
+-	double* out_matrix=NULL;
++	IssmDouble* matrix=NULL;
++	IssmDouble* out_matrix=NULL;
+ 
+ 	/*output: */
+-	double** out_array=NULL;
++	IssmDouble** out_array=NULL;
+ 	int      out_M;
+ 	int*     out_mdim_array=NULL;
+ 	int*     out_ndim_array=NULL;
+@@ -158,12 +158,12 @@
+ 
+ 	out_M=this->M;
+ 	if(out_M){
+-		out_array=xNew<double*>(M);
++		out_array=xNew<IssmDouble*>(M);
+ 		out_mdim_array=xNew<int>(M);
+ 		out_ndim_array=xNew<int>(M);
+ 
+-		memcpy(out_mdim_array,this->mdim_array,M*sizeof(int));
+-		memcpy(out_ndim_array,this->ndim_array,M*sizeof(int));
++		xMemCpy<int>(out_mdim_array,this->mdim_array,M);
++		xMemCpy<int>(out_ndim_array,this->ndim_array,M);
+ 
+ 		for(i=0;i<this->M;i++){
+ 			matrix=this->array[i];
+@@ -171,8 +171,8 @@
+ 			n=this->ndim_array[i];
+ 
+ 			if(m*n){
+-				out_matrix=xNew<double>(m*n);
+-				memcpy(out_matrix,matrix,m*n*sizeof(double));
++				out_matrix=xNew<IssmDouble>(m*n);
++				xMemCpy<IssmDouble>(out_matrix,matrix,m*n);
+ 			}
+ 			else{
+ 				out_matrix=NULL;
+@@ -200,38 +200,38 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatArrayParam::SetValue(double** array, int M, int* mdim_array, int* ndim_array){{{*/
+-void  DoubleMatArrayParam::SetValue(double** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){
++/*FUNCTION DoubleMatArrayParam::SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){{{*/
++void  DoubleMatArrayParam::SetValue(IssmDouble** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){
+ 
+ 	int i,m,n;
+-	double* in_matrix=NULL;
+-	double* matrix=NULL;
++	IssmDouble* in_matrix=NULL;
++	IssmDouble* matrix=NULL;
+ 
+ 	/*avoid leak: */
+ 	xDelete<int>(mdim_array);
+ 	xDelete<int>(ndim_array);
+ 	for(i=0;i<M;i++){
+ 		matrix=array[i];
+-		xDelete<double>(matrix);
++		xDelete<IssmDouble>(matrix);
+ 	}
+-	xDelete<double*>(array);
++	xDelete<IssmDouble*>(array);
+ 
+ 	/*copy data: */
+ 	this->M=in_M;
+-	this->array=xNew<double*>(M);
++	this->array=xNew<IssmDouble*>(M);
+ 	this->mdim_array=xNew<int>(M);
+ 	this->ndim_array=xNew<int>(M);
+ 	
+-	memcpy(this->mdim_array,in_mdim_array,M*sizeof(double));
+-	memcpy(this->ndim_array,in_ndim_array,M*sizeof(double));
++	xMemCpy<int>(this->mdim_array,in_mdim_array,M);
++	xMemCpy<int>(this->ndim_array,in_ndim_array,M);
+ 
+ 	for(i=0;i<M;i++){
+ 		in_matrix=in_array[i];
+ 		m=in_mdim_array[i];
+ 		n=in_ndim_array[i];
+ 
+-		matrix=xNew<double>(m*n);
+-		memcpy(matrix,in_matrix,m*n*sizeof(double));
++		matrix=xNew<IssmDouble>(m*n);
++		xMemCpy<IssmDouble>(matrix,in_matrix,m*n);
+ 
+ 		this->array[i]=matrix;
+ 	}
+@@ -242,7 +242,7 @@
+ void  DoubleMatArrayParam::UnitConversion(int direction_enum){
+ 	/*go through all matrices and convert: */
+ 	for (int i=0;i<this->M;i++){
+-		double* matrix=this->array[i];
++		IssmDouble* matrix=this->array[i];
+ 		int     m=this->mdim_array[i];
+ 		int     n=this->ndim_array[i];
+ 		::UnitConversion(matrix,m*n,direction_enum,this->enum_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.h	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.h	(revision 12474)
+@@ -46,29 +46,29 @@
+ 		void  GetParameterValue(int* pinteger){_error_("String param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM){_error_("String param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("String param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double* pdouble){_error_("String param of enum %i (%s) cannot return a double",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("String param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(char** pstring);
+ 		void  GetParameterValue(char*** pstringarray,int* pM){_error_("String param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM){_error_("String param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double** pdoublearray,int* pM, int* pN){_error_("String param of enum %i (%s) cannot return a double array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(double*** parray, int* pM,int** pmdims, int** pndims){_error_("String param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("String param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("String param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("String param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Vector** pvec){_error_("String param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(Matrix** pmat){_error_("String param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  GetParameterValue(FILE** pfid){_error_("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
+ 
+ 		void  SetValue(bool boolean){_error_("String param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int integer){_error_("String param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double scalar){_error_("String param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble scalar){_error_("String param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char* string);
+ 		void  SetValue(char** stringarray,int M){_error_("String param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* doublearray,int M){_error_("String param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double* pdoublearray,int M,int N){_error_("String param of enum %i (%s) cannot hold a double array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("String param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("String param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M){_error_("String param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* pintarray,int M,int N){_error_("String param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Vector* vec){_error_("String param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(Matrix* mat){_error_("String param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(FILE* fid){_error_("String param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(double** array, int M, int* mdim_array, int* ndim_array){_error_("String param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("String param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12473)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12474)
+@@ -26,19 +26,19 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleMatParam::DoubleMatParam(int enum_type,IssmDoubleMat value){{{*/
+-DoubleMatParam::DoubleMatParam(int in_enum_type,double* in_value, int in_M,int in_N){
++DoubleMatParam::DoubleMatParam(int in_enum_type,IssmDouble* in_value, int in_M,int in_N){
+ 
+ 	enum_type=in_enum_type;
+ 	M=in_M;
+ 	N=in_N;
+ 
+-	value=xNew<double>(M*N);
+-	memcpy(value,in_value,M*N*sizeof(double));
++	value=xNew<IssmDouble>(M*N);
++	xMemCpy<IssmDouble>(value,in_value,M*N);
+ }
+ /*}}}*/
+ /*FUNCTION DoubleMatParam::~DoubleMatParam(){{{*/
+ DoubleMatParam::~DoubleMatParam(){
+-	xDelete<double>(value);
++	xDelete<IssmDouble>(value);
+ 	return;
+ }
+ /*}}}*/
+@@ -93,17 +93,17 @@
+ /*}}}*/
+ 
+ /*DoubleMatParam virtual functions definitions: */
+-/*FUNCTION DoubleMatParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){{{*/
+-void  DoubleMatParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){
+-	double* output=NULL;
++/*FUNCTION DoubleMatParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){{{*/
++void  DoubleMatParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){
++	IssmDouble* output=NULL;
+ 
+-	output=xNew<double>(M*N);
+-	memcpy(output,value,M*N*sizeof(double));
++	output=xNew<IssmDouble>(M*N);
++	xMemCpy<IssmDouble>(output,value,M*N);
+ 
+ 	/*Assign output pointers:*/
+ 	if(pM) *pM=M;
+ 	if(pN) *pN=N;
+-	*pdoublearray=output;
++	*pIssmDoublearray=output;
+ }
+ /*}}}*/
+ /*FUNCTION DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{*/
+@@ -117,13 +117,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleMatParam::SetValue{{{*/
+-void  DoubleMatParam::SetValue(double* doublearray,int in_M,int in_N){
++void  DoubleMatParam::SetValue(IssmDouble* IssmDoublearray,int in_M,int in_N){
+ 
+ 	/*avoid leak: */
+-	xDelete<double>(this->value);
++	xDelete<IssmDouble>(this->value);
+ 
+-	this->value=xNew<double>(in_M*in_N);
+-	memcpy(this->value,doublearray,in_M*in_N*sizeof(double));
++	this->value=xNew<IssmDouble>(in_M*in_N);
++	xMemCpy<IssmDouble>(this->value,IssmDoublearray,in_M*in_N);
+ 
+ 	this->M=in_M;
+ 	this->N=in_N;
+@@ -137,7 +137,7 @@
+ 		
+ /*diverse: */
+ /*FUNCTION DoubleMatParam::GetPointer{{{*/
+-double* DoubleMatParam::GetPointer(void){
++IssmDouble* DoubleMatParam::GetPointer(void){
+ 	return this->value;
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12474-12475.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12474-12475.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12474-12475.diff	(revision 12679)
@@ -0,0 +1,499 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12474)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12475)
+@@ -16,11 +16,11 @@
+ /*}}}*/
+ 
+ /*FUNCTION TripleMultiply {{{*/
+-int TripleMultiply( double* a, int nrowa, int ncola, int itrna, double* b, int nrowb, int ncolb, int itrnb, double* c, int nrowc, int ncolc, int itrnc, double* d, int iaddd){
++int TripleMultiply( IssmDouble* a, int nrowa, int ncola, int itrna, IssmDouble* b, int nrowb, int ncolb, int itrnb, IssmDouble* c, int nrowc, int ncolc, int itrnc, IssmDouble* d, int iaddd){
+ 	/*TripleMultiply    Perform triple matrix product a*b*c+d.*/
+ 	
+ 	int idima,idimb,idimc,idimd;
+-	double* dtemp;
++	IssmDouble* dtemp;
+ 
+ /*  set up dimensions for triple product  */
+ 
+@@ -61,34 +61,34 @@
+ 
+ /*  perform the matrix triple product in the order that minimizes the
+ 	number of multiplies and the temporary space used, noting that
+-	(a*b)*c requires ac(b+d) multiplies and ac doubles, and a*(b*c)
+-	requires bd(a+c) multiplies and bd doubles (both are the same for
++	(a*b)*c requires ac(b+d) multiplies and ac IssmDoubles, and a*(b*c)
++	requires bd(a+c) multiplies and bd IssmDoubles (both are the same for
+ 	a symmetric triple product)  */
+ 
+ /*  multiply (a*b)*c+d  */
+ 
+ 	if (idima*idimc*(idimb+idimd) <= idimb*idimd*(idima+idimc)) {
+-		dtemp=xNew<double>(idima*idimc);
++		dtemp=xNew<IssmDouble>(idima*idimc);
+ 
+ 		MatrixMultiply(a,nrowa,ncola,itrna,b,nrowb,ncolb,itrnb,dtemp,0);
+ 		MatrixMultiply(dtemp,idima,idimc,0,c,nrowc,ncolc,itrnc,d,iaddd);
+-		xDelete<double>(dtemp);
++		xDelete<IssmDouble>(dtemp);
+ 	}
+ 
+ /*  multiply a*(b*c)+d  */
+ 
+ 	else {
+-		dtemp=xNew<double>(idimb*idimd);
++		dtemp=xNew<IssmDouble>(idimb*idimd);
+ 
+ 		MatrixMultiply(b,nrowb,ncolb,itrnb,c,nrowc,ncolc,itrnc,dtemp,0);
+ 		MatrixMultiply(a,nrowa,ncola,itrna,dtemp,idimb,idimd,0,d,iaddd);
+-		xDelete<double>(dtemp);
++		xDelete<IssmDouble>(dtemp);
+ 	}
+ 
+ 	return 1;
+ }/*}}}*/
+ /*FUNCTION MatrixMuliply {{{*/
+-int MatrixMultiply( double* a, int nrowa, int ncola, int itrna, double* b, int nrowb, int ncolb, int itrnb, double* c, int iaddc ){
++int MatrixMultiply( IssmDouble* a, int nrowa, int ncola, int itrna, IssmDouble* b, int nrowb, int ncolb, int itrnb, IssmDouble* c, int iaddc ){
+ 	/*MatrixMultiply    Perform matrix multiplication a*b+c.*/
+ 	int noerr=1;
+ 	int i,j,k,ipta,iptb,iptc;
+@@ -157,7 +157,7 @@
+ 	return noerr;
+ }/*}}}*/
+ /*FUNCTION MatrixInverse {{{*/
+-int MatrixInverse( double* a, int ndim, int nrow, double* b, int nvec, double* pdet ){
++int MatrixInverse( IssmDouble* a, int ndim, int nrow, IssmDouble* b, int nvec, IssmDouble* pdet ){
+ /* MatrixInverse    Perform matrix inversion and linear equation solution.
+ 
+ 	This function uses Gaussian elimination on the original matrix
+@@ -171,7 +171,7 @@
+ 	int noerr=1;
+ 	int i,j,k,ipt,jpt,irow,icol,ipiv,ncol;
+ 	int *pivrc1,*pivrc2,*pindx;
+-	double pivot,det,dtemp;
++	IssmDouble pivot,det,dtemp;
+ 
+ 	if (!b && nvec) {
+ 		_error_("No right-hand side for nvec=%d.",nvec);
+@@ -332,19 +332,19 @@
+ 	xDelete<int>(pindx);
+ 	return noerr;
+ }/*}}}*/
+-/*FUNCTION Matrix2x2Determinant(double* Adet,double* A) {{{*/
+-void Matrix2x2Determinant(double* Adet,double* A){
++/*FUNCTION Matrix2x2Determinant(IssmDouble* Adet,IssmDouble* A) {{{*/
++void Matrix2x2Determinant(IssmDouble* Adet,IssmDouble* A){
+ 	/*Compute determinant of a 2x2 matrix*/
+ 
+ 	/*det = a*d - c*b*/
+ 	*Adet= A[0]*A[3]-A[2]*A[1];
+ }
+ /*}}}*/
+-/*FUNCTION Matrix2x2Invert(double* Ainv,double* A) {{{*/
+-void Matrix2x2Invert(double* Ainv,double* A){
++/*FUNCTION Matrix2x2Invert(IssmDouble* Ainv,IssmDouble* A) {{{*/
++void Matrix2x2Invert(IssmDouble* Ainv,IssmDouble* A){
+ 
+ 	/*Intermediaries*/
+-	double det;
++	IssmDouble det;
+ 
+ 	/*Compute determinant*/
+ 	Matrix2x2Determinant(&det,A);
+@@ -357,19 +357,19 @@
+ 	Ainv[3]=   A[0]/det; /* =  a/det */
+ 
+ }/*}}}*/
+-/*FUNCTION Matrix3x3Determinant(double* Adet,double* A) {{{*/
+-void Matrix3x3Determinant(double* Adet,double* A){
++/*FUNCTION Matrix3x3Determinant(IssmDouble* Adet,IssmDouble* A) {{{*/
++void Matrix3x3Determinant(IssmDouble* Adet,IssmDouble* A){
+ 	/*Compute determinant of a 3x3 matrix*/
+ 
+ 	/*det = a*(e*i-f*h)-b*(d*i-f*g)+c*(d*h-e*g)*/
+    *Adet= A[0]*A[4]*A[8]-A[0]*A[5]*A[7]-A[3]*A[1]*A[8]+A[3]*A[2]*A[7]+A[6]*A[1]*A[5]-A[6]*A[2]*A[4];
+ }
+ /*}}}*/
+-/*FUNCTION Matrix3x3Invert(double* Ainv,double* A) {{{*/
+-void Matrix3x3Invert(double* Ainv,double* A){
++/*FUNCTION Matrix3x3Invert(IssmDouble* Ainv,IssmDouble* A) {{{*/
++void Matrix3x3Invert(IssmDouble* Ainv,IssmDouble* A){
+ 
+ 	/*Intermediaries*/
+-	double det;
++	IssmDouble det;
+ 
+ 	/*Compute determinant*/
+ 	Matrix3x3Determinant(&det,A);
+@@ -387,8 +387,8 @@
+ 	Ainv[8]=(A[0]*A[4]-A[1]*A[3])/det; /* = (a*e-b*d)/det */
+ 
+ }/*}}}*/
+-/*FUNCTION MatrixTranspose(double* Adet,double* A) {{{*/
+-void MatrixTranspose(double* tA,double* A, int nrows, int ncols){
++/*FUNCTION MatrixTranspose(IssmDouble* Adet,IssmDouble* A) {{{*/
++void MatrixTranspose(IssmDouble* tA,IssmDouble* A, int nrows, int ncols){
+ 	/*Transpose a n*m matrix*/
+ 
+ 	int i,j;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/matrix.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/matrix.h	(revision 12474)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/matrix.h	(revision 12475)
+@@ -5,13 +5,15 @@
+ #ifndef _MATRIXUTILS_H_
+ #define _MATRIXUTILS_H_
+ 
+-int  TripleMultiply( double* a, int nrowa, int ncola, int itrna, double* b, int nrowb, int ncolb, int itrnb, double* c, int nrowc, int ncolc, int itrnc, double* d, int iaddd);
+-int  MatrixMultiply( double* a, int nrowa, int ncola, int itrna, double* b, int nrowb, int ncolb, int itrnb, double* c, int iaddc );
+-int  MatrixInverse( double* a, int ndim, int nrow, double* b, int nvec, double* pdet );
+-void Matrix2x2Invert(double* Ainv, double* A);
+-void Matrix2x2Determinant(double* Adet,double* A);
+-void Matrix3x3Invert(double* Ainv, double* A);
+-void Matrix3x3Determinant(double* Adet,double* A);
+-void MatrixTranspose(double* tA,double* A,int nrows, int ncols);
++#include "../../include/include.h"
+ 
++int  TripleMultiply( IssmDouble* a, int nrowa, int ncola, int itrna, IssmDouble* b, int nrowb, int ncolb, int itrnb, IssmDouble* c, int nrowc, int ncolc, int itrnc, IssmDouble* d, int iaddd);
++int  MatrixMultiply( IssmDouble* a, int nrowa, int ncola, int itrna, IssmDouble* b, int nrowb, int ncolb, int itrnb, IssmDouble* c, int iaddc );
++int  MatrixInverse( IssmDouble* a, int ndim, int nrow, IssmDouble* b, int nvec, IssmDouble* pdet );
++void Matrix2x2Invert(IssmDouble* Ainv, IssmDouble* A);
++void Matrix2x2Determinant(IssmDouble* Adet,IssmDouble* A);
++void Matrix3x3Invert(IssmDouble* Ainv, IssmDouble* A);
++void Matrix3x3Determinant(IssmDouble* Adet,IssmDouble* A);
++void MatrixTranspose(IssmDouble* tA,IssmDouble* A,int nrows, int ncols);
++
+ #endif //ifndef _MATRIXUTILS_H_
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/GetVerticesCoordinates.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/GetVerticesCoordinates.cpp	(revision 12474)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/GetVerticesCoordinates.cpp	(revision 12475)
+@@ -4,7 +4,7 @@
+ 
+ #include "./elements.h"
+ 
+-void GetVerticesCoordinates(double* xyz,  Node** nodes, int numvertices){
++void GetVerticesCoordinates(IssmDouble* xyz,  Node** nodes, int numvertices){
+ 
+ 	/*In debugging mode, check that nodes is not a NULL pointer*/
+ 	_assert_(nodes);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp	(revision 12474)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp	(revision 12475)
+@@ -3,7 +3,7 @@
+  */ 
+ #include "./elements.h"
+ 
+-void TransformSolutionCoord(double* solution,Node** nodes,int numnodes,int cs_enum){
++void TransformSolutionCoord(IssmDouble* solution,Node** nodes,int numnodes,int cs_enum){
+ 
+ 	int* cs_array=NULL;
+ 
+@@ -18,12 +18,12 @@
+ 	xDelete<int>(cs_array);
+ }
+ 
+-void TransformSolutionCoord(double* solution,Node** nodes,int numnodes,int* cs_array){
++void TransformSolutionCoord(IssmDouble* solution,Node** nodes,int numnodes,int* cs_array){
+ 
+ 	int     i,j;
+ 	int     numdofs   = 0;
+-	double *transform = NULL;
+-	double *values    = NULL;
++	IssmDouble *transform = NULL;
++	IssmDouble *values    = NULL;
+ 
+ 	/*Get total number of dofs*/
+ 	for(i=0;i<numnodes;i++){
+@@ -35,7 +35,7 @@
+ 	}
+ 
+ 	/*Copy current solution vector*/
+-	values=xNew<double>(numdofs);
++	values=xNew<IssmDouble>(numdofs);
+ 	for(i=0;i<numdofs;i++) values[i]=solution[i];
+ 
+ 	/*Get Coordinate Systems transform matrix*/
+@@ -47,6 +47,6 @@
+ 				&solution[0],0);
+ 
+ 	/*Free Matrices*/
+-	xDelete<double>(transform);
+-	xDelete<double>(values);
++	xDelete<IssmDouble>(transform);
++	xDelete<IssmDouble>(values);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/Arrhenius.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/Arrhenius.cpp	(revision 12474)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/Arrhenius.cpp	(revision 12475)
+@@ -5,7 +5,7 @@
+ #include "./elements.h"
+ #include <math.h>
+ 
+-double Arrhenius(double temperature,double depth,double n){
++IssmDouble Arrhenius(IssmDouble temperature,IssmDouble depth,IssmDouble n){
+ 	/*Use EISMINT Parameterization for the rheology: Payne2000
+ 	 *
+ 	 *  A(T*) = A0 exp(-Q/RT*)
+@@ -24,11 +24,11 @@
+ 	 *  Convert A to B :  B = A^(-1/n) */
+ 
+ 	/*Some physical constants (Payne2000)*/
+-	double beta=8.66*pow(10.,-4.);
+-	double R=8.314;
++	IssmDouble beta=8.66*pow(10.,-4.);
++	IssmDouble R=8.314;
+ 
+ 	/*Intermediaries*/
+-	double A,B,Tstar;
++	IssmDouble A,B,Tstar;
+ 
+ 	/*convert temperature to absolute temperature*/
+ 	_assert_(depth);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/elements.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/elements.h	(revision 12474)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/elements.h	(revision 12475)
+@@ -10,25 +10,25 @@
+ class ElementMatrix;
+ class ElementVector;
+ 
+-double Paterson(double temperature);
+-double Arrhenius(double temperature,double depth,double n);
+-void   GetVerticesCoordinates(double* xyz,  Node** nodes, int numvertices);
++IssmDouble Paterson(IssmDouble temperature);
++IssmDouble Arrhenius(IssmDouble temperature,IssmDouble depth,IssmDouble n);
++void   GetVerticesCoordinates(IssmDouble* xyz,  Node** nodes, int numvertices);
+ int    GetNumberOfDofs( Node** nodes,int numnodes,int setenum,int approximation_enum);
+ int*   GetLocalDofList( Node** nodes,int numnodes,int setenum,int approximation_enum);
+ int*   GetGlobalDofList(Node** nodes,int numnodes,int setenum,int approximation_enum);
+ #ifdef _HAVE_DIAGNOSTIC_
+-void   CoordinateSystemTransform(double** ptransform,Node** nodes,int numnodes,int* cs_array);
++void   CoordinateSystemTransform(IssmDouble** ptransform,Node** nodes,int numnodes,int* cs_array);
+ void   TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int cs_enum);
+ void   TransformInvStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int* cs_array);
+ void   TransformStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int cs_enum);
+ void   TransformStiffnessMatrixCoord(ElementMatrix* Ke,Node** nodes,int numnodes,int* cs_array);
+ void   TransformLoadVectorCoord(ElementVector* pe,Node** nodes,int numnodes,int cs_enum);
+ void   TransformLoadVectorCoord(ElementVector* pe,Node** nodes,int numnodes,int* cs_array);
+-void   TransformSolutionCoord(double* solution,Node** nodes,int numnodes,int cs_enum);
+-void   TransformSolutionCoord(double* solution,Node** nodes,int numnodes,int* cs_array);
++void   TransformSolutionCoord(IssmDouble* solution,Node** nodes,int numnodes,int cs_enum);
++void   TransformSolutionCoord(IssmDouble* solution,Node** nodes,int numnodes,int* cs_array);
+ #endif
+ 
+-inline void printarray(double* array,int lines,int cols=1){
++inline void printarray(IssmDouble* array,int lines,int cols=1){
+ 	printf("\n");
+ 	for(int i=0;i<lines;i++){  
+ 		printf("   [ ");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp	(revision 12474)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp	(revision 12475)
+@@ -21,8 +21,8 @@
+ 
+ 	int     i,j;
+ 	int     numdofs   = 0;
+-	double *transform = NULL;
+-	double *values    = NULL;
++	IssmDouble *transform = NULL;
++	IssmDouble *values    = NULL;
+ 
+ 	/*Get total number of dofs*/
+ 	for(i=0;i<numnodes;i++){
+@@ -34,7 +34,7 @@
+ 	}
+ 
+ 	/*Copy current load vector*/
+-	values=xNew<double>(pe->nrows);
++	values=xNew<IssmDouble>(pe->nrows);
+ 	for(i=0;i<pe->nrows;i++) values[i]=pe->values[i];
+ 
+ 	/*Get Coordinate Systems transform matrix*/
+@@ -46,6 +46,6 @@
+ 				&pe->values[0],0);
+ 
+ 	/*Free Matrices*/
+-	xDelete<double>(transform);
+-	xDelete<double>(values);
++	xDelete<IssmDouble>(transform);
++	xDelete<IssmDouble>(values);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp	(revision 12474)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp	(revision 12475)
+@@ -4,14 +4,14 @@
+ #include "./elements.h"
+ #include <math.h>
+ 
+-void CoordinateSystemTransform(double** ptransform,Node** nodes,int numnodes,int* cs_array){
++void CoordinateSystemTransform(IssmDouble** ptransform,Node** nodes,int numnodes,int* cs_array){
+ 
+ 	int     i,counter;
+ 	int     numdofs           = 0;
+-	double  norm;
+-	double *transform         = NULL;
+-	double *values            = NULL;
+-	double  coord_system[3][3];
++	IssmDouble  norm;
++	IssmDouble *transform         = NULL;
++	IssmDouble *values            = NULL;
++	IssmDouble  coord_system[3][3];
+ 
+ 	/*Some checks in debugging mode*/
+ 	_assert_(numnodes && nodes);
+@@ -26,7 +26,7 @@
+ 	}
+ 
+ 	/*Allocate and initialize transform matrix*/
+-	transform=xNew<double>(numdofs*numdofs);
++	transform=xNew<IssmDouble>(numdofs*numdofs);
+ 	for(i=0;i<numdofs*numdofs;i++) transform[i]=0.0;
+ 
+ 	/*Create transform matrix for all nodes (x,y for 2d and x,y,z for 3d). It is a block matrix
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp	(revision 12474)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp	(revision 12475)
+@@ -22,8 +22,8 @@
+ 
+ 	int     i,j;
+ 	int     numdofs   = 0;
+-	double *transform = NULL;
+-	double *values    = NULL;
++	IssmDouble *transform = NULL;
++	IssmDouble *values    = NULL;
+ 
+ 	/*Get total number of dofs*/
+ 	for(i=0;i<numnodes;i++){
+@@ -35,7 +35,7 @@
+ 	}
+ 
+ 	/*Copy current stiffness matrix*/
+-	values=xNew<double>(Ke->nrows*Ke->ncols);
++	values=xNew<IssmDouble>(Ke->nrows*Ke->ncols);
+ 	for(i=0;i<Ke->nrows;i++) for(j=0;j<Ke->ncols;j++) values[i*Ke->ncols+j]=Ke->values[i*Ke->ncols+j];
+ 
+ 	/*Get Coordinate Systems transform matrix*/
+@@ -48,6 +48,6 @@
+ 				&Ke->values[0],0);
+ 
+ 	/*Free Matrix*/
+-	xDelete<double>(transform);
+-	xDelete<double>(values);
++	xDelete<IssmDouble>(transform);
++	xDelete<IssmDouble>(values);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/Paterson.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/Paterson.cpp	(revision 12474)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/Paterson.cpp	(revision 12475)
+@@ -6,11 +6,13 @@
+ 
+ #include <math.h>
+ 
+-double Paterson(double temperature){
++#include "../../include/include.h"
++
++IssmDouble Paterson(IssmDouble temperature){
+ 	
+ 	/*output: */
+-	double B;
+-	double T;
++	IssmDouble B;
++	IssmDouble T;
+ 
+ 	/*Switch to celsius from Kelvin: */
+ 	T=temperature-273.15;
+@@ -29,41 +31,41 @@
+ 
+ 
+ 	if(T<=-45.0){
+-		B=pow((double)10,(double)8)*(-0.000292866376675*pow(T+50,3)+ 0.011672640664130*pow(T+50,2)  -0.325004442485481*(T+50)+  6.524779401948101);
++		B=pow((IssmPDouble)10,(IssmPDouble)8)*(-0.000292866376675*pow(T+50,3)+ 0.011672640664130*pow(T+50,2)  -0.325004442485481*(T+50)+  6.524779401948101);
+ 	}
+ 	else if((T>=-45.0) && (T<=-40.0)){
+-		B=pow((double)10,(double)8)*(-0.000292866376675*pow(T+45,3)+ 0.007279645014004*pow(T+45,2)  -0.230243014094813*(T+45)+  5.154964909039554);
++		B=pow((IssmPDouble)10,(IssmPDouble)8)*(-0.000292866376675*pow(T+45,3)+ 0.007279645014004*pow(T+45,2)  -0.230243014094813*(T+45)+  5.154964909039554);
+ 	}
+ 	else if((T>=-40.0) && (T<=-35.0)){
+-		B=pow((double)10,(double)8)*(0.000072737147457*pow(T+40,3)+  0.002886649363879*pow(T+40,2)  -0.179411542205399*(T+40)+  4.149132666831214);
++		B=pow((IssmPDouble)10,(IssmPDouble)8)*(0.000072737147457*pow(T+40,3)+  0.002886649363879*pow(T+40,2)  -0.179411542205399*(T+40)+  4.149132666831214);
+ 	}
+ 	else if((T>=-35.0) && (T<=-30.0)){
+-		B=pow((double)10,(double)8)*(-0.000086144770023*pow(T+35,3)+ 0.003977706575736*pow(T+35,2)  -0.145089762507325*(T+35)+  3.333333333333331);
++		B=pow((IssmPDouble)10,(IssmPDouble)8)*(-0.000086144770023*pow(T+35,3)+ 0.003977706575736*pow(T+35,2)  -0.145089762507325*(T+35)+  3.333333333333331);
+ 	}
+ 	else if((T>=-30.0) && (T<=-25.0)){
+-		B=pow((double)10,(double)8)*(-0.000043984685769*pow(T+30,3)+ 0.002685535025386*pow(T+30,2)  -0.111773554501713*(T+30)+  2.696559088937191);
++		B=pow((IssmPDouble)10,(IssmPDouble)8)*(-0.000043984685769*pow(T+30,3)+ 0.002685535025386*pow(T+30,2)  -0.111773554501713*(T+30)+  2.696559088937191);
+ 	}
+ 	else if((T>=-25.0) && (T<=-20.0)){
+-		B=pow((double)10,(double)8)*(-0.000029799523463*pow(T+25,3)+ 0.002025764738854*pow(T+25,2)  -0.088217055680511*(T+25)+  2.199331606342181);
++		B=pow((IssmPDouble)10,(IssmPDouble)8)*(-0.000029799523463*pow(T+25,3)+ 0.002025764738854*pow(T+25,2)  -0.088217055680511*(T+25)+  2.199331606342181);
+ 	}
+ 	else if((T>=-20.0) && (T<=-15.0)){
+-		B=pow((double)10,(double)8)*(0.000136920904777*pow(T+20,3)+  0.001578771886910*pow(T+20,2)  -0.070194372551690*(T+20)+  1.805165505978111);
++		B=pow((IssmPDouble)10,(IssmPDouble)8)*(0.000136920904777*pow(T+20,3)+  0.001578771886910*pow(T+20,2)  -0.070194372551690*(T+20)+  1.805165505978111);
+ 	}
+ 	else if((T>=-15.0) && (T<=-10.0)){
+-		B=pow((double)10,(double)8)*(-0.000899763781026*pow(T+15,3)+ 0.003632585458564*pow(T+15,2)  -0.044137585824322*(T+15)+  1.510778053489523);
++		B=pow((IssmPDouble)10,(IssmPDouble)8)*(-0.000899763781026*pow(T+15,3)+ 0.003632585458564*pow(T+15,2)  -0.044137585824322*(T+15)+  1.510778053489523);
+ 	}
+ 	else if((T>=-10.0) && (T<=-5.0)){
+-		B=pow((double)10,(double)8)*(0.001676964325070*pow(T+10,3)-  0.009863871256831*pow(T+10,2)  -0.075294014815659*(T+10)+  1.268434288203714);
++		B=pow((IssmPDouble)10,(IssmPDouble)8)*(0.001676964325070*pow(T+10,3)-  0.009863871256831*pow(T+10,2)  -0.075294014815659*(T+10)+  1.268434288203714);
+ 	}
+ 	else if((T>=-5.0) && (T<=-2.0)){
+-		B=pow((double)10,(double)8)*(-0.003748937622487*pow(T+5,3)+0.015290593619213*pow(T+5,2)  -0.048160403003748*(T+5)+  0.854987973338348);
++		B=pow((IssmPDouble)10,(IssmPDouble)8)*(-0.003748937622487*pow(T+5,3)+0.015290593619213*pow(T+5,2)  -0.048160403003748*(T+5)+  0.854987973338348);
+ 	}
+ 	else if(T>=-2.0){
+-		B=pow((double)10,(double)8)*(-0.003748937622488*pow(T+2,3)-0.018449844983174*pow(T+2,2)  -0.057638157095631*(T+2)+  0.746900791092860);
++		B=pow((IssmPDouble)10,(IssmPDouble)8)*(-0.003748937622488*pow(T+2,3)-0.018449844983174*pow(T+2,2)  -0.057638157095631*(T+2)+  0.746900791092860);
+ 	}
+ 
+ 	/*B cannot be negative!*/
+-	if(B<0) B=pow((double)10,(double)6);
++	if(B<0) B=pow((IssmPDouble)10,(IssmPDouble)6);
+ 
+ 	return B;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp	(revision 12474)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp	(revision 12475)
+@@ -22,8 +22,8 @@
+ 
+ 	int     i,j;
+ 	int     numdofs   = 0;
+-	double *transform = NULL;
+-	double *values    = NULL;
++	IssmDouble *transform = NULL;
++	IssmDouble *values    = NULL;
+ 
+ 	/*Get total number of dofs*/
+ 	for(i=0;i<numnodes;i++){
+@@ -35,7 +35,7 @@
+ 	}
+ 
+ 	/*Copy current stiffness matrix*/
+-	values=xNew<double>(Ke->nrows*Ke->ncols);
++	values=xNew<IssmDouble>(Ke->nrows*Ke->ncols);
+ 	for(i=0;i<Ke->nrows;i++) for(j=0;j<Ke->ncols;j++) values[i*Ke->ncols+j]=Ke->values[i*Ke->ncols+j];
+ 
+ 	/*Get Coordinate Systems transform matrix*/
+@@ -48,6 +48,6 @@
+ 				&Ke->values[0],0);
+ 
+ 	/*Free Matrix*/
+-	xDelete<double>(transform);
+-	xDelete<double>(values);
++	xDelete<IssmDouble>(transform);
++	xDelete<IssmDouble>(values);
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12475-12476.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12475-12476.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12475-12476.diff	(revision 12679)
@@ -0,0 +1,296 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12475)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12476)
+@@ -15,21 +15,21 @@
+ #include "../../shared/shared.h"
+ #include <float.h>
+ 
+-void BrentSearch(double* psearch_scalar,double* pJ,OptPars* optpars,double (*f)(double,OptArgs*), OptArgs* optargs){
++void BrentSearch(IssmDouble* psearch_scalar,IssmDouble* pJ,OptPars* optpars,IssmDouble (*f)(IssmDouble,OptArgs*), OptArgs* optargs){
+ 
+ 	/* This routine is optimizing a given function using Brent's method
+ 	 * (Golden or parabolic procedure)*/
+ 
+ 	/*Intermediary*/
+-	double si,gold,intervalgold,oldintervalgold;
+-	double parab_num,parab_den;
+-	double distance,cm_jump;
+-	double fxmax,fxmin,fxbest;
+-	double fx,fx1,fx2;
+-	double xmax,xmin,xbest;
+-	double x,x1,x2,xm;
+-	double tol1,tol2,seps;
+-	double tolerance=1.e-4;
++	IssmDouble si,gold,intervalgold,oldintervalgold;
++	IssmDouble parab_num,parab_den;
++	IssmDouble distance,cm_jump;
++	IssmDouble fxmax,fxmin,fxbest;
++	IssmDouble fx,fx1,fx2;
++	IssmDouble xmax,xmin,xbest;
++	IssmDouble x,x1,x2,xm;
++	IssmDouble tol1,tol2,seps;
++	IssmDouble tolerance=1.e-4;
+ 	int    maxiter,iter;
+ 	bool   loop=true,goldenflag;
+ 
+@@ -57,7 +57,7 @@
+ 	}
+ 
+ 	/*initialize optimization variables*/
+-	seps=sqrt(DBL_EPSILON);    //precision of a double
++	seps=sqrt(DBL_EPSILON);    //precision of a IssmDouble
+ 	distance=0.0;              //new_x=old_x + distance
+ 	gold=0.5*(3.0-sqrt(5.0));  //gold = 1 - golden ratio
+ 	intervalgold=0.0;          //distance used by Golden procedure
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/extrema.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/extrema.cpp	(revision 12475)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/extrema.cpp	(revision 12476)
+@@ -8,8 +8,9 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
++#include "../../include/include.h"
+ 
+-double min(double a,double b){
++IssmDouble min(IssmDouble a,IssmDouble b){
+ 	if (a<b)return a;
+ 	else return b;
+ }
+@@ -17,7 +18,7 @@
+ 	if (a<b)return a;
+ 	else return b;
+ }
+-double max(double a,double b){
++IssmDouble max(IssmDouble a,IssmDouble b){
+ 	if (a>b)return a;
+ 	else return b;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.cpp	(revision 12475)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.cpp	(revision 12476)
+@@ -1,7 +1,7 @@
+ /*This routine only used by Intel compler: */
+ #ifdef _INTEL_WIN_
+ 
+-int isnan(double x){
++int isnan(IssmDouble x){
+ 	if (x!=x)return 1;
+ 	else return 0;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h	(revision 12475)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h	(revision 12476)
+@@ -6,7 +6,7 @@
+ #define _ISNAN_INTEL_H_
+ 
+ #ifdef _INTEL_WIN_
+-int isnan(double X);
++int isnan(IssmDouble X);
+ #endif
+ 
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12475)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12476)
+@@ -21,7 +21,7 @@
+ 
+ 	/*intermediary: */
+ 	int     dummy;
+-	double* analyses=NULL;
++	IssmDouble* analyses=NULL;
+ 	char**  strings=NULL;
+ 	char*   string=NULL;
+ 	int     numanalyses;
+@@ -64,7 +64,7 @@
+ 	strcpy(outstring,strings[found]);
+ 
+ 	/*Free ressources*/
+-	xDelete<double>(analyses);
++	xDelete<IssmDouble>(analyses);
+ 	for(i=0;i<numanalyses;i++){
+ 		string=strings[i];
+ 		xDelete<char>(string);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp	(revision 12475)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp	(revision 12476)
+@@ -14,12 +14,12 @@
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ #include "../../shared/shared.h"
+ 
+-double UnitConversionScaleFactor(int type_enum);
++IssmDouble UnitConversionScaleFactor(int type_enum);
+ /*}}}*/
+ 
+-void UnitConversion(double* values, int numvalues,int direction_enum, int type_enum){
++void UnitConversion(IssmDouble* values, int numvalues,int direction_enum, int type_enum){
+ 
+-	double scale;
++	IssmDouble scale;
+ 	int i;
+ 
+ 	/*Get scaling factor: */
+@@ -32,7 +32,7 @@
+ 
+ }
+ 
+-double UnitConversion(double value, int direction_enum, int type_enum){
++IssmDouble UnitConversion(IssmDouble value, int direction_enum, int type_enum){
+ 
+ 	UnitConversion(&value,1,direction_enum,type_enum);
+ 
+@@ -40,11 +40,11 @@
+ }
+ 
+ 
+-double UnitConversionScaleFactor(int type_enum){
++IssmDouble UnitConversionScaleFactor(int type_enum){
+ 
+-	double yts=365.0*24.0*3600.0;
++	IssmDouble yts=365.0*24.0*3600.0;
+ 	
+-	double scale;
++	IssmDouble scale;
+ 	switch(type_enum){
+ 		case TimesteppingStartTimeEnum:              scale=1.0/yts;break; //yr
+ 		case TimesteppingFinalTimeEnum:              scale=1.0/yts;break; //yr
+@@ -66,7 +66,7 @@
+ 		case SurfaceforcingsPrecipitationEnum:       scale=yts;break; //m/yr
+ 		case SurfaceforcingsMassBalanceEnum:         scale=yts;break; //m/yr
+ 		case MisfitEnum:                             scale=pow(yts,2);break; //(m/yr)^2
+-		case MassFluxEnum:                           scale=pow((double)10,-12)*yts;break; // (GigaTon/year)
++		case MassFluxEnum:                           scale=pow((IssmDouble)10,-12)*yts;break; // (GigaTon/year)
+ 		default: scale=1.0; break;
+ 	}
+ 	return scale;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp	(revision 12475)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp	(revision 12476)
+@@ -4,11 +4,11 @@
+ #include "./isnan.h"
+ #include <math.h>
+ 
+-void XZvectorsToCoordinateSystem(double* T,double* xzvectors){
++void XZvectorsToCoordinateSystem(IssmDouble* T,IssmDouble* xzvectors){
+ 
+ 	int		i,j;
+-	double	x[3],y[3],z[3];
+-	double	x_norm, y_norm, z_norm;
++	IssmDouble	x[3],y[3],z[3];
++	IssmDouble	x_norm, y_norm, z_norm;
+ 
+ 	for(i=0;i<6;i++){
+ 		if(isnan(xzvectors[i])){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp	(revision 12475)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp	(revision 12476)
+@@ -13,19 +13,19 @@
+ 
+ #include "../../objects/objects.h"
+ 
+-void IsInputConverged(double* peps, Input** new_inputs,Input** old_inputs,int num_inputs,int criterion_enum){
++void IsInputConverged(IssmDouble* peps, Input** new_inputs,Input** old_inputs,int num_inputs,int criterion_enum){
+ 
+ 	int i,j;
+ 
+ 	/*output: */
+-	double eps;
++	IssmDouble eps;
+ 	
+ 	/*intermediary: */
+-	double *newvalues     = NULL;
+-	double *oldvalues     = NULL;
++	IssmDouble *newvalues     = NULL;
++	IssmDouble *oldvalues     = NULL;
+ 	int     num_values;
+-	double  ndu        = 0;
+-	double  nu         = 0;
++	IssmDouble  ndu        = 0;
++	IssmDouble  nu         = 0;
+ 
+ 	if(criterion_enum==RelativeEnum){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/cross.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/cross.cpp	(revision 12475)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/cross.cpp	(revision 12476)
+@@ -8,8 +8,10 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-void cross(double* result,double* vector1,double* vector2){
++#include "../../include/include.h"
+ 
++void cross(IssmDouble* result,IssmDouble* vector1,IssmDouble* vector2){
++
+ 	/*result,vector1 and vector2 are all assumed to be of size 3: */
+ 
+ 	result[0]=vector1[1]*vector2[2]-vector1[2]*vector2[1];
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/numerics.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/numerics.h	(revision 12475)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/numerics.h	(revision 12476)
+@@ -15,19 +15,19 @@
+ struct OptArgs;
+ struct OptPars;
+ 
+-double min(double a,double b);
+-double max(double a,double b);
++IssmDouble min(IssmDouble a,IssmDouble b);
++IssmDouble max(IssmDouble a,IssmDouble b);
+ int    min(int a,int b);
+ int    max(int a,int b);
+-double OptFunc(double scalar, OptArgs* optargs);
+-void   BrentSearch(double* psearch_scalar,double* pJ,OptPars* optpars,double (*f)(double,OptArgs*), OptArgs* optargs);
+-void   OptimalSearch(double* psearch_scalar,double* pJ,OptPars* optpars,double (*f)(double,OptArgs*), OptArgs* optargs);
+-void   cross(double* result,double* vector1,double* vector2);
+-void   IsInputConverged(double* peps, Input** new_inputs,Input** old_inputs,int num_inputs,int criterion_enum);
+-void   UnitConversion(double* values, int numvalues,int direction_enum, int type_enum);
+-double UnitConversion(double value, int direction_enum, int type_enum);
++IssmDouble OptFunc(IssmDouble scalar, OptArgs* optargs);
++void   BrentSearch(IssmDouble* psearch_scalar,IssmDouble* pJ,OptPars* optpars,IssmDouble (*f)(IssmDouble,OptArgs*), OptArgs* optargs);
++void   OptimalSearch(IssmDouble* psearch_scalar,IssmDouble* pJ,OptPars* optpars,IssmDouble (*f)(IssmDouble,OptArgs*), OptArgs* optargs);
++void   cross(IssmDouble* result,IssmDouble* vector1,IssmDouble* vector2);
++void   IsInputConverged(IssmDouble* peps, Input** new_inputs,Input** old_inputs,int num_inputs,int criterion_enum);
++void   UnitConversion(IssmDouble* values, int numvalues,int direction_enum, int type_enum);
++IssmDouble UnitConversion(IssmDouble value, int direction_enum, int type_enum);
+ char*  OptionsFromAnalysis(Parameters* parameters,int analysis_type);
+-void   XZvectorsToCoordinateSystem(double* T,double* xzvectors);
++void   XZvectorsToCoordinateSystem(IssmDouble* T,IssmDouble* xzvectors);
+ #ifdef _HAVE_PETSC_
+ void   PetscOptionsFromAnalysis(Parameters* parameters,int analysis_type);
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp	(revision 12475)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp	(revision 12476)
+@@ -15,17 +15,17 @@
+ #include "../../shared/shared.h"
+ #include <float.h>
+ 
+-void OptimalSearch(double* psearch_scalar,double* pJ,OptPars* optpars,double (*f)(double,OptArgs*), OptArgs* optargs){
++void OptimalSearch(IssmDouble* psearch_scalar,IssmDouble* pJ,OptPars* optpars,IssmDouble (*f)(IssmDouble,OptArgs*), OptArgs* optargs){
+ 
+ 	/* This routine is optimizing a given function*/
+ 
+ 	/*function values: */
+-	double fx1,fx2,fxbest;
+-	double x1,x2,xmin,xbest;
++	IssmDouble fx1,fx2,fxbest;
++	IssmDouble x1,x2,xmin,xbest;
+ 
+ 	/*tolerances: */
+-	double seps;
+-	double tolerance=1.e-4;
++	IssmDouble seps;
++	IssmDouble tolerance=1.e-4;
+ 	int    maxiter;
+ 
+ 	/*counters: */
Index: /issm/oecreview/Archive/12321-12677/ISSM-12476-12477.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12476-12477.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12476-12477.diff	(revision 12679)
@@ -0,0 +1,928 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12477)
+@@ -18,17 +18,17 @@
+ 	Vector* KUold=NULL;
+ 	Vector* KUoldF=NULL;
+ 	Vector* duf=NULL;
+-	double ndu,nduinf,nu;
+-	double nKUF;
+-	double nKUoldF;
+-	double nF;
+-	double solver_residue,res;
++	IssmDouble ndu,nduinf,nu;
++	IssmDouble nKUF;
++	IssmDouble nKUoldF;
++	IssmDouble nF;
++	IssmDouble solver_residue,res;
+ 
+ 	/*convergence options*/
+-	double eps_res;
+-	double eps_rel;
+-	double eps_abs;
+-	double yts;
++	IssmDouble eps_res;
++	IssmDouble eps_rel;
++	IssmDouble eps_abs;
++	IssmDouble yts;
+ 
+ 	/*If uf is NULL in input, f-set is nil, model is fully constrained, therefore converged from 
+ 	 * the get go: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlconvergence.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlconvergence.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlconvergence.cpp	(revision 12477)
+@@ -16,7 +16,7 @@
+ #include "../modules/modules.h"
+ #include "./solutions.h"
+ 
+-bool controlconvergence(double J, double tol_cm){
++bool controlconvergence(IssmDouble J, IssmDouble tol_cm){
+ 
+ 	int i;
+ 	bool converged=false;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/thermal_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/thermal_core.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/thermal_core.cpp	(revision 12477)
+@@ -15,7 +15,7 @@
+ void thermal_core(FemModel* femmodel){
+ 
+ 	/*intermediary*/
+-	double melting_offset;
++	IssmDouble melting_offset;
+ 	bool   save_results;
+ 	bool   dakota_analysis  = false;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/solutions.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/solutions.h	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/solutions.h	(revision 12477)
+@@ -17,7 +17,7 @@
+ void gradient_core(FemModel* femmodel,int n=0,bool orthogonalize=false);
+ void diagnostic_core(FemModel* femmodel);
+ void hydrology_core(FemModel* femmodel);
+-void hydrology_core_step(FemModel* femmodel,int step, double time);
++void hydrology_core_step(FemModel* femmodel,int step, IssmDouble time);
+ void thermal_core(FemModel* femmodel);
+ void enthalpy_core(FemModel* femmodel);
+ void surfaceslope_core(FemModel* femmodel);
+@@ -29,20 +29,20 @@
+ void slopecompute_core(FemModel* femmodel);
+ void steadystate_core(FemModel* femmodel);
+ void transient_core(FemModel* femmodel);
+-double objectivefunction(double search_scalar,OptArgs* optargs);
++IssmDouble objectivefunction(IssmDouble search_scalar,OptArgs* optargs);
+ 
+ //convergence:
+ void convergence(bool* pconverged, Matrix* K_ff,Vector* p_f,Vector* u_f,Vector* u_f_old,Parameters* parameters);
+-bool controlconvergence(double J,double tol_cm);
++bool controlconvergence(IssmDouble J,IssmDouble tol_cm);
+ bool steadystateconvergence(FemModel* femmodel);
+ 
+ //optimization
+-int GradJSearch(double* search_vector,FemModel* femmodel,int step);
++int GradJSearch(IssmDouble* search_vector,FemModel* femmodel,int step);
+ 
+ //diverse
+ void ProcessArguments(int* solution,char** pbinname,char** poutbinname,char** ppetscname,char** plockname,int argc,char **argv);
+ void WriteLockFile(char* filename);
+-void controlrestart(FemModel* femmodel,double* J);
++void controlrestart(FemModel* femmodel,IssmDouble* J);
+ void ResetBoundaryConditions(FemModel* femmodel, int analysis_type);
+ 
+ //solution configuration
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp	(revision 12477)
+@@ -15,8 +15,8 @@
+ void gradient_core(FemModel* femmodel,int step,bool orthogonalize){ 
+ 
+ 	/*Intermediaries*/
+-	double  norm_inf;
+-	double *norm_list    = NULL;
++	IssmDouble  norm_inf;
++	IssmDouble *norm_list    = NULL;
+ 	Vector*     new_gradient = NULL;
+ 	Vector*     gradient     = NULL;
+ 	Vector*     old_gradient = NULL;
+@@ -47,5 +47,5 @@
+ 	ControlInputScaleGradientx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,norm_list,step);
+ 
+ 	/*Clean up and return*/
+-	xDelete<double>(norm_list);
++	xDelete<IssmDouble>(norm_list);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystateconvergence.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystateconvergence.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystateconvergence.cpp	(revision 12477)
+@@ -27,7 +27,7 @@
+ 	int velocityenums[8]={VxEnum,VxPicardEnum,VyEnum,VyPicardEnum,VzEnum,VzPicardEnum,PressureEnum,PressurePicardEnum}; //pairs of enums (new and old) on which to carry out the converence tests
+ 	int temperatureenums[2]={TemperatureEnum,TemperatureOldEnum};
+ 	int convergencecriterion[1]={RelativeEnum}; //criterions for convergence, RelativeEnum or AbsoluteEnum 
+-	double convergencecriterionvalue[1]; //value of criterion to be respected
++	IssmDouble convergencecriterionvalue[1]; //value of criterion to be respected
+ 
+ 	/*retrieve parameters: */
+ 	femmodel->parameters->FindParam(&convergencecriterionvalue[0],SteadystateReltolEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12477)
+@@ -29,9 +29,9 @@
+ 	char *petscfilename  = NULL;
+ 
+ 	/*time*/
+-	double   start, finish;
+-	double   start_core, finish_core;
+-	double   start_init, finish_init;
++	IssmPDouble   start, finish;
++	IssmPDouble   start_core, finish_core;
++	IssmPDouble   start_init, finish_init;
+ 	int      ierr;
+ 
+ 	ISSMBOOT();
+@@ -49,7 +49,7 @@
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); start=MPI_Wtime();
+ 	#else
+-	start=(double)clock();
++	start=(IssmPDouble)clock();
+ 	#endif
+ 
+ 	/*Size and rank: */
+@@ -72,7 +72,7 @@
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); start_init=MPI_Wtime();
+ 	#else
+-	start_init=(double)clock();
++	start_init=(IssmPDouble)clock();
+ 	#endif
+ 	femmodel=new FemModel(binfilename,outbinfilename,solution_type,analyses,numanalyses);
+ 	
+@@ -96,14 +96,14 @@
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); finish_init=MPI_Wtime();
+ 	#else
+-	finish_init=(double)clock();
++	finish_init=(IssmPDouble)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();
++	start_core=(IssmPDouble)clock();
+ 	#endif
+ 	
+ 	if(dakota_analysis){
+@@ -129,7 +129,7 @@
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
+ 	#else
+-	finish_core=(double)clock();
++	finish_core=(IssmPDouble)clock();
+ 	#endif
+ 	
+ 	_printf_(true,"write results to disk:\n");
+@@ -157,7 +157,7 @@
+ 	_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();
++	finish=(IssmPDouble)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);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp	(revision 12477)
+@@ -22,7 +22,7 @@
+ void transient_core(FemModel* femmodel){
+ 
+ 	/*parameters: */
+-	double starttime,finaltime,dt,yts;
++	IssmDouble starttime,finaltime,dt,yts;
+ 	bool   isdiagnostic,isprognostic,isthermal,isgroundingline,isenthalpy;
+ 	bool   save_results,dakota_analysis;
+ 	bool   time_adapt=false;
+@@ -33,7 +33,7 @@
+ 	
+ 	/*intermediary: */
+ 	int    step;
+-	double time;
++	IssmDouble time;
+ 
+ 	//first recover parameters common to all solutions
+ 	femmodel->parameters->FindParam(&dim,MeshDimensionEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/objectivefunction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/objectivefunction.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/objectivefunction.cpp	(revision 12477)
+@@ -19,12 +19,12 @@
+ #include "../include/include.h"
+ /*}}}*/
+ 
+-double objectivefunction(double search_scalar,OptArgs* optargs){
++IssmDouble objectivefunction(IssmDouble search_scalar,OptArgs* optargs){
+ 
+ 	int i;  
+ 	
+ 	/*output: */
+-	double J;
++	IssmDouble J;
+ 	
+ 	/*parameters: */
+ 	int        solution_type,analysis_type;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/hydrology_core_step.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/hydrology_core_step.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/hydrology_core_step.cpp	(revision 12477)
+@@ -12,7 +12,7 @@
+ #include "../include/include.h"
+ #include "../solvers/solvers.h"
+ 
+-void hydrology_core_step(FemModel* femmodel,int step, double time){
++void hydrology_core_step(FemModel* femmodel,int step, IssmDouble time){
+ 	
+ 	bool modify_loads=true;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlrestart.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlrestart.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlrestart.cpp	(revision 12477)
+@@ -6,7 +6,7 @@
+ #include "../modules/modules.h"
+ #include "../EnumDefinitions/EnumDefinitions.h"
+ 
+-void controlrestart(FemModel* femmodel,double* J){
++void controlrestart(FemModel* femmodel,IssmDouble* J){
+ 
+ 	int      num_controls;
+ 	int*     control_type = NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/control_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/control_core.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/control_core.cpp	(revision 12477)
+@@ -19,7 +19,7 @@
+ 	/*parameters: */
+ 	int     num_controls,num_responses;
+ 	int     nsteps;
+-	double  tol_cm;
++	IssmDouble  tol_cm;
+ 	bool    cm_gradient;
+ 	int     dim;
+ 	int     solution_type;
+@@ -27,13 +27,13 @@
+ 	bool    dakota_analysis=false;
+ 
+ 	int*    control_type = NULL;
+-	double* responses=NULL;
++	IssmDouble* responses=NULL;
+ 	int*    step_responses=NULL;
+-	double* maxiter=NULL;
+-	double* cm_jump=NULL;
++	IssmDouble* maxiter=NULL;
++	IssmDouble* cm_jump=NULL;
+ 		
+ 	/*intermediary: */
+-	double  search_scalar=1;
++	IssmDouble  search_scalar=1;
+ 	OptArgs optargs;
+ 	OptPars optpars;
+ 
+@@ -42,7 +42,7 @@
+ 	void (*adjointcore)(FemModel*)=NULL;
+ 
+ 	/*output: */
+-	double* J=NULL;
++	IssmDouble* J=NULL;
+ 
+ 	/*Recover parameters used throughout the solution*/
+ 	femmodel->parameters->FindParam(&num_controls,InversionNumControlParametersEnum);
+@@ -69,7 +69,7 @@
+ 	if(isstokes) solutioncore(femmodel);
+ 
+ 	/*Initialize responses: */
+-	J=xNew<double>(nsteps);
++	J=xNew<IssmDouble>(nsteps);
+ 	step_responses=xNew<int>(num_responses);
+ 		
+ 	/*Initialize some of the BrentSearch arguments: */
+@@ -121,8 +121,8 @@
+ 	/*Free ressources: */
+ 	xDelete<int>(control_type);
+ 	xDelete<int>(step_responses);
+-	xDelete<double>(maxiter);
+-	xDelete<double>(responses);
+-	xDelete<double>(cm_jump);
+-	xDelete<double>(J);
++	xDelete<IssmDouble>(maxiter);
++	xDelete<IssmDouble>(responses);
++	xDelete<IssmDouble>(cm_jump);
++	xDelete<IssmDouble>(J);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/hydrology_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/hydrology_core.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/hydrology_core.cpp	(revision 12477)
+@@ -16,10 +16,10 @@
+ 	int i;
+ 
+ 	/*intermediary*/
+-	double time;
++	IssmDouble time;
+ 	int    nsteps;
+-	double starttime,final_time;
+-	double dt;
++	IssmDouble starttime,final_time;
++	IssmDouble dt;
+ 	bool   save_results;
+ 	int    output_frequency;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12477)
+@@ -7,7 +7,7 @@
+ 
+ /*Local prototypes*/
+ void ProcessArguments2(char** pbinfilename,char** poutbinfilename,char** plockfilename,int argc,char **argv);
+-void ProcessInputfile(double **px,double **py,double **pdata,int *pnobs,double **px_interp,double **py_interp,int *pninterp,Options **poptions,FILE* fid);
++void ProcessInputfile(IssmDouble **px,IssmDouble **py,IssmDouble **pdata,int *pnobs,IssmDouble **px_interp,IssmDouble **py_interp,int *pninterp,Options **poptions,FILE* fid);
+ 
+ int main(int argc,char **argv){
+ 
+@@ -23,16 +23,16 @@
+ 
+ 	/*Input*/
+ 	int      ninterp,nobs;
+-	double  *x        = NULL;
+-	double  *y        = NULL;
+-	double  *data     = NULL;
+-	double  *x_interp = NULL;
+-	double  *y_interp = NULL;
++	IssmDouble  *x        = NULL;
++	IssmDouble  *y        = NULL;
++	IssmDouble  *data     = NULL;
++	IssmDouble  *x_interp = NULL;
++	IssmDouble  *y_interp = NULL;
+ 	Options *options  = NULL;
+ 
+ 	/*Output*/
+-	double *predictions = NULL;
+-	double *error       = NULL;
++	IssmDouble *predictions = NULL;
++	IssmDouble *error       = NULL;
+ 
+ 	ISSMBOOT();
+ 
+@@ -88,13 +88,13 @@
+ 	xDelete<char>(lockfilename);
+ 	xDelete<char>(binfilename);
+ 	xDelete<char>(outbinfilename);
+-	xDelete<double>(x);
+-	xDelete<double>(y);
+-	xDelete<double>(data);
+-	xDelete<double>(x_interp);
+-	xDelete<double>(y_interp);
+-	xDelete<double>(predictions);
+-	xDelete<double>(error);
++	xDelete<IssmDouble>(x);
++	xDelete<IssmDouble>(y);
++	xDelete<IssmDouble>(data);
++	xDelete<IssmDouble>(x_interp);
++	xDelete<IssmDouble>(y_interp);
++	xDelete<IssmDouble>(predictions);
++	xDelete<IssmDouble>(error);
+ 	delete options;
+ 	delete results;
+ 
+@@ -133,14 +133,14 @@
+ 	*plockfilename=lockfilename;
+ }
+ 
+-void ProcessInputfile(double **px,double **py,double **pdata,int *pnobs,double **px_interp,double **py_interp,int *pninterp,Options **poptions,FILE* fid){
++void ProcessInputfile(IssmDouble **px,IssmDouble **py,IssmDouble **pdata,int *pnobs,IssmDouble **px_interp,IssmDouble **py_interp,int *pninterp,Options **poptions,FILE* fid){
+ 
+ 	int      ninterp,nobs,numoptions;
+-	double  *x        = NULL;
+-	double  *y        = NULL;
+-	double  *data     = NULL;
+-	double  *x_interp = NULL;
+-	double  *y_interp = NULL;
++	IssmDouble  *x        = NULL;
++	IssmDouble  *y        = NULL;
++	IssmDouble  *data     = NULL;
++	IssmDouble  *x_interp = NULL;
++	IssmDouble  *y_interp = NULL;
+ 	Options *options  = NULL;
+ 	Option  *option   = NULL;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12477)
+@@ -16,7 +16,7 @@
+ #include <tao.h>
+ 
+ /*Local prototype*/
+-int FormFunctionGradient(TaoSolver,Vec,double*,Vec,void*);
++int FormFunctionGradient(TaoSolver,Vec,IssmDouble*,Vec,void*);
+ int IssmMonitor(TaoSolver,void*);
+ typedef struct {
+ 	FemModel* femmodel;
+@@ -30,7 +30,7 @@
+ 	int        nsteps,maxiter;
+ 	AppCtx     user;
+ 	TaoSolver  tao;
+-	double    *dummy          = NULL;
++	IssmDouble    *dummy          = NULL;
+ 	int       *control_list   = NULL;
+ 	Vector    *X              = NULL;
+ 	Vector    *XL             = NULL;
+@@ -49,7 +49,7 @@
+ 	femmodel->parameters->FindParam(&nsteps,InversionNstepsEnum);
+ 	femmodel->parameters->FindParam(&dummy,NULL,NULL,InversionMaxiterPerStepEnum);
+ 	femmodel->parameters->SetParam(false,SaveResultsEnum);
+-	maxiter=nsteps*(int)dummy[0]; xDelete<double>(dummy);
++	maxiter=nsteps*(int)dummy[0]; xDelete<IssmDouble>(dummy);
+ 
+ 	/*Initialize TAO*/
+ 	_printf_(VerboseControl(),"%s\n","   Initializing the Toolkit for Advanced Optimization (TAO)");
+@@ -99,14 +99,14 @@
+ 	TaoDestroy(&tao);
+ 	TaoFinalize();
+ }
+-int FormFunctionGradient(TaoSolver tao, Vec Xpetsc, double *fcn,Vec G,void *userCtx){
++int FormFunctionGradient(TaoSolver tao, Vec Xpetsc, IssmDouble *fcn,Vec G,void *userCtx){
+ 
+ 	/*Retreive arguments*/
+ 	int       solution_type,num_cost_functions;
+ 	AppCtx   *user           = (AppCtx *)userCtx;
+ 	FemModel *femmodel       = user->femmodel;
+ 	int      *cost_functions = NULL;
+-	double   *cost_functionsd= NULL;
++	IssmDouble   *cost_functionsd= NULL;
+ 	Vector   *gradient       = NULL;
+ 	Vector   *X              = NULL;
+ 
+@@ -146,13 +146,13 @@
+ 
+ 	/*Clean-up and return*/
+ 	xDelete<int>(cost_functions);
+-	xDelete<double>(cost_functionsd);
++	xDelete<IssmDouble>(cost_functionsd);
+ 	return 0;
+ }
+ int IssmMonitor(TaoSolver tao, void *userCtx){
+ 
+ 	int       i,its,num_responses;
+-	double    f,gnorm,cnorm,xdiff;
++	IssmDouble    f,gnorm,cnorm,xdiff;
+ 	AppCtx   *user      = (AppCtx *)userCtx;
+ 	FemModel *femmodel  = user->femmodel;
+ 	Element  *element   = NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.h	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.h	(revision 12477)
+@@ -1,5 +1,5 @@
+ /*!\file:  SeqMat.h
+- * \brief wrapper to SeqMat objects, which are just wrappers to a simple double* buffer.
++ * \brief wrapper to SeqMat objects, which are just wrappers to a simple IssmDouble* buffer.
+  */ 
+ 
+ #ifndef _SEQMAT_H_
+@@ -23,26 +23,26 @@
+ 	public:
+ 	
+ 		int M,N; 
+-		double* matrix; 
++		IssmDouble* matrix; 
+ 
+ 		/*SeqMat constructors, destructors {{{*/
+ 		SeqMat();
+ 		SeqMat(int M,int N);
+-		SeqMat(int M,int N,double sparsity);
+-		SeqMat(double* serial_mat,int M,int N,double sparsity);
++		SeqMat(int M,int N,IssmDouble sparsity);
++		SeqMat(IssmDouble* serial_mat,int M,int N,IssmDouble sparsity);
+ 		SeqMat(int M,int N,int connectivity,int numberofdofspernode);
+ 		~SeqMat();
+ 		/*}}}*/
+ 		/*SeqMat specific routines {{{*/
+ 		void Echo(void);
+ 		void Assemble(void);
+-		double Norm(NormMode norm_type);
++		IssmDouble Norm(NormMode norm_type);
+ 		void GetSize(int* pM,int* pN);
+ 		void GetLocalSize(int* pM,int* pN);
+ 		void MatMult(SeqVec* X,SeqVec* AX);
+ 		SeqMat* Duplicate(void);
+-		double* ToSerial(void);
+-		void SetValues(int m,int* idxm,int n,int* idxn,double* values,InsMode mode);
++		IssmDouble* ToSerial(void);
++		void SetValues(int m,int* idxm,int n,int* idxn,IssmDouble* values,InsMode mode);
+ 		void Convert(MatrixType type);
+ 		/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12477)
+@@ -30,25 +30,25 @@
+ 
+ 	this->M=pM;
+ 	this->vector=NULL;
+-	if(this->M) this->vector=xNewZeroInit<double>(pM);
++	if(this->M) this->vector=xNewZeroInit<IssmDouble>(pM);
+ }
+ /*}}}*/
+-/*FUNCTION SeqVec::SeqVec(double* serial_vec,int M){{{*/
+-SeqVec::SeqVec(double* buffer,int pM){
++/*FUNCTION SeqVec::SeqVec(IssmDouble* serial_vec,int M){{{*/
++SeqVec::SeqVec(IssmDouble* buffer,int pM){
+ 
+ 	int i,j;
+ 
+ 	this->M=pM;
+ 	this->vector=NULL;
+ 	if(this->M){
+-		this->vector=xNewZeroInit<double>(pM);
+-		memcpy(this->vector,buffer,pM*sizeof(double));
++		this->vector=xNewZeroInit<IssmDouble>(pM);
++		xMemCpy<IssmDouble>(this->vector,buffer,pM);
+ 	}
+ }
+ /*}}}*/
+ 		/*FUNCTION SeqVec::~SeqVec(){{{*/
+ SeqVec::~SeqVec(){
+-	xDelete<double>(this->vector);
++	xDelete<IssmDouble>(this->vector);
+ 	M=0;
+ }
+ /*}}}*/
+@@ -73,7 +73,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION SeqVec::SetValues{{{*/
+-void SeqVec::SetValues(int ssize, int* list, double* values, InsMode mode){
++void SeqVec::SetValues(int ssize, int* list, IssmDouble* values, InsMode mode){
+ 	
+ 	int i;
+ 	switch(mode){
+@@ -91,7 +91,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION SeqVec::SetValue{{{*/
+-void SeqVec::SetValue(int dof, double value, InsMode mode){
++void SeqVec::SetValue(int dof, IssmDouble value, InsMode mode){
+ 
+ 	switch(mode){
+ 		case ADD_VAL:
+@@ -107,7 +107,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION SeqVec::GetValue{{{*/
+-void SeqVec::GetValue(double* pvalue,int dof){
++void SeqVec::GetValue(IssmDouble* pvalue,int dof){
+ 
+ 	*pvalue=this->vector[dof];
+ 
+@@ -136,7 +136,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION SeqVec::Set{{{*/
+-void SeqVec::Set(double value){
++void SeqVec::Set(IssmDouble value){
+ 
+ 	int i;
+ 	for(i=0;i<this->M;i++)this->vector[i]=value;
+@@ -144,7 +144,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION SeqVec::AXPY{{{*/
+-void SeqVec::AXPY(SeqVec* X, double a){
++void SeqVec::AXPY(SeqVec* X, IssmDouble a){
+ 
+ 	int i;
+ 
+@@ -154,7 +154,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION SeqVec::AYPX{{{*/
+-void SeqVec::AYPX(SeqVec* X, double a){
++void SeqVec::AYPX(SeqVec* X, IssmDouble a){
+ 	
+ 	int i;
+ 
+@@ -164,13 +164,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION SeqVec::ToMPISerial{{{*/
+-double* SeqVec::ToMPISerial(void){
++IssmDouble* SeqVec::ToMPISerial(void){
+ 
+-	double* buffer=NULL;
++	IssmDouble* buffer=NULL;
+ 
+ 	if(this->M){
+-		buffer=xNew<double>(this->M);
+-		memcpy(buffer,this->vector,this->M*sizeof(double));
++		buffer=xNew<IssmDouble>(this->M);
++		xMemCpy<IssmDouble>(buffer,this->vector,this->M);
+ 	}
+ 	return buffer;
+ 
+@@ -187,9 +187,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION SeqVec::Norm{{{*/
+-double SeqVec::Norm(NormMode mode){
++IssmDouble SeqVec::Norm(NormMode mode){
+ 
+-	double norm;
++	IssmDouble norm;
+ 	int i;
+ 
+ 	switch(mode){
+@@ -209,7 +209,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION SeqVec::Scale{{{*/
+-void SeqVec::Scale(double scale_factor){
++void SeqVec::Scale(IssmDouble scale_factor){
+ 
+ 	int i;
+ 	for(i=0;i<this->M;i++)this->vector[i]=scale_factor*this->vector[i];
+@@ -217,11 +217,11 @@
+ }
+ /*}}}*/
+ /*FUNCTION SeqVec::Dot{{{*/
+-double SeqVec::Dot(SeqVec* input){
++IssmDouble SeqVec::Dot(SeqVec* input){
+ 
+ 	int i;
+ 
+-	double dot=0;
++	IssmDouble dot=0;
+ 	for(i=0;i<this->M;i++)dot+=this->vector[i]*input->vector[i];
+ 	return dot;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/issmtoolkit.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/issmtoolkit.h	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/issmtoolkit.h	(revision 12477)
+@@ -5,6 +5,8 @@
+ #ifndef _ISSM_TOOLKIT_H_
+ #define _ISSM_TOOLKIT_H_
+ 
++#include "../../include/include.h"
++
+ #include "./SeqMat.h"
+ #include "./SeqVec.h"
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12477)
+@@ -32,20 +32,20 @@
+ 	this->M=pM;
+ 	this->N=pN;
+ 	this->matrix=NULL;
+-	if(M*N) this->matrix=xNewZeroInit<double>(pM*pN);
++	if(M*N) this->matrix=xNewZeroInit<IssmDouble>(pM*pN);
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat::SeqMat(int M,int N, double sparsity){{{*/
+-SeqMat::SeqMat(int pM,int pN, double sparsity){
++/*FUNCTION SeqMat::SeqMat(int M,int N, IssmDouble sparsity){{{*/
++SeqMat::SeqMat(int pM,int pN, IssmDouble sparsity){
+ 
+ 	this->M=pM;
+ 	this->N=pN;
+ 	this->matrix=NULL;
+-	if(M*N) this->matrix=xNewZeroInit<double>(pM*pN);
++	if(M*N) this->matrix=xNewZeroInit<IssmDouble>(pM*pN);
+ }
+ /*}}}*/
+-/*FUNCTION SeqMat(double* serial_mat,int M,int N,double sparsity){{{*/
+-SeqMat::SeqMat(double* serial_mat,int pM,int pN,double sparsity){
++/*FUNCTION SeqMat(IssmDouble* serial_mat,int M,int N,IssmDouble sparsity){{{*/
++SeqMat::SeqMat(IssmDouble* serial_mat,int pM,int pN,IssmDouble sparsity){
+ 
+ 	int i,j;
+ 
+@@ -53,8 +53,8 @@
+ 	this->N=pN;
+ 	this->matrix=NULL;
+ 	if(M*N){
+-		this->matrix=xNewZeroInit<double>(pM*pN);
+-		memcpy(this->matrix,serial_mat,pM*pN*sizeof(double));
++		this->matrix=xNewZeroInit<IssmDouble>(pM*pN);
++		xMemCpy<IssmDouble>(this->matrix,serial_mat,pM*pN);
+ 	}
+ 
+ }
+@@ -65,13 +65,13 @@
+ 	this->M=pM;
+ 	this->N=pN;
+ 	this->matrix=NULL;
+-	if(M*N) this->matrix=xNewZeroInit<double>(pM*pN);
++	if(M*N) this->matrix=xNewZeroInit<IssmDouble>(pM*pN);
+ }
+ /*}}}*/
+ /*FUNCTION SeqMat::~SeqMat(){{{*/
+ SeqMat::~SeqMat(){
+ 
+-	xDelete<double>(this->matrix);
++	xDelete<IssmDouble>(this->matrix);
+ 	M=0;
+ 	N=0;
+ }
+@@ -99,10 +99,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION SeqMat::Norm{{{*/
+-double SeqMat::Norm(NormMode mode){
++IssmDouble SeqMat::Norm(NormMode mode){
+ 
+-	double norm;
+-	double absolute;
++	IssmDouble norm;
++	IssmDouble absolute;
+ 	int i,j;
+ 
+ 	switch(mode){
+@@ -144,7 +144,7 @@
+ 
+ 	int i,j;
+ 	int XM,AXM;
+-	double dummy;
++	IssmDouble dummy;
+ 
+ 	X->GetSize(&XM);
+ 	AX->GetSize(&AXM);
+@@ -165,27 +165,27 @@
+ /*FUNCTION SeqMat::Duplicate{{{*/
+ SeqMat* SeqMat::Duplicate(void){
+ 
+-	double dummy=0;
++	IssmDouble dummy=0;
+ 
+ 	return new SeqMat(this->matrix,this->M,this->N,dummy);
+ 
+ }
+ /*}}}*/
+ /*FUNCTION SeqMat::ToSerial{{{*/
+-double* SeqMat::ToSerial(void){
++IssmDouble* SeqMat::ToSerial(void){
+ 
+-	double* buffer=NULL;
++	IssmDouble* buffer=NULL;
+ 
+ 	if(this->M*this->N){
+-		buffer=xNew<double>(this->M*this->N);
+-		memcpy(buffer,this->matrix,this->M*this->N*sizeof(double));
++		buffer=xNew<IssmDouble>(this->M*this->N);
++		xMemCpy<IssmDouble>(buffer,this->matrix,this->M*this->N);
+ 	}
+ 	return buffer;
+ 
+ }
+ /*}}}*/
+ /*FUNCTION SeqMat::SetValues{{{*/
+-void SeqMat::SetValues(int m,int* idxm,int n,int* idxn,double* values,InsMode mode){
++void SeqMat::SetValues(int m,int* idxm,int n,int* idxn,IssmDouble* values,InsMode mode){
+ 	
+ 	int i,j;
+ 	switch(mode){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.h	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.h	(revision 12477)
+@@ -1,5 +1,5 @@
+ /*!\file:  SeqVec.h
+- * \brief wrapper to our SeqVec object, which is just a wrapper to a double* 
++ * \brief wrapper to our SeqVec object, which is just a wrapper to a IssmDouble* 
+  */ 
+ 
+ #ifndef _SEQVEC_H_
+@@ -21,33 +21,33 @@
+ 
+ 	public:
+ 	
+-		double* vector;
++		IssmDouble* vector;
+ 		int M;
+ 
+ 		/*SeqVec constructors, destructors {{{*/
+ 		SeqVec();
+ 		SeqVec(int M,bool fromlocalsize=false);
+-		SeqVec(double* buffer, int M);
++		SeqVec(IssmDouble* buffer, int M);
+ 		~SeqVec();
+ 		/*}}}*/
+ 		/*SeqVec specific routines {{{*/
+ 		void Echo(void);
+ 		void Assemble(void);
+-		void SetValues(int ssize, int* list, double* values, InsMode mode);
+-		void SetValue(int dof, double value, InsMode  mode);
+-		void GetValue(double* pvalue, int dof);
++		void SetValues(int ssize, int* list, IssmDouble* values, InsMode mode);
++		void SetValue(int dof, IssmDouble value, InsMode  mode);
++		void GetValue(IssmDouble* pvalue, int dof);
+ 		void GetSize(int* pM);
+ 		void GetLocalSize(int* pM);
+ 		SeqVec* Duplicate(void);
+-		void Set(double value);
+-		void AXPY(SeqVec* X, double a);
+-		void AYPX(SeqVec* X, double a);
+-		double* ToMPISerial(void);
++		void Set(IssmDouble value);
++		void AXPY(SeqVec* X, IssmDouble a);
++		void AYPX(SeqVec* X, IssmDouble a);
++		IssmDouble* ToMPISerial(void);
+ 		void Copy(SeqVec* to);
+-		double Norm(NormMode norm_type);
+-		void Scale(double scale_factor);
++		IssmDouble Norm(NormMode norm_type);
++		void Scale(IssmDouble scale_factor);
+ 		void PointwiseDivide(SeqVec* x,SeqVec* y);
+-		double Dot(SeqVec* vector);
++		IssmDouble Dot(SeqVec* vector);
+ 		/*}}}*/
+ };
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_nonlinear.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_nonlinear.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_nonlinear.cpp	(revision 12477)
+@@ -87,7 +87,7 @@
+ 		if(converged==true){
+ 			bool max_iteration_state=false;
+ 			int tempStep=1;
+-			double tempTime=1.0;
++			IssmDouble tempTime=1.0;
+ 			femmodel->results->AddObject(new BoolExternalResult(femmodel->results->Size()+1, MaxIterationConvergenceFlagEnum, max_iteration_state, tempStep, tempTime));
+ 			break;
+ 		}
+@@ -98,7 +98,7 @@
+ 			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;
++			IssmDouble tempTime=1.0;
+ 			femmodel->results->AddObject(new BoolExternalResult(femmodel->results->Size()+1, MaxIterationConvergenceFlagEnum, max_iteration_state, tempStep, tempTime));
+ 			break;
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_newton.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_newton.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_newton.cpp	(revision 12477)
+@@ -16,7 +16,7 @@
+ 	bool   converged;
+ 	int    num_unstable_constraints;
+ 	int    count;
+-	double kmax;
++	IssmDouble kmax;
+ 	Matrix* Kff = NULL;
+ 	Matrix* Kfs    = NULL;
+ 	Matrix* Jff = NULL;
+@@ -69,7 +69,7 @@
+ 		if(converged==true){	
+ 			bool max_iteration_state=false;
+ 			int tempStep=1;
+-			double tempTime=1.0;
++			IssmDouble tempTime=1.0;
+ 			femmodel->results->AddObject(new BoolExternalResult(femmodel->results->Size()+1, MaxIterationConvergenceFlagEnum, max_iteration_state, tempStep, tempTime));
+ 			break;
+ 		}
+@@ -77,7 +77,7 @@
+ 			_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;
++			IssmDouble tempTime=1.0;
+ 			femmodel->results->AddObject(new BoolExternalResult(femmodel->results->Size()+1, MaxIterationConvergenceFlagEnum, max_iteration_state, tempStep, tempTime));
+ 			break;
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp	(revision 12476)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp	(revision 12477)
+@@ -15,7 +15,7 @@
+ 	Vector* tf=NULL; 
+ 	Vector* tf_old=NULL; 
+ 	Vector* ys=NULL; 
+-	double melting_offset;
++	IssmDouble melting_offset;
+ 
+ 	/*intermediary: */
+ 	Matrix* Kff=NULL;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12477-12478.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12477-12478.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12477-12478.diff	(revision 12679)
@@ -0,0 +1,23 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/types.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/types.h	(revision 12477)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/types.h	(revision 12478)
+@@ -27,6 +27,7 @@
+ #endif  
+ 
+ #ifdef _HAVE_ADOLC_
++#include "adolc.h"
+ // for active variables
+ typedef adouble IssmDouble;
+ // for passive variables
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-ad.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-ad.sh	(revision 12477)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-ad.sh	(revision 12478)
+@@ -16,4 +16,5 @@
+ 	--without-transient \
+ 	--without-3d \
+ 	--without-groundingline \
+-	--without-kriging 
++	--without-kriging  \
++	--with-adolc-dir=$ADOLC_DIR 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12478-12479.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12478-12479.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12478-12479.diff	(revision 12679)
@@ -0,0 +1,26 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp	(revision 12478)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp	(revision 12479)
+@@ -19,7 +19,7 @@
+ 	file_line=0;
+ }
+ 
+-ErrorException::ErrorException(string what_file,string what_function,int what_line,string what_arg){
++ErrorException::ErrorException(const string& what_file, const string& what_function,int what_line, const string& what_arg){
+ 
+ 	what_str=what_arg;
+ 	file_name=what_file;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exceptions.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exceptions.h	(revision 12478)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exceptions.h	(revision 12479)
+@@ -23,7 +23,7 @@
+ 
+ 	public:
+ 	ErrorException(const string &what_arg); //for windows
+-	ErrorException(string what_file,string what_function,int what_line,string what_arg);//UNIX
++	ErrorException(const string&  what_file,const string& what_function,int what_line,const string& what_arg);//UNIX
+ 	~ErrorException() throw();
+ 	virtual const char *what() const throw();
+ 	void Report();
Index: /issm/oecreview/Archive/12321-12677/ISSM-12479-12480.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12479-12480.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12479-12480.diff	(revision 12679)
@@ -0,0 +1,27 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12479)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12480)
+@@ -6,6 +6,8 @@
+ #ifndef _MACROS_H_
+ #define _MACROS_H_
+ 
++#include <sstream>
++
+ #include "./typedefs.h"
+ 
+ #ifdef HAVE_CONFIG_H
+@@ -29,6 +31,13 @@
+   throw ErrorException(__FILE__,__func__,__LINE__,exprintf(__VA_ARGS__))
+ #endif
+ /*}}}*/
++/* _error2_ {{{*/
++/*new Error exception macro*/
++#define _error2_(StreamArgs)\
++   {std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
++   aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \
++   throw ErrorException(__FILE__,__func__,__LINE__,aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}
++/*}}}*/
+ /* _assert_ {{{*/
+ /*Assertion macro: do nothing if macro _ISSM_DEBUG_ undefined*/
+ #ifdef _ISSM_DEBUG_ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12480-12481.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12480-12481.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12480-12481.diff	(revision 12679)
@@ -0,0 +1,87 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp	(revision 12480)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp	(revision 12481)
+@@ -50,10 +50,10 @@
+ 	GaussLegendreLinear(&seg_coords,&seg_weights,numgauss);
+ 
+ 	/*Allocate GaussTria fields*/
+-	coords1=xNew<IssmDouble>(numgauss*sizeof(IssmDouble));
+-	coords2=xNew<IssmDouble>(numgauss*sizeof(IssmDouble));
+-	coords3=xNew<IssmDouble>(numgauss*sizeof(IssmDouble));
+-	weights=xNew<IssmDouble>(numgauss*sizeof(IssmDouble));
++	coords1=xNew<IssmPDouble>(numgauss);
++	coords2=xNew<IssmPDouble>(numgauss);
++	coords3=xNew<IssmPDouble>(numgauss);
++	weights=xNew<IssmPDouble>(numgauss);
+ 
+ 	/*Reverse index1 and 2 if necessary*/
+ 	if (index1>index2){
+@@ -96,10 +96,10 @@
+ /*}}}*/
+ /*FUNCTION GaussTria::~GaussTria(){{{*/
+ GaussTria::~GaussTria(){
+-	xDelete<IssmDouble>(weights);
+-	xDelete<IssmDouble>(coords1);
+-	xDelete<IssmDouble>(coords2);
+-	xDelete<IssmDouble>(coords3);
++	xDelete<IssmPDouble>(weights);
++	xDelete<IssmPDouble>(coords1);
++	xDelete<IssmPDouble>(coords2);
++	xDelete<IssmPDouble>(coords3);
+ }
+ /*}}}*/
+ 
+@@ -198,11 +198,11 @@
+ }
+ /*}}}*/
+ /*FUNCTION GaussTria::GaussFromCoords{{{*/
+-void GaussTria::GaussFromCoords(IssmDouble x,IssmDouble y,IssmDouble* xyz_list){
++void GaussTria::GaussFromCoords(IssmPDouble x,IssmPDouble y,IssmPDouble* xyz_list){
+ 
+ 	/*Intermediaries*/
+-	IssmDouble    area = 0;
+-	IssmDouble    x1,y1,x2,y2,x3,y3;
++	IssmPDouble    area = 0;
++	IssmPDouble    x1,y1,x2,y2,x3,y3;
+ 
+ 	/*in debugging mode: check that the default constructor has been called*/
+ 	_assert_(numgauss==-1);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.h	(revision 12480)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.h	(revision 12481)
+@@ -14,16 +14,16 @@
+ 
+ 	private:
+ 		int numgauss;
+-		IssmDouble* weights;
+-		IssmDouble* coords1;
+-		IssmDouble* coords2;
+-		IssmDouble* coords3;
++		IssmPDouble* weights;
++		IssmPDouble* coords1;
++		IssmPDouble* coords2;
++		IssmPDouble* coords3;
+ 
+ 	public:
+-		IssmDouble weight;
+-		IssmDouble coord1;
+-		IssmDouble coord2;
+-		IssmDouble coord3;
++		IssmPDouble weight;
++		IssmPDouble coord1;
++		IssmPDouble coord2;
++		IssmPDouble coord3;
+ 		
+ 	public:
+ 
+@@ -37,7 +37,7 @@
+ 		int  begin(void);
+ 		int  end(void);
+ 		void Echo(void);
+-		void GaussFromCoords(IssmDouble x1,IssmDouble y1,IssmDouble* xyz_list);
++		void GaussFromCoords(IssmPDouble x1,IssmPDouble y1,IssmPDouble* xyz_list);
+ 		void GaussPoint(int ig);
+ 		void GaussVertex(int iv);
+ 		void GaussCenter(void);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12481-12482.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12481-12482.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12481-12482.diff	(revision 12679)
@@ -0,0 +1,26 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12481)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12482)
+@@ -60,7 +60,7 @@
+ 		void  SetValue(int integer){this->value=integer;}
+ 		void  SetValue(int* intarray,int M){_error_("Int param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(int* intarray,int M,int N){_error_("Int param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble scalar){this->value=(int)scalar;}
++		void  SetValue(IssmPDouble scalar){this->value=(int)scalar;}
+ 		void  SetValue(char* string){_error_("Int param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M){_error_("Int param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Int param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12481)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12482)
+@@ -57,7 +57,7 @@
+ 
+ 		void  SetValue(bool boolean){this->value=boolean;}
+ 		void  SetValue(int integer){this->value=(bool)integer;}
+-		void  SetValue(IssmDouble scalar){this->value=(bool)scalar;}
++		void  SetValue(IssmPDouble scalar){this->value=(bool)scalar;}
+ 		void  SetValue(char* string){_error_("Bool param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(char** stringarray,int M){_error_("Bool param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+ 		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Bool param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12482-12483.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12482-12483.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12482-12483.diff	(revision 12679)
@@ -0,0 +1,74 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12482)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12483)
+@@ -106,10 +106,10 @@
+ 		this->GetInputValue(&vz, gauss,vzenum);
+ 		vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2));
+ 	}
+-	else _error_("element_type %s not supported yet",element_type);
++	else _error2_("element_type "<< element_type << " not supported yet");
+ 
+ 	/*Checks that s-1>0 if v=0*/
+-	if(vmag==0 && (s-1)<0) _error_("velocity is 0 ans (s-1)=%g<0, alpha_complement is Inf",s-1);
++        if(vmag==0 && (s-1)<0) _error2_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
+ 
+ 	alpha2=pow(drag_coefficient,2)*pow(Neff,r)*pow(vmag,(s-1));
+ 	_assert_(!isnan(alpha2));
+@@ -170,10 +170,10 @@
+ 		this->GetInputValue(&vz, gauss,vzenum);
+ 		vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2));
+ 	}
+-	else _error_("element_type %s not supported yet",element_type);
++	else _error2_("element_type "<< element_type << " not supported yet");
+ 
+ 	/*Checks that s-1>0 if v=0*/
+-	if(vmag==0 && (s-1)<0) _error_("velocity is 0 ans (s-1)=%g<0, alpha_complement is Inf",s-1);
++	if(vmag==0 && (s-1)<0) _error2_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
+ 
+ 	alpha2=pow(drag_coefficient,2)*pow(Neff,r)*pow(vmag,(s-1));
+ 	_assert_(!isnan(alpha2));
+@@ -237,10 +237,10 @@
+ 		this->GetInputValue(&vz, gauss,vzenum);
+ 		vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2));
+ 	}
+-	else _error_("element_type %s not supported yet",element_type);
++	else _error2_("element_type "<< element_type << " not supported yet");
+ 
+ 	/*Checks that s-1>0 if v=0*/
+-	if(vmag==0 && (s-1)<0) _error_("velocity is 0 ans (s-1)=%g<0, alpha_complement is Inf",s-1);
++	if(vmag==0 && (s-1)<0) _error2_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
+ 
+ 	alpha_complement=pow(Neff,r)*pow(vmag,(s-1));            _assert_(!isnan(alpha_complement));
+ 
+@@ -303,10 +303,10 @@
+ 		this->GetInputValue(&vz, gauss,vzenum);
+ 		vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2));
+ 	}
+-	else _error_("element_type %s not supported yet",element_type);
++	else _error2_("element_type "<< element_type << " not supported yet");
+ 
+ 	/*Checks that s-1>0 if v=0*/
+-	if(vmag==0 && (s-1)<0) _error_("velocity is 0 ans (s-1)=%g<0, alpha_complement is Inf",s-1);
++	if(vmag==0 && (s-1)<0) _error2_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
+ 
+ 	alpha_complement=pow(Neff,r)*pow(vmag,(s-1));            _assert_(!isnan(alpha_complement));
+ 
+@@ -318,7 +318,7 @@
+ void Friction::GetInputValue(IssmDouble* pvalue,GaussTria* gauss,int enum_type){
+ 
+ 	Input* input=inputs->GetInput(enum_type);
+-	if(!input) _error_("input %s not found",EnumToStringx(enum_type));
++	if(!input) _error2_("input " << EnumToStringx(enum_type) << " not found");
+ 	input->GetInputValue(pvalue,gauss);
+ 
+ }
+@@ -327,7 +327,7 @@
+ void Friction::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int enum_type){
+ 
+ 	Input* input=inputs->GetInput(enum_type);
+-	if(!input) _error_("input %s not found",EnumToStringx(enum_type));
++	if(!input) _error2_("input " << EnumToStringx(enum_type) << " not found");
+ 	input->GetInputValue(pvalue,gauss);
+ 
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12483-12484.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12483-12484.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12483-12484.diff	(revision 12679)
@@ -0,0 +1,356 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/.classpath
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/.classpath	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/.classpath	(revision 12484)
+@@ -0,0 +1,8 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<classpath>
++	<classpathentry kind="src" path="src"/>
++	<classpathentry kind="src" path="gen"/>
++	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
++	<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
++	<classpathentry kind="output" path="bin/classes"/>
++</classpath>
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/project.properties
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/project.properties	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/project.properties	(revision 12484)
+@@ -0,0 +1,14 @@
++# This file is automatically generated by Android Tools.
++# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
++#
++# This file must be checked in Version Control Systems.
++#
++# To customize properties used by the Ant build system edit
++# "ant.properties", and override values to adapt the script to your
++# project structure.
++#
++# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
++#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
++
++# Project target.
++target=android-14
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/.project
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/.project	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/.project	(revision 12484)
+@@ -0,0 +1,33 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<projectDescription>
++	<name>ISSM_App</name>
++	<comment></comment>
++	<projects>
++	</projects>
++	<buildSpec>
++		<buildCommand>
++			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
++			<arguments>
++			</arguments>
++		</buildCommand>
++		<buildCommand>
++			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
++			<arguments>
++			</arguments>
++		</buildCommand>
++		<buildCommand>
++			<name>org.eclipse.jdt.core.javabuilder</name>
++			<arguments>
++			</arguments>
++		</buildCommand>
++		<buildCommand>
++			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
++			<arguments>
++			</arguments>
++		</buildCommand>
++	</buildSpec>
++	<natures>
++		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
++		<nature>org.eclipse.jdt.core.javanature</nature>
++	</natures>
++</projectDescription>
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/proguard-project.txt
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/proguard-project.txt	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/proguard-project.txt	(revision 12484)
+@@ -0,0 +1,20 @@
++# To enable ProGuard in your project, edit project.properties
++# to define the proguard.config property as described in that file.
++#
++# Add project specific ProGuard rules here.
++# By default, the flags in this file are appended to flags specified
++# in ${sdk.dir}/tools/proguard/proguard-android.txt
++# You can edit the include path and order by changing the ProGuard
++# include property in project.properties.
++#
++# For more details, see
++#   http://developer.android.com/guide/developing/tools/proguard.html
++
++# Add any project specific keep options here:
++
++# If your project uses WebView with JS, uncomment the following
++# and specify the fully qualified class name to the JavaScript interface
++# class:
++#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
++#   public *;
++#}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/AndroidManifest.xml
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/AndroidManifest.xml	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/AndroidManifest.xml	(revision 12484)
+@@ -0,0 +1,23 @@
++<?xml version="1.0" encoding="utf-8"?>
++<manifest xmlns:android="http://schemas.android.com/apk/res/android"
++    package="issm.app"
++    android:versionCode="1"
++    android:versionName="1.0" >
++
++    <uses-sdk android:minSdkVersion="14" />
++
++    <application
++        android:icon="@drawable/ic_launcher"
++        android:label="@string/app_name" >
++        <activity
++            android:name=".ISSM_AppActivity"
++            android:label="@string/app_name" >
++            <intent-filter>
++                <action android:name="android.intent.action.MAIN" />
++
++                <category android:name="android.intent.category.LAUNCHER" />
++            </intent-filter>
++        </activity>
++    </application>
++
++</manifest>
+\ No newline at end of file
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/src/issm/app/ISSM_AppActivity.java
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/src/issm/app/ISSM_AppActivity.java	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/src/issm/app/ISSM_AppActivity.java	(revision 12484)
+@@ -0,0 +1,29 @@
++package issm.app;
++
++import android.app.Activity;
++import android.os.Bundle;
++import android.view.View;
++import android.view.View.OnClickListener;
++import android.widget.TextView;
++import android.widget.SeekBar;
++
++public class ISSM_AppActivity extends Activity implements OnClickListener
++{
++	private SeekBar sb;
++	private TextView tv;
++	
++    public void onCreate(Bundle savedInstanceState) 
++    {
++        super.onCreate(savedInstanceState);
++        setContentView(R.layout.main);
++        sb = (SeekBar)findViewById(R.id.seekBar2);
++        tv = (TextView)findViewById(R.id.editText2);
++        tv.setText("Current Progress: " + sb.getProgress());
++        sb.setOnClickListener(this);
++    }
++
++	public void onClick(View v)
++	{
++		tv.setText("Current Progress: " + sb.getProgress());
++	}
++}
+\ No newline at end of file
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-hdpi/ic_launcher.png
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-hdpi/ic_launcher.png
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-hdpi/ic_launcher.png	(revision 12483)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-hdpi/ic_launcher.png	(revision 12484)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-hdpi/ic_launcher.png
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-ldpi/ic_launcher.png
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-ldpi/ic_launcher.png
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-ldpi/ic_launcher.png	(revision 12483)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-ldpi/ic_launcher.png	(revision 12484)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-ldpi/ic_launcher.png
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-mdpi/ic_launcher.png
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-mdpi/ic_launcher.png
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-mdpi/ic_launcher.png	(revision 12483)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-mdpi/ic_launcher.png	(revision 12484)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-mdpi/ic_launcher.png
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-xhdpi/ic_launcher.png
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-xhdpi/ic_launcher.png
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-xhdpi/ic_launcher.png	(revision 12483)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-xhdpi/ic_launcher.png	(revision 12484)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/bin/res/drawable-xhdpi/ic_launcher.png
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/gen/issm/app/R.java
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/gen/issm/app/R.java	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/gen/issm/app/R.java	(revision 12484)
+@@ -0,0 +1,27 @@
++/* AUTO-GENERATED FILE.  DO NOT MODIFY.
++ *
++ * This class was automatically generated by the
++ * aapt tool from the resource data it found.  It
++ * should not be modified by hand.
++ */
++
++package issm.app;
++
++public final class R {
++    public static final class attr {
++    }
++    public static final class drawable {
++        public static final int ic_launcher=0x7f020000;
++    }
++    public static final class id {
++        public static final int editText2=0x7f050000;
++        public static final int seekBar2=0x7f050001;
++    }
++    public static final class layout {
++        public static final int main=0x7f030000;
++    }
++    public static final class string {
++        public static final int app_name=0x7f040001;
++        public static final int hello=0x7f040000;
++    }
++}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/gen/issm/app/BuildConfig.java
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/gen/issm/app/BuildConfig.java	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/gen/issm/app/BuildConfig.java	(revision 12484)
+@@ -0,0 +1,6 @@
++/** Automatically generated file. DO NOT MODIFY */
++package issm.app;
++
++public final class BuildConfig {
++    public final static boolean DEBUG = true;
++}
+\ No newline at end of file
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/values/strings.xml
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/values/strings.xml	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/values/strings.xml	(revision 12484)
+@@ -0,0 +1,7 @@
++<?xml version="1.0" encoding="utf-8"?>
++<resources>
++
++    <string name="hello">Hello World, ISSM_AppActivity!</string>
++    <string name="app_name">ISSM_App</string>
++
++</resources>
+\ No newline at end of file
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-hdpi/ic_launcher.png
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-hdpi/ic_launcher.png
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-hdpi/ic_launcher.png	(revision 12483)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-hdpi/ic_launcher.png	(revision 12484)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-hdpi/ic_launcher.png
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-ldpi/ic_launcher.png
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-ldpi/ic_launcher.png
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-ldpi/ic_launcher.png	(revision 12483)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-ldpi/ic_launcher.png	(revision 12484)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-ldpi/ic_launcher.png
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-mdpi/ic_launcher.png
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-mdpi/ic_launcher.png
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-mdpi/ic_launcher.png	(revision 12483)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-mdpi/ic_launcher.png	(revision 12484)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-mdpi/ic_launcher.png
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-xhdpi/ic_launcher.png
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-xhdpi/ic_launcher.png
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-xhdpi/ic_launcher.png	(revision 12483)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-xhdpi/ic_launcher.png	(revision 12484)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/drawable-xhdpi/ic_launcher.png
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/layout/main.xml
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/layout/main.xml	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/android/ISSM_App/res/layout/main.xml	(revision 12484)
+@@ -0,0 +1,22 @@
++<?xml version="1.0" encoding="utf-8"?>
++<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
++    android:layout_width="match_parent"
++    android:layout_height="match_parent"
++    android:orientation="horizontal" >
++
++    <TextView
++        android:id="@+id/editText2"
++        android:layout_width="match_parent"
++        android:layout_height="wrap_content"
++        android:layout_weight="1"
++        android:ems="10" android:translationX="0.5in" android:translationY="1in"/>
++    
++    <SeekBar
++        android:id="@+id/seekBar2"
++        android:layout_width="match_parent"
++        android:layout_height="wrap_content"
++        android:layout_weight="1"
++        android:clickable="true"
++        android:max="100" android:translationY="2in" android:translationX="-0.5in"/>
++
++</LinearLayout>
+\ No newline at end of file
Index: /issm/oecreview/Archive/12321-12677/ISSM-12484-12485.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12484-12485.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12484-12485.diff	(revision 12679)
@@ -0,0 +1,22 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12484)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12485)
+@@ -33,10 +33,17 @@
+ /*}}}*/
+ /* _error2_ {{{*/
+ /*new Error exception macro*/
++#ifdef _INTEL_WIN_
+ #define _error2_(StreamArgs)\
+    {std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
+    aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \
++   throw ErrorException(aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}
++#else
++#define _error2_(StreamArgs)\
++   {std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
++   aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \
+    throw ErrorException(__FILE__,__func__,__LINE__,aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}
++#endif
+ /*}}}*/
+ /* _assert_ {{{*/
+ /*Assertion macro: do nothing if macro _ISSM_DEBUG_ undefined*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12485-12486.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12485-12486.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12485-12486.diff	(revision 12679)
@@ -0,0 +1,21 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12485)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12486)
+@@ -45,6 +45,16 @@
+    throw ErrorException(__FILE__,__func__,__LINE__,aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}
+ #endif
+ /*}}}*/
++/* _printLine_ {{{*/
++/* macro to print a line, adds std::endl */
++#define _printLine_(StreamArgs)\
++   {std::cout << StreamArgs << std::endl;}
++/*}}}*/
++/* _printString_ {{{*/
++/* macro to print some string, adds std::ends */
++#define _printString_(StreamArgs)\
++   {std::cout << StreamArgs << std::ends;}
++/*}}}*/
+ /* _assert_ {{{*/
+ /*Assertion macro: do nothing if macro _ISSM_DEBUG_ undefined*/
+ #ifdef _ISSM_DEBUG_ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12486-12487.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12486-12487.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12486-12487.diff	(revision 12679)
@@ -0,0 +1,23 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp	(revision 12486)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp	(revision 12487)
+@@ -51,13 +51,13 @@
+ 
+ 	int i;
+ 
+-	printf("Contour: %i:\n",id);
+-	printf("   nods: %i\n",nods);
+-	printf("   closed: %s\n",closed?"true":"false");
++	_printLine_("Contour: " << id);
++	_printLine_("   nods: " << nods);
++	_printLine_("   closed: " << (closed?"true":"false"));
+ 	if(nods){
+-		printf("   x,y:\n");
++	        _printLine_("   x,y:");
+ 		for(i=0;i<nods;i++){
+-			printf("%i: %g|%g\n",i,x[i],y[i]);
++		        _printLine_(i << ": " << x[i] << "|" << y[i]);
+ 		}
+ 	}
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12487-12488.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12487-12488.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12487-12488.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12487)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12488)
+@@ -141,7 +141,7 @@
+ 
+ 	IssmDouble data[6];
+ 
+-	if(numdofs!=6)_error_("Result %s is a PentaP1ElementResult and cannot write vector of %i dofs",numdofs);
++	if(numdofs!=6)_error_("Result %s is a PentaP1ElementResult and cannot write vector of %i dofs",EnumToStringx(this->enum_type),numdofs);
+ 	for(int i=0;i<6;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i];
+ 	vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12488-12489.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12488-12489.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12488-12489.diff	(revision 12679)
@@ -0,0 +1,15 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Miscellaneous/issmdoc.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Miscellaneous/issmdoc.m	(revision 12488)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Miscellaneous/issmdoc.m	(revision 12489)
+@@ -8,8 +8,8 @@
+ 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)'));
++disp(sprintf('%s','	   md=setmask(md,''all'','''');               %defines the glacier system as an ice shelf (no island)'));
+ disp(sprintf('%s','	   md=parameterize(md,''Square.par'');        %fills all the other fields of the model'));
+-disp(sprintf('%s','	   md=setelementstype(md,''macayeal'',''all''); %defines all elements as MacAyeal''s'));
++disp(sprintf('%s','	   md=setflowequation(md,''macayeal'',''all''); %defines all elements as MacAyeal''s'));
+ disp(sprintf('%s','	   md=solve(md,DiagnosticSolutionEnum);   %generate the velocity field'));
+ disp(sprintf('%s','	   plotmodel(md,''data'',md.results.DiagnosticSolution.Vel);    %displays the velocity (type plotdoc for plotmodel help)'));
Index: /issm/oecreview/Archive/12321-12677/ISSM-12489-12490.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12489-12490.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12489-12490.diff	(revision 12679)
@@ -0,0 +1,12 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12489)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12490)
+@@ -6,6 +6,7 @@
+ #ifndef _MACROS_H_
+ #define _MACROS_H_
+ 
++#include <iostream>
+ #include <sstream>
+ 
+ #include "./typedefs.h"
Index: /issm/oecreview/Archive/12321-12677/ISSM-12490-12491.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12490-12491.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12490-12491.diff	(revision 12679)
@@ -0,0 +1,12 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp	(revision 12490)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp	(revision 12491)
+@@ -9,6 +9,7 @@
+ #endif
+ 
+ #include <string.h>
++#include <iostream>
+ #include "./objects.h"
+ #include "../include/include.h"
+ #include "../io/io.h"
Index: /issm/oecreview/Archive/12321-12677/ISSM-12491-12492.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12491-12492.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12491-12492.diff	(revision 12679)
@@ -0,0 +1,12 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp	(revision 12491)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Contour.cpp	(revision 12492)
+@@ -9,7 +9,6 @@
+ #endif
+ 
+ #include <string.h>
+-#include <iostream>
+ #include "./objects.h"
+ #include "../include/include.h"
+ #include "../io/io.h"
Index: /issm/oecreview/Archive/12321-12677/ISSM-12492-12493.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12492-12493.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12492-12493.diff	(revision 12679)
@@ -0,0 +1,8108 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12493)
+@@ -71,7 +71,7 @@
+ 	res=nKUoldF/nF;
+ 	if (isnan(res)){
+ 		_printf_(true,"norm nf = %lf and norm kuold = %lf\n",nF,nKUoldF);
+-		_error_("mechanical equilibrium convergence criterion is NaN!");
++		_error2_("mechanical equilibrium convergence criterion is NaN!");
+ 	}
+ 
+ 	//clean up
+@@ -95,7 +95,7 @@
+ 		duf=old_uf->Duplicate(); old_uf->Copy(duf); duf->AYPX(uf,-1.0);
+ 		ndu=duf->Norm(NORM_TWO); nu=old_uf->Norm(NORM_TWO);
+ 
+-		if (isnan(ndu) || isnan(nu)) _error_("convergence criterion is NaN!");
++		if (isnan(ndu) || isnan(nu)) _error2_("convergence criterion is NaN!");
+ 
+ 		//clean up
+ 		xdelete(&duf);
+@@ -120,7 +120,7 @@
+ 		//compute max(du)
+ 		duf=old_uf->Duplicate(); old_uf->Copy(duf); duf->AYPX(uf,-1.0);
+ 		ndu=duf->Norm(NORM_TWO); nduinf=duf->Norm(NORM_INF);
+-		if (isnan(ndu) || isnan(nu)) _error_("convergence criterion is NaN!");
++		if (isnan(ndu) || isnan(nu)) _error2_("convergence criterion is NaN!");
+ 
+ 		//clean up
+ 		xdelete(&duf);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/CorePointerFromSolutionEnum.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/CorePointerFromSolutionEnum.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/CorePointerFromSolutionEnum.cpp	(revision 12493)
+@@ -28,74 +28,74 @@
+ 			#ifdef _HAVE_DIAGNOSTIC_
+ 			solutioncore=&diagnostic_core;
+ 			#else
+-			_error_("ISSM was not compiled with diagnostic capabilities. Exiting");
++			_error2_("ISSM was not compiled with diagnostic capabilities. Exiting");
+ 			#endif
+ 			break;
+ 		case SteadystateSolutionEnum:
+ 			#ifdef _HAVE_STEADYSTATE_
+ 			solutioncore=&steadystate_core;
+ 			#else
+-			_error_("ISSM was not compiled with steady state capabilities. Exiting");
++			_error2_("ISSM was not compiled with steady state capabilities. Exiting");
+ 			#endif
+ 			break;
+ 		case ThermalSolutionEnum:
+ 			#ifdef _HAVE_THERMAL_
+ 			solutioncore=&thermal_core;
+ 			#else
+-			_error_("ISSM was not compiled with thermal capabilities. Exiting");
++			_error2_("ISSM was not compiled with thermal capabilities. Exiting");
+ 			#endif
+ 			break;
+ 		case EnthalpySolutionEnum:
+ 			#ifdef _HAVE_THERMAL_
+ 			solutioncore=&enthalpy_core;
+ 			#else
+-			_error_("ISSM was not compiled with thermal capabilities. Exiting");
++			_error2_("ISSM was not compiled with thermal capabilities. Exiting");
+ 			#endif
+ 			break;
+ 		case BalancethicknessSolutionEnum:
+ 			#ifdef _HAVE_BALANCED_
+ 			solutioncore=&balancethickness_core;
+ 			#else
+-			_error_("ISSM was not compiled with balanced capabilities. Exiting");
++			_error2_("ISSM was not compiled with balanced capabilities. Exiting");
+ 			#endif
+ 			break;
+ 		case HydrologySolutionEnum:
+ 			#ifdef _HAVE_HYDROLOGY_
+ 			solutioncore=&hydrology_core;
+ 			#else
+-			_error_("ISSM was not compiled with hydrology capabilities. Exiting");
++			_error2_("ISSM was not compiled with hydrology capabilities. Exiting");
+ 			#endif
+ 			break;
+ 		case SurfaceSlopeSolutionEnum:
+ 			#ifdef _HAVE_SLOPE_
+ 			solutioncore=&surfaceslope_core;
+ 			#else
+-			_error_("ISSM was not compiled with slope capabilities. Exiting");
++			_error2_("ISSM was not compiled with slope capabilities. Exiting");
+ 			#endif
+ 			break;
+ 		case BedSlopeSolutionEnum:
+ 			#ifdef _HAVE_SLOPE_
+ 			solutioncore=&bedslope_core;
+ 			#else
+-			_error_("ISSM was not compiled with slope capabilities. Exiting");
++			_error2_("ISSM was not compiled with slope capabilities. Exiting");
+ 			#endif
+ 			break;
+ 		case TransientSolutionEnum:
+ 			#ifdef _HAVE_TRANSIENT_
+ 			solutioncore=&transient_core;
+ 			#else
+-			_error_("ISSM was not compiled with transient capabilities. Exiting");
++			_error2_("ISSM was not compiled with transient capabilities. Exiting");
+ 			#endif
+ 			break;
+ 		case PrognosticSolutionEnum:
+ 			#ifdef _HAVE_PROGNOSTIC_
+ 			solutioncore=&prognostic_core;
+ 			#else
+-			_error_("ISSM was not compiled with prognostic capabilities. Exiting");
++			_error2_("ISSM was not compiled with prognostic capabilities. Exiting");
+ 			#endif
+ 			break;
+ 		default:
+-			_error_("%s%s%s"," solution type: ",EnumToStringx(solutiontype)," not supported yet!");
++			_error2_("" << " solution type: " << EnumToStringx(solutiontype) << " not supported yet!");
+ 			break;
+ 	}
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystate_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystate_core.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystate_core.cpp	(revision 12493)
+@@ -51,7 +51,7 @@
+ 			enthalpy_core(femmodel);
+ 		}
+ 		#else
+-		_error_("ISSM was not compiled with thermal capabilities. Exiting");
++		_error2_("ISSM was not compiled with thermal capabilities. Exiting");
+ 		#endif
+ 
+ 		_printf_(VerboseSolution(),"%s\n","   computing new velocity");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/WriteLockFile.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/WriteLockFile.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/WriteLockFile.cpp	(revision 12493)
+@@ -16,10 +16,10 @@
+ 	/* Open lock file and write 1 into it: */
+ 	if(my_rank==0){
+ 		fid=fopen(filename,"w");
+-		if(fid==NULL) _error_("%s%s","error message: could not open lock file ",filename);
++		if(fid==NULL) _error2_("" << "error message: could not open lock file " << filename);
+ 
+ 		/*Close file: */
+-		if(fclose(fid)!=0) _error_("%s%s","could not close lock file ",filename);
++		if(fclose(fid)!=0) _error2_("" << "could not close lock file " << filename);
+ 	}
+ 
+ }	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/ProcessArguments.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/ProcessArguments.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/ProcessArguments.cpp	(revision 12493)
+@@ -16,9 +16,9 @@
+ 	char *petscfilename  = NULL;
+ 	char *lockfilename   = NULL;
+ 
+-	if(argc<2)_error_("Usage error: no solution requested");
++	if(argc<2)_error2_("Usage error: no solution requested");
+ 	*solution_type=StringToEnumx(argv[1]);
+-	if(argc<3)_error_("Usage error: missing model name");
++	if(argc<3)_error2_("Usage error: missing model name");
+ 	modelname=argv[3];
+ 	binfilename    = xNew<char>(strlen(modelname)+strlen(".bin")   +1); sprintf(binfilename,   "%s%s",modelname,".bin");
+ 	outbinfilename = xNew<char>(strlen(modelname)+strlen(".outbin")+1); sprintf(outbinfilename,"%s%s",modelname,".outbin");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp	(revision 12493)
+@@ -36,8 +36,8 @@
+ 
+ 	/*Check that gradient is clean*/
+ 	norm_inf=new_gradient->Norm(NORM_INF);
+-	if(norm_inf<=0)    _error_("||∂J/∂α||∞ = 0    gradient norm is zero");
+-	if(isnan(norm_inf))_error_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
++	if(norm_inf<=0)    _error2_("||∂J/∂α||∞ = 0    gradient norm is zero");
++	if(isnan(norm_inf))_error2_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
+ 
+ 	/*plug back into inputs: */
+ 	ControlInputSetGradientx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,new_gradient);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/AdjointCorePointerFromSolutionEnum.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/AdjointCorePointerFromSolutionEnum.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/AdjointCorePointerFromSolutionEnum.cpp	(revision 12493)
+@@ -34,7 +34,7 @@
+ 			adjointcore=&adjointbalancethickness_core;
+ 			break;
+ 		default:
+-			_error_("No adjoint has been implemented for solution %s yet",EnumToStringx(solutiontype));
++			_error2_("No adjoint has been implemented for solution " << EnumToStringx(solutiontype) << " yet");
+ 			break;
+ 	}
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp	(revision 12493)
+@@ -109,7 +109,7 @@
+ 			break;
+ 		
+ 		default:
+-			_error_("%s%s%s"," solution type: ",EnumToStringx(solutiontype)," not supported yet!");
++			_error2_("" << " solution type: " << EnumToStringx(solutiontype) << " not supported yet!");
+ 			break;
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12493)
+@@ -39,7 +39,7 @@
+ 	/*Initialize environments: Petsc, MPI, etc...: */
+ 	#ifdef _HAVE_PETSC_
+ 	ierr=PetscInitialize(&argc,&argv,(char*)0,"");  
+-	if(ierr) _error_("Could not initialize Petsc");
++	if(ierr) _error2_("Could not initialize Petsc");
+ 	#else
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Init(&argc,&argv);
+@@ -110,7 +110,7 @@
+ 		#ifdef _HAVE_DAKOTA_
+ 		Dakotax(femmodel);
+ 		#else
+-		_error_("ISSM was not compiled with dakota support, cannot carry out dakota analysis!");
++		_error2_("ISSM was not compiled with dakota support, cannot carry out dakota analysis!");
+ 		#endif
+ 	}
+ 	else if(control_analysis){
+@@ -120,7 +120,7 @@
+ 		else
+ 		 control_core(femmodel);
+ 		#else
+-		_error_("ISSM was not compiled with control support, cannot carry out dakota analysis!");
++		_error2_("ISSM was not compiled with control support, cannot carry out dakota analysis!");
+ 		#endif
+ 	}
+ 	else{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp	(revision 12493)
+@@ -102,7 +102,7 @@
+ 				enthalpy_core(femmodel);
+ 			}
+ 			#else
+-			_error_("ISSM was not compiled with thermal capabilities. Exiting");
++			_error2_("ISSM was not compiled with thermal capabilities. Exiting");
+ 			#endif
+ 		}
+ 
+@@ -111,7 +111,7 @@
+ 			#ifdef _HAVE_DIAGNOSTIC_
+ 			diagnostic_core(femmodel);
+ 			#else
+-			_error_("ISSM was not compiled with diagnostic capabilities. Exiting");
++			_error2_("ISSM was not compiled with diagnostic capabilities. Exiting");
+ 			#endif
+ 		}
+ 
+@@ -127,7 +127,7 @@
+ 			#ifdef _HAVE_GROUNDINGLINE_
+ 			GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+ 			#else
+-			_error_("ISSM was not compiled with grounding line migration capabilities. Exiting");
++			_error2_("ISSM was not compiled with grounding line migration capabilities. Exiting");
+ 			#endif
+ 		}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/objectivefunction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/objectivefunction.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/objectivefunction.cpp	(revision 12493)
+@@ -48,7 +48,7 @@
+ 		femmodel->SetCurrentConfiguration(BalancethicknessAnalysisEnum);
+ 	}
+ 	else{
+-		_error_("Solution %s not implemented yet",EnumToStringx(solution_type));
++		_error2_("Solution " << EnumToStringx(solution_type) << " not implemented yet");
+ 	}
+ 
+ 	/*update parameter according to scalar: */ //false means: do not save control
+@@ -65,7 +65,7 @@
+ 		solver_linear(femmodel); 
+ 	}
+ 	else{
+-		_error_("Solution %s not implemented yet",EnumToStringx(solution_type));
++		_error2_("Solution " << EnumToStringx(solution_type) << " not implemented yet");
+ 	}
+ 
+ 	/*Compute misfit for this velocity field.*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12493)
+@@ -39,7 +39,7 @@
+ 	/*Initialize environments: Petsc, MPI, etc...: */
+ #ifdef _HAVE_PETSC_
+ 	int ierr=PetscInitialize(&argc,&argv,(char*)0,"");  
+-	if(ierr) _error_("Could not initialize Petsc");
++	if(ierr) _error2_("Could not initialize Petsc");
+ #else
+ #ifdef _HAVE_MPI_
+ 	MPI_Init(&argc,&argv);
+@@ -121,7 +121,7 @@
+ 	char *outbinfilename = NULL;
+ 	char *lockfilename   = NULL;
+ 
+-	if(argc<2)_error_("Usage error: missing model name");
++	if(argc<2)_error2_("Usage error: missing model name");
+ 	modelname=argv[2];
+ 	binfilename    = xNew<char>((strlen(modelname)+strlen(".bin")   +1)); sprintf(binfilename,   "%s%s",modelname,".bin");
+ 	outbinfilename = xNew<char>((strlen(modelname)+strlen(".outbin")+1)); sprintf(outbinfilename,"%s%s",modelname,".outbin");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12493)
+@@ -40,7 +40,7 @@
+ 	int argc; char **args=NULL;
+ 	PetscGetArgs(&argc,&args);
+ 	ierr = TaoInitialize(&argc,&args,(char*)0,"");
+-	if(ierr) _error_("Could not initialize Tao");
++	if(ierr) _error2_("Could not initialize Tao");
+ 
+ 	/*Recover some parameters*/
+ 	femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);
+@@ -180,6 +180,6 @@
+ 
+ #else
+ void controltao_core(FemModel* femmodel){
+-	_error_("TAO not installed or PETSc version not supported");
++	_error2_("TAO not installed or PETSc version not supported");
+ }
+ #endif //_HAVE_TAO_ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12493)
+@@ -26,7 +26,7 @@
+ 
+ 	/*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]));
++		_error2_("Value of option \"" << odouble->name  << "\" must be class \"double\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
+ 	}
+ 	FetchData(&odouble->values,&odouble->numel,&odouble->ndims,&odouble->size,prhs[0]);
+ 
+@@ -44,7 +44,7 @@
+ 
+ 	/*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]));
++		_error2_("Value of option \"" << ological->name  << "\" must be class \"logical\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
+ 	}
+ 	FetchData(&ological->values,&ological->numel,&ological->ndims,&ological->size,prhs[0]);
+ 
+@@ -62,7 +62,7 @@
+ 
+ 	/*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]));
++		_error2_("Value of option \"" << ochar->name  << "\" must be class \"char\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
+ 	}
+ 	FetchData(&ochar->values,&ochar->numel,&ochar->ndims,&ochar->size,prhs[0]);
+ 
+@@ -86,7 +86,7 @@
+ 
+ 	/*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]));
++		_error2_("Value of option \"" << ostruct->name  << "\" must be class \"struct\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
+ 	}
+ 	ostruct->numel=mxGetNumberOfElements(prhs[0]);
+ 	ostruct->ndims=mxGetNumberOfDimensions(prhs[0]);
+@@ -132,7 +132,7 @@
+ 
+ 	/*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]));
++		_error2_("Value of option \"" << ocell->name  << "\" must be class \"cell\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
+ 	}
+ 
+ 	ocell->numel=mxGetNumberOfElements(prhs[0]);
+@@ -180,7 +180,7 @@
+ 			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]));
++		else _error2_("Second argument value of option \""<< name <<"\" is of unrecognized class \""<< mxGetClassName(prhs[0]) <<"\".");
+ 	}
+ 
+ 	return(option);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp	(revision 12493)
+@@ -21,11 +21,11 @@
+ 		if (NRHS==0 && NLHS==0)return 1;
+ 		/* special case: */
+ 		function();
+-		_error_("usage: see above");
++		_error2_("usage: see above");
+ 	}
+ 	else if (nlhs!=NLHS || nrhs!=NRHS ) {
+ 		function(); 
+-		_error_("usage error.");
++		_error2_("usage error.");
+ 	}
+ 	return 1;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12493)
+@@ -43,7 +43,7 @@
+ 	}
+ 	else{
+ 		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++		_error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
+ 	}
+ 			
+ 	/*Assign output pointers:*/
+@@ -84,7 +84,7 @@
+ 	}
+ 	else{
+ 		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++		_error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
+ 	}
+ 			
+ 	/*Assign output pointers:*/
+@@ -129,7 +129,7 @@
+ 	}
+ 	else{
+ 		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++		_error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
+ 	}
+ 
+ 	/*Assign output pointers:*/
+@@ -171,7 +171,7 @@
+ 	}
+ 	else{
+ 		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++		_error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
+ 	}
+ 
+ 	/*Assign output pointers:*/
+@@ -233,7 +233,7 @@
+ 	}
+ 	else{
+ 		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++		_error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
+ 	}
+ 			
+ 	/*Assign output pointers:*/
+@@ -264,7 +264,7 @@
+ 	}
+ 	else{
+ 		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++		_error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
+ 	}
+ 
+ 	/*Assign output pointers:*/
+@@ -296,7 +296,7 @@
+ 	}
+ 	else{
+ 		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++		_error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
+ 	}
+ 
+ 	/*Assign output pointers:*/
+@@ -328,7 +328,7 @@
+ 	}
+ 	else{
+ 		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++		_error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
+ 	}
+ 
+ 	/*Assign output pointers:*/
+@@ -360,7 +360,7 @@
+ 	}
+ 	else{
+ 		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++		_error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
+ 	}
+ 
+ 	/*Assign output pointers:*/
+@@ -376,7 +376,7 @@
+ 
+ 	/*Ok, the string should be coming directly from the matlab workspace: */
+ 	if (!mxIsClass(dataref,"char")){
+-		_error_("input data_type is not a string!");
++		_error2_("input data_type is not a string!");
+ 	}
+ 	else{
+ 		/*Recover the string:*/
+@@ -411,7 +411,7 @@
+ 	}
+ 	else{
+ 		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++		_error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
+ 	}
+ 			
+ 	/*Assign output pointers:*/
+@@ -429,7 +429,7 @@
+ 	double scalar;
+ 
+ 	if (!mxIsClass(dataref,"double")){
+-		_error_("input data_type is not a double!");
++		_error2_("input data_type is not a double!");
+ 	}
+ 	else{
+ 		/*Recover the double: */
+@@ -446,7 +446,7 @@
+ 	int integer;
+ 
+ 	if (!mxIsClass(dataref,"double")){
+-		_error_("input data_type is not a scalar!");
++		_error2_("input data_type is not a scalar!");
+ 	}
+ 	else{
+ 		/*Recover the double: */
+@@ -463,12 +463,12 @@
+ 	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");
++		if(mxGetM(dataref)!=1) _error2_("input data is not of size 1x1");
++		if(mxGetN(dataref)!=1) _error2_("input data is not of size 1x1");
+ 		mxbool_ptr=mxGetLogicals(dataref);
+ 	}
+ 	else{
+-		_error_("input data_type is not a bool!");
++		_error2_("input data_type is not a bool!");
+ 	}
+ 
+ 	*pboolean=*mxbool_ptr;
+@@ -490,7 +490,7 @@
+ 	}
+ 	else{
+ 		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++		_error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
+ 	}
+ 
+ 	/*Assign output pointers:*/
+@@ -514,7 +514,7 @@
+ 	}
+ 	else{
+ 		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++		_error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
+ 	}
+ 
+ 	/*Assign output pointers:*/
+@@ -615,10 +615,10 @@
+ 
+ 	/*Fetch all options*/
+ 	for (int i=istart; i<nrhs; i=i+2){
+-		if (!mxIsClass(pdataref[i],"char")) _error_("Argument %d must be name of option",i+1);
++		if (!mxIsClass(pdataref[i],"char")) _error2_("Argument " << i+1 << " must be name of option");
+ 
+ 		FetchData(&name,pdataref[i]);
+-		if(i+1 == nrhs) _error_("Argument %d must exist and be value of option \"%s\".",i+2,name);
++		if(i+1 == nrhs) _error2_("Argument " << i+2 << " must exist and be value of option \"" << name << "\".");
+ 
+ 		option=(Option*)OptionParse(name,&pdataref[i+1]);
+ 		options->AddOption(option);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp	(revision 12493)
+@@ -45,7 +45,7 @@
+ 		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);
++		if (cols!=1) _error2_("input vector of size " << rows << "x" << cols << " should have only one column");
+ 
+ 		nz=(int)((double)nnz/(double)rows);
+ 
+@@ -76,7 +76,7 @@
+ 		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);
++		if (cols!=1) _error2_("input vector of size " << rows << "x" << cols << " should have only one column");
+ 
+ 		/*allocate and memcpy*/
+ 		if(rows){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp	(revision 12493)
+@@ -107,7 +107,7 @@
+ 		}
+ 	}
+ 	else{
+-		_error_("Matlab matrix type Not implemented yet");
++		_error2_("Matlab matrix type Not implemented yet");
+ 	}
+ 
+ 	/*Assign output pointer: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp	(revision 12493)
+@@ -26,11 +26,11 @@
+ 	/*check on requested size: */
+ 	if (size==0){
+ 		function();
+-		_error_("usage: see above");
++		_error2_("usage: see above");
+ 	}
+ 	else if (size!=NRHS ) {
+ 		function(); 
+-		_error_("usage error.");
++		_error2_("usage error.");
+ 	}
+ 	return 1;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/io/FetchPythonData.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 12493)
+@@ -46,7 +46,7 @@
+ 	bool boolean;
+ 	
+ 	/*check this is indeed a subtype of long type: */
+-	if(!PyBool_Check(py_boolean))_error_("expecting a boolean in input!");
++	if(!PyBool_Check(py_boolean))_error2_("expecting a boolean in input!");
+ 
+ 	/*extract boolean: */
+ 	boolean=(bool)PyLong_AsLong(py_boolean);
+@@ -67,7 +67,7 @@
+ 
+ 	/*retrive dimensions: */
+ 	ndim=PyArray_NDIM((const PyArrayObject*)py_matrix);
+-	if(ndim!=2)_error_("expecting an MxN matrix in input!");
++	if(ndim!=2)_error2_("expecting an MxN matrix in input!");
+ 	dims=PyArray_DIMS((PyArrayObject*)py_matrix);
+ 	M=dims[0]; N=dims[1];
+ 	
+@@ -91,7 +91,7 @@
+ 
+ 	/*retrive dimensions: */
+ 	ndim=PyArray_NDIM((const PyArrayObject*)py_vector);
+-	if(ndim!=1)_error_("expecting an Mx1 vector in input!");
++	if(ndim!=1)_error2_("expecting an Mx1 vector in input!");
+ 	dims=PyArray_DIMS((PyArrayObject*)py_vector);
+ 	M=dims[0]; 
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Parameters.cpp	(revision 12493)
+@@ -64,7 +64,7 @@
+ 			return;
+ 		}
+ 	}
+-	_error_("could not find parameter %s",EnumToStringx(enum_type));
++	_error2_("could not find parameter " << EnumToStringx(enum_type));
+ }
+ /*}}}*/
+ /*FUNCTION Parameters::FindParam(int* pinteger,int enum_type){{{*/
+@@ -81,7 +81,7 @@
+ 			return;
+ 		}
+ 	}
+-	_error_("could not find parameter %s",EnumToStringx(enum_type));
++	_error2_("could not find parameter " << EnumToStringx(enum_type));
+ }
+ /*}}}*/
+ /*FUNCTION Parameters::FindParam(IssmDouble* pscalar, int enum_type){{{*/
+@@ -98,7 +98,7 @@
+ 			return;
+ 		}
+ 	}
+-	_error_("could not find parameter %s",EnumToStringx(enum_type));
++	_error2_("could not find parameter " << EnumToStringx(enum_type));
+ }
+ /*}}}*/
+ /*FUNCTION Parameters::FindParam(char** pstring,int enum_type){{{*/
+@@ -115,7 +115,7 @@
+ 			return;
+ 		}
+ 	}
+-	_error_("could not find parameter %s",EnumToStringx(enum_type));
++	_error2_("could not find parameter " << EnumToStringx(enum_type));
+ 
+ }
+ /*}}}*/
+@@ -133,7 +133,7 @@
+ 			return;
+ 		}
+ 	}
+-	_error_("could not find parameter %s",EnumToStringx(enum_type));
++	_error2_("could not find parameter " << EnumToStringx(enum_type));
+ 
+ }
+ /*}}}*/
+@@ -151,7 +151,7 @@
+ 			return;
+ 		}
+ 	}
+-	_error_("could not find parameter %s",EnumToStringx(enum_type));
++	_error2_("could not find parameter " << EnumToStringx(enum_type));
+ 
+ }
+ /*}}}*/
+@@ -169,7 +169,7 @@
+ 			return;
+ 		}
+ 	}
+-	_error_("could not find parameter %s",EnumToStringx(enum_type));
++	_error2_("could not find parameter " << EnumToStringx(enum_type));
+ 
+ }
+ /*}}}*/
+@@ -187,7 +187,7 @@
+ 			return;
+ 		}
+ 	}
+-	_error_("could not find parameter %s",EnumToStringx(enum_type));
++	_error2_("could not find parameter " << EnumToStringx(enum_type));
+ 
+ }
+ /*}}}*/
+@@ -205,7 +205,7 @@
+ 			return;
+ 		}
+ 	}
+-	_error_("could not find parameter %s",EnumToStringx(enum_type));
++	_error2_("could not find parameter " << EnumToStringx(enum_type));
+ 
+ }
+ /*}}}*/
+@@ -223,7 +223,7 @@
+ 			return;
+ 		}
+ 	}
+-	_error_("could not find parameter %s",EnumToStringx(enum_type));
++	_error2_("could not find parameter " << EnumToStringx(enum_type));
+ }
+ /*}}}*/
+ /*FUNCTION Parameters::FindParam(Vector** pvec,int enum_type){{{*/
+@@ -240,7 +240,7 @@
+ 			return;
+ 		}
+ 	}
+-	_error_("could not find parameter %s",EnumToStringx(enum_type));
++	_error2_("could not find parameter " << EnumToStringx(enum_type));
+ 
+ }
+ /*}}}*/
+@@ -258,7 +258,7 @@
+ 			return;
+ 		}
+ 	}
+-	_error_("could not find parameter %s",EnumToStringx(enum_type));
++	_error2_("could not find parameter " << EnumToStringx(enum_type));
+ 
+ }
+ /*}}}*/
+@@ -276,7 +276,7 @@
+ 			return;
+ 		}
+ 	}
+-	_error_("could not find parameter %s",EnumToStringx(enum_type));
++	_error2_("could not find parameter " << EnumToStringx(enum_type));
+ }
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Elements.cpp	(revision 12493)
+@@ -202,7 +202,7 @@
+ 
+ 		/*see what the first element of this partition has in stock (this is common to all partitions)*/
+ 		if(my_rank==minrank){
+-			if(this->Size()==0) _error_("Cannot write results because there is no element??");
++			if(this->Size()==0) _error2_("Cannot write results because there is no element??");
+ 			Element* element=(Element*)this->GetObjectByOffset(0);
+ 			element->ListResultsInfo(&resultsenums,&resultssizes,&resultstimes,&resultssteps,&numberofresults);
+ 		}
+@@ -231,7 +231,7 @@
+ 			/*Get vector for result number i*/
+ 			if(resultssizes[i]==P1Enum)      vectorsize=numberofvertices;
+ 			else if(resultssizes[i]==P0Enum) vectorsize=numberofelements;
+-			else _error_("Unkown result size: %s",EnumToStringx(resultssizes[i]));
++			else _error2_("Unkown result size: " << EnumToStringx(resultssizes[i]));
+ 			vector=new Vector(vectorsize);
+ 
+ 			for(int j=0;j<this->Size();j++){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12493)
+@@ -58,12 +58,12 @@
+ 	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");
++	if(minspacing<=0) _error2_("minspacing must > 0");
+ 
+ 	/*Get Minimum box size*/
+ 	if(options->GetOption("boxlength")){
+ 		options->Get(&minlength,"boxlength");
+-		if(minlength<=0)_error_("boxlength should be a positive number");
++		if(minlength<=0)_error2_("boxlength should be a positive number");
+ 		maxdepth=int(log(max(xmax-xmin,ymax-ymin)/minlength +1)/log(2.0));
+ 	}
+ 	else{
+@@ -383,7 +383,7 @@
+ 	SolverxGsl(&Ginv1, Gamma,ones,n_obs);   // Gamma^-1 ones
+ 	SolverxGsl(&GinvZ, Gamma,obs,n_obs);    // Gamma^-1 Z
+ #else
+-	_error_("GSL is required");
++	_error2_("GSL is required");
+ #endif
+ 
+ 	/*Prepare predictor*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.cpp	(revision 12493)
+@@ -56,7 +56,7 @@
+ 	if (!found){
+ 		/*we could not find an input with the correct enum type. No defaults values were provided, 
+ 		 * error out: */
+-		_error_("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));
++		_error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
+ 	}
+ 
+ 	/*Ok, we have an input if we made it here, request the input to return the value: */
+@@ -84,7 +84,7 @@
+ 	if (!found){
+ 		/*we could not find an input with the correct enum type. No defaults values were provided, 
+ 		 * error out: */
+-		_error_("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));
++		_error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
+ 	}
+ 
+ 	/*Ok, we have an input if we made it here, request the input to return the value: */
+@@ -112,7 +112,7 @@
+ 	if (!found){
+ 		/*we could not find an input with the correct enum type. No defaults values were provided, 
+ 		 * error out: */
+-		_error_("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));
++		_error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
+ 	}
+ 
+ 	/*Ok, we have an input if we made it here, request the input to return the value: */
+@@ -140,7 +140,7 @@
+ 	if (!found){
+ 		/*we could not find an input with the correct enum type. No defaults values were provided, 
+ 		 * error out: */
+-		_error_("could not find input with enum type %i (%s)",enum_type,EnumToStringx(enum_type));
++		_error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
+ 	}
+ 
+ 	/*Ok, we have an input if we made it here, request the input to return the value: */
+@@ -212,7 +212,7 @@
+ 	constrain_input=(Input*)this->GetInput(constrain_enum);
+ 
+ 	/*some checks: */
+-	if(!constrain_input) _error_(" input %s could not be found!",EnumToStringx(constrain_enum));
++	if(!constrain_input) _error2_(" input " << EnumToStringx(constrain_enum) << " could not be found!");
+ 
+ 	/*Apply ContrainMin: */
+ 	constrain_input->ConstrainMin(minimum);
+@@ -253,7 +253,7 @@
+ 		max=input->Max();
+ 	}
+ 	else{
+-		_error_("Input %s not found",EnumToStringx(enumtype));
++		_error2_("Input " << EnumToStringx(enumtype) << " not found");
+ 	}
+ 
+ 	/*Return output*/
+@@ -274,7 +274,7 @@
+ 		max=input->MaxAbs();
+ 	}
+ 	else{
+-		_error_("Input %s not found",EnumToStringx(enumtype));
++		_error2_("Input " << EnumToStringx(enumtype) << " not found");
+ 	}
+ 
+ 	/*Return output*/
+@@ -295,7 +295,7 @@
+ 		min=input->Min();
+ 	}
+ 	else{
+-		_error_("Input %s not found",EnumToStringx(enumtype));
++		_error2_("Input " << EnumToStringx(enumtype) << " not found");
+ 	}
+ 
+ 	/*Return output*/
+@@ -316,7 +316,7 @@
+ 		min=input->MinAbs();
+ 	}
+ 	else{
+-		_error_("Input %s not found",EnumToStringx(enumtype));
++		_error2_("Input " << EnumToStringx(enumtype) << " not found");
+ 	}
+ 
+ 	/*Return output*/
+@@ -368,7 +368,7 @@
+ 
+ 	/*Make a copy of the original input: */
+ 	original=(Input*)this->GetInput(original_enum);
+-	if(!original)_error_("could not find input with enum: %s",EnumToStringx(original_enum)); 
++	if(!original)_error2_("could not find input with enum: " << EnumToStringx(original_enum)); 
+ 	copy=(Input*)original->copy();
+ 
+ 	/*Change copy enum to reinitialized_enum: */
+@@ -415,8 +415,8 @@
+ 	yinput=(Input*)this->GetInput(MeshYEnum);
+ 
+ 	/*some checks: */
+-	if(!xinput) _error_(" input %s could not be found!",EnumToStringx(MeshXEnum));
+-	if(!yinput) _error_(" input %s could not be found!",EnumToStringx(MeshYEnum));
++	if(!xinput) _error2_(" input " << EnumToStringx(MeshXEnum) << " could not be found!");
++	if(!yinput) _error2_(" input " << EnumToStringx(MeshYEnum) << " could not be found!");
+ 
+ 	/*Apply AXPY: */
+ 	yinput->AXPY(xinput,scalar);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12493)
+@@ -132,7 +132,7 @@
+ 
+ 	vector<Object*>::iterator object;
+ 
+-	if(this==NULL)_error_(" trying to echo a NULL dataset");
++	if(this==NULL)_error2_(" trying to echo a NULL dataset");
+ 
+ 	_printf_(true,"DataSet echo: %i objects\n",objects.size());
+ 
+@@ -149,7 +149,7 @@
+ 
+ 	vector<Object*>::iterator object;
+ 
+-	if(this==NULL)_error_(" trying to echo a NULL dataset");
++	if(this==NULL)_error2_(" trying to echo a NULL dataset");
+ 
+ 	_printf_(true,"DataSet echo: %i objects\n",objects.size());
+ 
+@@ -193,11 +193,11 @@
+ 	int i;
+ 
+ 	_assert_(this);
+-	if(!sorted)_error_(" trying to binary search on a non-sorted dataset!");
++	if(!sorted)_error2_(" trying to binary search on a non-sorted dataset!");
+ 
+ 	/*Carry out a binary search on the sorted_ids: */
+ 	if(!binary_search(&id_offset,eid, sorted_ids,objects.size())){
+-		_error_("could not find object with id %i in DataSet %s",eid,EnumToStringx(enum_type));
++		_error2_("could not find object with id " << eid << " in DataSet " << EnumToStringx(enum_type));
+ 	}
+ 
+ 	/*Convert  the id offset into sorted offset: */
+@@ -258,7 +258,7 @@
+ 
+ 	/*Only sort if we are not already sorted: */
+ 	if(!sorted){
+-		_error_(" not implemented yet!");
++		_error2_(" not implemented yet!");
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Options.cpp	(revision 12493)
+@@ -46,17 +46,17 @@
+ 	_assert_(in_option);
+ 
+ 	/*Also, check the option name*/
+-	if(!in_option->name) _error_("input option has an empty name");
+-	if(strchr(in_option->name,'.')) _error_("Option \"%s\" has a protected character \".\"",in_option->name);
+-	if(strchr(in_option->name,'[')) _error_("Option \"%s\" has a protected character \"[\"",in_option->name);
+-	if(strchr(in_option->name,']')) _error_("Option \"%s\" has a protected character \"]\"",in_option->name);
++	if(!in_option->name) _error2_("input option has an empty name");
++	if(strchr(in_option->name,'.')) _error2_("Option \"" << in_option->name << "\" has a protected character \".\"");
++	if(strchr(in_option->name,'[')) _error2_("Option \"" << in_option->name << "\" has a protected character \"[\"");
++	if(strchr(in_option->name,']')) _error2_("Option \"" << in_option->name << "\" has a protected character \"]\"");
+ 
+ 	/*Finally, check that no option of the same name already exists in the dataset*/
+ 	for(object=objects.begin();object<objects.end();object++){
+ 
+ 		option=(Option*)(*object); 
+ 		if (!strcmp(option->name,in_option->name)){
+-			_error_("Options \"%s\" found multiple times",in_option->name);
++			_error2_("Options \"" << in_option->name << "\" found multiple times");
+ 			break;
+ 		}
+ 	}
+@@ -82,7 +82,7 @@
+ 	}
+ 	/*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);
++		_error2_("option of name \"" << name << "\" not found, and no default value has been provided");
+ 	}
+ }
+ /*}}}*/
+@@ -120,7 +120,7 @@
+ 	}
+ 	/*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);
++		_error2_("option of name \"" << name << "\" not found, and no default value has been provided");
+ 	}
+ }
+ /*}}}*/
+@@ -158,7 +158,7 @@
+ 	}
+ 	/*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);
++		_error2_("option of name \"" << name << "\" not found, and no default value has been provided");
+ 	}
+ }
+ /*}}}*/
+@@ -198,7 +198,7 @@
+ 	}
+ 	/*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);
++		_error2_("option of name \"" << name << "\" not found, and no default value has been provided");
+ 	}
+ 
+ }
+@@ -263,7 +263,7 @@
+ 		}
+ 		/*Else: not supported*/
+ 		else{
+-			_error_("Cannot recover field \"%s\" for an option of type %s",name,EnumToStringx(option->ObjectEnum()));
++			_error2_("Cannot recover field \"" << name << "\" for an option of type " << EnumToStringx(option->ObjectEnum()));
+ 		}
+ 	}
+ 	/*Else, the Option does not exist, no default provided*/
+@@ -289,7 +289,7 @@
+ 	}
+ 	/*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);
++		_error2_("option of name \"" << name << "\" not found, and no default value has been provided");
+ 	}
+ }
+ /*}}}*/
+@@ -323,7 +323,7 @@
+ 				}
+ 				/*Else: not supported*/
+ 				else{
+-					_error_("Cannot recover field \"%s\" for an option of type %s",name,EnumToStringx(option->ObjectEnum()));
++					_error2_("Cannot recover field \"" << name << "\" for an option of type " << EnumToStringx(option->ObjectEnum()));
+ 				}
+ 			}
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12493)
+@@ -8,7 +8,6 @@
+ 
+ #include <iostream>
+ #include <sstream>
+-
+ #include "./typedefs.h"
+ 
+ #ifdef HAVE_CONFIG_H
+@@ -41,7 +40,7 @@
+    throw ErrorException(aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}
+ #else
+ #define _error2_(StreamArgs)\
+-   {std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
++	{std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
+    aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \
+    throw ErrorException(__FILE__,__func__,__LINE__,aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp	(revision 12493)
+@@ -35,26 +35,26 @@
+ 
+ 	if (!itrnb) {
+ 		if (nrowb != idimb) {
+-			_error_("Matrix A and B inner vectors not equal size.");
++			_error2_("Matrix A and B inner vectors not equal size.");
+ 		}
+ 		idimc=ncolb;
+ 	}
+ 	else {
+ 		if (ncolb != idimb) {
+-			_error_("Matrix A and B inner vectors not equal size.");
++			_error2_("Matrix A and B inner vectors not equal size.");
+ 		}
+ 		idimc=nrowb;
+ 	}
+ 
+ 	if (!itrnc) {
+ 		if (nrowc != idimc) {
+-			_error_("Matrix B and C inner vectors not equal size.");
++			_error2_("Matrix B and C inner vectors not equal size.");
+ 		}
+ 		idimd=ncolc;
+ 	}
+ 	else {
+ 		if (ncolc != idimc) {
+-			_error_("Matrix B and C inner vectors not equal size.");
++			_error2_("Matrix B and C inner vectors not equal size.");
+ 		}
+ 		idimd=nrowc;
+ 	}
+@@ -123,7 +123,7 @@
+ 	}
+ 
+ 	if (ntrma != ntrmb) {
+-		_error_("Matrix A and B inner vectors not equal size");
++		_error2_("Matrix A and B inner vectors not equal size");
+ 	    noerr=0;	
+ 		return noerr;
+ 	}
+@@ -174,7 +174,7 @@
+ 	IssmDouble pivot,det,dtemp;
+ 
+ 	if (!b && nvec) {
+-		_error_("No right-hand side for nvec=%d.",nvec);
++		_error2_("No right-hand side for nvec=" << nvec << ".");
+ 		noerr=0;
+ 		return noerr;
+ 	}
+@@ -213,7 +213,7 @@
+ 			xDelete<int>(pivrc1);
+ 			xDelete<int>(pivrc2);
+ 			xDelete<int>(pindx);
+-			_error_("Pivot %f less than machine epsilon",pivot);
++			_error2_("Pivot " << pivot << " less than machine epsilon");
+ 			noerr=0;
+ 			return noerr;
+ 		}
+@@ -348,7 +348,7 @@
+ 
+ 	/*Compute determinant*/
+ 	Matrix2x2Determinant(&det,A);
+-	if (fabs(det) < DBL_EPSILON) _error_("Determinant smaller that machine epsilon");
++	if (fabs(det) < DBL_EPSILON) _error2_("Determinant smaller that machine epsilon");
+ 
+ 	/*Compute invert*/
+ 	Ainv[0]=   A[3]/det; /* =  d/det */
+@@ -373,7 +373,7 @@
+ 
+ 	/*Compute determinant*/
+ 	Matrix3x3Determinant(&det,A);
+-	if (fabs(det) < DBL_EPSILON) _error_("Determinant smaller that machine epsilon");
++	if (fabs(det) < DBL_EPSILON) _error2_("Determinant smaller that machine epsilon");
+ 
+ 	/*Compute invert*/
+ 	Ainv[0]=(A[4]*A[8]-A[5]*A[7])/det; /* = (e*i-f*h)/det */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12493)
+@@ -42,11 +42,11 @@
+ 	/*initialize counter and get response at the boundaries*/
+ 	iter=0;
+ 	fxmin = (*f)(xmin,optargs);
+-	if (isnan(fxmin)) _error_("Function evaluation returned NaN");
++	if (isnan(fxmin)) _error2_("Function evaluation returned NaN");
+ 	_printf_(VerboseControl(),"\n        Iteration         x           f(x)       Tolerance         Procedure\n\n");
+ 	_printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",xmin,fxmin,"         N/A         boundary\n");
+ 	fxmax = (*f)(xmax,optargs);
+-	if (isnan(fxmax)) _error_("Function evaluation returned NaN");
++	if (isnan(fxmax)) _error2_("Function evaluation returned NaN");
+ 	_printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",xmax,fxmax,"         N/A         boundary\n");
+ 
+ 	/*test if jump option activated and xmin==0*/
+@@ -70,7 +70,7 @@
+ 
+ 	/*2: call the function to be evaluated*/
+ 	fxbest = (*f)(x,optargs);
+-	if(isnan(fxbest)) _error_("Function evaluation returned NaN");
++	if(isnan(fxbest)) _error2_("Function evaluation returned NaN");
+ 	iter=iter+1;
+ 
+ 	/*3: update the other variables*/
+@@ -153,7 +153,7 @@
+ 
+ 		//evaluate function on x
+ 		fx = (*f)(x,optargs);
+-		if(isnan(fx)) _error_("Function evaluation returned NaN");
++		if(isnan(fx)) _error2_("Function evaluation returned NaN");
+ 		iter=iter+1;
+ 
+ 		// Update a, b, xm, x1, x2, tol1, tol2
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12493)
+@@ -1669,7 +1669,7 @@
+ 		} while (iter < MAX_GAUS_ITER);
+ 		if (iter >= MAX_GAUS_ITER) {
+ 			xDelete<IssmPDouble>(work);
+-			_error_("%s%i"," Max iterations exceeded for l=",MAX_GAUS_ITER);
++			_error2_("" << " Max iterations exceeded for l=" << MAX_GAUS_ITER);
+ 		}
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12493)
+@@ -56,7 +56,7 @@
+ 	}
+ 	if (found==-1){
+ 		/*ok, we did not find anything, this is not good! error out: */
+-		_error_("%s%s","could find neither a default analysis  nor analysis ",EnumToStringx(analysis_type));
++		_error2_("" << "could find neither a default analysis  nor analysis " << EnumToStringx(analysis_type));
+ 	}
+ 
+ 	/*ok, grab the option string: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp	(revision 12493)
+@@ -28,7 +28,7 @@
+ 	/*Now, which direction are we going? once determined, use scale factor: */
+ 	if(direction_enum==IuToExtEnum) for(i=0;i<numvalues;i++)values[i]=values[i]*scale; 
+ 	else if(direction_enum==ExtToIuEnum) for(i=0;i<numvalues;i++)values[i]=values[i]/scale; 
+-	else _error_(" wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");
++	else _error2_(" wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");
+ 
+ }
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/Verbosity.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/Verbosity.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/Verbosity.cpp	(revision 12493)
+@@ -33,7 +33,7 @@
+ /*FUNCTION SetVerbosityLevel {{{*/
+ void SetVerbosityLevel(int level){
+ 
+-	if(level<0) _error_("vebosity level should be a positive integer (user provided %i)",level);
++	if(level<0) _error2_("vebosity level should be a positive integer (user provided " << level << ")");
+ 
+ 	verbositylevel = level;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp	(revision 12493)
+@@ -52,7 +52,7 @@
+ 		if(nu)eps=ndu/nu;
+ 		else eps=0;
+ 	}
+-	else _error_("%s%s%s"," convergence criterion ",EnumToStringx(criterion_enum)," not supported yet!");
++	else _error2_("" << " convergence criterion " << EnumToStringx(criterion_enum) << " not supported yet!");
+ 
+ 	/*Assign output pointers:*/
+ 	*peps=eps;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp	(revision 12493)
+@@ -40,7 +40,7 @@
+ 	
+ 	//get the value of the function at the first boundary
+ 	fx1= (*f)(x1,optargs);
+-	if (isnan(fx1)) _error_("Function evaluation returned NaN");
++	if (isnan(fx1)) _error2_("Function evaluation returned NaN");
+ 	_printf_(VerboseControl(),"\n        Iteration         x           f(x)       Tolerance\n\n");
+ 	_printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",x1,fx1,"         N/A\n");
+ 
+@@ -53,7 +53,7 @@
+ 		/*get f(x2)*/
+ 		iter++;
+ 		fx2 = (*f)(x2,optargs);
+-		if (isnan(fx2)) _error_("Function evaluation returned NaN");
++		if (isnan(fx2)) _error2_("Function evaluation returned NaN");
+ 		_printf_(VerboseControl(),"         %5i    %12.6g  %12.6g  %12.6g\n",iter,x2,fx2,fabs(x2-x1)>fabs(fx2-fx1)?fabs(fx2-fx1):fabs(x2-x1));
+ 
+ 		//Stop the optimization?
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/String/DescriptorIndex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/String/DescriptorIndex.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/String/DescriptorIndex.cpp	(revision 12493)
+@@ -22,12 +22,12 @@
+ 
+ 	/*retrieve first token, separated by underscore: */
+ 	pch = strtok (descriptor,"_");
+-	if(!pch)_error_("%s%s%s"," descriptor ",descriptor," is not correctly formatted!");
++	if(!pch)_error2_("" << " descriptor " << descriptor << " is not correctly formatted!");
+ 
+ 	if (strncmp(pch,"scaled",6)==0){
+ 		/*we have a scaled variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error_("%s%s%s"," scaled descriptor ",descriptor," is not correctly formatted!");
++		if(!pch)_error2_("" << " scaled descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 
+ 		/*now recover  the index if it exists: */
+@@ -43,22 +43,22 @@
+ 	else if (strncmp(pch,"indexed",7)==0){
+ 		/*we have an indexed variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");
++		if(!pch)_error2_("" << " indexed descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 		/*now recover  the index: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");
++		if(!pch)_error2_("" << " indexed descriptor " << descriptor << " is not correctly formatted!");
+ 		sscanf(pch,"%i",pindex);
+ 		return IndexedEnum;
+ 	}
+ 	else if (strncmp(pch,"nodal",5)==0){
+ 		/*we have an indexed variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");
++		if(!pch)_error2_("" << " nodal descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 		/*now recover  the index: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");
++		if(!pch)_error2_("" << " nodal descriptor " << descriptor << " is not correctly formatted!");
+ 		sscanf(pch,"%i",pindex);
+ 		return NodalEnum;
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/alloc.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/alloc.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/alloc.cpp	(revision 12493)
+@@ -30,11 +30,11 @@
+ 
+ 	void* memptr=NULL;
+ 
+-	if(!size)_error_(" attempting to 0 size allocation!");
++	if(!size)_error2_(" attempting to 0 size allocation!");
+ 
+ 	/* Use the c library to do the allocation: */
+ 	memptr=malloc(size);
+-	if(!memptr) _error_("memory allocation failed!");
++	if(!memptr) _error2_("memory allocation failed!");
+ 
+ 	return memptr;
+ }
+@@ -43,11 +43,11 @@
+ 
+ 	void* memptr=NULL;
+ 	
+-	if(!size)_error_("attempting to 0 size allocation!");
++	if(!size)_error2_("attempting to 0 size allocation!");
+ 
+ 	/* Use the c library to do the allocation: */
+ 	memptr=calloc(n,size);
+-	if(!memptr) _error_("memory allocation failed!");
++	if(!memptr) _error2_("memory allocation failed!");
+ 
+ 	return memptr;
+ }
+@@ -87,11 +87,11 @@
+ 	
+ 	register void* value=NULL;
+ 	
+-	if(!size)_error_("attempting to realloc to zero");
++	if(!size)_error2_("attempting to realloc to zero");
+ 	value = (void*)realloc(pv,size);
+ 
+ 	if (value == NULL) {
+-		_error_("virtual memory exhausted");
++		_error2_("virtual memory exhausted");
+ 	}
+ 	return value;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Threads/LaunchThread.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Threads/LaunchThread.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Threads/LaunchThread.cpp	(revision 12493)
+@@ -43,12 +43,12 @@
+ 	for(i=0;i<num_threads;i++){
+ 
+ 		if(pthread_create(threads+i,NULL,function,(void*)(handles+i))){
+-			_error_(" pthread_create error");
++			_error2_(" pthread_create error");
+ 		}
+ 	}
+ 	for(i=0;i<num_threads;i++){
+ 		if(pthread_join(threads[i],(void**)&status)){
+-			_error_(" pthread_join error");
++			_error2_(" pthread_join error");
+ 		}
+ 	}
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp	(revision 12493)
+@@ -30,7 +30,7 @@
+ 		switch(cs_array[i]){
+ 			case XYEnum:   numdofs+=2; break;
+ 			case XYZPEnum: numdofs+=4; break;
+-			default: _error_("Coordinate system %s not supported yet",EnumToStringx(cs_array[i]));
++			default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
+ 		}
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp	(revision 12493)
+@@ -29,7 +29,7 @@
+ 		switch(cs_array[i]){
+ 			case XYEnum:   numdofs+=2; break;
+ 			case XYZPEnum: numdofs+=4; break;
+-			default: _error_("Coordinate system %s not supported yet",EnumToStringx(cs_array[i]));
++			default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
+ 		}
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp	(revision 12493)
+@@ -21,7 +21,7 @@
+ 		switch(cs_array[i]){
+ 			case XYEnum:   numdofs+=2; break;
+ 			case XYZPEnum: numdofs+=4; break;
+-			default: _error_("Coordinate system %s not supported yet",EnumToStringx(cs_array[i]));
++			default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
+ 		}
+ 	}
+ 
+@@ -66,7 +66,7 @@
+ 				counter+=4;
+ 				break;
+ 			default:
+-				_error_("Coordinate system %s not supported yet",EnumToStringx(cs_array[i]));
++				_error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
+ 		}
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp	(revision 12493)
+@@ -30,7 +30,7 @@
+ 		switch(cs_array[i]){
+ 			case XYEnum:   numdofs+=2; break;
+ 			case XYZPEnum: numdofs+=4; break;
+-			default: _error_("Coordinate system %s not supported yet",EnumToStringx(cs_array[i]));
++			default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
+ 		}
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp	(revision 12493)
+@@ -30,7 +30,7 @@
+ 		switch(cs_array[i]){
+ 			case XYEnum:   numdofs+=2; break;
+ 			case XYZPEnum: numdofs+=4; break;
+-			default: _error_("Coordinate system %s not supported yet",EnumToStringx(cs_array[i]));
++			default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
+ 		}
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineWrite.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineWrite.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineWrite.cpp	(revision 12493)
+@@ -22,7 +22,7 @@
+ 
+ 	/*open domain outline file for writing: */
+ 	if ((fid=fopen(domainname,"w"))==NULL){
+-		_error_("%s%s","could not open domain file ",domainname); 
++		_error2_("" << "could not open domain file " << domainname); 
+ 		noerr=0; goto cleanupandreturn;
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 12493)
+@@ -37,7 +37,7 @@
+ 
+ 	/*open domain outline file for reading: */
+ 	if ((fid=fopen(domainname,"r"))==NULL){
+-		_error_("%s%s","could not find domain file ",domainname); 
++		_error2_("" << "could not find domain file " << domainname); 
+ 	}
+ 
+ 	/*Do a first pass through the domainname file, to figure out how many profiles 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/pfopen.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/pfopen.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/pfopen.cpp	(revision 12493)
+@@ -19,7 +19,7 @@
+ 	
+ 	/*Open handle to data on disk: */
+ 	fid=fopen(filename,format);
+-	if(fid==NULL) _error_("%s%s%s","could not open file ",filename," for binary reading or writing"); 
++	if(fid==NULL) _error2_("" << "could not open file " << filename << " for binary reading or writing"); 
+ 
+ 	return fid;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/pfclose.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/pfclose.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/pfclose.cpp	(revision 12493)
+@@ -17,5 +17,5 @@
+ 	/*Close file handle: */
+ 	extern int my_rank;
+ 	_assert_(fid);
+-	if(fclose(fid)!=0)_error_("%s%s","could not close file ",filename);
++	if(fclose(fid)!=0)_error2_("" << "could not close file " << filename);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp	(revision 12493)
+@@ -40,7 +40,7 @@
+ 
+ 	/*some checks*/
+ 	if (nels_data<1 || nods_data<3 || nods_prime==0){
+-		_error_("nothing to be done according to the mesh given in input");
++		_error2_("nothing to be done according to the mesh given in input");
+ 	}
+ 
+ 	/*Set debug to 1 if there are lots of elements*/
+@@ -54,11 +54,11 @@
+ 		interpolation_type=2;
+ 	}
+ 	else{
+-		_error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
++		_error2_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
+ 	}
+ 
+ 	if((numcontours) && (interpolation_type==2)){
+-		_error_(" element interpolation_type with contours not supported yet!");
++		_error2_(" element interpolation_type with contours not supported yet!");
+ 	}
+ 
+ 	/*Get prime mesh extrema coordinates*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12493)
+@@ -469,5 +469,5 @@
+          else stage=5;
+    }
+ 	/*If we reach this point, the string provided has not been found*/
+-   _error_("Enum %s not found",name);
++   _error2_("Enum " << name << " not found");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Responsex/Responsex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Responsex/Responsex.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Responsex/Responsex.cpp	(revision 12493)
+@@ -45,9 +45,9 @@
+ 		case MaterialsRheologyBbarEnum:ElementResponsex(responses, elements,nodes, vertices, loads, materials, parameters,MaterialsRheologyBbarEnum,process_units); break;
+ 		case VelEnum:ElementResponsex(responses, elements,nodes, vertices, loads, materials, parameters,VelEnum,process_units); break;
+ 		case FrictionCoefficientEnum:NodalValuex(responses, FrictionCoefficientEnum,elements,nodes, vertices, loads, materials, parameters,process_units); break;
+-		default: _error_(" response descriptor \"%s\" not supported yet!",response_descriptor); break;
++		default: _error2_(" response descriptor \"" << response_descriptor << "\" not supported yet!"); break;
+ 		#else
+-		default: _error_(" ISSM was not compiled with responses capabilities, exiting!");
++		default: _error2_(" ISSM was not compiled with responses capabilities, exiting!");
+ 		#endif
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 12493)
+@@ -37,13 +37,13 @@
+ 
+ 	/*Checks*/
+ 	if (data_cols<=0){
+-		_error_("data provided has a negative number of columns");
++		_error2_("data provided has a negative number of columns");
+ 	}
+ 	if (data_rows!=nods_data && data_rows!=nels_data){
+-		_error_("data provided should have either %i or %i lines (not %i)",nods_data,nels_data,data_rows);
++		_error2_("data provided should have either " << nods_data << " or " << nels_data << " lines (not " << data_rows << ")");
+ 	}
+ 	if((num_default_values) && (data_cols>1)){
+-		_error_("data provided can only have 1 column if a default value is provided");
++		_error2_("data provided can only have 1 column if a default value is provided");
+ 	}
+ 	
+ 	/*If default values supplied, figure out which nodes are inside the contour, including the border of the contour: */
+@@ -124,7 +124,7 @@
+ 			else{
+ 				for (j=0;j<data_cols;j++){
+ 					if (it<0 || it>=nels_data){
+-						_error_("Triangle number %i not in [0 %i], because not correctly implemented yet... interpolate on grid first",it,nels_data);
++						_error2_("Triangle number " << it << " not in [0 " << nels_data << "], because not correctly implemented yet... interpolate on grid first");
+ 					}
+ 					data_interp[i*data_cols+j]=data[data_cols*it+j];
+ 				}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp	(revision 12493)
+@@ -52,7 +52,7 @@
+ 	double  cde,re,ex2,ex;
+ 	double  sl,rho,cm,T,chi;
+ 
+-	if((sgn!=1) && (sgn!=-1)) _error_("Sign should be either +1 or -1.\n");
++	if((sgn!=1) && (sgn!=-1)) _error2_("Sign should be either +1 or -1.\n");
+ 
+ 	delta = central_meridian;
+ 	slat  = standard_parallel;
+@@ -130,7 +130,7 @@
+ 		*pslat = 71;
+ 		_printf_(flag,"Warning: expecting coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n");
+ 	}
+-	else _error_("Sign should be either +1 or -1.\n");
++	else _error2_("Sign should be either +1 or -1.\n");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 12493)
+@@ -29,7 +29,7 @@
+ 
+ 	/*some checks*/
+ 	if (nels<1 || nods<3 || nlines<1 || ncols<1 || xposting==0 || yposting==0){
+-		_error_("nothing to be done according to the mesh given in input");
++		_error2_("nothing to be done according to the mesh given in input");
+ 	}
+ 
+ 	/*figure out what kind of interpolation is needed*/
+@@ -40,7 +40,7 @@
+ 		interpolation_type=2;
+ 	}
+ 	else{
+-		_error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
++		_error2_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
+ 	}
+ 
+ 	/*First, allocate pointers: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12493)
+@@ -26,7 +26,7 @@
+ 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
+ 
+ 	if(migration_style==NoneEnum) return;
+-	if(migration_style!=AgressiveMigrationEnum && migration_style!=SoftMigrationEnum) _error_("%s not supported yet!",EnumToStringx(migration_style));
++	if(migration_style!=AgressiveMigrationEnum && migration_style!=SoftMigrationEnum) _error2_("" << EnumToStringx(migration_style) << " not supported yet!");
+ 
+ 	if(migration_style==SoftMigrationEnum){
+ 		/*Create flag for grounded vertices above the hydrostatic equilibrium: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp	(revision 12493)
+@@ -71,7 +71,7 @@
+ 	#ifdef _HAVE_CONTROL_
+ 	if(control_analysis)solutioncore=&control_core;
+ 	#else
+-	_error_("ISSM was not compiled with control capabilities, exiting!");
++	_error2_("ISSM was not compiled with control capabilities, exiting!");
+ 	#endif
+ 
+ 	/*Run the core solution sequence: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp	(revision 12493)
+@@ -22,12 +22,12 @@
+ 
+ 	/*retrieve first token, separated by underscore: */
+ 	pch = strtok (descriptor,"_");
+-	if(!pch)_error_("%s%s%s"," descriptor ",descriptor," is not correctly formatted!");
++	if(!pch)_error2_("" << " descriptor " << descriptor << " is not correctly formatted!");
+ 
+ 	if (strncmp(pch,"scaled",6)==0){
+ 		/*we have a scaled variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error_("%s%s%s"," scaled descriptor ",descriptor," is not correctly formatted!");
++		if(!pch)_error2_("" << " scaled descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 
+ 		/*now recover  the index if it exists: */
+@@ -43,22 +43,22 @@
+ 	else if (strncmp(pch,"indexed",7)==0){
+ 		/*we have an indexed variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");
++		if(!pch)_error2_("" << " indexed descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 		/*now recover  the index: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error_("%s%s%s"," indexed descriptor ",descriptor," is not correctly formatted!");
++		if(!pch)_error2_("" << " indexed descriptor " << descriptor << " is not correctly formatted!");
+ 		sscanf(pch,"%i",pindex);
+ 		return IndexedEnum;
+ 	}
+ 	else if (strncmp(pch,"nodal",5)==0){
+ 		/*we have an indexed variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");
++		if(!pch)_error2_("" << " nodal descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 		/*now recover  the index: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error_("%s%s%s"," nodal descriptor ",descriptor," is not correctly formatted!");
++		if(!pch)_error2_("" << " nodal descriptor " << descriptor << " is not correctly formatted!");
+ 		sscanf(pch,"%i",pindex);
+ 		return NodalEnum;
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp	(revision 12493)
+@@ -25,7 +25,7 @@
+ 
+ 	/*Get size of vector: */
+ 	gsize=nodes->NumberOfDofs(configuration_type,GsetEnum);
+-	if (gsize==0) _error_("Allocating a Vec of size 0 as gsize=0 for configuration: %s",EnumToStringx(configuration_type));
++	if (gsize==0) _error2_("Allocating a Vec of size 0 as gsize=0 for configuration: " << EnumToStringx(configuration_type));
+ 	
+ 	/*Initialize solution: */
+ 	solution=new Vector(gsize);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp	(revision 12493)
+@@ -37,7 +37,7 @@
+ 
+ 	if(    (edge1==IntersectEnum) && (edge2==IntersectEnum) && (edge3==IntersectEnum)   ){
+ 		/*This case is impossible: */
+-		_error_(" error: a line cannot go through 3 different vertices!");
++		_error2_(" error: a line cannot go through 3 different vertices!");
+ 	}
+ 	else if(    ((edge1==IntersectEnum) && (edge2==IntersectEnum)) || ((edge2==IntersectEnum) && (edge3==IntersectEnum)) || ((edge3==IntersectEnum) && (edge1==IntersectEnum))   ){
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp	(revision 12493)
+@@ -38,7 +38,7 @@
+ 	/*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");
++	if(!sumfound)_error2_("" << "could not find material with id" << index << " to compute ElementResponse");
+ 	#endif
+ 
+ 	/*Ok, we found the element, compute responseocity: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp	(revision 12493)
+@@ -29,7 +29,7 @@
+ 	/*Do we have penalties linked to rifts? In this case, run our special rifts penalty 
+ 	 * management routine, otherwise, skip : */
+ 	if (RiftIsPresent(loads,analysis_type)){
+-		_error_("rift constraints reset not supported yet!");
++		_error2_("rift constraints reset not supported yet!");
+ 	}
+ 	else if(ThermalIsPresent(loads,analysis_type)){
+ 		ThermalConstraintsReset(loads,analysis_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 12493)
+@@ -94,10 +94,10 @@
+ 			xDelete<double>(distributed_values);
+ 		}
+ 		else if (strncmp(descriptor,"indexed_",8)==0){
+-			_error_(" indexed variables not supported yet!");
++			_error2_(" indexed variables not supported yet!");
+ 		}
+ 		else if (strncmp(descriptor,"nodal_",8)==0){
+-			_error_(" nodal variables not supported yet!");
++			_error2_(" nodal variables not supported yet!");
+ 		}
+ 		else{
+ 			/*Ok, standard variable, just update inputs using the variable: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp	(revision 12493)
+@@ -51,7 +51,7 @@
+ 	double  latitude,longitude;
+ 	double  T,rho,sl,tc,mc;
+ 
+-	if((sgn!=1) && (sgn!=-1)) _error_("Sign should be either +1 or -1.\n");
++	if((sgn!=1) && (sgn!=-1)) _error2_("Sign should be either +1 or -1.\n");
+ 
+ 	delta = central_meridian;
+ 	slat  = standard_parallel;
+@@ -122,7 +122,7 @@
+ 		*pslat = 71;
+ 		_printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n");
+ 	}
+-	else _error_("Sign should be either +1 or -1.\n");
++	else _error2_("Sign should be either +1 or -1.\n");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12493)
+@@ -54,7 +54,7 @@
+ 	/*read exp file  */
+ 
+ 	if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp))
+-		_error_("Error reading exp file.");
++		_error2_("Error reading exp file.");
+ 	_printf_(true,"Exp2Kmlx -- Reading %d exp profiles from file \"%s\".\n",nprof,filexp);
+ //	for (i=0; i<nprof; i++)
+ //		printf("i=%d; nvert=%d, closed=%d\n",i,pnvert[i],closed[i]);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp	(revision 12493)
+@@ -43,7 +43,7 @@
+ 
+ 	fidi=fopen(filkml,"r");
+ 	if (!(kobj=KMLFileReadx(fidi)))
+-		_error_("Error reading kml file.");
++		_error2_("Error reading kml file.");
+ 	fclose(fidi);
+ 
+ /*  open exp file  */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 12493)
+@@ -50,7 +50,7 @@
+ 			for (i=0;i<numberofelements;i++) epart[i]=0;
+ 			for (i=0;i<numberofnodes;i++)    npart[i]=0;
+ 		}
+-		else _error_("At least one processor is required");
++		else _error2_("At least one processor is required");
+ 	}
+ 	else{
+ 		/*We have a 3d mesh, made of a regularly extruded 2d mesh. We first partition the 2d mesh, then we extrude the partition: */
+@@ -77,7 +77,7 @@
+ 			for (i=0;i<numberofelements2d;i++) epart2d[i]=0;
+ 			for (i=0;i<numberofnodes2d;i++)    npart2d[i]=0;
+ 		}
+-		else _error_("At least one processor is required");
++		else _error2_("At least one processor is required");
+ 
+ 		/*Extrude epart2d to epart, using numlayers: */
+ 		epart=xNew<int>(numberofelements);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 12493)
+@@ -31,7 +31,7 @@
+ 		}
+ 	}
+ 	else{
+-		_error_("%s%s%s"," vector type: ",EnumToStringx(type)," not supported yet!");
++		_error2_("" << " vector type: " << EnumToStringx(type) << " not supported yet!");
+ 	}
+ 
+ 	vector->Assemble();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp	(revision 12493)
+@@ -37,7 +37,7 @@
+ 	/*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));
++	if(!sumfound)_error2_("" << "could not find element with vertex with id" << index << " to compute nodal value " << EnumToStringx(natureofdataenum));
+ 	#endif
+ 
+ 	/*Broadcast and plug into response: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12493)
+@@ -138,7 +138,7 @@
+ 		xDelete<double>(gate.percent);
+ 	}
+ 	else{
+-		_error_("output '%s' not supported yet",output);
++		_error2_("output '" << output << "' not supported yet");
+ 	}
+ 
+ 	/*clean-up and Assign output pointer*/
+@@ -305,7 +305,7 @@
+ 		else if(strcmp(model,"exponential")==0) variogram = new ExponentialVariogram(options);
+ 		else if(strcmp(model,"spherical")==0)   variogram = new SphericalVariogram(options);
+ 		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 _error2_("variogram " << model << " not supported yet (list of supported variogram: gaussian, exponential, spherical and power)");
+ 	}
+ 	else variogram = new GaussianVariogram(options);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12493)
+@@ -102,7 +102,7 @@
+ #endif
+ 	}
+ 	else{
+-		_error_("output '%s' not supported yet",output);
++		_error2_("output '" << output << "' not supported yet");
+ 	}
+ 
+ 	/*clean-up and Assign output pointer*/
+@@ -125,7 +125,7 @@
+ 		else if(strcmp(model,"exponential")==0) variogram = new ExponentialVariogram(options);
+ 		else if(strcmp(model,"spherical")==0)   variogram = new SphericalVariogram(options);
+ 		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 _error2_("variogram " << model << " not supported yet (list of supported variogram: gaussian, exponential, spherical and power)");
+ 	}
+ 	else variogram = new GaussianVariogram(options);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp	(revision 12493)
+@@ -47,7 +47,7 @@
+ 			case VyEnum:   iomodel->FetchData(1,VyEnum); break;
+ 			case FrictionCoefficientEnum: iomodel->FetchData(1,FrictionCoefficientEnum); break;
+ 			case MaterialsRheologyBbarEnum:    iomodel->FetchData(1,MaterialsRheologyBEnum); break;
+-			default: _error_("Control %s not implemented yet",EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]));
++			default: _error2_("Control " << EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]) << " not implemented yet");
+ 		}
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12493)
+@@ -102,7 +102,7 @@
+ 		}
+ 	}
+ 	else{
+-		_error_("not implemented yet");
++		_error2_("not implemented yet");
+ 	}
+ 
+ 	/*Second: add all missing nodes*/
+@@ -110,7 +110,7 @@
+ 	/*Get edges and elements*/
+ 	iomodel->FetchData(&edges,&numberofedges,&cols,MeshEdgesEnum);
+ 	iomodel->FetchData(&elements,NULL,NULL,MeshElementsEnum);
+-	if (cols!=4) _error_("field edges should have 4 columns");
++	if (cols!=4) _error2_("field edges should have 4 columns");
+ 
+ 	/*!All elements have been partitioned above, only create elements for this CPU: */
+ 	for (i=0;i<numberofedges;i++){
+@@ -151,7 +151,7 @@
+ 				my_nodes[(int)e2*3+1]=true;
+ 			}
+ 			else{
+-				_error_("Problem in edges creation");
++				_error2_("Problem in edges creation");
+ 			}
+ 		}
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp	(revision 12493)
+@@ -45,7 +45,7 @@
+ 	NodesPartitioning(&iomodel->my_nodes,iomodel->my_elements,iomodel->my_vertices,iomodel,continuous_galerkin);
+ 
+ 	/*Check in 3d*/
+-	if(stabilization==3 && dim==3) _error_("DG 3d not implemented yet");
++	if(stabilization==3 && dim==3) _error2_("DG 3d not implemented yet");
+ 
+ 	/*First fetch data: */
+ 	iomodel->FetchData(7,MeshElementsEnum,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp	(revision 12493)
+@@ -60,7 +60,7 @@
+ 			doftype[4]=StokesApproximationEnum;
+ 			doftype[5]=StokesApproximationEnum;
+ 		}
+-		else _error_("Approximationtype %i (%s) not implemented yet for DiagnosticHoriz",(int)*vertices_type,EnumToStringx((int)*vertices_type));
++		else _error2_("Approximationtype " << (int)*vertices_type << " (" << EnumToStringx((int)*vertices_type) << ") not implemented yet for DiagnosticHoriz");
+ 	}
+ 	else if (analysis_type==DiagnosticVertAnalysisEnum){
+ 		numdofs=1;
+@@ -89,7 +89,7 @@
+ 	else if (analysis_type==BalancethicknessAnalysisEnum){
+ 		numdofs=1;
+ 	}
+-	else _error_("analysis type: %i (%s) not implemented yet",analysis_type,EnumToStringx(analysis_type));
++	else _error2_("analysis type: " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not implemented yet");
+ 
+ 	/*Now initialize the index*/
+ 	index->Init(numdofs,doftype);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 12493)
+@@ -32,7 +32,7 @@
+ 	if(!loads) loads = new Loads();
+ 
+ 	/*return if 2d mesh*/
+-	if (dim==2) _error_("2d meshes not supported yet");
++	if (dim==2) _error2_("2d meshes not supported yet");
+ 
+ 	//create penalties for nodes: no node can have a temperature over the melting point
+ 	iomodel->FetchData(2,ThermalSpctemperatureEnum,MeshElementsEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp	(revision 12493)
+@@ -25,7 +25,7 @@
+ 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
+ 
+ 	/*if 2d: Error*/
+-	if (dim==2) _error_("2d meshes not supported yet");
++	if (dim==2) _error2_("2d meshes not supported yet");
+ 
+ 	/*Recover pointer: */
+ 	loads=*ploads;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp	(revision 12493)
+@@ -144,7 +144,7 @@
+ 						}
+ 
+ 					}
+-					else _error_("if vertices_type is MacAyealPattyn, you shoud have nodeonpattyn or nodeonmacayeal");
++					else _error2_("if vertices_type is MacAyealPattyn, you shoud have nodeonpattyn or nodeonmacayeal");
+ 			}
+ 			/*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/
+ 			else if ((int)vertices_type[i]==PattynStokesApproximationEnum){
+@@ -184,7 +184,7 @@
+ 							count++;
+ 						}
+ 					}
+-					else _error_("if vertices_type is PattynStokes, you shoud have nodeonpattyn or nodeonstokes");
++					else _error2_("if vertices_type is PattynStokes, you shoud have nodeonpattyn or nodeonstokes");
+ 			}
+ 			/*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/
+ 			else if ((int)vertices_type[i]==MacAyealStokesApproximationEnum){
+@@ -224,7 +224,7 @@
+ 							count++;
+ 						}
+ 					}
+-					else _error_("if vertices_type is MacAyealStokes, you shoud have nodeonmacayeal or nodeonstokes");
++					else _error2_("if vertices_type is MacAyealStokes, you shoud have nodeonmacayeal or nodeonstokes");
+ 			}
+ 			/*Now add the regular spcs*/
+ 			else{
+@@ -317,7 +317,7 @@
+ 						constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0.,DiagnosticHorizAnalysisEnum));
+ 						count++;
+ 						break;
+-					default: _error_("Vertex approximation %s not supported",EnumToStringx((int)vertices_type[i]));
++					default: _error2_("Vertex approximation " << EnumToStringx((int)vertices_type[i]) << " not supported");
+ 				}
+ 			}
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp	(revision 12493)
+@@ -45,7 +45,7 @@
+ 	NodesPartitioning(&iomodel->my_nodes,iomodel->my_elements,iomodel->my_vertices,iomodel,continuous_galerkin);
+ 
+ 	/*Check in 3d*/
+-	if(stabilization==3 && dim==3) _error_("DG 3d not implemented yet");
++	if(stabilization==3 && dim==3) _error2_("DG 3d not implemented yet");
+ 
+ 	/*First fetch data: */
+ 	iomodel->FetchData(7,MeshElementsEnum,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 12493)
+@@ -152,7 +152,7 @@
+ 			
+ 			/*Fetch the mass flux segments necessary to compute the mass fluxes.  Build a DoubleMatArrayParam object out of them: */ 
+ 			iomodel->FetchData(&array,&mdims_array,&ndims_array,&qmu_mass_flux_num_profiles,QmuMassFluxSegmentsEnum);
+-			if(qmu_mass_flux_num_profiles==0)_error_(" qmu_mass_flux_num_profiles is 0, when MassFlux computations were requested!");
++			if(qmu_mass_flux_num_profiles==0)_error2_(" qmu_mass_flux_num_profiles is 0, when MassFlux computations were requested!");
+ 
+ 			/*Go through segments, and extract those that belong to this cpu: */
+ 			for(i=0;i<qmu_mass_flux_num_profiles;i++){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp	(revision 12493)
+@@ -123,7 +123,7 @@
+ 
+ 
+ 		default:
+-			_error_("%s%s%s"," analysis_type: ",EnumToStringx(analysis_type)," not supported yet!");
++			_error2_("" << " analysis_type: " << EnumToStringx(analysis_type) << " not supported yet!");
+ 	}
+ 
+ 	/*Update Elements and Materials For Control methods*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp	(revision 12493)
+@@ -26,7 +26,7 @@
+ 
+ 	/*some checks*/
+ 	if (nels_data<1 || nods_data<6 || nods_prime==0){
+-		_error_("nothing to be done according to the mesh given in input");
++		_error2_("nothing to be done according to the mesh given in input");
+ 	}
+ 
+ 	/*Set debug to 1 if there are lots of elements*/
+@@ -40,7 +40,7 @@
+ 		interpolation_type=2;
+ 	}
+ 	else{
+-		_error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
++		_error2_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
+ 	}
+ 
+ 	/*Get prime mesh extrema coordinates*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12493)
+@@ -80,7 +80,7 @@
+ 	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");
++			_error2_("requested MUMPS solver, which was not compiled into ISSM!\n");
+ 			#endif
+ 		#endif
+ 	}
+@@ -104,7 +104,7 @@
+ 	/*Stokes: */
+ 	if (solver_type==StokesSolverEnum){
+ 		/*Make indices out of doftypes: */
+-		if(!df)_error_("need doftypes for Stokes solver!\n");
++		if(!df)_error2_("need doftypes for Stokes solver!\n");
+ 		DofTypesToIndexSet(&isv,&isp,df,StokesSolverEnum);
+ 
+ 		/*Set field splits: */
+@@ -135,7 +135,7 @@
+ 	
+ 	/*Check convergence*/
+ 	KSPGetIterationNumber(ksp,&iteration_number);
+-	if (iteration_number<0) _error_("%s%i"," Solver diverged at iteration number: ",-iteration_number);
++	if (iteration_number<0) _error2_("" << " Solver diverged at iteration number: " << -iteration_number);
+ 
+ 	/*Free resources:*/
+ 	KSPFree(&ksp);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/Solverx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/Solverx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/Solverx.cpp	(revision 12493)
+@@ -54,7 +54,7 @@
+ 		delete uf_vector;
+ 
+ 		#else
+-			_error_("GSL support not compiled in!");
++			_error2_("GSL support not compiled in!");
+ 		#endif
+ 	#endif
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12493)
+@@ -25,8 +25,8 @@
+ 	Kff->GetSize(&M,&N);
+ 	pf->GetSize(&N2);
+ 
+-	if(N!=N2)_error_("Right hand side vector of size %i, when matrix is of size %i-%i !",N2,M,N);
+-	if(M!=N)_error_("Stiffness matrix should be square!");
++	if(N!=N2)_error2_("Right hand side vector of size " << N2 << ", when matrix is of size " << M << "-" << N << " !");
++	if(M!=N)_error2_("Stiffness matrix should be square!");
+ 
+ 	SolverxGsl(&x,Kff->matrix,pf->vector,N);
+ 	uf=new SeqVec(x,N);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12493)
+@@ -35,13 +35,13 @@
+ 
+ 	/*Some checks on arguments: */
+ 	if ((M<2) || (N<2) || (nods<=0)){
+-		_error_("nothing to be done according to the dimensions of input matrices and vectors.");
++		_error2_("nothing to be done according to the dimensions of input matrices and vectors.");
+ 	}
+ 	if (x_in[1]-x_in[0]<0){
+-		_error_("x coordinate vector should be increasing.\n   use Matlab's command x=flipud(x), also flip the data matrix data=fliplr(data)");
++		_error2_("x coordinate vector should be increasing.\n   use Matlab's command x=flipud(x), also flip the data matrix data=fliplr(data)");
+ 	}
+ 	if (y_in[1]-y_in[0]<0){
+-		_error_("y coordinate vector should be increasing.\n   use Matlab's command y=flipud(y), also flip the data matrix data=flipud(data)");
++		_error2_("y coordinate vector should be increasing.\n   use Matlab's command y=flipud(y), also flip the data matrix data=flipud(data)");
+ 	}
+ 
+ 	/*Allocate output vector: */
+@@ -67,7 +67,7 @@
+ 		for (i=0;i<M;i++) y[i]=y_in[i];
+ 	}
+ 	else{
+-		_error_("x and y vectors length should be 1 or 0 more than data number of rows.");
++		_error2_("x and y vectors length should be 1 or 0 more than data number of rows.");
+ 	}
+ 
+ 	/*initialize thread parameters: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp	(revision 12493)
+@@ -70,7 +70,7 @@
+ 	/*Last check: is the number of elements on last column of the connectivity superior to maxels? If so, then error out and 
+ 	 * warn the user to increase the connectivity width: */
+ 	for(i=0;i<nods;i++){
+-		if (*(connectivity+width*i+maxels)>maxels)_error_("%s%g%s"," max connectivity width reached (",*(connectivity+width*i+maxels),")! increase width of connectivity table");
++		if (*(connectivity+width*i+maxels)>maxels)_error2_("" << " max connectivity width reached (" << *(connectivity+width*i+maxels) << ")! increase width of connectivity table");
+ 	}
+ 
+ 	/*Assign output pointers: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12493)
+@@ -105,7 +105,7 @@
+ 	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(string==NULL) _error2_("PETSc options for analysis " << EnumToStringx((int)analyses[i]) << " have been declared but were not found");
+ 		}
+ 		if(my_rank==0)stringlength=(strlen(string)+1)*sizeof(char);
+ 		#ifdef _HAVE_MPI_
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp	(revision 12493)
+@@ -53,8 +53,8 @@
+ 
+ 	/*Check that gradient is clean*/
+ 	norm_inf=gradient->Norm(NORM_INF);
+-	if(norm_inf<=0)    _error_("||∂J/∂α||∞ = 0    gradient norm is zero");
+-	if(isnan(norm_inf))_error_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
++	if(norm_inf<=0)    _error2_("||∂J/∂α||∞ = 0    gradient norm is zero");
++	if(isnan(norm_inf))_error2_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
+ 
+ 	/*Clean-up and assign output pointer*/
+ 	if(pnorm_list){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12493)
+@@ -85,7 +85,7 @@
+ 			}
+ 		}
+ 		else if (flag==NodalEnum){
+-			_error_(" nodal response functions not supported yet!");
++			_error2_(" nodal response functions not supported yet!");
+ 
+ 			/*increment response_pointer :*/
+ 			responses_pointer++;
+@@ -103,7 +103,7 @@
+ 				responses_pointer++;
+ 			}
+ 		}
+-		else _error_("%s%i%s"," flag type ",flag," not supported yet for response analysis");
++		else _error2_("" << " flag type " << flag << " not supported yet for response analysis");
+ 	}
+ 
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12493)
+@@ -132,7 +132,7 @@
+ 						nodecon[ipt+(nncon-1)]++;
+ 					}
+ 					else
+-						_error_("Nodal connectivity table needs more than specified %d columns.\n",mxepg);
++						_error2_("Nodal connectivity table needs more than specified " << mxepg << " columns.\n");
+ 				}
+ 				jpt++;
+ 			}
+@@ -172,7 +172,7 @@
+ 		}
+ 
+ 		else
+-			_error_("Data matrix has incorrect number of %d rows.\n",mdata);
++			_error2_("Data matrix has incorrect number of " << mdata << " rows.\n");
+ 	}
+ 
+ /*  write folder for mesh  */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp	(revision 12493)
+@@ -74,7 +74,7 @@
+ /*  open shp/shx files  */
+ 
+ 	hSHP = SHPOpen( filshp, "rb" );
+-	if (!hSHP) _error_("Error opening shp/shx files.");
++	if (!hSHP) _error2_("Error opening shp/shx files.");
+ 
+ /*  read header and print out file bounds  */
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12493)
+@@ -37,8 +37,8 @@
+ 	/*First of, find the record for the enum, and get code  of data type: */
+ 	fid=iomodel->SetFilePointerToData(&code, &vector_layout,vector_enum);
+ 
+-	if(code!=7)_error_("%s%s"," expecting a IssmDouble vector for constraints with enum ",EnumToStringx(vector_enum));
+-	if(vector_layout!=1)_error_("%s%s"," expecting a nodal vector for constraints with enum ",EnumToStringx(vector_enum));
++	if(code!=7)_error2_("" << " expecting a IssmDouble vector for constraints with enum " << EnumToStringx(vector_enum));
++	if(vector_layout!=1)_error2_("" << " expecting a nodal vector for constraints with enum " << EnumToStringx(vector_enum));
+ 
+ 	/*Fetch vector:*/
+ 	iomodel->FetchData(&IssmDoublevector,&M,&N,vector_enum);
+@@ -98,7 +98,7 @@
+ 		}
+ 	}
+ 	else{
+-		_error_("Size of field %s not supported",EnumToStringx(vector_enum));
++		_error2_("Size of field " << EnumToStringx(vector_enum) << " not supported");
+ 	}
+ 
+ 	/*Free ressources:*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp	(revision 12493)
+@@ -55,6 +55,6 @@
+ 			NULL, NULL, pnum_procs, tpwgts, options, &objval,epart, npart);
+ 
+ 	#else
+-	_error_("METIS version not supported yet");
++	_error2_("METIS version not supported yet");
+ 	#endif
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12493)
+@@ -84,7 +84,7 @@
+ 			for(i=0;i<ssize;i++) this->vector[list[i]]=values[i];
+ 			break;
+ 		default:
+-			_error_("unknown insert mode!");
++			_error2_("unknown insert mode!");
+ 			break;
+ 	}
+ 
+@@ -101,7 +101,7 @@
+ 			this->vector[dof]=value;
+ 			break;
+ 		default:
+-			_error_("unknown insert mode!");
++			_error2_("unknown insert mode!");
+ 			break;
+ 	}
+ }
+@@ -203,7 +203,7 @@
+ 			return sqrt(norm);
+ 			break;
+ 		default:
+-			_error_("unknown norm !");
++			_error2_("unknown norm !");
+ 			break;
+ 	}
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12493)
+@@ -118,7 +118,7 @@
+ 			return norm;
+ 			break;
+ 		default:
+-			_error_("unknown norm !");
++			_error2_("unknown norm !");
+ 			break;
+ 	}
+ }
+@@ -149,8 +149,8 @@
+ 	X->GetSize(&XM);
+ 	AX->GetSize(&AXM);
+ 
+-	if(M!=AXM)_error_("A and AX should have the same number of rows!");
+-	if(N!=XM)_error_("A and X should have the same number of columns!");
++	if(M!=AXM)_error2_("A and AX should have the same number of rows!");
++	if(N!=XM)_error2_("A and X should have the same number of columns!");
+ 
+ 	for(i=0;i<M;i++){
+ 		dummy=0;
+@@ -196,7 +196,7 @@
+ 			for(i=0;i<m;i++) for(j=0;j<n;j++) this->matrix[N*idxm[i]+idxn[j]]=values[n*i+j];
+ 			break;
+ 		default:
+-			_error_("unknown insert mode!");
++			_error2_("unknown insert mode!");
+ 			break;
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp	(revision 12493)
+@@ -50,7 +50,7 @@
+ 	MatGetLocalSize(*A,&local_mA,&local_nA);
+ 
+ 	/*Some dimensions checks: */
+-	if (mA!=nA) _error_(" trying to take the invert of a non-square matrix!");
++	if (mA!=nA) _error2_(" trying to take the invert of a non-square matrix!");
+ 
+ 	/* Set default Plapack parameters */
+ 	//First find nprows*npcols=num_procs;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscMatrixType.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscMatrixType.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscMatrixType.cpp	(revision 12493)
+@@ -29,7 +29,7 @@
+ 			return MATSEQAIJ;
+ 			break;
+ 		default: 
+-			_error_("unknown matrix type !");
++			_error2_("unknown matrix type !");
+ 			break;
+ 	}
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscInsertMode.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscInsertMode.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscInsertMode.cpp	(revision 12493)
+@@ -29,7 +29,7 @@
+ 			return INSERT_VALUES;
+ 			break;
+ 		default: 
+-			_error_("unknown insert mode!");
++			_error2_("unknown insert mode!");
+ 			break;
+ 	}
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatInvert.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatInvert.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatInvert.cpp	(revision 12493)
+@@ -28,7 +28,7 @@
+ 
+ 	/*Some checks: */
+ 	MatGetSize(matrix,&M,&N);
+-	if(M!=N) _error_("trying to invert a non square matrix!");
++	if(M!=N) _error2_("trying to invert a non square matrix!");
+ 
+ 	/*Create identitiy matrix: */
+ 	identity=NewMat(M,N,sparsity);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatPartition.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatPartition.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/MatPartition.cpp	(revision 12493)
+@@ -61,7 +61,7 @@
+ 			#endif
+ 		}
+ 		else{
+-			_error_("MatType %s not supported yet",type);
++			_error2_("MatType " << type << " not supported yet");
+ 		}
+ 		/*Assemble*/
+ 		MatAssemblyBegin(outmatrix,MAT_FINAL_ASSEMBLY);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscNormMode.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscNormMode.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscNormMode.cpp	(revision 12493)
+@@ -29,7 +29,7 @@
+ 			return NORM_2;
+ 			break;
+ 		default: 
+-			_error_("unknown norm !");
++			_error2_("unknown norm !");
+ 			break;
+ 	}
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp	(revision 12493)
+@@ -54,7 +54,7 @@
+ 			 * and set the option, then end the token analysis.*/
+ 			if(first[0]!='-'){
+ 				/*This is not good, the option does not have '-'! Get out*/
+-				_error_("%s%s%s","Option ",first," should be preceded by '-'!");
++				_error2_("" << "Option " << first << " should be preceded by '-'!");
+ 			}
+ 			/*Reduce first to bare option value*/
+ 			PetscStrlen(first,&len);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecMerge.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecMerge.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/VecMerge.cpp	(revision 12493)
+@@ -34,7 +34,7 @@
+ 
+ 	/*If the dimension of the partitioning vector is not the same as that of vector B, we have a problem: */
+ 	if ( (row_partition_size !=MB) ){
+-		_error_("Dimensions of partitioning vector incompatible with dimensions of input vector\n");
++		_error2_("Dimensions of partitioning vector incompatible with dimensions of input vector\n");
+ 	}
+ 
+ 	/*Get values from vector B and plug them into vector A, using the partitioning vector*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12493)
+@@ -142,7 +142,7 @@
+ 		if(this->ssize)this->sdoflist=xNew<int>(size);
+ 		else this->sdoflist=NULL;
+ 	}
+-	else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
++	else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ }
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12493)
+@@ -179,13 +179,13 @@
+ 
+ 			/*Get input (either in element or material)*/
+ 			Input* input=inputs->GetInput(input_enum);
+-			if(!input) _error_("Input %s not found in material",EnumToStringx(input_enum));
++			if(!input) _error2_("Input " << EnumToStringx(input_enum) << " not found in material");
+ 
+ 			/*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
+ 			input->GetVectorFromInputs(vector,&doflist1[0]);}
+ 			break;
+ 
+-		default: _error_("element %s not implemented yet",EnumToStringx(element->ObjectEnum()));
++		default: _error2_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
+ 	}
+ }
+ /*}}}*/
+@@ -245,7 +245,7 @@
+ 	}
+ 
+ 	/*Checks in debugging mode*/
+-	if(viscosity<=0) _error_("Negative viscosity");
++	if(viscosity<=0) _error2_("Negative viscosity");
+ 	_assert_(B>0);
+ 	_assert_(n>0);
+ 
+@@ -316,7 +316,7 @@
+ 	}
+ 
+ 	/*Checks in debugging mode*/
+-	if(viscosity3d<=0) _error_("Negative viscosity");
++	if(viscosity3d<=0) _error2_("Negative viscosity");
+ 	_assert_(B>0);
+ 	_assert_(n>0);
+ 
+@@ -388,7 +388,7 @@
+ 	}
+ 
+ 	/*Checks in debugging mode*/
+-	if(viscosity3d<=0) _error_("Negative viscosity");
++	if(viscosity3d<=0) _error2_("Negative viscosity");
+ 	_assert_(B>0);
+ 	_assert_(n>0);
+ 
+@@ -549,9 +549,9 @@
+ 					this->inputs->AddInput(new TriaP1Input(name,values));
+ 					return;
+ 
+-				default: _error_("element %s not implemented yet",EnumToStringx(element->ObjectEnum()));
++				default: _error2_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
+ 			}
+-		default: _error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
++		default: _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
+ 	}
+ }
+ /*}}}*/
+@@ -607,9 +607,9 @@
+ 					/*}}}*/
+ 					return;
+ 
+-				default: _error_("element %s not implemented yet",EnumToStringx(element->ObjectEnum()));
++				default: _error2_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
+ 			}
+-		default: _error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
++		default: _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
+ 	}
+ 
+ 
+@@ -749,7 +749,7 @@
+ 	}
+ 	#endif
+ 	else{
+-		_error_(" Mesh type not supported yet!");
++		_error2_(" Mesh type not supported yet!");
+ 	}
+ 
+ 	return;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp	(revision 12493)
+@@ -81,7 +81,7 @@
+ 		for(i=0;i<numgauss;i++) weights[i]=seg_weights[i];
+ 	}
+ 	else
+-	 _error_("The 2 indices provided are not supported yet (user provided %i and %i)",index1,index2);
++	 _error2_("The 2 indices provided are not supported yet (user provided " << index1 << " and " << index2 << ")");
+ 
+ 	/*Initialize static fields as undefined*/
+ 	weight=UNDEF;
+@@ -179,7 +179,7 @@
+ 		coord3=0.5;
+ 	}
+ 	else
+-	 _error_("The 2 indices provided are not supported yet (user provided %i and %i)",index1,index2);
++	 _error2_("The 2 indices provided are not supported yet (user provided " << index1 << " and " << index2 << ")");
+ 
+ }
+ /*}}}*/
+@@ -242,7 +242,7 @@
+ 			coord1=0; coord2=0; coord3=1;
+ 			break;
+ 		default:
+-			_error_("vertex index should be in [0 2]");
++			_error2_("vertex index should be in [0 2]");
+ 
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp	(revision 12493)
+@@ -120,7 +120,7 @@
+ 		for(i=0;i<numgauss;i++) weights[i]=seg_weights[i];
+ 	}
+ 	else{
+-		_error_("Penta not supported yet");
++		_error2_("Penta not supported yet");
+ 	}
+ 
+ 	/*Initialize static fields as undefined*/
+@@ -160,7 +160,7 @@
+ 		for(int i=0;i<numgauss;i++) coords4[i]=1.0;
+ 	}
+ 	else{
+-		_error_("Tria not supported yet");
++		_error2_("Tria not supported yet");
+ 	}
+ 
+ }
+@@ -222,7 +222,7 @@
+ 		}
+ 	}
+ 	else{
+-		_error_("Tria not supported yet (user provided indices %i %i %i %i)",index1,index2,index3,index4);
++		_error2_("Tria not supported yet (user provided indices " << index1 << " " << index2 << " " << index3 << " " << index4 << ")");
+ 	}
+ 
+ 	/*clean-up*/
+@@ -341,7 +341,7 @@
+ 			coord1=0; coord2=0; coord3=1; coord4= +1;
+ 			break;
+ 		default:
+-			_error_("vertex index should be in [0 5]");
++			_error2_("vertex index should be in [0 5]");
+ 
+ 	}
+ 
+@@ -360,7 +360,7 @@
+ 		for(int i=0;i<numgauss;i++) coords4[i]=-1.0;
+ 	}
+ 	else{
+-		_error_("Tria not supported yet");
++		_error2_("Tria not supported yet");
+ 	}
+ 
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12493)
+@@ -123,7 +123,7 @@
+ /*}}}*/
+ /*FUNCTION DoubleVecParam::GetParameterValue(int** pintarray,int* pM){{{*/
+ void  DoubleVecParam::GetParameterValue(int** pintarray,int* pM){
+-	_error_("DoubleVec param of enum %i (%s) cannot return an array of int",enum_type,EnumToStringx(enum_type));
++	_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of int");
+ }
+ /*}}}*/
+ /*FUNCTION DoubleVecParam::GetParameterName{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12493)
+@@ -81,32 +81,32 @@
+ /*}}}*/
+ /*FUNCTION DoubleParam::GetParameterValue(int* pinteger){{{*/
+ void DoubleParam::GetParameterValue(int* pinteger){
+-	_error_("Double param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));
++	_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::GetParameterValue(bool* pbool){{{*/
+ void DoubleParam::GetParameterValue(bool* pbool){
+-	_error_("Double param of enum %i (%s) cannot return an bool",enum_type,EnumToStringx(enum_type));
++	_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an bool");
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM){{{*/
+ void DoubleParam::GetParameterValue(int** pintarray,int* pM){
+-	_error_("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));
++	_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{*/
+ void DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){
+-	_error_("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));
++	_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){{{*/
+ void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){
+-	_error_("Double param of enum %i (%s) cannot return an array of IssmDouble",enum_type,EnumToStringx(enum_type));
++	_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of IssmDouble");
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){{{*/
+ void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){
+-	_error_("Double param of enum %i (%s) cannot return an array of IssmDouble",enum_type,EnumToStringx(enum_type));
++	_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of IssmDouble");
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::UnitConversion{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12493)
+@@ -108,7 +108,7 @@
+ /*}}}*/
+ /*FUNCTION DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{*/
+ void  DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){
+-	_error_("DoubleMat of enum %i (%s) cannot return an array of int",enum_type,EnumToStringx(enum_type));
++	_error2_("DoubleMat of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of int");
+ }
+ /*}}}*/
+ /*FUNCTION DoubleMatParam::GetParameterName{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Geometry.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Geometry.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Geometry.cpp	(revision 12493)
+@@ -81,9 +81,9 @@
+ 	if      (!strncmp(kstr,"</Geometry",10))
+ 		return;
+ 	else if (!strncmp(kstr,"</",2))
+-		_error_("KML_Geometry::Read -- Unexpected closing tag %s.\n",kstr);
++	  {_error2_("KML_Geometry::Read -- Unexpected closing tag " << kstr << ".\n");}
+ 	else if (strncmp(kstr,"<",1))
+-		_error_("KML_Geometry::Read -- Unexpected field \"%s\".\n",kstr);
++	  {_error2_("KML_Geometry::Read -- Unexpected field \"" << kstr << "\".\n");}
+ 
+ 	else if (!strncmp(kstr,"<",1))
+ 		KML_Object::Read(fid,kstr);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp	(revision 12493)
+@@ -94,18 +94,14 @@
+ 	if      (!strncmp(kstr,"</ColorStyle",12))
+ 		return;
+ 	else if (!strncmp(kstr,"</",2))
+-		_error_("KML_ColorStyle::Read -- Unexpected closing tag %s.\n",kstr);
++	  {_error2_("KML_ColorStyle::Read -- Unexpected closing tag " << kstr);}
+ 	else if (strncmp(kstr,"<",1))
+-		_error_("KML_ColorStyle::Read -- Unexpected field \"%s\".\n",kstr);
++	  {_error2_("KML_ColorStyle::Read -- Unexpected field \"" << kstr << "\"");}
+ 
+ 	else if (!strcmp(kstr,"<color>"))
+-		KMLFileTokenParse( color     ,NULL,KML_COLORSTYLE_COLOR_LENGTH,
+-						  kstr,
+-						  fid);
++		KMLFileTokenParse( color     ,NULL,KML_COLORSTYLE_COLOR_LENGTH, kstr, fid);
+ 	else if (!strcmp(kstr,"<colorMode>"))
+-		KMLFileTokenParse( colormode ,NULL,KML_COLORSTYLE_COLORMODE_LENGTH,
+-						  kstr,
+-						  fid);
++		KMLFileTokenParse( colormode ,NULL,KML_COLORSTYLE_COLORMODE_LENGTH, kstr, fid);
+ 
+ 	else if (!strncmp(kstr,"<",1))
+ 		KML_SubStyle::Read(fid,kstr);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.cpp	(revision 12493)
+@@ -139,9 +139,9 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_Placemark::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_Placemark::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_Placemark::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_Placemark::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ 		else if (!strncmp(kstri,"<Point", 6)) {
+ 			kobj=(KML_Object*)new KML_Point();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp	(revision 12493)
+@@ -158,7 +158,7 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_Unknown::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_Unknown::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 
+ 		else if (strncmp(kstri,"<",1)) {
+ 			if (value) {
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp	(revision 12493)
+@@ -141,9 +141,9 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_GroundOverlay::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_GroundOverlay::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_GroundOverlay::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_GroundOverlay::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ 		else if (!strcmp(kstri,"<altitude>"))
+ 			KMLFileTokenParse(&altitude  ,
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.cpp	(revision 12493)
+@@ -196,9 +196,9 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_Style::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_Style::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_Style::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_Style::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ //		else if (!strncmp(kstri,"<IconStyle",10)) {
+ //			icon      =new KML_IconStyle();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp	(revision 12493)
+@@ -143,9 +143,9 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_MultiGeometry::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_MultiGeometry::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_MultiGeometry::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_MultiGeometry::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ 		else if (!strncmp(kstri,"<Point", 6)) {
+ 			kobj=(KML_Object*)new KML_Point();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp	(revision 12493)
+@@ -49,7 +49,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_LineStyle::DeepEcho {{{*/
+ void  KML_LineStyle::DeepEcho(){
+ 
+@@ -60,7 +59,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_LineStyle::DeepEcho {{{*/
+ void  KML_LineStyle::DeepEcho(const char* indent){
+ 
+@@ -75,7 +73,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_LineStyle::Write {{{*/
+ void  KML_LineStyle::Write(FILE* filout,const char* indent){
+ 
+@@ -93,7 +90,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_LineStyle::Read {{{*/
+ void  KML_LineStyle::Read(FILE* fid,char* kstr){
+ 
+@@ -116,9 +112,9 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_LineStyle::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_LineStyle::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_LineStyle::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_LineStyle::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ 		else if (!strcmp(kstri,"<width>"))
+ 			KMLFileTokenParse(&width     ,
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.cpp	(revision 12493)
+@@ -109,9 +109,9 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_Folder::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_Folder::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_Folder::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_Folder::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ 		else if (!strncmp(kstri,"<",1))
+ 			KML_Container::Read(fid,kstri);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.cpp	(revision 12493)
+@@ -109,9 +109,9 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_Document::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_Document::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_Document::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_Document::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ 		else if (!strncmp(kstri,"<",1))
+ 			KML_Container::Read(fid,kstri);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.cpp	(revision 12493)
+@@ -106,9 +106,9 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_File::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_File::Read -- Unexpected closing tag " << kstri << ".");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_File::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_File::Read -- Unexpected field \"" << kstri << "\"");}
+ 
+ 		else if (!strncmp(kstri,"<",1))
+ 			KML_Object::Read(fid,kstri);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.cpp	(revision 12493)
+@@ -148,42 +148,26 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_Icon::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_Icon::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_Icon::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_Icon::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ 		else if (!strcmp(kstri,"<href>"))
+-			KMLFileTokenParse( href      ,NULL,KML_ICON_HREF_LENGTH,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse( href      ,NULL,KML_ICON_HREF_LENGTH, kstri, fid);
+ 		else if (!strcmp(kstri,"<refreshMode>"))
+-			KMLFileTokenParse( refmode   ,NULL,KML_ICON_REFMODE_LENGTH,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse( refmode   ,NULL,KML_ICON_REFMODE_LENGTH, kstri, fid);
+ 		else if (!strcmp(kstri,"<refreshInterval>"))
+-			KMLFileTokenParse(&refint    ,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse(&refint    , kstri, fid);
+ 		else if (!strcmp(kstri,"<viewRefreshMode>"))
+-			KMLFileTokenParse( vrefmode  ,NULL,KML_ICON_VREFMODE_LENGTH,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse( vrefmode  ,NULL,KML_ICON_VREFMODE_LENGTH, kstri, fid);
+ 		else if (!strcmp(kstri,"<viewRefreshTime>"))
+-			KMLFileTokenParse(&vreftime  ,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse(&vreftime  , kstri, fid);
+ 		else if (!strcmp(kstri,"<viewBoundScale>"))
+-			KMLFileTokenParse(&vboundsc  ,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse(&vboundsc  , kstri, fid);
+ 		else if (!strcmp(kstri,"<viewFormat>"))
+-			KMLFileTokenParse( vformat   ,NULL,KML_ICON_VFORMAT_LENGTH,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse( vformat   ,NULL,KML_ICON_VFORMAT_LENGTH, kstri, fid);
+ 		else if (!strcmp(kstri,"<httpQuery>"))
+-			KMLFileTokenParse( hquery    ,NULL,KML_ICON_HQUERY_LENGTH,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse( hquery    ,NULL,KML_ICON_HQUERY_LENGTH, kstri, fid);
+ 
+ 		else if (!strncmp(kstri,"<",1))
+ 			KML_Object::Read(fid,kstri);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.cpp	(revision 12493)
+@@ -125,22 +125,16 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_Point::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_Point::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_Point::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_Point::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ 		else if (!strcmp(kstri,"<extrude>"))
+-			KMLFileTokenParse(&extrude   ,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse(&extrude   , kstri, fid);
+ 		else if (!strcmp(kstri,"<altitudeMode>"))
+-			KMLFileTokenParse( altmode   ,NULL,KML_POINT_ALTMODE_LENGTH,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse( altmode   ,NULL,KML_POINT_ALTMODE_LENGTH, kstri, fid);
+ 		else if (!strcmp(kstri,"<coordinates>"))
+-			KMLFileTokenParse(&pcoords   ,NULL,3,
+-							  kstri,
+-							  fid);
++			KMLFileTokenParse(&pcoords   ,NULL,3, kstri, fid);
+ 
+ 		else if (!strncmp(kstri,"<",1))
+ 			KML_Geometry::Read(fid,kstri);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp	(revision 12493)
+@@ -138,9 +138,9 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_LinearRing::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_LinearRing::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_LinearRing::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_LinearRing::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ 		else if (!strcmp(kstri,"<extrude>"))
+ 			KMLFileTokenParse(&extrude,kstri,fid);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.cpp	(revision 12493)
+@@ -152,9 +152,9 @@
+ 	if      (!strncmp(kstr,"</Feature", 9))
+ 		return;
+ 	else if (!strncmp(kstr,"</",2))
+-		_error_("KML_Feature::Read -- Unexpected closing tag %s.\n",kstr);
++	  {_error2_("KML_Feature::Read -- Unexpected closing tag " << kstr);}
+ 	else if (strncmp(kstr,"<",1))
+-		_error_("KML_Feature::Read -- Unexpected field \"%s\".\n",kstr);
++	  {_error2_("KML_Feature::Read -- Unexpected field \"" << kstr << "\"");}
+ 
+ 	else if (!strncmp(kstr,"<Style", 6)) {
+ 		kobj=(KML_Object*)new KML_Style();
+@@ -163,29 +163,17 @@
+ 	}
+ 
+ 	else if (!strcmp(kstr,"<name>"))
+-		KMLFileTokenParse( name      ,NULL,KML_FEATURE_NAME_LENGTH,
+-						  kstr,
+-						  fid);
++		KMLFileTokenParse( name      ,NULL,KML_FEATURE_NAME_LENGTH, kstr, fid);
+ 	else if (!strcmp(kstr,"<visibility>"))
+-		KMLFileTokenParse(&visibility,
+-						  kstr,
+-						  fid);
++		KMLFileTokenParse(&visibility, kstr, fid);
+ 	else if (!strcmp(kstr,"<open>"))
+-		KMLFileTokenParse(&open      ,
+-						  kstr,
+-						  fid);
++		KMLFileTokenParse(&open      , kstr, fid);
+ 	else if (!strncmp(kstr,"<snippet", 8))
+-		KMLFileTokenParse( snippet   ,NULL,KML_FEATURE_SNIPPET_LENGTH,
+-						  kstr,
+-						  fid);
++		KMLFileTokenParse( snippet   ,NULL,KML_FEATURE_SNIPPET_LENGTH, kstr, fid);
+ 	else if (!strcmp(kstr,"<description>"))
+-		KMLFileTokenParse( descript  ,NULL,KML_FEATURE_DESCRIPT_LENGTH,
+-						  kstr,
+-						  fid);
++		KMLFileTokenParse( descript  ,NULL,KML_FEATURE_DESCRIPT_LENGTH, kstr, fid);
+ 	else if (!strcmp(kstr,"<styleUrl>"))
+-		KMLFileTokenParse( styleurl  ,NULL,KML_FEATURE_STYLEURL_LENGTH,
+-						  kstr,
+-						  fid);
++		KMLFileTokenParse( styleurl  ,NULL,KML_FEATURE_STYLEURL_LENGTH, kstr, fid);
+ 
+ 	else if (!strncmp(kstr,"<",1))
+ 		KML_Object::Read(fid,kstr);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 12493)
+@@ -137,7 +137,6 @@
+ 	return(buffer);
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTokenComment(FILE* fid) {{{*/
+ char* KMLFileTokenComment(FILE* fid){
+ 
+@@ -202,7 +201,6 @@
+ 	return(buffer);
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTokenBuffer {{{*/
+ void KMLFileTokenBuffer(char** pbuffer,int* pibuf,int* pbuflen,
+ 						int c,
+@@ -227,7 +225,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTagName {{{*/
+ char* KMLFileTagName(char* pname,
+ 					 char* ktag){
+@@ -236,7 +233,6 @@
+ 						  ktag));
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTagName {{{*/
+ char* KMLFileTagName(char* pname,int *m,int maxlen,
+ 					 char* ktag){
+@@ -247,7 +243,7 @@
+ 	char*   ktokn;
+ 
+ 	if (strncmp(&ktag[0],"<"        ,1) || strncmp(&ktag[strlen(ktag)-1],">",1))
+-		_error_("KMLFileTagName -- Missing tag delimiters in %s.\n",ktag);
++		_error2_("KMLFileTagName -- Missing tag delimiters in " << ktag << ".\n");
+ 
+ /*  strtok modifies ktag, so work on copy  */
+ 
+@@ -282,7 +278,6 @@
+ 	return(pname);
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTagAttrib {{{*/
+ int KMLFileTagAttrib(KML_Object* kobj,
+ 					 char* ktag){
+@@ -332,7 +327,6 @@
+ 	return(isolo);
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTokenParse {{{*/
+ int KMLFileTokenParse(int* pival,
+ 					  char* ktag,
+@@ -345,7 +339,7 @@
+ 	if (!(kstr=KMLFileToken(fid,
+ 							NULL,NULL)) ||
+ 		(kstr[0] == '<'))
+-		_error_("KMLFileTokenParse -- Missing integer field for %s.\n",ktag);
++		_error2_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n");
+ 
+ 	sscanf(kstr,"%d",pival);
+ 	xfree((void**)&kstr);
+@@ -358,7 +352,7 @@
+ 			(kstr[0] != '<') ||
+ 			(kstr[1] != '/') ||
+ 			(strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
+-			_error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
++		  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
+ 		else
+ 			xfree((void**)&kstr);
+ 
+@@ -367,11 +361,8 @@
+ 	return(0);
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTokenParse {{{*/
+-int KMLFileTokenParse(bool* pbval,
+-					  char* ktag,
+-					  FILE* fid){
++int KMLFileTokenParse(bool* pbval, char* ktag, FILE* fid){
+ 
+ 	int     ival;
+ 	char*   kstr;
+@@ -381,7 +372,7 @@
+ 	if (!(kstr=KMLFileToken(fid,
+ 							NULL,NULL)) ||
+ 		(kstr[0] == '<'))
+-		_error_("KMLFileTokenParse -- Missing bool field for %s.\n",ktag);
++	  {_error2_("KMLFileTokenParse -- Missing bool field for " << ktag << ".\n");}
+ 
+ 	sscanf(kstr,"%d",&ival);
+ 	*pbval=(bool)ival;
+@@ -395,7 +386,7 @@
+ 			(kstr[0] != '<') ||
+ 			(kstr[1] != '/') ||
+ 			(strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
+-			_error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
++		  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
+ 		else
+ 			xfree((void**)&kstr);
+ 
+@@ -404,7 +395,6 @@
+ 	return(0);
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTokenParse {{{*/
+ char* KMLFileTokenParse(char* pstr,
+ 						char* ktag,
+@@ -415,7 +405,6 @@
+ 							 fid));
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTokenParse {{{*/
+ char* KMLFileTokenParse(char* pstr,int *m,int maxlen,
+ 						char* ktag,
+@@ -428,7 +417,7 @@
+ 	if (!(kstr=KMLFileToken(fid,
+ 							NULL,NULL)) ||
+ 		(kstr[0] == '<'))
+-		_error_("KMLFileTokenParse -- Missing string field for %s.\n",ktag);
++		_error2_("KMLFileTokenParse -- Missing string field for " << ktag << ".\n");
+ 
+ 	if (!pstr) {
+ 		if (maxlen)
+@@ -458,7 +447,7 @@
+ 			(kstr[0] != '<') ||
+ 			(kstr[1] != '/') ||
+ 			(strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
+-			_error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
++		  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
+ 		else
+ 			xfree((void**)&kstr);
+ 
+@@ -467,7 +456,6 @@
+ 	return(pstr);
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTokenParse {{{*/
+ int KMLFileTokenParse(float* pfval,
+ 					  char* ktag,
+@@ -480,7 +468,7 @@
+ 	if (!(kstr=KMLFileToken(fid,
+ 							NULL,NULL)) ||
+ 		(kstr[0] == '<'))
+-		_error_("KMLFileTokenParse -- Missing integer field for %s.\n",ktag);
++	  {_error2_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n");}
+ 
+ 	sscanf(kstr,"%g",pfval);
+ 	xfree((void**)&kstr);
+@@ -493,7 +481,7 @@
+ 			(kstr[0] != '<') ||
+ 			(kstr[1] != '/') ||
+ 			(strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
+-			_error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
++		  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
+ 		else
+ 			xfree((void**)&kstr);
+ 
+@@ -502,7 +490,6 @@
+ 	return(0);
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTokenParse {{{*/
+ int KMLFileTokenParse(double* pdval,
+ 					  char* ktag,
+@@ -515,7 +502,7 @@
+ 	if (!(kstr=KMLFileToken(fid,
+ 							NULL,NULL)) ||
+ 		(kstr[0] == '<'))
+-		_error_("KMLFileTokenParse -- Missing integer field for %s.\n",ktag);
++		_error2_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n");
+ 
+ 	sscanf(kstr,"%lg",pdval);
+ 	xfree((void**)&kstr);
+@@ -528,7 +515,7 @@
+ 			(kstr[0] != '<') ||
+ 			(kstr[1] != '/') ||
+ 			(strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
+-			_error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
++		  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
+ 		else
+ 			xfree((void**)&kstr);
+ 
+@@ -537,7 +524,6 @@
+ 	return(0);
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTokenParse {{{*/
+ int KMLFileTokenParse(double **pdval,int* m,int maxlen,
+ 					  char* ktag,
+@@ -553,7 +539,7 @@
+ 	if (!(kstr=KMLFileToken(fid,
+ 							NULL,NULL)) ||
+ 		(kstr[0] == '<'))
+-		_error_("KMLFileTokenParse -- Missing double [m] field for %s.\n",ktag);
++		_error2_("KMLFileTokenParse -- Missing double [m] field for " << ktag << ".\n");
+ 
+ 	if (!*pdval)
+ 		if (maxlen)
+@@ -567,7 +553,7 @@
+ 	while (ktok) {
+ 		i++;
+ 		if (maxlen && (maxlen < i+1))
+-			_error_("KMLFileTokenParse -- Double [m] field too short for %s.\n",ktag);
++			_error2_("KMLFileTokenParse -- Double [m] field too short for " << ktag << ".\n");
+ 		sscanf(ktok,"%lg",&((*pdval)[i]));
+ 		ktok=strtok(NULL,delim);
+ 	}
+@@ -587,7 +573,7 @@
+ 			(kstr[0] != '<') ||
+ 			(kstr[1] != '/') ||
+ 			(strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
+-			_error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
++		  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
+ 		else
+ 			xfree((void**)&kstr);
+ 
+@@ -598,7 +584,6 @@
+ 	return(0);
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTokenParse {{{*/
+ int KMLFileTokenParse(double (**pdval3)[3],int* m,int maxlen,
+ 					  char* ktag,
+@@ -614,7 +599,7 @@
+ 	if (!(kstr=KMLFileToken(fid,
+ 							NULL,NULL)) ||
+ 		(kstr[0] == '<'))
+-		_error_("KMLFileTokenParse -- Missing double [m x 3] field for %s.\n",ktag);
++		_error2_("KMLFileTokenParse -- Missing double [m x 3] field for " << ktag << ".\n");
+ 
+ 	if (!*pdval3)
+ 		if (maxlen)
+@@ -631,7 +616,7 @@
+ 			i++;
+ 			j=0;
+ 			if (maxlen && (maxlen < i+1))
+-				_error_("KMLFileTokenParse -- Double [m x 3] field too short for %s.\n",ktag);
++				_error2_("KMLFileTokenParse -- Double [m x 3] field too short for " << ktag << ".\n");
+ 		}
+ 		sscanf(ktok,"%lg",&((*pdval3)[i][j]));
+ 		ktok=strtok(NULL,delim);
+@@ -655,7 +640,7 @@
+ 			(kstr[0] != '<') ||
+ 			(kstr[1] != '/') ||
+ 			(strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
+-			_error_("KMLFileTokenParse -- Missing closing tag for %s.\n",ktag);
++		  {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
+ 		else
+ 			xfree((void**)&kstr);
+ 
+@@ -666,7 +651,6 @@
+ 	return(0);
+ }
+ /*}}}*/
+-
+ /*FUNCTION  KMLFileTagSkip {{{*/
+ int KMLFileTagSkip(char* ktag,
+ 				   FILE* fid){
+@@ -703,15 +687,14 @@
+ 
+ 		else if ((kstr[0] == '<') &&
+ 				 (kstr[1] == '/')) {
+-			_error_("KMLFileTagSkip -- Unexpected closing tag %s.\n",kstr);
++			_error2_("KMLFileTagSkip -- Unexpected closing tag " << kstr << ".\n");
+ 		}
+ 
+ 		xfree((void**)&kstr);
+ 	}
+ 
+-	_error_("KMLFileTokenParse -- Corresponding closing tag for %s not found.\n",ktag);
++	_error2_("KMLFileTokenParse -- Corresponding closing tag for " << ktag << " not found.\n");
+ 
+ 	return(0);
+ }
+ /*}}}*/
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_StyleSelector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_StyleSelector.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_StyleSelector.cpp	(revision 12493)
+@@ -81,9 +81,9 @@
+ 	if      (!strncmp(kstr,"</StyleSelector",15))
+ 		return;
+ 	else if (!strncmp(kstr,"</",2))
+-		_error_("KML_StyleSelector::Read -- Unexpected closing tag %s.\n",kstr);
++	  {_error2_("KML_StyleSelector::Read -- Unexpected closing tag " << kstr << ".\n");}
+ 	else if (strncmp(kstr,"<",1))
+-		_error_("KML_StyleSelector::Read -- Unexpected field \"%s\".\n",kstr);
++	  {_error2_("KML_StyleSelector::Read -- Unexpected field \"" << kstr << "\".\n");}
+ 
+ 	else if (!strncmp(kstr,"<",1))
+ 		KML_Object::Read(fid,kstr);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp	(revision 12493)
+@@ -131,9 +131,9 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_LatLonBox::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_LatLonBox::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_LatLonBox::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_LatLonBox::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ 		else if (!strcmp(kstri,"<north>"))
+ 			KMLFileTokenParse(&north     ,
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp	(revision 12493)
+@@ -120,9 +120,9 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_PolyStyle::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_PolyStyle::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_PolyStyle::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_PolyStyle::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ 		else if (!strcmp(kstri,"<fill>"))
+ 			KMLFileTokenParse(&fill      ,
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp	(revision 12493)
+@@ -145,9 +145,9 @@
+ 	if      (!strncmp(kstr,"</Object", 8))
+ 		return;
+ 	else if (!strncmp(kstr,"</",2))
+-		_error_("KML_Object::Read -- Unexpected closing tag %s.\n",kstr);
++	  {_error2_("KML_Object::Read -- Unexpected closing tag " << kstr << ".\n");}
+ 	else if (strncmp(kstr,"<",1))
+-		_error_("KML_Object::Read -- Unexpected field \"%s\".\n",kstr);
++	  {_error2_("KML_Object::Read -- Unexpected field \"" << kstr << "\".\n");}
+ 
+ 	else if (!strncmp(kstr,"<Placemark",10)) {
+ 		kobj=(KML_Object*)new KML_Placemark();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_SubStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_SubStyle.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_SubStyle.cpp	(revision 12493)
+@@ -81,9 +81,9 @@
+ 	if      (!strncmp(kstr,"</SubStyle",10))
+ 		return;
+ 	else if (!strncmp(kstr,"</",2))
+-		_error_("KML_SubStyle::Read -- Unexpected closing tag %s.\n",kstr);
++	  {_error2_("KML_SubStyle::Read -- Unexpected closing tag " << kstr << ".\n");}
+ 	else if (strncmp(kstr,"<",1))
+-		_error_("KML_SubStyle::Read -- Unexpected field \"%s\".\n",kstr);
++	  {_error2_("KML_SubStyle::Read -- Unexpected field \"" << kstr << "\".\n");}
+ 
+ 	else if (!strncmp(kstr,"<",1))
+ 		KML_Object::Read(fid,kstr);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp	(revision 12493)
+@@ -140,9 +140,9 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_LineString::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_LineString::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_LineString::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_LineString::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ 		else if (!strcmp(kstri,"<extrude>"))
+ 			KMLFileTokenParse(&extrude   ,
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.cpp	(revision 12493)
+@@ -122,9 +122,9 @@
+ 		return;
+ 	}
+ 	else if (!strncmp(kstr,"</",2))
+-		_error_("KML_Overlay::Read -- Unexpected closing tag %s.\n",kstr);
++	  {_error2_("KML_Overlay::Read -- Unexpected closing tag " << kstr << ".\n");}
+ 	else if (strncmp(kstr,"<",1))
+-		_error_("KML_Overlay::Read -- Unexpected field \"%s\".\n",kstr);
++	  {_error2_("KML_Overlay::Read -- Unexpected field \"" << kstr << "\".\n");}
+ 
+ 	else if (!strcmp(kstr,"<color>"))
+ 		KMLFileTokenParse( color     ,NULL,KML_OVERLAY_COLOR_LENGTH,
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.cpp	(revision 12493)
+@@ -119,9 +119,9 @@
+ 		return;
+ 	}
+ 	else if (!strncmp(kstr,"</",2))
+-		_error_("KML_Container::Read -- Unexpected closing tag %s.\n",kstr);
++	  {_error2_("KML_Container::Read -- Unexpected closing tag " << kstr );}
+ 	else if (strncmp(kstr,"<",1))
+-		_error_("KML_Container::Read -- Unexpected field \"%s\".\n",kstr);
++	  {_error2_("KML_Container::Read -- Unexpected field \"" << kstr << "\"");}
+ 
+ 	else if (!strncmp(kstr,"<Placemark",10)) {
+ 		kobj=(KML_Object*)new KML_Placemark();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.cpp	(revision 12493)
+@@ -178,9 +178,9 @@
+ 			break;
+ 		}
+ 		else if (!strncmp(kstri,"</",2))
+-			_error_("KML_Polygon::Read -- Unexpected closing tag %s.\n",kstri);
++		  {_error2_("KML_Polygon::Read -- Unexpected closing tag " << kstri << ".\n");}
+ 		else if (strncmp(kstri,"<",1))
+-			_error_("KML_Polygon::Read -- Unexpected field \"%s\".\n",kstri);
++		  {_error2_("KML_Polygon::Read -- Unexpected field \"" << kstri << "\".\n");}
+ 
+ 		else if (!strcmp(kstri,"<extrude>"))
+ 			KMLFileTokenParse(&extrude   ,
+@@ -206,9 +206,9 @@
+ 					break;
+ 				}
+ 				else if (!strncmp(kstrj,"</",2))
+-					_error_("KML_Polygon::Read -- Unexpected closing tag %s.\n",kstrj);
++				  {_error2_("KML_Polygon::Read -- Unexpected closing tag " << kstrj << ".\n");}
+ 				else if (strncmp(kstrj,"<",1))
+-					_error_("KML_Polygon::Read -- Unexpected field \"%s\".\n",kstrj);
++				  {_error2_("KML_Polygon::Read -- Unexpected field \"" << kstrj << "\".\n");}
+ 
+ 				else if (!strncmp(kstrj,"<LinearRing",11)) {
+ 					kobj=(KML_Object*)new KML_LinearRing();
+@@ -233,9 +233,9 @@
+ 					break;
+ 				}
+ 				else if (!strncmp(kstrj,"</",2))
+-					_error_("KML_Polygon::Read -- Unexpected closing tag %s.\n",kstrj);
++				  {_error2_("KML_Polygon::Read -- Unexpected closing tag " << kstrj << ".\n");}
+ 				else if (strncmp(kstrj,"<",1))
+-					_error_("KML_Polygon::Read -- Unexpected field \"%s\".\n",kstrj);
++				  {_error2_("KML_Polygon::Read -- Unexpected field \"" << kstrj << "\".\n");}
+ 
+ 				else if (!strncmp(kstrj,"<LinearRing",11)) {
+ 					kobj=(KML_Object*)new KML_LinearRing();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12493)
+@@ -46,7 +46,7 @@
+ /*FUNCTION ElementMatrix::ElementMatrix(ElementMatrix* Ke){{{*/
+ ElementMatrix::ElementMatrix(ElementMatrix* Ke){
+ 
+-	if(!Ke) _error_("Input Element Matrix is a NULL pointer");
++	if(!Ke) _error2_("Input Element Matrix is a NULL pointer");
+ 	this->Init(Ke);
+ 	return;
+ }
+@@ -62,7 +62,7 @@
+ 
+ 	/*If one of the two matrix is NULL, we copy the other one*/
+ 	if(!Ke1 && !Ke2){
+-		_error_("Two input element matrices are NULL");
++		_error2_("Two input element matrices are NULL");
+ 	}
+ 	else if(!Ke1){
+ 		this->Init(Ke2);
+@@ -74,7 +74,7 @@
+ 	}
+ 
+ 	/*General Case: Ke1 and Ke2 are not empty*/
+-	if(!Ke1->dofsymmetrical || !Ke2->dofsymmetrical) _error_("merging 2 non dofsymmetrical matrices not implemented yet");
++	if(!Ke1->dofsymmetrical || !Ke2->dofsymmetrical) _error2_("merging 2 non dofsymmetrical matrices not implemented yet");
+ 
+ 	/*Initialize itransformation matrix Ke[P[i]] = Ke2[i]*/
+ 	P=xNew<int>(Ke2->nrows);
+@@ -294,7 +294,7 @@
+ 		}
+ 	}
+ 	else{
+-		_error_(" non dofsymmetrical matrix AddToGlobal routine not support yet!");
++		_error2_(" non dofsymmetrical matrix AddToGlobal routine not support yet!");
+ 	}
+ 
+ }
+@@ -331,7 +331,7 @@
+ 
+ 	}
+ 	else{
+-		_error_(" non dofsymmetrical matrix AddToGlobal routine not support yet!");
++		_error2_(" non dofsymmetrical matrix AddToGlobal routine not support yet!");
+ 	}
+ 
+ }
+@@ -342,8 +342,8 @@
+ 	#ifdef _ISSM_DEBUG_ 
+ 	for (int i=0;i<this->nrows;i++){
+ 		for(int j=0;j<this->ncols;j++){
+-			if (isnan(this->values[i*this->ncols+j])) _error_("NaN found in Element Matrix");
+-			if (fabs(this->values[i*this->ncols+j])>1.e+50) _error_("Element Matrix values exceeds 1.e+50");
++			if (isnan(this->values[i*this->ncols+j])) _error2_("NaN found in Element Matrix");
++			if (fabs(this->values[i*this->ncols+j])>1.e+50) _error2_("Element Matrix values exceeds 1.e+50");
+ 		}
+ 	}
+ 	#endif
+@@ -364,7 +364,7 @@
+ 
+ 	/*Transpose indices*/
+ 	if(!dofsymmetrical){
+-		_error_("not supported yet");
++		_error2_("not supported yet");
+ 	}
+ 
+ 	/*Clean up and return*/
+@@ -487,7 +487,7 @@
+ 
+ 	int i;
+ 
+-	if(this->nrows!=this->ncols)_error_("need square matrix in input!");
++	if(this->nrows!=this->ncols)_error2_("need square matrix in input!");
+ 
+ 	for(i=0;i<this->nrows;i++){
+ 		this->values[this->ncols*i+i]=scalar;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12493)
+@@ -41,7 +41,7 @@
+ 
+ 	/*If one of the two matrix is NULL, we copy the other one*/
+ 	if(!pe1 && !pe2){
+-		_error_("Two input element matrices are NULL");
++		_error2_("Two input element matrices are NULL");
+ 	}
+ 	else if(!pe1){
+ 		this->Init(pe2);
+@@ -209,8 +209,8 @@
+ 	/*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");
++		if (isnan(this->values[i])) _error2_("NaN found in Element Vector");
++		if (fabs( this->values[i])>1.e+50) _error2_("Element Vector values exceeds 1.e+50");
+ 	}
+ #endif
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12493)
+@@ -124,7 +124,7 @@
+ 
+ 	/*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());
++		_error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single int");
+ 	}
+ 
+ 	/*Assign output pointer*/
+@@ -136,7 +136,7 @@
+ 
+ 	/*We should first check that the size is one*/
+ 	if(this->NumEl()!=1){
+-		_error_("option \"%s\" has %i elements and cannot return a single IssmPDouble",this->name,this->NumEl());
++		_error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single IssmPDouble");
+ 	}
+ 
+ 	/*Assign output pointer*/
+@@ -148,7 +148,7 @@
+ 
+ 	/*We should first check that the size is at least one*/
+ 	if(this->NumEl()<=0){
+-		_error_("option \"%s\" is empty and cannot return a IssmPDouble vector",this->name);
++		_error2_("option \"" << this->name << "\" is empty and cannot return a IssmPDouble vector");
+ 	}
+ 
+ 	/*Copy vector*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12493)
+@@ -124,7 +124,7 @@
+ 
+ 	/*We should first check that the size is one*/
+ 	if(this->NumEl()!=1){
+-		_error_("option \"%s\" has %i elements and cannot return a single bool",this->name,this->NumEl());
++		_error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single bool");
+ 	}
+ 
+ 	/*Assign output pointer*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp	(revision 12493)
+@@ -26,7 +26,7 @@
+ 
+ 	/*check for index too large  */
+ 	for (i=0;i<ndims;i++) aprod*=size[i];
+-	if (index >= aprod) _error_("Index %d exceeds number of elements %d.",index,aprod);
++	if (index >= aprod) _error2_("Index " << index << " exceeds number of elements " << aprod << ".");
+ 
+ 	/*calculate the dimensions (being careful of integer division)  */
+ 	for (i=ndims-1; i>=0; i--) {
+@@ -45,7 +45,7 @@
+ 
+ 	/*check for any dimension too large  */
+ 	for (i=0;i<ndims;i++){
+-		if (dims[i] >= size[i]) _error_("Dimension %d of %d exceeds size of %d.",i,dims[i],size[i]);
++		if (dims[i] >= size[i]) _error2_("Dimension " << i << " of " << dims[i] << " exceeds size of " << size[i] << ".");
+ 	}
+ 
+ 	/*calculate the index  */
+@@ -64,7 +64,7 @@
+ 
+ 	/*check for index too large  */
+ 	for (i=0; i<ndims; i++) aprod*=size[i];
+-	if (index >= aprod) _error_("Index %d exceeds number of elements %d.",index,aprod);
++	if (index >= aprod) _error2_("Index " << index << " exceeds number of elements " << aprod << ".");
+ 
+ 	/*calculate the dimensions (being careful of integer division)  */
+ 	for (i=0; i<ndims; i++) {
+@@ -83,7 +83,7 @@
+ 
+ 	/*check for any dimension too large  */
+ 	for (i=0; i<ndims; i++){
+-		if (dims[i] >= size[i]) _error_("Dimension %d of %d exceeds size of %d.",i,dims[i],size[i]);
++		if (dims[i] >= size[i]) _error2_("Dimension " << i << " of " << dims[i] << " exceeds size of " << size[i] << ".");
+ 	}
+ 
+ 	/*calculate the index  */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12493)
+@@ -152,7 +152,7 @@
+ 
+ 	/*We should first check that the size is at least one*/
+ 	if(this->NumEl()<=0){
+-		_error_("option \"%s\" is empty and cannot return a string vector",this->name);
++		_error2_("option \"" << this->name << "\" is empty and cannot return a string vector");
+ 	}
+ 
+ 	/*Calculate the size and number of strings*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12493)
+@@ -131,7 +131,7 @@
+ 
+ 	/*We should first check that the size is one*/
+ 	if(this->NumEl()!=1){
+-		_error_("option \"%s\" has %i elements and cannot return a single options dataset",this->name,this->NumEl());
++		_error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single options dataset");
+ 	}
+ 
+ 	/*Assign output pointer*/
+@@ -143,7 +143,7 @@
+ 
+ 	/*We should first check that the size is at least one*/
+ 	if(this->NumEl()<=0){
+-		_error_("option \"%s\" is empty and cannot return an options dataset vector",this->name);
++		_error2_("option \"" << this->name << "\" is empty and cannot return an options dataset vector");
+ 	}
+ 
+ 	/*Assign output pointer*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12493)
+@@ -269,7 +269,7 @@
+ 			Ke=CreateKMatrixAdjointBalancethickness();
+ 			break;
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global matrix*/
+@@ -299,7 +299,7 @@
+ 			pe=CreatePVectorAdjointBalancethickness();
+ 			break;
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global matrix*/
+@@ -346,7 +346,7 @@
+ 		case BoundaryEnum:
+ 			return CreateKMatrixPrognosticBoundary();
+ 		default:
+-			_error_("type not supported yet");
++			_error2_("type not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -499,7 +499,7 @@
+ 		case BoundaryEnum:
+ 			return CreateKMatrixBalancethicknessBoundary();
+ 		default:
+-			_error_("type not supported yet");
++			_error2_("type not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -650,7 +650,7 @@
+ 		case BoundaryEnum:
+ 			return CreateKMatrixAdjointBalancethicknessBoundary();
+ 		default:
+-			_error_("type not supported yet");
++			_error2_("type not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -682,7 +682,7 @@
+ 		case BoundaryEnum:
+ 			return CreatePVectorPrognosticBoundary();
+ 		default:
+-			_error_("type not supported yet");
++			_error2_("type not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -750,7 +750,7 @@
+ 		vxaverage_input->GetInputValue(&vx,gauss);
+ 		vyaverage_input->GetInputValue(&vy,gauss);
+ 		spcthickness_input->GetInputValue(&thickness,gauss);
+-		if(isnan(thickness)) _error_("Cannot weakly apply constraint because NaN was provided");
++		if(isnan(thickness)) _error2_("Cannot weakly apply constraint because NaN was provided");
+ 
+ 		UdotN=vx*normal[0]+vy*normal[1];
+ 		tria->GetSegmentJacobianDeterminant(&Jdet,&xyz_list[0][0],gauss);
+@@ -776,7 +776,7 @@
+ 		case BoundaryEnum:
+ 			return CreatePVectorBalancethicknessBoundary();
+ 		default:
+-			_error_("type not supported yet");
++			_error2_("type not supported yet");
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.cpp	(revision 12493)
+@@ -171,7 +171,7 @@
+ 			Ke=PenaltyCreateKMatrixPrognostic(kmax);
+ 			break;
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global Vector*/
+@@ -243,27 +243,27 @@
+ 			switch(approximation1){
+ 				case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 
+ 				case PattynApproximationEnum:   return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 
+-				default: _error_("not supported yet");
++				default: _error2_("not supported yet");
+ 			}
+ 		case PattynApproximationEnum:
+ 			switch(approximation1){
+ 				case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 
+ 				case PattynApproximationEnum:   return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax); 
+-				default: _error_("not supported yet");
++				default: _error2_("not supported yet");
+ 			}
+ 		case StokesApproximationEnum:
+ 			switch(approximation1){
+ 				case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax); 
+ 				case NoneApproximationEnum: return   PenaltyCreateKMatrixDiagnosticStokes(kmax); 
+-				default: _error_("not supported yet");
++				default: _error2_("not supported yet");
+ 			}
+ 		case NoneApproximationEnum:
+ 			switch(approximation1){
+ 				case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax); 
+ 				case NoneApproximationEnum: return   PenaltyCreateKMatrixDiagnosticStokes(kmax); 
+-				default: _error_("not supported yet");
++				default: _error2_("not supported yet");
+ 			}
+-		default: _error_("not supported yet");
++		default: _error2_("not supported yet");
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.cpp	(revision 12493)
+@@ -238,7 +238,7 @@
+ 			break;
+ 		#endif
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global matrix*/
+@@ -270,7 +270,7 @@
+ 			break;
+ 		#endif
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global Vector*/
+@@ -378,7 +378,7 @@
+ 		return;
+ 	}
+ 	else{
+-		_error_("analysis: %s not supported yet",EnumToStringx(analysis_type));
++		_error2_("analysis: " << EnumToStringx(analysis_type) << " not supported yet");
+ 	}
+ 
+ }
+@@ -615,6 +615,6 @@
+ /*}}}*/
+ /*FUNCTION Pengrid::UpdateInputs {{{*/
+ void  Pengrid::UpdateInputs(IssmDouble* solution){
+-	_error_("not supported yet!");
++	_error2_("not supported yet!");
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12493)
+@@ -80,7 +80,7 @@
+ 		icefront_node_ids[2]=iomodel->nodecounter+(int)*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+2);
+ 		icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+3);
+ 	}
+-	else _error_("in_icefront_type %s not supported yet!",EnumToStringx(in_icefront_type));
++	else _error2_("in_icefront_type " << EnumToStringx(in_icefront_type) << " not supported yet!");
+ 
+ 	if (in_icefront_type==PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum)
+ 	 num_nodes=4;
+@@ -262,7 +262,7 @@
+ 			break;
+ 		#endif
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global Vector*/
+@@ -378,7 +378,7 @@
+ 			return CreatePVectorDiagnosticStokes();
+ 	    #endif
+ 		default:
+-			_error_("Icefront type %s not supported yet",EnumToStringx(type));
++			_error2_("Icefront type " << EnumToStringx(type) << " not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -440,7 +440,7 @@
+ 				water_pressure=-1.0/2.0*gravity*rho_ice*pow(thickness,2); // we are facing a wall of ice. use water_pressure to cancel the lithostatic pressure.
+ 				break;
+ 			default:
+-				_error_("fill type %s not supported yet",EnumToStringx(fill));
++				_error2_("fill type " << EnumToStringx(fill) << " not supported yet");
+ 		}
+ 		ice_pressure=1.0/2.0*gravity*rho_ice*pow(thickness,2);
+ 		air_pressure=0;
+@@ -563,7 +563,7 @@
+ 				water_pressure=0;
+ 				break;
+ 			default:
+-				_error_("fill type %s not supported yet",EnumToStringx(fill));
++				_error2_("fill type " << EnumToStringx(fill) << " not supported yet");
+ 		}
+ 		ice_pressure=rho_ice*gravity*(surface-z_g);
+ 		air_pressure=0;
+@@ -637,7 +637,7 @@
+ 				water_pressure=0;
+ 				break;
+ 			default:
+-				_error_("fill type %s not supported yet",EnumToStringx(fill));
++				_error2_("fill type " << EnumToStringx(fill) << " not supported yet");
+ 		}
+ 		air_pressure=0;
+ 		pressure = water_pressure + air_pressure; //no ice pressure fore Stokes
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12493)
+@@ -275,7 +275,7 @@
+ 	if (!IsInput(name)) return;
+ 
+ 	/*update input*/
+-	_error_("not implemented yet");
++	_error2_("not implemented yet");
+ 	//this->inputs->AddInput(new DoubleInput(name,constant));
+ 
+ }
+@@ -323,7 +323,7 @@
+ 			Ke=PenaltyCreateKMatrixDiagnosticHoriz(kmax);
+ 			break;
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global Vector*/
+@@ -349,7 +349,7 @@
+ 			/*No penalty applied on load vector*/
+ 			break;
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global Vector*/
+@@ -396,7 +396,7 @@
+ 	Tria       *tria2               = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
+ 	tria1=(Tria*)elements[0];
+ 	tria2=(Tria*)elements[1];
+ 
+@@ -409,7 +409,7 @@
+ 	this->inputs->GetInputValue(&friction,FrictionEnum);
+ 	tria1->GetInputValue(&h[0],nodes[0],ThicknessEnum);
+ 	tria2->GetInputValue(&h[1],nodes[1],ThicknessEnum);
+-	if (h[0]!=h[1])_error_(" different thicknesses not supported for rift fronts");
++	if (h[0]!=h[1])_error2_(" different thicknesses not supported for rift fronts");
+ 	thickness=h[0];
+ 
+ 	/*There is contact, we need to constrain the normal velocities (zero penetration), and the 
+@@ -487,7 +487,7 @@
+ 	Tria       *tria2               = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
+ 	tria1=(Tria*)elements[0];
+ 	tria2=(Tria*)elements[1];
+ 
+@@ -503,11 +503,11 @@
+ 	gravity=matpar->GetG();
+ 	tria1->GetInputValue(&h[0],nodes[0],ThicknessEnum);
+ 	tria2->GetInputValue(&h[1],nodes[1],ThicknessEnum);
+-	if (h[0]!=h[1])_error_(" different thicknesses not supported for rift fronts");
++	if (h[0]!=h[1])_error2_(" different thicknesses not supported for rift fronts");
+ 	thickness=h[0];
+ 	tria1->GetInputValue(&b[0],nodes[0],BedEnum);
+ 	tria2->GetInputValue(&b[1],nodes[1],BedEnum);
+-	if (b[0]!=b[1])_error_(" different beds not supported for rift fronts");
++	if (b[0]!=b[1])_error2_(" different beds not supported for rift fronts");
+ 	bed=b[0];
+ 
+ 	/*Ok, this rift is opening. We should put loads on both sides of the rift flanks. Because we are dealing with contact mechanics, 
+@@ -535,7 +535,7 @@
+ 	}
+ 	else if(fill==MelangeEnum){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice)
+ 
+-		if(!shelf) _error_("%s%i%s","fill type ",fill," not supported on ice sheets yet.");
++		if(!shelf) _error2_("" << "fill type " << fill << " not supported on ice sheets yet.");
+ 
+ 		pressure_litho=rho_ice*gravity*pow(thickness,(IssmDouble)2)/(IssmDouble)2;
+ 		pressure_air=0;
+@@ -545,7 +545,7 @@
+ 		pressure=pressure_litho-pressure_air-pressure_melange-pressure_water;
+ 	}
+ 	else{
+-		_error_("%s%i%s","fill type ",fill," not supported yet.");
++		_error2_("" << "fill type " << fill << " not supported yet.");
+ 	}
+ 
+ 	/*Ok, add contribution to first node, along the normal i==0: */
+@@ -584,7 +584,7 @@
+ 	Tria       *tria2           = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
+ 
+ 	/*recover elements on both side of rift: */
+ 	tria1=(Tria*)elements[0];
+@@ -705,7 +705,7 @@
+ 	Tria       *tria2           = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
+ 
+ 	/*recover elements on both side of rift: */
+ 	tria1=(Tria*)elements[0];
+@@ -750,7 +750,7 @@
+ 	Tria     *tria2       = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
+ 
+ 	/*recover elements on both side of rift: */
+ 	tria1=(Tria*)elements[0];
+@@ -793,7 +793,7 @@
+ 	Tria       *tria2           = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
+ 
+ 	/*recover elements on both side of rift: */
+ 	tria1=(Tria*)elements[0];
+@@ -843,7 +843,7 @@
+ 	Tria       *tria2       = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
+ 
+ 	/*recover elements on both side of rift: */
+ 	tria1=(Tria*)elements[0];
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp	(revision 12493)
+@@ -37,7 +37,7 @@
+ 
+ 		// check Size
+ 		if (Size<=0){
+-			_error_("Size<=0");
++			_error2_("Size<=0");
+ 		}
+ 
+ 		Metric Mx,My;
+@@ -267,7 +267,7 @@
+ 			while (t->det <0) { // intersection boundary edge and a,b,
+ 				k=(*t)(0) ?  ((  (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1  )) : 0;
+ 				if (k<0){
+-					_error_("k<0");
++					_error2_("k<0");
+ 				}
+ 				ocut = OppositeEdge[k];
+ 				i=VerticesOfTriangularEdge[ocut][0];
+@@ -311,7 +311,7 @@
+ 				j=VerticesOfTriangularEdge[iedge][1];
+ 				double dij = detj-deti;
+ 				if (i+j+k != 0 + 1 +2){
+-					_error_("i+j+k != 0 + 1 +2");
++					_error2_("i+j+k != 0 + 1 +2");
+ 				}
+ 				ba[j] =  detj/dij;
+ 				ba[i] = -deti/dij;
+@@ -383,7 +383,7 @@
+ 						j= VerticesOfTriangularEdge[ocut][1];
+ 					}
+ 					else {
+-						_error_("Bug Split Edge");
++						_error2_("Bug Split Edge");
+ 					}
+ 				}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Triangle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Triangle.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Triangle.cpp	(revision 12493)
+@@ -18,10 +18,10 @@
+ 		BamgVertex *v=Th->vertices;
+ 		long nbv = Th->nbv;
+ 		if (i<0 || j<0 || k<0){
+-			_error_("i<0 || j<0 || k<0");
++			_error2_("i<0 || j<0 || k<0");
+ 		}
+ 		if (i>=nbv || j>=nbv || k>=nbv){
+-			_error_("i>=nbv || j>=nbv || k>=nbv");
++			_error2_("i>=nbv || j>=nbv || k>=nbv");
+ 		}
+ 		vertices[0]=v+i;
+ 		vertices[1]=v+j;
+@@ -172,7 +172,7 @@
+ 
+ 			//check number of iterations
+ 			if (k>=2000){
+-				_error_("too many iteration in Triangle::FindBoundaryEdge (k>=2000)");
++				_error2_("too many iteration in Triangle::FindBoundaryEdge (k>=2000)");
+ 			}
+ 		} while (this!= t);
+ 		//not found, return empty triangle
+@@ -212,7 +212,7 @@
+ 		jp = AdjEdgeIndex[jp]&3;
+ 		do {
+ 			while (t->swap(j,koption)){
+-				if (k>=20000) _error_("k>=20000");
++				if (k>=20000) _error2_("k>=20000");
+ 				NbSwap++;
+ 				k++;
+ 				t=  tp->adj[jp];      // set unchange t qnd j for previous triangles
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp	(revision 12493)
+@@ -59,30 +59,30 @@
+ 
+ 	int i;
+ 
+-	if (this->anisomax<1) _error_("'anisomax' option should be >=1");
+-	if (this->coeff==0) _error_("'coeff' should be positive");
+-	if (this->errg<0) _error_("'errg' option should be >0");
+-	if (this->gradation<1) _error_("'gradation' option should be >=1");
+-	if (this->Hessiantype!=0  && this->Hessiantype!=1) _error_("'Hessiantype' supported options are 0 and 1");
+-	if (this->maxnbv<3) _error_("'maxnbv' option should be >3");
+-	if (this->maxsubdiv<=1) _error_("'maxsubdiv' should be >1");
+-	if (this->Metrictype!=0   && this->Metrictype!=1 && this->Metrictype!=2) _error_("'Metrictype' supported options are 0, 1 and 2");
+-	if (this->nbjacobi<=0) _error_("'nbjacobi' option should be >0");
+-	if (this->nbsmooth<=0) _error_("'nbsmooth' option should be >0");
++	if (this->anisomax<1) _error2_("'anisomax' option should be >=1");
++	if (this->coeff==0) _error2_("'coeff' should be positive");
++	if (this->errg<0) _error2_("'errg' option should be >0");
++	if (this->gradation<1) _error2_("'gradation' option should be >=1");
++	if (this->Hessiantype!=0  && this->Hessiantype!=1) _error2_("'Hessiantype' supported options are 0 and 1");
++	if (this->maxnbv<3) _error2_("'maxnbv' option should be >3");
++	if (this->maxsubdiv<=1) _error2_("'maxsubdiv' should be >1");
++	if (this->Metrictype!=0   && this->Metrictype!=1 && this->Metrictype!=2) _error2_("'Metrictype' supported options are 0, 1 and 2");
++	if (this->nbjacobi<=0) _error2_("'nbjacobi' option should be >0");
++	if (this->nbsmooth<=0) _error2_("'nbsmooth' option should be >0");
+ 
+-	if (this->Crack!=0  && this->Crack!=1) _error_("'Crack' supported options are 0 and 1");
+-	if (this->KeepVertices!=0 && this->KeepVertices!=1) _error_("'KeepVertices' supported options are 0 and 1");
+-	if (this->geometricalmetric!=0  && this->geometricalmetric!=1) _error_("'geometricalmetric' supported options are 0 and 1");
++	if (this->Crack!=0  && this->Crack!=1) _error2_("'Crack' supported options are 0 and 1");
++	if (this->KeepVertices!=0 && this->KeepVertices!=1) _error2_("'KeepVertices' supported options are 0 and 1");
++	if (this->geometricalmetric!=0  && this->geometricalmetric!=1) _error2_("'geometricalmetric' supported options are 0 and 1");
+ 
+-	if (this->hmin<=0) _error_("'hmin' option should be >0");
+-	if (this->hmax<=0 || this->hmax<this->hmin) _error_("'hmax' option should be between 0 and hmin=%g",this->hmin);
+-	if (this->hminVertices && this->hminVerticesSize[1]!=1) _error_("'hminVertices' should be a column");
+-	if (this->hmaxVertices && this->hmaxVerticesSize[1]!=1) _error_("'hmaxVertices' should be a column");
+-	if (this->hVertices && this->hVerticesSize[1]!=1) _error_("'hVertices' should be a column");
+-	if (this->metric && (this->metricSize[1]!=1 && this->metricSize[1]!=3)) _error_("'metric' should have either 1 (iso) or 3 (aniso) columns.");
++	if (this->hmin<=0) _error2_("'hmin' option should be >0");
++	if (this->hmax<=0 || this->hmax<this->hmin) _error2_("'hmax' option should be between 0 and hmin=" << this->hmin);
++	if (this->hminVertices && this->hminVerticesSize[1]!=1) _error2_("'hminVertices' should be a column");
++	if (this->hmaxVertices && this->hmaxVerticesSize[1]!=1) _error2_("'hmaxVertices' should be a column");
++	if (this->hVertices && this->hVerticesSize[1]!=1) _error2_("'hVertices' should be a column");
++	if (this->metric && (this->metricSize[1]!=1 && this->metricSize[1]!=3)) _error2_("'metric' should have either 1 (iso) or 3 (aniso) columns.");
+ 	if (this->field){
+-		if (this->errSize[0]!=1 || this->errSize[1]!=this->fieldSize[1]) _error_("'err' should be of size %i x %i",1,this->fieldSize[1]);
+-		for (i=0;i<this->fieldSize[1];i++) {if (this->err[i]<=0) _error_("'err' option should be >0");};
++		if (this->errSize[0]!=1 || this->errSize[1]!=this->fieldSize[1]) _error2_("'err' should be of size " << 1 << " x " << this->fieldSize[1]);
++		for (i=0;i<this->fieldSize[1];i++) {if (this->err[i]<=0) _error2_("'err' option should be >0");};
+ 	}
+ 
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/SubDomain.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/SubDomain.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/SubDomain.cpp	(revision 12493)
+@@ -15,11 +15,11 @@
+ 	void SubDomain::Set(const Mesh & Th ,long i,Mesh & ThNew){
+ 		*this = Th.subdomains[i];
+ 		if ( head-Th.triangles<0 || head-Th.triangles>=Th.nbt){
+-			_error_("head-Th.triangles<0 || head-Th.triangles>=Th.nbt");
++			_error2_("head-Th.triangles<0 || head-Th.triangles>=Th.nbt");
+ 		}
+ 		head = ThNew.triangles + Th.GetId(head) ; 
+ 		if (edge-Th.edges<0 || edge-Th.edges>=Th.nbe);{
+-			_error_("edge-Th.edges<0 || edge-Th.edges>=Th.nbe");
++			_error2_("edge-Th.edges<0 || edge-Th.edges>=Th.nbe");
+ 		}
+ 		edge = ThNew.edges+ Th.GetId(edge);
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Metric.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Metric.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Metric.cpp	(revision 12493)
+@@ -196,7 +196,7 @@
+ 		}
+ 		// warning for optimisation S is in [0:0.5] not in [0:1]
+ 		if (i>=512){
+-			_error_("i>=512");
++			_error2_("i>=512");
+ 		}
+ 		LastMetricInterpole.lab=l;
+ 		LastMetricInterpole.opt=i;
+@@ -344,7 +344,7 @@
+ 			}
+ 		}
+ 		if (r>1 || r<0){
+-			_error_("r>1 || r<0");
++			_error2_("r>1 || r<0");
+ 		}
+ 		return r ;
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp	(revision 12493)
+@@ -75,13 +75,13 @@
+ 		nbe    = bamggeom->EdgesSize[0];
+ 
+ 		//some checks
+-		if (bamggeom->Vertices==NULL) _error_("the domain provided does not contain any vertex");
+-		if (bamggeom->Edges==NULL) _error_("the domain provided does not contain any edge");
++		if (bamggeom->Vertices==NULL) _error2_("the domain provided does not contain any vertex");
++		if (bamggeom->Edges==NULL) _error2_("the domain provided does not contain any edge");
+ 
+ 		//Vertices
+ 		if (bamggeom->Vertices){
+ 			if(verbose>5) printf("      processing Vertices\n");
+-			if (bamggeom->VerticesSize[1]!=3) _error_("Vertices should have 3 columns");
++			if (bamggeom->VerticesSize[1]!=3) _error2_("Vertices should have 3 columns");
+ 			vertices = new GeomVertex[nbv];
+ 			for (i=0;i<nbv;i++) {
+ 				vertices[i].r.x=(double)bamggeom->Vertices[i*3+0];
+@@ -114,10 +114,10 @@
+ 			 * coefIcoor = (2^30 -1)/D
+ 			 */
+ 			coefIcoor=(MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y));
+-			if(coefIcoor<=0) _error_("coefIcoor should be positive");
++			if(coefIcoor<=0) _error2_("coefIcoor should be positive");
+ 		}
+ 		else{
+-			_error_("No BamgVertex provided");
++			_error2_("No BamgVertex provided");
+ 		}
+ 
+ 		//Edges
+@@ -126,7 +126,7 @@
+ 			double* verticeslength=NULL;
+ 
+ 			if(verbose>5) printf("      processing Edges\n");
+-			if (bamggeom->EdgesSize[1]!=3) _error_("Edges should have 3 columns");
++			if (bamggeom->EdgesSize[1]!=3) _error2_("Edges should have 3 columns");
+ 			edges = new GeomEdge[nbe];
+ 
+ 			//initialize verticeslength (sum of the lengths of the edges holding vertex)
+@@ -175,7 +175,7 @@
+ 			
+ 		}
+ 		else{
+-			_error_("No edges provided");
++			_error2_("No edges provided");
+ 		}
+ 
+ 		//hVertices
+@@ -205,7 +205,7 @@
+ 		//TangentAtEdges
+ 		if (bamggeom->TangentAtEdges){
+ 			if(verbose>5) printf("      processing TangentAtEdges");
+-			if (bamggeom->TangentAtEdgesSize[1]!=4) _error_("TangentAtEdges should have 4 columns");
++			if (bamggeom->TangentAtEdgesSize[1]!=4) _error2_("TangentAtEdges should have 4 columns");
+ 			int n,i,j,k;
+ 			R2 tg;
+ 
+@@ -215,8 +215,8 @@
+ 				j=(int)bamggeom->TangentAtEdges[k*4+1]-1; //for C indexing
+ 				tg.x=bamggeom->TangentAtEdges[k*4+2];
+ 				tg.y=bamggeom->TangentAtEdges[k*4+3];
+-				if (i<0 || i>=nbe) _error_("TangentAtEdges first index exceeds matrix dimension");
+-				if (j!=0 && j!=1)  _error_("TangentAtEdges second index should be 1 or 2 only");
++				if (i<0 || i>=nbe) _error2_("TangentAtEdges first index exceeds matrix dimension");
++				if (j!=0 && j!=1)  _error2_("TangentAtEdges second index should be 1 or 2 only");
+ 				edges[i].tg[j] = tg;
+ 			}
+ 		}
+@@ -224,11 +224,11 @@
+ 		//Corners
+ 		if(bamggeom->Corners){
+ 			if(verbose>5) printf("      processing Corners");
+-			if (bamggeom->CornersSize[1]!=1) _error_("Corners should have 1 column");
++			if (bamggeom->CornersSize[1]!=1) _error2_("Corners should have 1 column");
+ 			n=bamggeom->CornersSize[0];
+ 			for (i=0;i<n;i++) {     
+ 				j=(int)bamggeom->Corners[i]-1; //for C indexing
+-				if (j>nbv-1 || j<0) _error_("Bad corner definition: should in [0 %i]",nbv);
++				if (j>nbv-1 || j<0) _error2_("Bad corner definition: should in [0 " << nbv << "]");
+ 				/*Required => at the same time SetRequired and SetCorner*/
+ 				vertices[j].SetCorner();
+ 				vertices[j].SetRequired();
+@@ -238,11 +238,11 @@
+ 		//RequiredVertices
+ 		if(bamggeom->RequiredVertices){
+ 			if(verbose>5) printf("      processing RequiredVertices\n");
+-			if (bamggeom->RequiredVerticesSize[1]!=1) _error_("RequiredVertices should have 1 column");
++			if (bamggeom->RequiredVerticesSize[1]!=1) _error2_("RequiredVertices should have 1 column");
+ 			n=bamggeom->RequiredVerticesSize[0];
+ 			for (i=0;i<n;i++) {     
+ 				j=(int)bamggeom->RequiredVertices[i]-1; //for C indexing
+-				if (j>nbv-1 || j<0) _error_("Bad RequiredVerticess  definition: should in [0 %i]",nbv);
++				if (j>nbv-1 || j<0) _error2_("Bad RequiredVerticess  definition: should in [0 " << nbv << "]");
+ 				vertices[j].SetRequired();
+ 			}
+ 		}
+@@ -250,11 +250,11 @@
+ 		//RequiredEdges
+ 		if(bamggeom->RequiredEdges){
+ 			if(verbose>5) printf("      processing RequiredEdges\n");
+-			if (bamggeom->RequiredEdgesSize[1]!=1) _error_("RequiredEdges should have 1 column");
++			if (bamggeom->RequiredEdgesSize[1]!=1) _error2_("RequiredEdges should have 1 column");
+ 			n=bamggeom->RequiredEdgesSize[0];
+ 			for (i=0;i<n;i++) {     
+ 				j=(int)bamggeom->RequiredEdges[i]-1; //for C indexing
+-				if (j>nbe-1 || j<0) _error_("Bad RequiredEdges definition: should in [0 %i]",nbe);
++				if (j>nbe-1 || j<0) _error2_("Bad RequiredEdges definition: should in [0 " << nbe << "]");
+ 				edges[j].SetRequired();  
+ 			}
+ 		}
+@@ -262,7 +262,7 @@
+ 		//SubDomain
+ 		if(bamggeom->SubDomains){
+ 			if(verbose>5) printf("      processing SubDomains\n");
+-			if (bamggeom->SubDomainsSize[1]!=4) _error_("SubDomains should have 4 columns");
++			if (bamggeom->SubDomainsSize[1]!=4) _error2_("SubDomains should have 4 columns");
+ 			nbsubdomains=bamggeom->SubDomainsSize[0];
+ 			subdomains = new GeomSubDomain[nbsubdomains];
+ 			for (i=0;i<nbsubdomains;i++){
+@@ -270,8 +270,8 @@
+ 				i1=(int)bamggeom->SubDomains[i*4+1];
+ 				i2=(int)bamggeom->SubDomains[i*4+2];
+ 				i3=(int)bamggeom->SubDomains[i*4+3];
+-				if (i0!=2) _error_("Bad Subdomain definition: first number should be 2 (for Edges)");
+-				if (i1>nbe || i1<=0) _error_("Bad Subdomain definition: second number should in [1 %i] (edge number)",nbe);
++				if (i0!=2) _error2_("Bad Subdomain definition: first number should be 2 (for Edges)");
++				if (i1>nbe || i1<=0) _error2_("Bad Subdomain definition: second number should in [1 " << nbe << "] (edge number)");
+ 				subdomains[i].edge=edges + (i1-1);
+ 				subdomains[i].direction = (int) i2;
+ 				subdomains[i].ReferenceNumber = i3;
+@@ -531,7 +531,7 @@
+ 				delete [] next_p;
+ 				delete [] head_v;
+ 				delete [] eangle;
+-				_error_("two points of the geometry are very closed to each other (see reference numbers above)");
++				_error2_("two points of the geometry are very closed to each other (see reference numbers above)");
+ 			}
+ 
+ 			/*Add vertices[i] to the quadtree*/
+@@ -609,7 +609,7 @@
+ 				delete [] next_p;
+ 				delete [] head_v;
+ 				delete [] eangle;
+-				_error_("Length of edge %i is 0",i);
++				_error2_("Length of edge " << i << " is 0");
+ 			}
+ 			//compute angle in [-Pi Pi]
+ 			eangle[i] = atan2(v10.y,v10.x);
+@@ -703,7 +703,7 @@
+ 				long n1 = next_p[k++]; 
+ 				long i1 = n1/2 ,j1=n1%2;
+ 
+-				if( edges[i1].v[j1] != edges[i].v[j]) _error_("Problem while processing edges: check the edge list");
++				if( edges[i1].v[j1] != edges[i].v[j]) _error2_("Problem while processing edges: check the edge list");
+ 
+ 				edges[i1].Adj[j1] = edges + i;
+ 				edges[i1].AdjVertexIndex[j1] = j;
+@@ -830,10 +830,10 @@
+ 		s=save_s;
+ 		GeomEdge* on=e.GeomEdgeHook;
+ 		if (!on){
+-			_error_("ProjectOnCurve error message: edge provided should be on geometry");
++			_error2_("ProjectOnCurve error message: edge provided should be on geometry");
+ 		}
+ 		if (!e[0].GeomEdgeHook ||  !e[1].GeomEdgeHook){
+-			_error_("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry");
++			_error2_("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry");
+ 		}
+ 
+ 		//Get the two vertices of the edge
+@@ -874,7 +874,7 @@
+ 					printf(" 1)  a mesh edge  containing more than %i geometrical edges\n",mxe/2);
+ 					printf(" 2)  code bug : be sure that we call   Mesh::SetVertexFieldOn() before\n");
+ 					printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n");
+-					_error_("see above");
++					_error2_("see above");
+ 				}
+ 				NbTry++;
+ 				goto retry;
+@@ -894,7 +894,7 @@
+ 				printf(" 1)  a mesh edge  contening more than %i geometrical edges\n",mxe/2);
+ 				printf(" 2)  code bug : be sure that we call   Mesh::SetVertexFieldOn() before\n");
+ 				printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n");
+-				_error_("see above");
++				_error2_("see above");
+ 			}
+ 			GeomEdge* tmpge = eg1;
+ 			ge[++tge] =eg1 = eg1->Adj[direction1];
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp	(revision 12493)
+@@ -75,7 +75,7 @@
+ 			ci= 2.0/9.0 * 1/(err*coef*coef) * 1/(smax-smin);
+ 		}
+ 		else{
+-			_error_("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype);
++			_error2_("Metrictype " << Metrictype << " not supported yet (use 0,1 or 2(default))");
+ 		}
+ 
+ 		//initialize metric Miv with ci*H
+@@ -145,7 +145,7 @@
+ 			tria = ttc;
+ 			j = NextEdge[jc];
+ 			if (k>=2000){
+-				_error_("k>=2000 (Maximum number of iterations reached)");
++				_error2_("k>=2000 (Maximum number of iterations reached)");
+ 			}
+ 		} while ( tbegin != tria); 
+ 		if (kk<4) return 0;
+@@ -212,7 +212,7 @@
+ 				tria = ttc;
+ 				j = NextEdge[jc];
+ 				if (k>=2000){
+-					_error_("k>=2000");
++					_error2_("k>=2000");
+ 				}
+ 			}while ( tbegin != tria); 
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Edge.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Edge.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Edge.cpp	(revision 12493)
+@@ -44,7 +44,7 @@
+ 	int Edge::Intersection(const  Edge & e){ 
+ 
+ 		/*some shecks*/
+-		if (!(adj[0]==&e || adj[1]==&e)){ _error_("Intersection bug"); }
++		if (!(adj[0]==&e || adj[1]==&e)){ _error2_("Intersection bug"); }
+ 		_assert_(adj[0]==&e || adj[1]==&e);
+ 
+ 		return adj[0]==&e?0:1;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/SetOfE4.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/SetOfE4.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/SetOfE4.cpp	(revision 12493)
+@@ -49,7 +49,7 @@
+ 
+ 		//check that nbax <=NbOfEdges
+ 		if (nbax <=NbOfEdges ) {
+-			_error_("SetOfEdges4::add overflow: NbOfEdges=%i > nbax=%i",NbOfEdges,nbax);
++			_error2_("SetOfEdges4::add overflow: NbOfEdges=" << NbOfEdges << " > nbax=" << nbax);
+ 		}
+ 
+ 		//update chain
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12493)
+@@ -116,7 +116,7 @@
+ 		  if (imaxnbv != nbv){
+ 			  delete [] kk;
+ 			  delete [] refv;
+-			  _error_("imaxnbv != nbv");
++			  _error2_("imaxnbv != nbv");
+ 		  }
+ 		  for (i=0;i<Tho.nbt;i++)
+ 			if(  reft[i] >=0 && flag[i]) 
+@@ -127,20 +127,20 @@
+ 				int i2 = Tho.GetId(t[2]);
+ 				if (i0<0 || i1<0 || i2<0){
+ 					delete [] refv;
+-					_error_("i0<0 || i1<0 || i2< 0");
++					_error2_("i0<0 || i1<0 || i2< 0");
+ 				}
+ 				if (i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv){
+-					_error_("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv");
++					_error2_("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv");
+ 				}
+ 				triangles[nbt] = Triangle(this,kk[i0],kk[i1],kk[i2]);
+ 				triangles[nbt].color = Tho.subdomains[reft[i]].ReferenceNumber; 
+ 				nbt++;           
+ 			  }
+ 		  if (kt!=nbt){
+-			  _error_("kt!=nbt");
++			  _error2_("kt!=nbt");
+ 		  }
+ 		  if (nbt==0 && nbv==0) {
+-			  _error_("All triangles have been removed");
++			  _error2_("All triangles have been removed");
+ 		  }
+ 		  delete [] kk;
+ 		  delete [] reft;
+@@ -152,10 +152,10 @@
+ 		  ReconstructExistingMesh();
+ 
+ 		  if (!nbsubdomains){
+-			  _error_("nbsubdomains==0");
++			  _error2_("nbsubdomains==0");
+ 		  }
+ 		  if (!subdomains[0].head || !subdomains[0].head->link){
+-			  _error_("!subdomains[0].head || !subdomains[0].head->link");
++			  _error2_("!subdomains[0].head || !subdomains[0].head->link");
+ 		  }
+ 
+ 	  }
+@@ -322,7 +322,7 @@
+ 				isorphan=true;
+ 			}
+ 		}
+-		if(isorphan) _error_("Orphan found in mesh, see ids above");
++		if(isorphan) _error2_("Orphan found in mesh, see ids above");
+ 
+ 		/*Clean up*/
+ 		xDelete<bool>(nodeflags);
+@@ -361,7 +361,7 @@
+ 			maxnbt=2*maxnbv-2; // for filling The Holes and quadrilaterals 
+ 		}
+ 		else{
+-			if(verbose>5) _error_("no Vertices found in the initial mesh");
++			if(verbose>5) _error2_("no Vertices found in the initial mesh");
+ 		}
+ 
+ 		//Triangles
+@@ -379,7 +379,7 @@
+ 			}
+ 		}
+ 		else{
+-			if(verbose>5) _error_("no Triangles found in the initial mesh");
++			if(verbose>5) _error2_("no Triangles found in the initial mesh");
+ 		}
+ 
+ 		//Quadrilaterals
+@@ -505,7 +505,7 @@
+ 				j=(int)bamgmesh->EdgesOnGeomEdge[i1*2+1]-1; //C indexing
+ 				//Check value
+ 				if(!(i>=0 && j>=0 && i<nbe && j<Gh.nbe)) {
+-					_error_("ReadMesh error: EdgesOnGeomEdge edge provided (line %i: [%i %i]) is incorrect (must be positive, [0<i<nbe=%i 0<j<Gh.nbe=%i]",i1+1,i+1,j+1,nbe,Gh.nbe);
++					_error2_("ReadMesh error: EdgesOnGeomEdge edge provided (line " << i1+1 << ": [" << i+1 << " " << j+1 << "]) is incorrect (must be positive, [0<i<nbe=" << nbe << " 0<j<Gh.nbe=" << Gh.nbe << "]");
+ 				}
+ 				edges[i].GeomEdgeHook=Gh.edges+j;
+ 			}
+@@ -521,8 +521,8 @@
+ 				i3  =(int)bamgmesh->SubDomains[i*3+0];
+ 				head=(int)bamgmesh->SubDomains[i*3+1]-1;//C indexing
+ 				direction=(int)bamgmesh->SubDomains[i*3+2];
+-				if (i3!=23) _error_("Bad Subdomain definition: first number should be 3");
+-				if (head<0 || head>=nbt) _error_("Bad Subdomain definition: head should in [1 %i] (triangle number)",nbt);
++				if (i3!=23) _error2_("Bad Subdomain definition: first number should be 3");
++				if (head<0 || head>=nbt) _error2_("Bad Subdomain definition: head should in [1 " << nbt << "] (triangle number)");
+ 				subdomains[i].head = triangles+head;
+ 			}
+ 		}
+@@ -566,9 +566,9 @@
+ 			if (reft[i]>=0){
+ 				for (j=0;j<3;j++){
+ 					int v=GetId(triangles[i][j]); //jth vertex of the ith triangle
+-					if (k>3*nbt-1 || k<0) _error_("k = %i, nbt = %i",k,nbt);
++					if (k>3*nbt-1 || k<0) _error2_("k = " << k << ", nbt = " << nbt);
+ 					next_1[k]=head_1[v];
+-					if (v>nbv-1 || v<0)   _error_("v = %i, nbv = %i",v,nbv);
++					if (v>nbv-1 || v<0)   _error2_("v = " << v << ", nbv = " << nbv);
+ 					head_1[v]=k++;
+ 					connectivitysize_1[v]+=1;
+ 				}
+@@ -706,7 +706,7 @@
+ 					if(stop) break;
+ 				}
+ 				if (!stop){
+-					_error_("Element holding segment [%i %i] not found...",i1+1,i2+1);
++					_error2_("Element holding segment [" << i1+1 << " " << i2+1 << "] not found...");
+ 				}
+ 			}
+ 		}
+@@ -804,7 +804,7 @@
+ 			for (i=0;i<NbVerticesOnGeomEdge;i++){
+ 				const VertexOnGeom &v=VerticesOnGeomEdge[i];
+ 				if (!v.OnGeomEdge()){
+-					_error_("A vertices supposed to be OnGeomEdge is actually not");
++					_error2_("A vertices supposed to be OnGeomEdge is actually not");
+ 				}
+ 				bamgmesh->VerticesOnGeomEdge[i*3+0]=GetId((BamgVertex*)v)+1; //back to Matlab indexing
+ 				bamgmesh->VerticesOnGeomEdge[i*3+1]=Gh.GetId((const GeomEdge*)v)+1; //back to Matlab indexing
+@@ -887,9 +887,9 @@
+ 		for (i=0;i<i1;i++) {
+ 			for (j=0;j<2;j++){
+ 				int v=(int)bamgmesh->IssmEdges[i*i2+j]-1; //back to C indexing
+-				if (k>2*i1-1 || k<0) _error_("Index exceed matrix dimensions (k=%i not in [0 %i]",k,2*i1-1);
++				if (k>2*i1-1 || k<0) _error2_("Index exceed matrix dimensions (k=" << k << " not in [0 " << 2*i1-1 << "]");
+ 				next_2[k]=head_2[v];
+-				if (v>nbv-1 || v<0)   _error_("Index exceed matrix dimensions (v=%i not in [0 %i])",v,nbv-1);
++				if (v>nbv-1 || v<0)   _error2_("Index exceed matrix dimensions (v=" << v << " not in [0 " << nbv-1 << "])");
+ 				head_2[v]=k++;
+ 				connectivitysize_2[v]+=1;
+ 			}
+@@ -1060,7 +1060,7 @@
+ 
+ 		//check that hmax is positive
+ 		if (hmax<=0){
+-			_error_("hmax<=0");
++			_error2_("hmax<=0");
+ 		}
+ 
+ 		//errC cannot be higher than 1
+@@ -1089,7 +1089,7 @@
+ 				double hn=Min(hmax,ht*anisomax);
+ 
+ 				if (ht<=0 || hn<=0){
+-					_error_("ht<=0 || hn<=0");
++					_error2_("ht<=0 || hn<=0");
+ 				}
+ 				EigenMetric Vp(1/(ht*ht),1/(hn*hn),tg);
+ 				Metric MVp(Vp);
+@@ -1114,7 +1114,7 @@
+ 			BuildMetric1(bamgopts);
+ 		}
+ 		else{
+-			_error_("Hessiantype %i not supported yet (1->use Green formula, 0-> double P2 projection)",Hessiantype);
++			_error2_("Hessiantype " << Hessiantype << " not supported yet (1->use Green formula, 0-> double P2 projection)");
+ 		}
+ 	}
+ 	/*}}}*/
+@@ -1158,7 +1158,7 @@
+ 
+ 		//some checks
+ 		if (( infvertexindex <0 ) && (detOld <0) ||  ( infvertexindex >=0  ) && (detOld >0) ){
+-			_error_("inconsistent configuration (Contact ISSM developers)");
++			_error2_("inconsistent configuration (Contact ISSM developers)");
+ 		}
+ 
+ 		// if det3 does not exist, build it 
+@@ -1200,7 +1200,7 @@
+ 				}
+ 			}
+ 			else{
+-				_error_("Cannot add a vertex more than once. Check duplicates");
++				_error2_("Cannot add a vertex more than once. Check duplicates");
+ 			}
+ 		}
+ 
+@@ -1213,7 +1213,7 @@
+ 		tt[1]= &triangles[nbt++];
+ 		tt[2]= &triangles[nbt++];
+ 
+-		if (nbt>maxnbt) _error_("Not enough triangles");
++		if (nbt>maxnbt) _error2_("Not enough triangles");
+ 
+ 		*tt[1]=*tt[2]=*t;
+ 		tt[0]->link=tt[1];
+@@ -1250,7 +1250,7 @@
+ 			int rswap=tt[izerodet]->swap(iedge);
+ 
+ 			if (!rswap) {
+-				_error_("swap the point s is on a edge");
++				_error2_("swap the point s is on a edge");
+ 			}
+ 		}
+ 	}
+@@ -1317,7 +1317,7 @@
+ 
+ 		//check that the mesh is not empty
+ 		if (nbt<=0 || nbv <=0 ) {
+-			_error_("nbt or nbv is negative (Mesh empty?)");
++			_error2_("nbt or nbv is negative (Mesh empty?)");
+ 		}
+ 
+ 		//Gh is the geometry of the mesh (this), initialize MaxCornerAngle
+@@ -1339,7 +1339,7 @@
+ 		//check that there is no double edge
+ 		if (nbe !=  edge4->nb()){ 
+ 			delete [] st;
+-			_error_("Some Double edge in the mesh, the number is %i, nbe4=%i",nbe,edge4->nb()); 
++			_error2_("Some Double edge in the mesh, the number is " << nbe << ", nbe4=" << edge4->nb()); 
+ 		}
+ 		//keep nbe in nbeold
+ 		long nbeold = nbe;
+@@ -1359,7 +1359,7 @@
+ 				else if(st[k]>=0) {
+ 					//check that it is not an edge on boundary (should not already exist)
+ 					if (triangles[i].TriangleAdj(j) || triangles[st[k]/3].TriangleAdj((int) (st[k]%3))){
+-						_error_("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)");
++						_error2_("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)");
+ 					}
+ 					//OK, the element is not on boundary, is belongs to 2 triangles -> build Adjacent triangles list
+ 					triangles[i].SetAdj2(j,triangles + st[k] / 3,(int) (st[k]%3));
+@@ -1377,7 +1377,7 @@
+ 					printf("Edge %i of triangle %i\n",j,i);
+ 					printf("Edge %i of triangle %i\n",(-st[k]+2)%3,(-st[k]+2)/3);
+ 					printf("Edge %i of triangle %i\n",triangles[(-st[k]+2)/3].NuEdgeTriangleAdj((int)((-st[k]+2)%3)),GetId(triangles[(-st[k]+2)/3].TriangleAdj((int)((-st[k]+2)%3))));
+-					_error_("An edge belongs to more than 2 triangles");
++					_error2_("An edge belongs to more than 2 triangles");
+ 				}	
+ 			}
+ 		}
+@@ -1459,7 +1459,7 @@
+ 
+ 			//check that we have been through all edges
+ 			if (k!=nbe){
+-				_error_("problem in edge construction process: k!=nbe (should not happen)");
++				_error2_("problem in edge construction process: k!=nbe (should not happen)");
+ 			}
+ 			//delete edgessave
+ 			if (edgessave) delete [] edgessave;
+@@ -1504,7 +1504,7 @@
+ 
+ 					//check that we have the correct vertex
+ 					if (v!=edges[i0 ].v[j0]){
+-						_error_("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge");
++						_error2_("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge");
+ 					}
+ 
+ 					//Add adjacence
+@@ -1521,7 +1521,7 @@
+ 
+ 		//check that nbsubdomains is empty
+ 		if (nbsubdomains){
+-			_error_("nbsubdomains should be 0");
++			_error2_("nbsubdomains should be 0");
+ 		}
+ 		nbsubdomains=0;
+ 
+@@ -1590,7 +1590,7 @@
+ 		//check that we have been through all subdomains
+ 		if (k!= nbsubdomains){
+ 			delete [] colorT;
+-			_error_("k!= nbsubdomains");
++			_error2_("k!= nbsubdomains");
+ 		}
+ 		//delete colorT and st
+ 		delete [] colorT;
+@@ -1651,7 +1651,7 @@
+ 		Gh.coefIcoor= (MaxICoor)/(Max(Gh.pmax.x-Gh.pmin.x,Gh.pmax.y-Gh.pmin.y));
+ 		if (Gh.coefIcoor<=0){
+ 			delete [] colorV;
+-			_error_("Gh.coefIcoor<=0 in infered Geometry (this should not happen)");
++			_error2_("Gh.coefIcoor<=0 in infered Geometry (this should not happen)");
+ 		}
+ 
+ 		/*Build Gh.edges*/
+@@ -1704,7 +1704,7 @@
+ 			if (k != i){
+ 				delete [] len;
+ 				delete [] colorV;
+-				_error_("problem in Edge4 construction: k != i");
++				_error2_("problem in Edge4 construction: k != i");
+ 			}
+ 		}
+ 
+@@ -1733,7 +1733,7 @@
+ 				Gh.subdomains[i].ReferenceNumber =  subdomains[i].ReferenceNumber;
+ 			}
+ 			else
+-			 _error_("%i should be >=0");
++			 _error2_("%i should be >=0");
+ 		  }
+ 
+ 		delete edge4;
+@@ -1767,7 +1767,7 @@
+ 		nbsol=bamgopts->fieldSize[1];
+ 
+ 		/*Check size*/
+-		if (bamgopts->fieldSize[0] != nbv) _error_("'field' should have %i rows",nbv);
++		if (bamgopts->fieldSize[0] != nbv) _error2_("'field' should have " << nbv << " rows");
+ 
+ 		//initialization of some variables
+ 		double* ss=(double*)s;
+@@ -1972,7 +1972,7 @@
+ 		nbsol=bamgopts->fieldSize[1];
+ 
+ 		/*Check size*/
+-		if (bamgopts->fieldSize[0] != nbv) _error_("'field' should have %i rows",nbv);
++		if (bamgopts->fieldSize[0] != nbv) _error2_("'field' should have " << nbv << " rows");
+ 
+ 		//initialization of some variables
+ 		long    i,k,iA,iB,iC,iv;
+@@ -2297,7 +2297,7 @@
+ 				//The vertex cannot be marked more than twice
+ 				if (splitvertex[i1]==3 || splitvertex[i2]==3){
+ 					delete [] splitvertex;
+-					_error_("Crossing rifts not supported yet");
++					_error2_("Crossing rifts not supported yet");
+ 				}
+ 			}
+ 		}
+@@ -2375,14 +2375,14 @@
+ 				}
+ 				//printf("%i -> %i %i %i, edge [%i->%i %i->%i]\n",element_renu[GetId(ta.t)],GetId((*ta.t)[0])+1,GetId((*ta.t)[1])+1,GetId((*ta.t)[2])+1,i1,j1,i2,j2);
+ 				ta = Next(ta).Adj(); 
+-				if (count++>50) _error_("Maximum number of iteration exceeded");
++				if (count++>50) _error2_("Maximum number of iteration exceeded");
+ 			}while ((tbegin != ta)); 
+ 		}
+ 
+ 		//Check EdgeFlag
+ 		for(i=0;i<NbCrackedEdges;i++){
+ 			if (Edgeflags[i]!=2){
+-				_error_("A problem occured: at least one crack edge (number %i) does not belong to 2 elements",i+1);
++				_error2_("A problem occured: at least one crack edge (number " << i+1 << ") does not belong to 2 elements");
+ 			}
+ 		}
+ 		delete [] Edgeflags;
+@@ -2432,7 +2432,7 @@
+ 				if (!triangles[t].det) k++;
+ 			}
+ 			if (k!=0) {
+-				_error_("there is %i triangles of mes = 0",k);
++				_error2_("there is " << k << " triangles of mes = 0");
+ 			}
+ 
+ 			//Force Edges
+@@ -2446,12 +2446,12 @@
+ 
+ 				if (nbswp) nbfe++;
+ 				if ( nbswp < 0 && k < 5){
+-					_error_("Missing Edge %i, v0=%i,v1=%i",i,GetId(edges[i][0]),GetId(edges[i][1]));
++					_error2_("Missing Edge " << i << ", v0=" << GetId(edges[i][0]) << ",v1=" << GetId(edges[i][1]));
+ 				}
+ 			}
+ 
+ 			if (k!=0) {
+-				_error_("There are %i lost edges, the boundary might be crossing",k);
++				_error2_("There are " << k << " lost edges, the boundary might be crossing");
+ 			}
+ 			for (int j=0;j<nbv;j++){
+ 				Nbswap +=  vertices[j].Optim(1,0);
+@@ -2533,7 +2533,7 @@
+ 			it++;} // end while (it<nbt)
+ 			if (nbt == nbtout ||  !NbSubDomTot) {
+ 				delete [] HeapArete;
+-				_error_("The boundary is not close: all triangles are outside");
++				_error2_("The boundary is not close: all triangles are outside");
+ 			}
+ 
+ 			delete [] HeapArete;
+@@ -2571,7 +2571,7 @@
+ 						it++;} // end white (it<nbt)
+ 						if (k!=nbsubdomains){
+ 							delete [] mark;
+-							_error_("k!=nbsubdomains");
++							_error2_("k!=nbsubdomains");
+ 						}
+ 						if(OutSide) 
+ 						  {
+@@ -2661,7 +2661,7 @@
+ 							else 
+ 							 subdomains[i].head=t=ta;
+ 							if(t<triangles || t >= triangles+nbt || t->det < 0 || t->link == 0) {
+-								_error_("bad definition of SubSomain %i",i);
++								_error2_("bad definition of SubSomain " << i);
+ 							}
+ 							long it = GetId(t);
+ 							if (mark[it] >=0) {
+@@ -2676,7 +2676,7 @@
+ 							  {
+ 								kkk++;
+ 								if (mark[GetId(tt)]>=0){
+-									_error_("mark[GetId(tt)]>=0");
++									_error2_("mark[GetId(tt)]>=0");
+ 								}
+ 								mark[GetId(tt)]=i;
+ 								tt=tt->link;
+@@ -2685,7 +2685,7 @@
+ 						}
+ 						ta = Previous(Adj(ta));         
+ 						if(t == (Triangle *) ta) {
+-							_error_("bad definition of SubSomain %i",i);
++							_error2_("bad definition of SubSomain " << i);
+ 						}
+ 					}
+ 				}
+@@ -2847,7 +2847,7 @@
+ 		for (i=2; det(orderedvertices[0]->i,orderedvertices[1]->i,orderedvertices[i]->i)==0;){
+ 			//if i is higher than nbv, it means that all the determinants are 0,
+ 			//all vertices are aligned!
+-			if  (++i>=nbv) _error_("all the vertices are aligned");
++			if  (++i>=nbv) _error2_("all the vertices are aligned");
+ 		}
+ 		// exchange i et 2 in "orderedvertices" so that
+ 		// the first 3 vertices are not aligned (real triangle)
+@@ -2983,7 +2983,7 @@
+ 				BamgVertex &vj = vertices[iv];
+ 				long  j=vj.ReferenceNumber; 
+ 				if (&vj!=orderedvertices[j]){
+-					_error_("&vj!= orderedvertices[j]");
++					_error2_("&vj!= orderedvertices[j]");
+ 				}
+ 				if(i!=j){ 
+ 					Exchange(vi,vj);
+@@ -2993,7 +2993,7 @@
+ 				Triangle *tcvj=TriangleFindFromCoord(vj.i,det3);
+ 				if (tcvj && !tcvj->link){
+ 					tcvj->Echo();
+-					_error_("problem inserting point in InsertNewPoints (tcvj=%p and tcvj->link=%i)",tcvj,tcvj->link);
++					_error2_("problem inserting point in InsertNewPoints (tcvj=" << tcvj << " and tcvj->link=" << tcvj->link << ")");
+ 				}
+ 				quadtree->Add(vj);
+ 				AddVertex(vj,tcvj,det3);
+@@ -3025,7 +3025,7 @@
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/MakeGeomEdgeToEdge)*/
+ 
+ 		if (!Gh.nbe){
+-			_error_("!Gh.nbe");
++			_error2_("!Gh.nbe");
+ 		}
+ 		Edge **e= new (Edge* [Gh.nbe]);
+ 
+@@ -3058,7 +3058,7 @@
+ 				if(kk<10) printf("BUG: the geometrical edge %i is on no edge curve\n",i);
+ 			}
+ 		}
+-		if(kk) _error_("See above");
++		if(kk) _error2_("See above");
+ 
+ 		return e;
+ 	}
+@@ -3257,7 +3257,7 @@
+ 
+ 				//check i
+ 				if (i<0 || i>=nbt ){
+-					_error_("Index problem in NewPoints (i=%i not in [0 %i])",i,nbt-1);
++					_error2_("Index problem in NewPoints (i=" << i << " not in [0 " << nbt-1 << "])");
+ 				}
+ 				//change first_np_or_next_t[i]
+ 				first_np_or_next_t[i] = iter; 
+@@ -3308,7 +3308,7 @@
+ 						Headt=kt;
+ 					}
+ 					if (ta.EdgeVertex(0)!=s){
+-						_error_("ta.EdgeVertex(0)!=s");
++						_error2_("ta.EdgeVertex(0)!=s");
+ 					}
+ 					ta = Next(Adj(ta));
+ 				} while ( (tbegin != (Triangle*) ta)); 
+@@ -3343,7 +3343,7 @@
+ 			tA=vA.BackgroundEdgeHook->abcisse;
+ 		}
+ 		else {
+-			_error_("ProjectOnCurve On BamgVertex %i forget call to SetVertexFieldOnBTh",BTh.GetId(vA));
++			_error2_("ProjectOnCurve On BamgVertex " << BTh.GetId(vA) << " forget call to SetVertexFieldOnBTh");
+ 		} 
+ 
+ 		if (vB.IndexInTriangle == IsVertexOnVertex){
+@@ -3354,17 +3354,17 @@
+ 			tB=vB.BackgroundEdgeHook->abcisse;
+ 		}
+ 		else {
+-			_error_("ProjectOnCurve On BamgVertex %i forget call to SetVertexFieldOnBTh",BTh.GetId(vB));
++			_error2_("ProjectOnCurve On BamgVertex " << BTh.GetId(vB) << " forget call to SetVertexFieldOnBTh");
+ 		} 
+ 		Edge * e = &BhAB;
+ 		if (!pA || !pB || !e){
+-			_error_("!pA || !pB || !e");
++			_error2_("!pA || !pB || !e");
+ 		}
+ 		// be carefull the back ground edge e is on same geom edge 
+ 		// of the initiale edge def by the 2 vertex A B;
+ 		//check Is a background Mesh;   
+ 		if (e<BTh.edges || e>=BTh.edges+BTh.nbe){
+-			_error_("e<BTh.edges || e>=BTh.edges+BTh.nbe");
++			_error2_("e<BTh.edges || e>=BTh.edges+BTh.nbe");
+ 		}
+ 		// walk on BTh edge 
+ 		//not finish ProjectOnCurve with BackGround Mesh);
+@@ -3387,7 +3387,7 @@
+ 
+ 		  } 
+ 		else{ // do the search by walking 
+-			_error_("case not supported yet");
++			_error2_("case not supported yet");
+ 		  }
+ 
+ 		// find the direction of walking with direction of edge and pA,PB;
+@@ -3451,7 +3451,7 @@
+ 			abscisse = lg*theta;
+ 
+ 		  }
+-		_error_("Big bug...");
++		_error2_("Big bug...");
+ 		return 0; // just for the compiler 
+ 	}                  
+ 	/*}}}*/
+@@ -3492,7 +3492,7 @@
+ 		kk=kk+(i==edge4->SortAndAdd(GetId(edges[i][0]),GetId(edges[i][1])));
+ 	}
+ 	if (kk != nbe){ 
+-		_error_("There are %i double edges in the mesh",kk-nbe);
++		_error2_("There are " << kk-nbe << " double edges in the mesh");
+ 	}
+ 
+ 	//Add edges of all triangles in existing mesh
+@@ -3524,7 +3524,7 @@
+ 
+ 			//An edge belongs to 2 triangles
+ 			else {
+-				_error_("The edge (%i , %i) belongs to more than 2 triangles",GetId(triangles[i][VerticesOfTriangularEdge[j][0]]),GetId(triangles[i][VerticesOfTriangularEdge[j][1]]));
++				_error2_("The edge (" << GetId(triangles[i][VerticesOfTriangularEdge[j][0]]) << " , " << GetId(triangles[i][VerticesOfTriangularEdge[j][1]]) << ") belongs to more than 2 triangles");
+ 			}
+ 		}
+ 	}
+@@ -3562,7 +3562,7 @@
+ 		}
+ 	}
+ 	if(k) {
+-		_error_("%i boundary edges (from the geometry) are not defined as mesh edges",k);
++		_error2_("" << k << " boundary edges (from the geometry) are not defined as mesh edges");
+ 	}
+ 
+ 	/* mesh generation with boundary points*/
+@@ -3589,7 +3589,7 @@
+ 	//Find a vertex that is not aligned with vertices 0 and 1
+ 	for (i=2;det(orderedvertices[0]->i,orderedvertices[1]->i,orderedvertices[i]->i)==0;) 
+ 	 if  (++i>=nbvb) {
+-		 _error_("ReconstructExistingMesh: All the vertices are aligned");
++		 _error2_("ReconstructExistingMesh: All the vertices are aligned");
+ 	 }
+ 	//Move this vertex (i) to the 2d position in orderedvertices
+ 	Exchange(orderedvertices[2], orderedvertices[i]);
+@@ -3649,7 +3649,7 @@
+ 		}
+ 	}
+ 	if(nbloss) {
+-		_error_("we lost %i existing edges other %i",nbloss,knbe);
++		_error2_("we lost " << nbloss << " existing edges other " << knbe);
+ 	}
+ 
+ 	FindSubDomain(1);
+@@ -3724,7 +3724,7 @@
+ 	triangles = savetriangles;
+ 	subdomains = savesubdomains;
+ 	if (k) {
+-		_error_("number of triangles edges alone = %i",k);
++		_error2_("number of triangles edges alone = " << k);
+ 	}
+ 	FindSubDomain();
+ 
+@@ -3754,7 +3754,7 @@
+ 						 printf("Its pointer is %p\n",edges[i][j].GeomEdgeHook);
+ 
+ 						printf("This edge is on geometry and has no adjacent edge (open curve) and one of the tip is not required\n");
+-						_error_("See above (might be cryptic...)");
++						_error2_("See above (might be cryptic...)");
+ 					}
+ 				}
+ 			}
+@@ -3777,15 +3777,15 @@
+ 		  { 
+ 			t=t0=subdomains[i].head;
+ 			if (!t0){ // not empty sub domain
+-				_error_("!t0");
++				_error2_("!t0");
+ 			}
+ 			do { 
+ 				long kt = GetId(t);
+ 				if (kt<0 || kt >= nbt ){
+-					_error_("kt<0 || kt >= nbt");
++					_error2_("kt<0 || kt >= nbt");
+ 				}
+ 				if (renu[kt]!=-1){
+-					_error_("renu[kt]!=-1");
++					_error2_("renu[kt]!=-1");
+ 				}
+ 				renu[kt]=k++;
+ 			}
+@@ -3802,7 +3802,7 @@
+ 			if (renu[it]==-1) renu[it]=k++;
+ 		}
+ 		if (k != nbt){
+-			_error_("k != nbt");
++			_error2_("k != nbt");
+ 		}
+ 		// do the change on all the pointeur 
+ 		for ( it=0;it<nbt;it++)
+@@ -3928,7 +3928,7 @@
+ 	//Compute coefIcoor
+ 	coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y));
+ 	if (coefIcoor<=0){
+-		_error_("coefIcoor should be positive, a problem in the geometry is likely");
++		_error2_("coefIcoor should be positive, a problem in the geometry is likely");
+ 	}
+ 
+ 	// generation of integer coord  
+@@ -3964,7 +3964,7 @@
+ 		else triangles[i].det=-1;
+ 	}
+ 
+-	if (number_of_errors) _error_("Fatal error: some triangles have negative areas, see above");
++	if (number_of_errors) _error2_("Fatal error: some triangles have negative areas, see above");
+ }
+ /*}}}*/
+ /*FUNCTION Mesh::ShowRegulaty{{{*/
+@@ -4145,7 +4145,7 @@
+ 			//  pour tous les triangles autour du sommet s
+ 			register Triangle* t= vertices[i].t;
+ 			if (!t){
+-				_error_("!t");
++				_error2_("!t");
+ 			}
+ 			BamgVertex & vi = vertices[i];
+ 			AdjacentTriangle ta(t,EdgesVertexTriangle[vertices[i].IndexInTriangle][0]);
+@@ -4153,13 +4153,13 @@
+ 			while (1) {
+ 				ta=Previous(Adj(ta));
+ 				if (vertices+i != ta.EdgeVertex(1)){
+-					_error_("vertices+i != ta.EdgeVertex(1)");
++					_error2_("vertices+i != ta.EdgeVertex(1)");
+ 				}
+ 				BamgVertex & vj = *(ta.EdgeVertex(0));
+ 				if ( &vj ) {
+ 					j= &vj-vertices;
+ 					if (j<0 || j >= nbv){
+-						_error_("j<0 || j >= nbv");
++						_error2_("j<0 || j >= nbv");
+ 					}
+ 					R2 Aij = (R2) vj - (R2) vi;
+ 					double ll =  Norme2(Aij);
+@@ -4283,7 +4283,7 @@
+ 					// a faire -- difficile 
+ 					// the first PB is to now a background edge between the 2 vertices
+ 					if (!edgesGtoB){
+-						_error_("!edgesGtoB");
++						_error2_("!edgesGtoB");
+ 					}
+ 					ong= ProjectOnCurve(*edgesGtoB[Gh.GetId(edges[i].GeomEdgeHook)],
+ 								edges[i][0],edges[i][1],0.5,vertices[k],
+@@ -4355,7 +4355,7 @@
+ 		for (i=0;i<nbt;i++) {
+ 			Triangle & t = triangles[i];
+ 			if (!t.link){
+-				_error_("!t.link");
++				_error2_("!t.link");
+ 			}
+ 			for(int j=0;j<3;j++)
+ 			  {
+@@ -4382,7 +4382,7 @@
+ 										||   (bb=Area2( t[0].r , A.r    , t[2].r )) < 0.0  
+ 										||   (cc=Area2( t[0].r , t[1].r , A.r    )) < 0.0)){
+ 							printf("%i not in triangle %i In= %i %g %g %g %g\n",ke + nbvold,i,!!t.link,aa,bb,cc,dd);
+-							_error_("Number of triangles with P2 interpolation Problem");
++							_error2_("Number of triangles with P2 interpolation Problem");
+ 						}
+ 					}
+ 					else {
+@@ -4390,7 +4390,7 @@
+ 										||   (bb=Area2( tt[0].r , A.r     , tt[2].r )) < 0 
+ 										||   (cc=Area2( tt[0].r , tt[1].r , A.r     )) < 0)){
+ 							printf("%i not in triangle %i In= %i %g %g %g %g\n",ke + nbvold,ii,!!tt.link,aa,bb,cc,dd);
+-							_error_("Number of triangles with P2 interpolation Problem");
++							_error2_("Number of triangles with P2 interpolation Problem");
+ 						}
+ 					} 
+ 				  }
+@@ -4438,7 +4438,7 @@
+ 							kkk[nbsplitedge++]=j;		      
+ 						  } // tt 
+ 						else
+-						 _error_("Bug...");
++						 _error2_("Bug...");
+ 					  } // ke<0	       
+ 					else
+ 					  { // ke >=0
+@@ -4451,7 +4451,7 @@
+ 
+ 			  } 
+ 			if (nbinvisible>=2){
+-				_error_("nbinvisible>=2");
++				_error2_("nbinvisible>=2");
+ 			}
+ 			switch (nbsplitedge) {
+ 				case 0: ksplit[i]=10; newnbt++; break;   // nosplit
+@@ -4463,7 +4463,7 @@
+ 						  break;
+ 			} 
+ 			if (ksplit[i]<40){
+-				_error_("ksplit[i]<40");
++				_error2_("ksplit[i]<40");
+ 			}
+ 		  }
+ 		//  now do the element split
+@@ -4480,7 +4480,7 @@
+ 			long kk=ksplit[i]/10;
+ 			int  ke=(int) (ksplit[i]%10);
+ 			if (kk>=7 || kk<=0){
+-				_error_("kk>=7 || kk<=0");
++				_error2_("kk>=7 || kk<=0");
+ 			}
+ 
+ 			// def the numbering   k (edge) i vertex 
+@@ -4497,7 +4497,7 @@
+ 			BamgVertex * v2=t0(i2);
+ 
+ 			if (nbmkadj>=10){
+-				_error_("nbmkadj>=10");
++				_error2_("nbmkadj>=10");
+ 			}
+ 			// --------------------------
+ 			AdjacentTriangle ta0(t0.Adj(i0)),ta1(t0.Adj(i1)),ta2(t0.Adj(i2));
+@@ -4515,7 +4515,7 @@
+ 							Triangle &t1=triangles[kkk++];
+ 							t1=t0;
+ 							if (kedge[3*i+i0]<0){
+-								_error_("kedge[3*i+i0]<0");
++								_error2_("kedge[3*i+i0]<0");
+ 							}
+ 							BamgVertex * v3 = vertices + kedge[3*i+k0];
+ 
+@@ -4531,10 +4531,10 @@
+ 							Triangle &t2=triangles[kkk++];
+ 							t2=t1=t0;
+ 							if (kedge[3*i+k1]<0){
+-								_error_("kedge[3*i+k1]<0");
++								_error2_("kedge[3*i+k1]<0");
+ 							}
+ 							if (kedge[3*i+k2]<0){
+-								_error_("kedge[3*i+k2]<0");
++								_error2_("kedge[3*i+k2]<0");
+ 							}
+ 
+ 							BamgVertex * v01 = vertices + kedge[3*i+k2];
+@@ -4558,7 +4558,7 @@
+ 							Triangle &t3=triangles[kkk++];
+ 							t3=t2=t1=t0;
+ 							if (kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0){
+-								_error_("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0");
++								_error2_("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0");
+ 							}
+ 							BamgVertex * v12 = vertices + kedge[3*i+k0];
+ 							BamgVertex * v02 = vertices + kedge[3*i+k1]; 
+@@ -4632,7 +4632,7 @@
+ 				 mkadj[nbmkadj++]=jj;
+ 				}
+ 			if (nbmkadj>13){// 13 = 6 + 4 +
+-				_error_("nbmkadj>13");
++				_error2_("nbmkadj>13");
+ 			}
+ 
+ 			if (kk==6)  newnbq+=3;
+@@ -4758,7 +4758,7 @@
+ 
+ 			quadtree->Add(vi);
+ 			if (!tcvi || tcvi->det<0){// internal
+-				_error_("!tcvi || tcvi->det < 0");
++				_error2_("!tcvi || tcvi->det < 0");
+ 			}
+ 			AddVertex(vi,tcvi,det3);
+ 			NbSwap += vi.Optim(1);          
+@@ -4802,14 +4802,14 @@
+ 	else {
+ 
+ 		/*Check that the quadtree does exist*/
+-		if (!quadtree) _error_("no starting triangle provided and no quadtree available");
++		if (!quadtree) _error2_("no starting triangle provided and no quadtree available");
+ 
+ 		/*Call NearestVertex*/
+ 		BamgVertex *a = quadtree->NearestVertex(B.x,B.y) ;
+ 
+ 		/*Check output (Vertex a)*/
+-		if (!a)    _error_("problem while trying to find nearest vertex from a given point. No output found");
+-		if (!a->t) _error_("no triangle is associated to vertex number %i (orphan?)",GetId(a)+1);
++		if (!a)    _error2_("problem while trying to find nearest vertex from a given point. No output found");
++		if (!a->t) _error2_("no triangle is associated to vertex number " << GetId(a)+1 << " (orphan?)");
+ 		_assert_(a>=vertices && a<vertices+nbv);
+ 
+ 		/*Get starting triangle*/
+@@ -4844,7 +4844,7 @@
+ 	while(t->det>0) { 
+ 
+ 		/*Increase counter*/
+-		if (++counter>=10000) _error_("Maximum number of iteration reached (threshold = %i).",counter);
++		if (++counter>=10000) _error2_("Maximum number of iteration reached (threshold = " << counter << ").");
+ 
+ 		j= OppositeVertex[jj];
+ 		det3[j] = detop;  //det(*b,*s1,*s2);
+@@ -4908,7 +4908,7 @@
+ 		t=t0=subdomains[i].head;
+ 
+ 		//check that the subdomain is not empty
+-		if (!t0){ _error_("At least one subdomain is empty");}
++		if (!t0){ _error2_("At least one subdomain is empty");}
+ 
+ 		//loop
+ 		do{
+@@ -4991,7 +4991,7 @@
+ 		}
+ 		//allocate
+ 		VerticesOnGeomVertex = new VertexOnGeom[NbVerticesOnGeomVertex];  
+-		if(NbVerticesOnGeomVertex >= maxnbv) _error_("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,maxnbv);
++		if(NbVerticesOnGeomVertex >= maxnbv) _error2_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv);
+ 		_assert_(nbv==0);
+ 		//Build VerticesOnGeomVertex
+ 		for (i=0;i<Gh.nbv;i++){
+@@ -5080,7 +5080,7 @@
+ 								PreviousNewEdge=0;
+ 								NbNewPoints=0;
+ 								NbEdgeCurve=0;
+-								if (nbvend>=maxnbv) _error_("maximum number of vertices too low! Check the domain outline or increase maxnbv");
++								if (nbvend>=maxnbv) _error2_("maximum number of vertices too low! Check the domain outline or increase maxnbv");
+ 								lcurve =0;
+ 								s = lstep; //-1 initially, then length of each sub edge
+ 
+@@ -5322,7 +5322,7 @@
+ 		for (i=0;i<Gh.nbv;i++) if (Gh[i].Required()) NbVerticesOnGeomVertex++;
+ 		if(NbVerticesOnGeomVertex >= maxnbv){
+ 			delete [] bcurve;
+-			_error_("too many vertices on geometry: %i >= %i",NbVerticesOnGeomVertex,maxnbv);
++			_error2_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv);
+ 		}
+ 
+ 		VerticesOnGeomVertex = new VertexOnGeom[  NbVerticesOnGeomVertex];
+@@ -5393,7 +5393,7 @@
+ 		} 
+ 		if (bfind!=Gh.nbcurves){
+ 			delete [] bcurve;
+-			_error_("problem generating number of curves (%i found in the geometry but %i curve found in the mesh)",Gh.nbcurves,bfind);
++			_error2_("problem generating number of curves (" << Gh.nbcurves << " found in the geometry but " << bfind << " curve found in the mesh)");
+ 		}
+ 
+ 		// method in 2 + 1 step 
+@@ -5492,11 +5492,11 @@
+ 									Edge* e = edges + nbe++;
+ 									double se= (sNew-L0)/LAB;
+ 									if (se<0 || se>=1.000000001){
+-										_error_("Problem creating point on a boundary: se=%g should be in [0 1]",se);
++										_error2_("Problem creating point on a boundary: se=" << se << " should be in [0 1]");
+ 									}
+ 									se = abscisseInterpole(v0.m,v1.m,AB,se,1);
+ 									if (se<0 || se>1){
+-										_error_("Problem creating point on a boundary: se=%g should be in [0 1]",se);
++										_error2_("Problem creating point on a boundary: se=" << se << " should be in [0 1]");
+ 									}
+ 									se = k1         ? se : 1. - se;
+ 									se = k1==k1equi ? se : 1. - se;
+@@ -5528,7 +5528,7 @@
+ 								break;
+ 							}
+ 							if (!ee.adj[k1]) {
+-								_error_(" adj edge %i, nbe=%i, Gh.vertices=%i",BTh.GetId(ee),nbe,Gh.vertices);
++								_error2_(" adj edge " << BTh.GetId(ee) << ", nbe=" << nbe << ", Gh.vertices=" << Gh.vertices);
+ 							}
+ 							pe = ee.adj[k1]; // next edge
+ 							k0 = pe->Intersection(ee); 
+@@ -5566,7 +5566,7 @@
+ 			//Allocate memory
+ 			if(step==0){
+ 				if(nbv+NbOfNewPoints > maxnbv) {
+-					_error_("too many vertices on geometry: %i >= %i",nbv+NbOfNewPoints,maxnbv);
++					_error2_("too many vertices on geometry: " << nbv+NbOfNewPoints << " >= " << maxnbv);
+ 				}
+ 				edges = new Edge[NbOfNewEdge];
+ 				nbex = NbOfNewEdge;
+@@ -5611,7 +5611,7 @@
+ 		int k=(*t)(0) ?  ((  (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1  )) : 0;
+ 		int dir=0;
+ 		if (k<0){
+-			_error_("k<0");
++			_error2_("k<0");
+ 		}
+ 		int kkk=0;  
+ 		Icoor2 IJ_IA,IJ_AJ;
+@@ -5619,7 +5619,7 @@
+ 		for (;;edge = dir >0 ? Next(Adj(Next(edge))) : Previous(Adj(Previous(edge)))) {  
+ 			kkk++;
+ 			if (kkk>=1000){
+-				_error_("kkk>=1000");
++				_error2_("kkk>=1000");
+ 			}
+ 			BamgVertex  &vI =  *edge.EdgeVertex(0);
+ 			BamgVertex  &vJ =  *edge.EdgeVertex(1);
+@@ -5636,7 +5636,7 @@
+ 							continue;}}// go in direction j
+ 							double IJ2 = IJ_IA + IJ_AJ;
+ 							if (IJ2==0){
+-								_error_("IJ2==0");
++								_error2_("IJ2==0");
+ 							}
+ 							a= IJ_AJ/IJ2;
+ 							b= IJ_IA/IJ2;
+@@ -5654,7 +5654,7 @@
+ 		// restart:
+ 		//   int dir=0;
+ 		if (t->link != 0){
+-			_error_("t->link != 0");
++			_error2_("t->link != 0");
+ 		}
+ 		// to have a starting edges 
+ 		// try the 3 edge bourna-- in case of internal hole 
+@@ -5726,7 +5726,7 @@
+ 			  }
+ 		  }
+ 		if (cas ==-2){
+-			_error_("cas==-2");
++			_error2_("cas==-2");
+ 		}
+ 		// l1 = ||C s1||  , l0 = ||C s0||
+ 		// where s0,s1 are the vertex of the edge er
+@@ -5743,7 +5743,7 @@
+ 			do  {  // loop over vertex s
+ 				kkk++;
+ 				if (edge.EdgeVertex(0)!=s && kkk>=10000){
+-					_error_("edge.EdgeVertex(0)!=s && kkk>=10000");
++					_error2_("edge.EdgeVertex(0)!=s && kkk>=10000");
+ 				}
+ 
+ 				int link = tt->link == 0;
+@@ -5775,7 +5775,7 @@
+ 			} while (t!=tt);
+ 
+ 			if (!(Triangle *) er){
+-				_error_("!(Triangle *) er");
++				_error2_("!(Triangle *) er");
+ 			}
+ 			I2 A((I2)*er.EdgeVertex(0));
+ 			I2 B((I2)*er.EdgeVertex(1));
+@@ -5799,7 +5799,7 @@
+ 
+ 	int NbSwap =0;
+ 	if (!a.t || !b.t){ // the 2 vertex is in a mesh
+-		_error_("!a.t || !b.t");
++		_error2_("!a.t || !b.t");
+ 	}
+ 	int k=0;
+ 	taret=AdjacentTriangle(0,0); // erreur 
+@@ -5816,7 +5816,7 @@
+ 		v2 = tta.EdgeVertex(0);
+ 		vbegin =v2;
+ 		if (!v2){
+-			_error_("!v2");
++			_error2_("!v2");
+ 		}
+ 		det2 = det(*v2,a,b);
+ 	}
+@@ -5833,12 +5833,12 @@
+ 			BamgVertex * va = &a, *vb = &b;
+ 			tc = Previous(tc);
+ 			if (!v1 || !v2){
+-				_error_("!v1 || !v2");
++				_error2_("!v1 || !v2");
+ 			}
+ 			Icoor2 detss = 0,l=0,ks;
+ 			while ((ks=SwapForForcingEdge(  va,  vb, tc, detss, det1,det2,NbSwap)))
+ 			 if(l++ > 10000000) {
+-				 _error_("Loop in forcing Egde, nb de swap=%i, nb of try swap (%i) too big",NbSwap,l);
++				 _error2_("Loop in forcing Egde, nb de swap=" << NbSwap << ", nb of try swap (" << l << ") too big");
+ 			 }
+ 			BamgVertex *aa = tc.EdgeVertex(0), *bb = tc.EdgeVertex(1);
+ 			if (( aa == &a ) && (bb == &b) ||  (bb ==  &a ) && (aa == &b)) {
+@@ -5857,7 +5857,7 @@
+ 		tta = tc;
+ 		k++;
+ 		if (k>=2000){
+-			_error_("k>=2000");
++			_error2_("k>=2000");
+ 		}
+ 		if ( vbegin == v2 ) return -1;// error 
+ 	}
+@@ -5929,7 +5929,7 @@
+ 		Triangle *t1=tt1,*t2=tt2;// les 2 triangles adjacent
+ 		short a1=tt1,a2=tt2;// les 2 numero de l arete dans les 2 triangles
+ 		if ( a1<0 || a1>=3 ){
+-			_error_("a1<0 || a1>=3");
++			_error2_("a1<0 || a1>=3");
+ 		}
+ 
+ 		BamgVertex & sa= (* t1)[VerticesOfTriangularEdge[a1][0]];
+@@ -5941,10 +5941,10 @@
+ 		Icoor2 det1=t1->det , det2=t2->det ;
+ 		Icoor2 detT = det1+det2;
+ 		if ((det1<=0 ) || (det2<=0)){
+-			_error_("(det1<=0 ) || (det2<=0)");
++			_error2_("(det1<=0 ) || (det2<=0)");
+ 		}
+ 		if ( (detsa>=0) || (detsb<=0) ){ // [a,b] cut infinite line va,bb
+-			_error_("(detsa>=0) || (detsb<=0)");
++			_error2_("(detsa>=0) || (detsb<=0)");
+ 		}
+ 		Icoor2 ndet1 = bamg::det(s1,sa,s2);
+ 		Icoor2 ndet2 = detT - ndet1;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp	(revision 12493)
+@@ -128,7 +128,7 @@
+ 		}
+ 	}
+ 	if(found!=-1) analysis_counter=found;
+-	else _error_("Could not find alias for analysis_type %s in list of FemModel analyses",EnumToStringx(configuration_type));
++	else _error2_("Could not find alias for analysis_type " << EnumToStringx(configuration_type) << " in list of FemModel analyses");
+ 
+ 	/*Now, plug analysis_counter and analysis_type inside the parameters: */
+ 	this->parameters->SetParam(analysis_counter,AnalysisCounterEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12493)
+@@ -141,7 +141,7 @@
+ 
+ 	IssmDouble data[6];
+ 
+-	if(numdofs!=6)_error_("Result %s is a PentaP1ElementResult and cannot write vector of %i dofs",EnumToStringx(this->enum_type),numdofs);
++	if(numdofs!=6)_error2_("Result " << EnumToStringx(this->enum_type) << " is a PentaP1ElementResult and cannot write vector of " << numdofs << " dofs");
+ 	for(int i=0;i<6;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i];
+ 	vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
+ 
+@@ -149,5 +149,5 @@
+ /*FUNCTION PentaP1ElementResult::GetElementVectorFromResults{{{*/
+ void PentaP1ElementResult::GetElementVectorFromResults(Vector* vector,int dof){
+ 
+-	_error_("Result %s is a PentaP1ElementResult and should not write vector of size numberofelemenrs",EnumToStringx(enum_type));
++	_error2_("Result " << EnumToStringx(enum_type) << " is a PentaP1ElementResult and should not write vector of size numberofelemenrs");
+ } /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 12493)
+@@ -129,7 +129,7 @@
+ /*FUNCTION BoolElementResult::GetVectorFromResults{{{*/
+ void BoolElementResult::GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){
+ 
+-	_error_("cannot return vector on vertices");
++	_error2_("cannot return vector on vertices");
+ } /*}}}*/
+ /*FUNCTION BoolElementResult::GetElementVectorFromResults{{{*/
+ void BoolElementResult::GetElementVectorFromResults(Vector* vector,int dof){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12493)
+@@ -129,12 +129,12 @@
+ 
+ 	IssmDouble data[3];
+ 
+-	if(numdofs!=3)_error_("Result %s is a TriaP1ElementResult and cannot write vector of %i dofs",numdofs);
++	if(numdofs!=3)_error2_("Result " << EnumToStringx(this->enum_type) << " is a TriaP1ElementResult and cannot write vector of " << numdofs << " dofs");
+ 	for(int i=0;i<3;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i];
+ 	vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
+ 
+ } /*}}}*/
+ /*FUNCTION TriaP1ElementResult::GetElementVectorFromResults{{{*/
+ void TriaP1ElementResult::GetElementVectorFromResults(Vector* vector,int dof){
+-	_error_("Result %s is a TriaP1ElementResult and should not write vector of size numberofelemenrs",EnumToStringx(enum_type));
++	_error2_("Result " << EnumToStringx(enum_type) << " is a TriaP1ElementResult and should not write vector of size numberofelemenrs");
+ } /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12493)
+@@ -213,7 +213,7 @@
+ 			break;
+ 		#endif
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global matrix*/
+@@ -276,7 +276,7 @@
+ 		case P1DGEnum:
+ 			return CreateKMatrixPrognostic_DG();
+ 		default:
+-			_error_("Element type %s not supported yet",EnumToStringx(GetElementType()));
++			_error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
+ 	}
+ 
+ }
+@@ -567,7 +567,7 @@
+ 			break;
+ 		#endif
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global Vector*/
+@@ -586,7 +586,7 @@
+ 		case P1DGEnum:
+ 			return CreatePVectorPrognostic_DG();
+ 		default:
+-			_error_("Element type %s not supported yet",EnumToStringx(GetElementType()));
++			_error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -762,7 +762,7 @@
+ 			break;
+ #endif
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global matrix*/
+@@ -774,12 +774,12 @@
+ /*}}}*/
+ /*FUNCTION Tria::ComputeBasalStress {{{*/
+ void  Tria::ComputeBasalStress(Vector* eps){
+-	_error_("Not Implemented yet");
++	_error2_("Not Implemented yet");
+ }
+ /*}}}*/
+ /*FUNCTION Tria::ComputeStrainRate {{{*/
+ void  Tria::ComputeStrainRate(Vector* eps){
+-	_error_("Not Implemented yet");
++	_error2_("Not Implemented yet");
+ }
+ /*}}}*/
+ /*FUNCTION Tria::ComputeStressTensor {{{*/
+@@ -1018,7 +1018,7 @@
+ 		if(node==nodes[i])
+ 		 return i;
+ 	}
+-	_error_("Node provided not found among element nodes");
++	_error2_("Node provided not found among element nodes");
+ }
+ /*}}}*/
+ /*FUNCTION Tria::GetInputListOnVertices(IssmDouble* pvalue,int enumtype) {{{*/
+@@ -1030,7 +1030,7 @@
+ 
+ 	/*Recover input*/
+ 	Input* input=inputs->GetInput(enumtype);
+-	if (!input) _error_("Input %s not found in element",EnumToStringx(enumtype));
++	if (!input) _error2_("Input " << EnumToStringx(enumtype) << " not found in element");
+ 
+ 	/*Checks in debugging mode*/
+ 	_assert_(pvalue);
+@@ -1102,7 +1102,7 @@
+ void Tria::GetInputValue(IssmDouble* pvalue,Node* node,int enumtype){
+ 
+ 	Input* input=inputs->GetInput(enumtype);
+-	if(!input) _error_("No input of type %s found in tria",EnumToStringx(enumtype));
++	if(!input) _error2_("No input of type " << EnumToStringx(enumtype) << " found in tria");
+ 
+ 	GaussTria* gauss=new GaussTria();
+ 	gauss->GaussVertex(this->GetNodeIndex(node));
+@@ -1144,7 +1144,7 @@
+ 		break;
+ 	#endif
+ 	default:
+-		_error_("analysis: %s not supported yet",EnumToStringx(analysis_type));
++		_error2_("analysis: " << EnumToStringx(analysis_type) << " not supported yet");
+ 	}
+ 
+ }
+@@ -1160,7 +1160,7 @@
+ 
+ 	/*Check that both inputs have been found*/
+ 	if (!vx_input || !vy_input){
+-		_error_("Input missing. Here are the input pointers we have for vx: %p, vy: %p\n",vx_input,vy_input);
++		_error2_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << "\n");
+ 	}
+ 
+ 	/*Get strain rate assuming that epsilon has been allocated*/
+@@ -1184,7 +1184,7 @@
+ 
+ 	/*Get input (either in element or material)*/
+ 	Input* input=inputs->GetInput(input_enum);
+-	if(!input) _error_("Input %s not found in element",EnumToStringx(input_enum));
++	if(!input) _error2_("Input " << EnumToStringx(input_enum) << " not found in element");
+ 
+ 	/*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
+ 	input->GetVectorFromInputs(vector,&doflist1[0]);
+@@ -1231,7 +1231,7 @@
+ 
+ 	/*Make a copy of the original input: */
+ 	input=(Input*)this->inputs->GetInput(enum_type);
+-	if(!input)_error_(" could not find old input with enum: %s",EnumToStringx(enum_type));
++	if(!input)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
+ 
+ 	/*ArtificialNoise: */
+ 	input->ArtificialNoise(min,max);
+@@ -1251,8 +1251,8 @@
+ 	for(i=0;i<num_enums/2;i++){
+ 		new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
+ 		old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]);
+-		if(!new_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToStringx(enums[2*i+0]));
+-		if(!old_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToStringx(enums[2*i+0]));
++		if(!new_inputs[i])_error2_("" << " could not find input with enum " << EnumToStringx(enums[2*i+0]));
++		if(!old_inputs[i])_error2_("" << " could not find input with enum " << EnumToStringx(enums[2*i+0]));
+ 	}
+ 
+ 	/*ok, we've got the inputs (new and old), now loop throught the number of criterions and fill the eps array:*/
+@@ -1280,8 +1280,8 @@
+ 	else if (object_enum==MaterialsEnum)
+ 	 oldinput=(Input*)this->matice->inputs->GetInput(enum_type);
+ 	else
+-	 _error_("object %s not supported yet",EnumToStringx(object_enum));
+-	if(!oldinput)_error_("%s%s"," could not find old input with enum: ",EnumToStringx(enum_type));
++	 _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
++	if(!oldinput)_error2_("" << " could not find old input with enum: " << EnumToStringx(enum_type));
+ 	newinput=(Input*)oldinput->copy();
+ 
+ 	/*Assign new name (average)*/
+@@ -1293,7 +1293,7 @@
+ 	else if (object_enum==MaterialsEnum)
+ 	 this->matice->inputs->AddInput((Input*)newinput);
+ 	else
+-	 _error_("object %s not supported yet",EnumToStringx(object_enum));
++	 _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputDuplicate{{{*/
+@@ -1311,7 +1311,7 @@
+ 
+ 	/*Make a copy of the original input: */
+ 	input=(Input*)this->inputs->GetInput(enum_type);
+-	if(!input)_error_(" could not find old input with enum: %s",EnumToStringx(enum_type));
++	if(!input)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
+ 
+ 	/*Scale: */
+ 	input->Scale(scale_factor);
+@@ -1326,7 +1326,7 @@
+ 	/*Go through all the input objects, and find the one corresponding to enum_type, if it exists: */
+ 	if (enum_type==MaterialsRheologyBbarEnum) input=this->matice->inputs->GetInput(enum_type);
+ 	else input=this->inputs->GetInput(enum_type);
+-	//if (!input) _error_("Input %s not found in tria->inputs",EnumToStringx(enum_type));
++	//if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found in tria->inputs");
+ 	if(!input)return;
+ 
+ 	/*If we don't find it, no big deal, just don't do the transfer. Otherwise, build a new Result 
+@@ -1432,7 +1432,7 @@
+ 				case MaterialsRheologyBbarEnum:
+ 					/*Matice will take care of it*/ break;
+ 				default:
+-					_error_("Control %s not implemented yet",EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]));
++					_error2_("Control " << EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]) << " not implemented yet");
+ 			}
+ 		}
+ 	}
+@@ -1504,7 +1504,7 @@
+ 			InputUpdateFromSolutionPrognostic(solution);
+ 			break;
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -1522,7 +1522,7 @@
+ 	/*Use the dof list to index into the solution vector: */
+ 	for(int i=0;i<numdof;i++){
+ 		values[i]=solution[doflist[i]];
+-		if(isnan(values[i])) _error_("NaN found in solution vector");
++		if(isnan(values[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Add input to the element: */
+@@ -1555,7 +1555,7 @@
+ 	this->parameters->FindParam(&minthickness,PrognosticMinThicknessEnum);
+ 	for(i=0;i<numdof;i++){
+ 		newthickness[i]=solution[doflist[i]];
+-		if(isnan(newthickness[i])) _error_("NaN found in solution vector");
++		if(isnan(newthickness[i])) _error2_("NaN found in solution vector");
+ 		/*Constrain thickness to be at least 1m*/
+ 		if(newthickness[i]<minthickness) newthickness[i]=minthickness;
+ 	}
+@@ -1586,7 +1586,7 @@
+ 				newsurface[i]=oldsurface[i]+(1.0-rho_ice/rho_water)*(newthickness[i]-oldthickness[i]); //surface = oldsurface + (1-di) * dH 
+ 				newbed[i]=oldbed[i]-rho_ice/rho_water*(newthickness[i]-oldthickness[i]); //bed = oldbed + di * dH
+ 			}
+-			else _error_("Hydrostatic adjustment %i (%s) not supported yet",hydroadjustment,EnumToStringx(hydroadjustment));
++			else _error2_("Hydrostatic adjustment " << hydroadjustment << " (" << EnumToStringx(hydroadjustment) << ") not supported yet");
+ 		}
+ 	}
+ 
+@@ -1627,18 +1627,18 @@
+ 			return;
+ 
+ 		default:
+-			_error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
++			_error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
+ 	}
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromVector(int* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVector(int* vector, int name, int type){
+-	_error_(" not supported yet!");
++	_error2_(" not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromVector(bool* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVector(bool* vector, int name, int type){
+-	_error_(" not supported yet!");
++	_error2_(" not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputCreate(IssmDouble scalar,int enum,int code);{{{*/
+@@ -1656,7 +1656,7 @@
+ 	else if ((code==7) || (code==3)){ //IssmDouble
+ 		this->inputs->AddInput(new DoubleInput(name,(int)scalar));
+ 	}
+-	else _error_("%s%i"," could not recognize nature of vector from code ",code);
++	else _error2_("" << " could not recognize nature of vector from code " << code);
+ 
+ }
+ /*}}}*/
+@@ -1721,7 +1721,7 @@
+ 			}
+ 			this->inputs->AddInput(transientinput);
+ 		}
+-		else _error_("nodal vector is either numberofnodes or numberofnodes+1 long. Field provided (%s) is %i long",EnumToStringx(vector_enum),M);
++		else _error2_("nodal vector is either numberofnodes or numberofnodes+1 long. Field provided (" << EnumToStringx(vector_enum) << ") is " << M << " long");
+ 	}
+ 	else if(vector_type==2){ //element vector
+ 		/*Are we in transient or static? */
+@@ -1738,14 +1738,14 @@
+ 			else if (code==7){ //IssmDouble
+ 				this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index]));
+ 			}
+-			else _error_("%s%i"," could not recognize nature of vector from code ",code);
++			else _error2_("" << " could not recognize nature of vector from code " << code);
+ 		}
+ 		else {
+-			_error_("transient elementary inputs not supported yet!");
++			_error2_("transient elementary inputs not supported yet!");
+ 		}
+ 	}
+ 	else{
+-		_error_("Cannot add input for vector type %i (not supported)",vector_type);
++		_error2_("Cannot add input for vector type " << vector_type << " (not supported)");
+ 	}
+ 
+ }
+@@ -2359,12 +2359,12 @@
+ /*FUNCTION Tria::SetClone {{{*/
+ void  Tria::SetClone(int* minranks){
+ 
+-	_error_("not implemented yet");
++	_error2_("not implemented yet");
+ }
+ /*}}}*/
+ /*FUNCTION Tria::SmearFunction {{{*/
+ void  Tria::SmearFunction(Vector*  smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius){
+-	_error_("not implemented yet");
++	_error2_("not implemented yet");
+ 
+ }
+ /*}}}*/
+@@ -2457,7 +2457,7 @@
+ 	this->MaxAbsVx(&maxabsvx,false);
+ 	this->MaxAbsVy(&maxabsvy,false);
+ 	#else
+-		_error_("ISSM was not compiled with responses compiled in, exiting!");
++		_error2_("ISSM was not compiled with responses compiled in, exiting!");
+ 	#endif
+ 
+ 	/* Get node coordinates and dof list: */
+@@ -2650,7 +2650,7 @@
+ 	rho_ice=matpar->GetRhoIce();
+ 
+ 	/*First off, check that this segment belongs to this element: */
+-	if ((int)*(segment+4)!=this->id)_error_("%s%i%s%i","error message: segment with id ",(int)*(segment+4)," does not belong to element with id:",this->id);
++	if ((int)*(segment+4)!=this->id)_error2_("" << "error message: segment with id " << (int)*(segment+4) << " does not belong to element with id:" << this->id);
+ 
+ 	/*Recover segment node locations: */
+ 	x1=*(segment+0); y1=*(segment+1); x2=*(segment+2); y2=*(segment+3);
+@@ -2869,7 +2869,7 @@
+ 			/*Assign output pointers:*/
+ 			*presponse=vel;
+ 		default:  
+-			_error_("Response type %s not supported yet!",EnumToStringx(response_enum));
++			_error2_("Response type " << EnumToStringx(response_enum) << " not supported yet!");
+ 	}
+ 
+ }
+@@ -3324,8 +3324,8 @@
+ 		vy[i]=values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i])) _error_("NaN found in solution vector");
+-		if(isnan(vy[i])) _error_("NaN found in solution vector");
++		if(isnan(vx[i])) _error2_("NaN found in solution vector");
++		if(isnan(vy[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get Vz and compute vel*/
+@@ -3384,8 +3384,8 @@
+ 		vy[i]=values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i])) _error_("NaN found in solution vector");
+-		if(isnan(vy[i])) _error_("NaN found in solution vector");
++		if(isnan(vx[i])) _error2_("NaN found in solution vector");
++		if(isnan(vy[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Now Compute vel*/
+@@ -3440,7 +3440,7 @@
+ 		}
+ 
+ 		if (input->ObjectEnum()!=ControlInputEnum){
+-			_error_("input %s is not a ControlInput",EnumToStringx(control_type[i]));
++			_error2_("input " << EnumToStringx(control_type[i]) << " is not a ControlInput");
+ 		}
+ 
+ 		((ControlInput*)input)->UpdateValue(scalar);
+@@ -3465,8 +3465,8 @@
+ 	else{
+ 		input=inputs->GetInput(enum_type);
+ 	}
+-	if (!input) _error_("Input %s not found",EnumToStringx(enum_type));
+-	if (input->ObjectEnum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type));
++	if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
++	if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
+ 
+ 	GradientIndexing(&doflist1[0],control_index);
+ 	((ControlInput*)input)->GetGradient(gradient,&doflist1[0]);
+@@ -3483,8 +3483,8 @@
+ 	else{
+ 		input=inputs->GetInput(enum_type);
+ 	}
+-	if (!input) _error_("Input %s not found",EnumToStringx(enum_type));
+-	if (input->ObjectEnum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type));
++	if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
++	if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
+ 
+ 	((ControlInput*)input)->ScaleGradient(scale);
+ }/*}}}*/
+@@ -3502,8 +3502,8 @@
+ 	else{
+ 		input=inputs->GetInput(enum_type);
+ 	}
+-	if (!input) _error_("Input %s not found",EnumToStringx(enum_type));
+-	if (input->ObjectEnum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type));
++	if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
++	if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
+ 
+ 	GradientIndexing(&doflist1[0],control_index);
+ 	for(int i=0;i<NUMVERTICES;i++) grad_list[i]=gradient[doflist1[i]];
+@@ -3537,7 +3537,7 @@
+ 			GradjVyBalancedthickness(gradient,control_index);
+ 			break;
+ 		default:
+-			_error_("%s%i","control type not supported yet: ",control_type);
++			_error2_("" << "control type not supported yet: " << control_type);
+ 	}
+ 
+ 	/*Now deal with ∂J/∂alpha*/
+@@ -3565,7 +3565,7 @@
+ 			GradjBGradient(gradient,resp,control_index);
+ 			break;
+ 		default:
+-			_error_("response %s not supported yet",EnumToStringx(responses[resp]));
++			_error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
+ 	}
+ 
+ 	xDelete<int>(responses);
+@@ -4421,7 +4421,7 @@
+ 				for(i=0;i<numdof;i++) pe->values[i]+= - weight*dH[1]*dbasis[1][i]*Jdet*gauss->weight;
+ 				break;
+ 			default:
+-				_error_("response %s not supported yet",EnumToStringx(responses[resp]));
++				_error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
+ 		}
+ 	}
+ 
+@@ -4599,7 +4599,7 @@
+ 					/*Nothing in P vector*/
+ 					break;
+ 				default:
+-					_error_("response %s not supported yet",EnumToStringx(responses[resp]));
++					_error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
+ 			}
+ 		}
+ 	}
+@@ -4776,7 +4776,7 @@
+ 					/*Nothing in P vector*/
+ 					break;
+ 				default:
+-					_error_("response %s not supported yet",EnumToStringx(responses[resp]));
++					_error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
+ 			}
+ 		}
+ 	}
+@@ -4845,7 +4845,7 @@
+ 			Ke=CreateKMatrixBalancethickness_DG();
+ 			break;
+ 		default:
+-			_error_("Element type %s not supported yet",EnumToStringx(GetElementType()));
++			_error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
+ 	}
+ 
+ 	/*Transpose and return Ke*/
+@@ -4946,8 +4946,8 @@
+ 		lambday[i]=values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(lambdax[i])) _error_("NaN found in solution vector");
+-		if(isnan(lambday[i])) _error_("NaN found in solution vector");
++		if(isnan(lambdax[i])) _error2_("NaN found in solution vector");
++		if(isnan(lambday[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Add vx and vy as inputs to the tria element: */
+@@ -4977,7 +4977,7 @@
+ 	/*Ok, we have vx and vy in values, fill in vx and vy arrays: */
+ 	for(i=0;i<numdof;i++){
+ 		lambda[i]=values[i];
+-		if(isnan(lambda[i])) _error_("NaN found in solution vector");
++		if(isnan(lambda[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Add vx and vy as inputs to the tria element: */
+@@ -5009,7 +5009,7 @@
+ 
+ 	/*Check that it is a ControlInput*/
+ 	if (input->ObjectEnum()!=ControlInputEnum){
+-		_error_("input %s is not a ControlInput",EnumToStringx(control_enum));
++		_error2_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
+ 	}
+ 
+ 	((ControlInput*)input)->GetVectorFromInputs(vector,&doflist1[0],data);
+@@ -5043,7 +5043,7 @@
+ 	}
+ 
+ 	if (input->ObjectEnum()!=ControlInputEnum){
+-		_error_("input %s is not a ControlInput",EnumToStringx(control_enum));
++		_error2_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
+ 	}
+ 
+ 	((ControlInput*)input)->SetInput(new_input);
+@@ -5313,7 +5313,7 @@
+ 	/*Use the dof list to index into the solution vector: */
+ 	for(i=0;i<numdof;i++){
+ 		values[i]=solution[doflist[i]];
+-		if(isnan(values[i])) _error_("NaN found in solution vector");
++		if(isnan(values[i])) _error2_("NaN found in solution vector");
+ 		if (values[i]<pow((IssmDouble)10,(IssmDouble)-10))values[i]=pow((IssmDouble)10,(IssmDouble)-10); //correcting the water column to positive values
+  
+ 	}
+@@ -5425,19 +5425,19 @@
+ 			break;
+ 
+ 		default:
+-			_error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
++			_error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
+ 	}
+ 
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVectorDakota(int* vector, int name, int type){
+-	_error_(" not supported yet!");
++	_error2_(" not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type){
+-	_error_(" not supported yet!");
++	_error2_(" not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type);{{{*/
+@@ -5479,7 +5479,7 @@
+ 			break;
+ 
+ 		default:
+-			_error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
++			_error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
+ 	}
+ 
+ }
+@@ -5496,7 +5496,7 @@
+ 		case P1DGEnum:
+ 			return CreateKMatrixBalancethickness_DG();
+ 		default:
+-			_error_("Element type %s not supported yet",EnumToStringx(GetElementType()));
++			_error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
+ 	}
+ 
+ }
+@@ -5675,7 +5675,7 @@
+ 		case P1DGEnum:
+ 			return CreatePVectorBalancethickness_DG();
+ 		default:
+-			_error_("Element type %s not supported yet",EnumToStringx(GetElementType()));
++			_error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.cpp	(revision 12493)
+@@ -948,7 +948,7 @@
+ 
+ 	/*Get Determinant*/
+ 	Matrix3x3Determinant(Jdet,&J[0][0]);
+-	if(*Jdet<0) _error_("negative jacobian determinant!");
++	if(*Jdet<0) _error2_("negative jacobian determinant!");
+ 
+ }
+ /*}}}*/
+@@ -971,7 +971,7 @@
+ 
+ 	/*Jdet = norm( AB ^ AC ) / (2 * area of the reference triangle), with areaRef=sqrt(3) */
+ 	*Jdet=SQRT3/6.0*pow(pow(((y2-y1)*(z3-z1)-(z2-z1)*(y3-y1)),2.0)+pow(((z2-z1)*(x3-x1)-(x2-x1)*(z3-z1)),2.0)+pow(((x2-x1)*(y3-y1)-(y2-y1)*(x3-x1)),2.0),0.5);
+-	if(*Jdet<0) _error_("negative jacobian determinant!");
++	if(*Jdet<0) _error2_("negative jacobian determinant!");
+ }
+ /*}}}*/
+ /*FUNCTION PentaRef::GetSegmentJacobianDeterminant{{{*/
+@@ -989,7 +989,7 @@
+ 	z2=*(xyz_list+3*1+2);
+ 
+ 	*Jdet=1.0/2.0*sqrt(pow(x2-x1,2.) + pow(y2-y1,2.) + pow(z2-z1,2.));
+-	if(*Jdet<0) _error_("negative jacobian determinant!");
++	if(*Jdet<0) _error2_("negative jacobian determinant!");
+ 
+ }
+ /*}}}*/
+@@ -1225,7 +1225,7 @@
+ 	/*Jdet = (Area of the trapezoid)/(Area trapezoid ref) with AreaRef = 4*/
+ 	/*Area of a trabezoid = altitude * (base1 + base2)/2 */
+ 	*Jdet= pow(pow(x2-x1,2.) + pow(y2-y1,2.),0.5) * (z4-z1 + z3-z2)/8;
+-	if(*Jdet<0) _error_("negative jacobian determinant!");
++	if(*Jdet<0) _error2_("negative jacobian determinant!");
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12493)
+@@ -145,7 +145,7 @@
+ /*Other*/
+ /*FUNCTION Penta::AverageOntoPartition {{{*/
+ void  Penta::AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){
+-	_error_("Not supported yet!");
++	_error2_("Not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::BedNormal {{{*/
+@@ -251,8 +251,8 @@
+ 	inputs->GetInputValue(&approximation,ApproximationEnum);
+ 
+ 	/*Check analysis_types*/
+-	if (analysis_type!=DiagnosticHorizAnalysisEnum) _error_("Not supported yet!");
+-	if (approximation!=StokesApproximationEnum) _error_("Not supported yet!");
++	if (analysis_type!=DiagnosticHorizAnalysisEnum) _error2_("Not supported yet!");
++	if (approximation!=StokesApproximationEnum) _error2_("Not supported yet!");
+ 
+ 	/*retrieve some parameters: */
+ 	this->parameters->FindParam(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
+@@ -317,7 +317,7 @@
+ /*FUNCTION Penta::ComputeStrainRate {{{*/
+ void  Penta::ComputeStrainRate(Vector* eps){
+ 
+-	_error_("Not implemented yet");
++	_error2_("Not implemented yet");
+ 
+ }
+ /*}}}*/
+@@ -463,7 +463,7 @@
+ 			break;
+ 		#endif
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global matrix*/
+@@ -568,7 +568,7 @@
+ 			break;
+ 		#endif
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global Vector*/
+@@ -637,7 +637,7 @@
+ 			break;
+ #endif
+ 		default:
+-			_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++			_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ 
+ 	/*Add to global matrix*/
+@@ -815,7 +815,7 @@
+ 		if(node==nodes[i])
+ 		 return i;
+ 	}
+-	_error_("Node provided not found among element nodes");
++	_error2_("Node provided not found among element nodes");
+ 
+ }
+ /*}}}*/
+@@ -828,7 +828,7 @@
+ 
+ 	/*Recover input*/
+ 	Input* input=inputs->GetInput(enumtype);
+-	if (!input) _error_("Input %s not found in element",EnumToStringx(enumtype));
++	if (!input) _error2_("Input " << EnumToStringx(enumtype) << " not found in element");
+ 
+ 	/*Checks in debugging mode*/
+ 	_assert_(pvalue);
+@@ -877,7 +877,7 @@
+ void Penta::GetInputValue(IssmDouble* pvalue,Node* node,int enumtype){
+ 
+ 	Input* input=inputs->GetInput(enumtype);
+-	if(!input) _error_("No input of type %s found in tria",EnumToStringx(enumtype));
++	if(!input) _error2_("No input of type " << EnumToStringx(enumtype) << " found in tria");
+ 
+ 	GaussPenta* gauss=new GaussPenta();
+ 	gauss->GaussVertex(this->GetNodeIndex(node));
+@@ -972,7 +972,7 @@
+ 		break;
+ 	#endif
+ 	default:
+-		_error_("analysis: %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++		_error2_("analysis: " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -1012,7 +1012,7 @@
+ 
+ 	/*Check that both inputs have been found*/
+ 	if (!vx_input || !vy_input){
+-		_error_("Input missing. Here are the input pointers we have for vx: %p, vy: %p\n",vx_input,vy_input);
++		_error2_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << "\n");
+ 	}
+ 
+ 	/*Get strain rate assuming that epsilon has been allocated*/
+@@ -1037,7 +1037,7 @@
+ 
+ 	/*Check that both inputs have been found*/
+ 	if (!vx_input || !vy_input || !vz_input){
+-		_error_("Input missing. Here are the input pointers we have for vx: %p, vy: %p, vz: %p\n",vx_input,vy_input,vz_input);
++		_error2_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << ", vz: " << vz_input << "\n");
+ 	}
+ 
+ 	/*Get strain rate assuming that epsilon has been allocated*/
+@@ -1072,7 +1072,7 @@
+ 
+ 	/*Get input (either in element or material)*/
+ 	Input* input=inputs->GetInput(input_enum);
+-	if(!input) _error_("Input %s not found in element",EnumToStringx(input_enum));
++	if(!input) _error2_("Input " << EnumToStringx(input_enum) << " not found in element");
+ 
+ 	/*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
+ 	input->GetVectorFromInputs(vector,&doflist1[0]);
+@@ -1132,7 +1132,7 @@
+ 
+ 	/*Make a copy of the original input: */
+ 	input=(Input*)this->inputs->GetInput(enum_type);
+-	if(!input)_error_(" could not find old input with enum: %s",EnumToStringx(enum_type));
++	if(!input)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
+ 
+ 	/*ArtificialNoise: */
+ 	input->ArtificialNoise(min,max);
+@@ -1152,8 +1152,8 @@
+ 	for(i=0;i<num_enums/2;i++){
+ 		new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
+ 		old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]);
+-		if(!new_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToStringx(enums[2*i+0]));
+-		if(!old_inputs[i])_error_("%s%s"," could not find input with enum ",EnumToStringx(enums[2*i+0]));
++		if(!new_inputs[i])_error2_("" << " could not find input with enum " << EnumToStringx(enums[2*i+0]));
++		if(!old_inputs[i])_error2_("" << " could not find input with enum " << EnumToStringx(enums[2*i+0]));
+ 	}
+ 
+ 	/*ok, we've got the inputs (new and old), now loop throught the number of criterions and fill the eps array:*/
+@@ -1185,7 +1185,7 @@
+ 	else if ((code==7) || (code==3)){ //IssmDouble
+ 		this->inputs->AddInput(new DoubleInput(name,(IssmDouble)scalar));
+ 	}
+-	else _error_("%s%i"," could not recognize nature of vector from code ",code);
++	else _error2_("" << " could not recognize nature of vector from code " << code);
+ 
+ }
+ /*}}}*/
+@@ -1250,7 +1250,7 @@
+ 			}
+ 			this->inputs->AddInput(transientinput);
+ 		}
+-		else _error_("nodal vector is either numberofnodes (%i), or numberofnodes+1 long. Field provided is %i long. Enum %s",numberofvertices,M,EnumToStringx(vector_enum));
++		else _error2_("nodal vector is either numberofnodes (" << numberofvertices << "), or numberofnodes+1 long. Field provided is " << M << " long. Enum " << EnumToStringx(vector_enum));
+ 	}
+ 	else if(vector_type==2){ //element vector
+ 		/*Are we in transient or static? */
+@@ -1267,14 +1267,14 @@
+ 			else if (code==7){ //IssmDouble
+ 				this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index]));
+ 			}
+-			else _error_("%s%i"," could not recognize nature of vector from code ",code);
++			else _error2_("" << " could not recognize nature of vector from code " << code);
+ 		}
+ 		else {
+-			_error_("transient elementary inputs not supported yet!");
++			_error2_("transient elementary inputs not supported yet!");
+ 		}
+ 	}
+ 	else{
+-		_error_("Cannot add input for vector type %i (not supported)",vector_type);
++		_error2_("Cannot add input for vector type " << vector_type << " (not supported)");
+ 	}
+ 
+ }
+@@ -1313,8 +1313,8 @@
+ 		else if (object_enum==MaterialsEnum)
+ 		 original_input=(Input*)penta->matice->inputs->GetInput(enum_type);
+ 		else
+-		 _error_("object %s not supported yet",EnumToStringx(object_enum));
+-		if(!original_input) _error_("could not find input with enum %s",EnumToStringx(enum_type));
++		 _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
++		if(!original_input) _error2_("could not find input with enum " << EnumToStringx(enum_type));
+ 
+ 		/*If first time, initialize total_integrated_input*/
+ 		if (step==0){
+@@ -1325,7 +1325,7 @@
+ 			else if (original_input->ObjectEnum()==DoubleInputEnum)
+ 			 total_integrated_input=new DoubleInput(average_enum_type,0.0);
+ 			else
+-			 _error_("object %s not supported yet",EnumToStringx(original_input->ObjectEnum()));
++			 _error2_("object " << EnumToStringx(original_input->ObjectEnum()) << " not supported yet");
+ 		}
+ 
+ 		/*Step2: Create element thickness input*/
+@@ -1373,7 +1373,7 @@
+ 	else if (object_enum==MaterialsEnum)
+ 	 this->matice->inputs->AddInput((Input*)depth_averaged_input);
+ 	else
+-	 _error_("object %s not supported yet",EnumToStringx(object_enum));
++	 _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputDuplicate{{{*/
+@@ -1414,10 +1414,10 @@
+ 		}
+ 	}
+ 	else{
+-		_error_("object of type %s not supported yet",EnumToStringx(object_type));
++		_error2_("object of type " << EnumToStringx(object_type) << " not supported yet");
+ 	}
+ 	for(i=0;i<num_inputs;i++){
+-		if(!base_inputs[i]) _error_("could not find input with enum %s in object %s",EnumToStringx(enum_type),EnumToStringx(object_type));
++		if(!base_inputs[i]) _error2_("could not find input with enum " << EnumToStringx(enum_type) << " in object " << EnumToStringx(object_type));
+ 		base_inputs[i]->Extrude();
+ 	}
+ 
+@@ -1444,7 +1444,7 @@
+ 				penta->nodes[i+3]->inputs->AddInput((Input*)copy); //change only the three upper nodes
+ 			}
+ 			else{
+-				_error_("object of type %s not supported yet",EnumToStringx(object_type));
++				_error2_("object of type " << EnumToStringx(object_type) << " not supported yet");
+ 			}
+ 		}
+ 
+@@ -1463,7 +1463,7 @@
+ 
+ 	/*Make a copy of the original input: */
+ 	input=(Input*)this->inputs->GetInput(enum_type);
+-	if(!input)_error_(" could not find old input with enum: %s",EnumToStringx(enum_type));
++	if(!input)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
+ 
+ 	/*Scale: */
+ 	input->Scale(scale_factor);
+@@ -1479,7 +1479,7 @@
+ 	/*Go through all the input objects, and find the one corresponding to enum_type, if it exists: */
+ 	if (enum_type==MaterialsRheologyBbarEnum) input=this->matice->inputs->GetInput(MaterialsRheologyBEnum);
+ 	else input=this->inputs->GetInput(enum_type);
+-	//if (!input) _error_("Input %s not found in penta->inputs",EnumToStringx(enum_type)); why error out? if the requested input does not exist, we should still 
++	//if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found in penta->inputs"); why error out? if the requested input does not exist, we should still 
+ 	//try and output whatever we can instead of just failing.
+ 	if(!input)return;
+ 
+@@ -1593,7 +1593,7 @@
+ 				case MaterialsRheologyBbarEnum:
+ 					/*Matice will take care of it*/ break;
+ 				default:
+-					_error_("Control %s not implemented yet",EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]));
++					_error2_("Control " << EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]) << " not implemented yet");
+ 			}
+ 		}
+ 	}
+@@ -1626,7 +1626,7 @@
+ 			this->inputs->AddInput(new IntInput(ApproximationEnum,NoneApproximationEnum));
+ 		}
+ 		else{
+-			_error_("Approximation type %s not supported yet",EnumToStringx((int)*(iomodel->Data(FlowequationElementEquationEnum)+index)));
++			_error2_("Approximation type " << EnumToStringx((int)*(iomodel->Data(FlowequationElementEquationEnum)+index)) << " not supported yet");
+ 		}
+ 	}
+ 
+@@ -1710,7 +1710,7 @@
+ 		break;
+ 	#endif
+ 	default: 
+-		_error_("analysis %i (%s) not supported yet",analysis_type,EnumToStringx(analysis_type));
++		_error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -1741,7 +1741,7 @@
+ 	this->parameters->FindParam(&minthickness,PrognosticMinThicknessEnum);
+ 	for(i=0;i<numdof2d;i++){
+ 		newthickness[i]=solution[doflist[i]];
+-		if(isnan(newthickness[i])) _error_("NaN found in solution vector");
++		if(isnan(newthickness[i])) _error2_("NaN found in solution vector");
+ 		/*Constrain thickness to be at least 1m*/
+ 		if(newthickness[i]<minthickness) newthickness[i]=minthickness;
+ 		newthickness[i+numdof2d]=newthickness[i];
+@@ -1774,7 +1774,7 @@
+ 				newsurface[i]=oldsurface[i]+(1.0-rho_ice/rho_water)*(newthickness[i]-oldthickness[i]); //surface = oldsurface + (1-di) * dH 
+ 				newbed[i]=oldbed[i]-rho_ice/rho_water*(newthickness[i]-oldthickness[i]); //bed = oldbed + di * dH
+ 			}
+-			else _error_("Hydrostatic adjustment %i (%s) not supported yet",hydroadjustment,EnumToStringx(hydroadjustment));
++			else _error2_("Hydrostatic adjustment " << hydroadjustment << " (" << EnumToStringx(hydroadjustment) << ") not supported yet");
+ 		}
+ 	}
+ 
+@@ -1811,7 +1811,7 @@
+ 	/*Use the dof list to index into the solution vector: */
+ 	for(int i=0;i<numdof;i++){
+ 		values[i]=solution[doflist[i]];
+-		if(isnan(values[i])) _error_("NaN found in solution vector");
++		if(isnan(values[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Add input to the element: */
+@@ -1841,7 +1841,7 @@
+ 	for(int i=0;i<numdof2d;i++){
+ 		values[i]         =solution[doflist[i]];
+ 		values[i+numdof2d]=values[i];
+-		if(isnan(values[i])) _error_("NaN found in solution vector");
++		if(isnan(values[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Start looping over all elements above current element and update all inputs*/
+@@ -1887,18 +1887,18 @@
+ 
+ 		default:
+ 
+-			_error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
++			_error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
+ 	}
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromVector(int* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVector(int* vector, int name, int type){
+-	_error_(" not supported yet!");
++	_error2_(" not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromVector(bool* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVector(bool* vector, int name, int type){
+-	_error_(" not supported yet!");
++	_error2_(" not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::IsOnBed{{{*/
+@@ -2675,7 +2675,7 @@
+ /*FUNCTION Penta::SetClone {{{*/
+ void  Penta::SetClone(int* minranks){
+ 
+-	_error_("not implemented yet");
++	_error2_("not implemented yet");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::SetCurrentConfiguration {{{*/
+@@ -2987,7 +2987,7 @@
+ 				}
+ 				this->inputs->AddInput(new PentaP1Input(EnthalpyEnum,nodeinputs));
+ 			}
+-			else _error_("temperature and waterfraction required for the enthalpy solution");
++			else _error2_("temperature and waterfraction required for the enthalpy solution");
+ 			break;
+ 
+ 		default:
+@@ -3066,7 +3066,7 @@
+ /*}}}*/
+ /*FUNCTION Penta::SmearFunction {{{*/
+ void  Penta::SmearFunction(Vector* smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius){
+-	_error_("not implemented yet");
++	_error2_("not implemented yet");
+ }
+ /*}}}*/
+ 
+@@ -3284,7 +3284,7 @@
+ 			/*Assign output pointers:*/
+ 			*presponse=vel;
+ 		default:  
+-			_error_("Response type %s not supported yet!",EnumToStringx(response_enum));
++			_error2_("Response type " << EnumToStringx(response_enum) << " not supported yet!");
+ 	}
+ 
+ }
+@@ -4327,7 +4327,7 @@
+ 		//if(values[i]<matpar->TMeltingPoint(pressure[i])-50) values[i]=matpar->TMeltingPoint(pressure[i])-50;
+ 
+ 		/*Check solution*/
+-		if(isnan(values[i])) _error_("NaN found in solution vector");
++		if(isnan(values[i])) _error2_("NaN found in solution vector");
+ 		//if(values[i]<0)      printf("temperature < 0°K found in solution vector\n");
+ 		//if(values[i]>275)    printf("temperature > 275°K found in solution vector (Paterson's rheology associated is negative)\n");
+ 	}
+@@ -4361,7 +4361,7 @@
+ 				this->matice->inputs->AddInput(new PentaP1Input(MaterialsRheologyBEnum,B));
+ 				break;
+ 			default:
+-				_error_("Rheology law %s not supported yet",EnumToStringx(rheology_law));
++				_error2_("Rheology law " << EnumToStringx(rheology_law) << " not supported yet");
+ 
+ 		}
+ 	}
+@@ -4397,7 +4397,7 @@
+ 		values[i]=solution[doflist[i]];
+ 
+ 		/*Check solution*/
+-		if(isnan(values[i])) _error_("NaN found in solution vector");
++		if(isnan(values[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get all inputs and parameters*/
+@@ -4410,8 +4410,8 @@
+ 		/*Convert enthalpy into temperature and water fraction*/
+ 		for(i=0;i<numdof;i++){
+ 			matpar->EnthalpyToThermal(&temperatures[i],&waterfraction[i],values[i],pressure[i]);
+-			if(waterfraction[i]<0) _error_("Negative water fraction found in solution vector");
+-			//if(waterfraction[i]>1) _error_("Water fraction >1 found in solution vector");
++			if(waterfraction[i]<0) _error2_("Negative water fraction found in solution vector");
++			//if(waterfraction[i]>1) _error2_("Water fraction >1 found in solution vector");
+ 		}
+ 			
+ 		this->inputs->AddInput(new PentaP1Input(EnthalpyEnum,values));
+@@ -4439,7 +4439,7 @@
+ 				this->matice->inputs->AddInput(new PentaP1Input(MaterialsRheologyBEnum,B));
+ 				break;
+ 			default:
+-				_error_("Rheology law %s not supported yet",EnumToStringx(rheology_law));
++				_error2_("Rheology law " << EnumToStringx(rheology_law) << " not supported yet");
+ 
+ 		}
+ 	}
+@@ -4467,8 +4467,8 @@
+ 	else{
+ 		input=inputs->GetInput(enum_type);
+ 	}
+-	if (!input) _error_("Input %s not found",EnumToStringx(enum_type));
+-	if (input->ObjectEnum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type));
++	if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
++	if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
+ 
+ 	GradientIndexing(&doflist1[0],control_index);
+ 	((ControlInput*)input)->GetGradient(gradient,&doflist1[0]);
+@@ -4485,8 +4485,8 @@
+ 	else{
+ 		input=inputs->GetInput(enum_type);
+ 	}
+-	if (!input) _error_("Input %s not found",EnumToStringx(enum_type));
+-	if (input->ObjectEnum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type));
++	if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
++	if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
+ 
+ 	((ControlInput*)input)->ScaleGradient(scale);
+ }/*}}}*/
+@@ -4504,8 +4504,8 @@
+ 	else{
+ 		input=inputs->GetInput(enum_type);
+ 	}
+-	if (!input) _error_("Input %s not found",EnumToStringx(enum_type));
+-	if (input->ObjectEnum()!=ControlInputEnum) _error_("Input %s is not a ControlInput",EnumToStringx(enum_type));
++	if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
++	if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
+ 
+ 	GradientIndexing(&doflist1[0],control_index);
+ 	for(int i=0;i<NUMVERTICES;i++) grad_list[i]=gradient[doflist1[i]];
+@@ -4529,7 +4529,7 @@
+ 		case NoneApproximationEnum:
+ 			return NULL;
+ 		default:
+-			_error_("Approximation %s not supported yet",EnumToStringx(approximation));
++			_error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -4719,7 +4719,7 @@
+ 		case StokesApproximationEnum:
+ 			return CreatePVectorAdjointStokes();
+ 		default:
+-			_error_("Approximation %s not supported yet",EnumToStringx(approximation));
++			_error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -4808,7 +4808,7 @@
+ 					/*Gradient is 0*/
+ 					break;
+ 				default:
+-					_error_("approximation %s not supported yet",EnumToStringx(approximation));
++					_error2_("approximation " << EnumToStringx(approximation) << " not supported yet");
+ 			}
+ 			break;
+ 
+@@ -4828,12 +4828,12 @@
+ 					/*Gradient is 0*/
+ 					break;
+ 				default:
+-					_error_("approximation %s not supported yet",EnumToStringx(approximation));
++					_error2_("approximation " << EnumToStringx(approximation) << " not supported yet");
+ 			}
+ 			break;
+ 
+ 		default:
+-			_error_("control type %s not supported yet: ",EnumToStringx(control_type));
++			_error2_("control type " << EnumToStringx(control_type) << " not supported yet: ");
+ 	}
+ 
+ 	/*Now deal with ∂J/∂alpha*/
+@@ -4865,7 +4865,7 @@
+ 			delete tria->matice; delete tria;
+ 			break;
+ 		default:
+-			_error_("response %s not supported yet",EnumToStringx(responses[resp]));
++			_error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
+ 	}
+ 	xDelete<int>(responses);
+ }
+@@ -5119,7 +5119,7 @@
+ 			input=(Input*)this->inputs->GetInput(control_type[i]); _assert_(input);
+ 		}
+ 
+-		if (input->ObjectEnum()!=ControlInputEnum) _error_("input %s is not a ControlInput",EnumToStringx(control_type[i]));
++		if (input->ObjectEnum()!=ControlInputEnum) _error2_("input " << EnumToStringx(control_type[i]) << " is not a ControlInput");
+ 
+ 		((ControlInput*)input)->UpdateValue(scalar);
+ 		((ControlInput*)input)->Constrain();
+@@ -5162,10 +5162,10 @@
+ 		lambdap[i]=values[i*NDOF4+3];
+ 
+ 		/*Check solution*/
+-		if(isnan(lambdax[i])) _error_("NaN found in solution vector");
+-		if(isnan(lambday[i])) _error_("NaN found in solution vector");
+-		if(isnan(lambdaz[i])) _error_("NaN found in solution vector");
+-		if(isnan(lambdap[i])) _error_("NaN found in solution vector");
++		if(isnan(lambdax[i])) _error2_("NaN found in solution vector");
++		if(isnan(lambday[i])) _error2_("NaN found in solution vector");
++		if(isnan(lambdaz[i])) _error2_("NaN found in solution vector");
++		if(isnan(lambdap[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Add vx and vy as inputs to the tria element: */
+@@ -5201,8 +5201,8 @@
+ 		lambday[i]=values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(lambdax[i]))       _error_("NaN found in solution vector");
+-		if(isnan(lambday[i]))       _error_("NaN found in solution vector");
++		if(isnan(lambdax[i]))       _error2_("NaN found in solution vector");
++		if(isnan(lambday[i]))       _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Add vx and vy as inputs to the tria element: */
+@@ -5403,7 +5403,7 @@
+ /*FUNCTION Penta::ThicknessAbsGradient{{{*/
+ IssmDouble Penta::ThicknessAbsGradient(bool process_units,int weight_index){
+ 
+-	_error_("Not implemented yet");
++	_error2_("Not implemented yet");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::ThicknessAbsMisfit {{{*/
+@@ -5418,7 +5418,7 @@
+ 
+ 	/*If on water, return 0: */
+ 	if(IsOnWater())return 0;
+-	_error_("Not implemented yet");
++	_error2_("Not implemented yet");
+ 
+ 	tria=(Tria*)SpawnTria(0,1,2);
+ 	J=tria->ThicknessAbsMisfit(process_units,weight_index);
+@@ -5469,11 +5469,11 @@
+ 
+ 	/*Get input (either in element or material)*/
+ 	Input* input=inputs->GetInput(control_enum);
+-	if(!input) _error_("Input %s not found in element",EnumToStringx(control_enum));
++	if(!input) _error2_("Input " << EnumToStringx(control_enum) << " not found in element");
+ 
+ 	/*Check that it is a ControlInput*/
+ 	if (input->ObjectEnum()!=ControlInputEnum){
+-		_error_("input %s is not a ControlInput",EnumToStringx(control_enum));
++		_error2_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
+ 	}
+ 
+ 	((ControlInput*)input)->GetVectorFromInputs(vector,&doflist1[0],data);
+@@ -5508,7 +5508,7 @@
+ 	}
+ 
+ 	if (input->ObjectEnum()!=ControlInputEnum){
+-		_error_("input %s is not a ControlInput",EnumToStringx(control_enum));
++		_error2_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
+ 	}
+ 
+ 	((ControlInput*)input)->SetInput(new_input);
+@@ -5614,19 +5614,19 @@
+ 			break;
+ 
+ 		default:
+-			_error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
++			_error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
+ 	}
+ 
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVectorDakota(int* vector, int name, int type){
+-	_error_(" not supported yet!");
++	_error2_(" not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type){
+-	_error_(" not supported yet!");
++	_error2_(" not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type);{{{*/
+@@ -5669,7 +5669,7 @@
+ 			break;
+ 
+ 		default:
+-			_error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
++			_error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
+ 	}
+ 
+ }
+@@ -6228,7 +6228,7 @@
+ 		case PattynStokesApproximationEnum:
+ 			return CreateKMatrixDiagnosticPattynStokes();
+ 		default:
+-			_error_("Approximation %s not supported yet",EnumToStringx(approximation));
++			_error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -6396,7 +6396,7 @@
+ 			this->GetStrainRate3d(&epsilons[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input);
+ 			matice->GetViscosity3dStokes(&newviscosity,&epsilons[0]);
+ 		}
+-		else _error_("approximation %i (%s) not supported yet",approximation,EnumToStringx(approximation));
++		else _error2_("approximation " << approximation << " (" << EnumToStringx(approximation) << ") not supported yet");
+ 
+ 		D_scalar=2*newviscosity*gauss->weight*Jdet;
+ 		for (i=0;i<3;i++) D[i][i]=D_scalar;
+@@ -7219,7 +7219,7 @@
+ 		case PattynStokesApproximationEnum:
+ 			return CreatePVectorDiagnosticPattynStokes();
+ 		default:
+-			_error_("Approximation %s not supported yet",EnumToStringx(approximation));
++			_error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -7732,7 +7732,7 @@
+ 		case NoneApproximationEnum:
+ 			return NULL;
+ 		default:
+-			_error_("Approximation %s not supported yet",EnumToStringx(approximation));
++			_error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
+ 	}
+ }
+ /*}}}*/
+@@ -8127,8 +8127,8 @@
+ 		vy[i+3]=vy[i];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i])) _error_("NaN found in solution vector");
+-		if(isnan(vy[i])) _error_("NaN found in solution vector");
++		if(isnan(vx[i])) _error2_("NaN found in solution vector");
++		if(isnan(vy[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get parameters fro pressure computation*/
+@@ -8225,8 +8225,8 @@
+ 		vy[i]=macayeal_values[i*NDOF2+1]+pattyn_values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i])) _error_("NaN found in solution vector");
+-		if(isnan(vy[i])) _error_("NaN found in solution vector");
++		if(isnan(vx[i])) _error2_("NaN found in solution vector");
++		if(isnan(vy[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Now Compute vel*/
+@@ -8313,22 +8313,22 @@
+ 		pressure[i]=stokes_values[i*NDOF4+3]*stokesreconditioning;
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i]))       _error_("NaN found in solution vector");
+-		if(isnan(vy[i]))       _error_("NaN found in solution vector");
+-		if(isnan(vzstokes[i])) _error_("NaN found in solution vector");
+-		if(isnan(pressure[i])) _error_("NaN found in solution vector");
++		if(isnan(vx[i]))       _error2_("NaN found in solution vector");
++		if(isnan(vy[i]))       _error2_("NaN found in solution vector");
++		if(isnan(vzstokes[i])) _error2_("NaN found in solution vector");
++		if(isnan(pressure[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get Vz*/
+ 	Input* vzmacayeal_input=inputs->GetInput(VzMacAyealEnum);
+ 	if (vzmacayeal_input){
+ 		if (vzmacayeal_input->ObjectEnum()!=PentaP1InputEnum){
+-			_error_("Cannot compute Vel as VzMacAyeal is of type %s",EnumToStringx(vzmacayeal_input->ObjectEnum()));
++			_error2_("Cannot compute Vel as VzMacAyeal is of type " << EnumToStringx(vzmacayeal_input->ObjectEnum()));
+ 		}
+ 		GetInputListOnVertices(&vzmacayeal[0],VzMacAyealEnum);
+ 	}
+ 	else{
+-		_error_("Cannot update solution as VzMacAyeal is not present");
++		_error2_("Cannot update solution as VzMacAyeal is not present");
+ 	}
+ 
+ 	/*Now Compute vel*/
+@@ -8392,8 +8392,8 @@
+ 		vy[i]=values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i])) _error_("NaN found in solution vector");
+-		if(isnan(vy[i])) _error_("NaN found in solution vector");
++		if(isnan(vx[i])) _error2_("NaN found in solution vector");
++		if(isnan(vy[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get Vz*/
+@@ -8481,22 +8481,22 @@
+ 		pressure[i]=stokes_values[i*NDOF4+3]*stokesreconditioning;
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i]))       _error_("NaN found in solution vector");
+-		if(isnan(vy[i]))       _error_("NaN found in solution vector");
+-		if(isnan(vzstokes[i])) _error_("NaN found in solution vector");
+-		if(isnan(pressure[i])) _error_("NaN found in solution vector");
++		if(isnan(vx[i]))       _error2_("NaN found in solution vector");
++		if(isnan(vy[i]))       _error2_("NaN found in solution vector");
++		if(isnan(vzstokes[i])) _error2_("NaN found in solution vector");
++		if(isnan(pressure[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get Vz*/
+ 	Input* vzpattyn_input=inputs->GetInput(VzPattynEnum);
+ 	if (vzpattyn_input){
+ 		if (vzpattyn_input->ObjectEnum()!=PentaP1InputEnum){
+-			_error_("Cannot compute Vel as VzPattyn is of type %s",EnumToStringx(vzpattyn_input->ObjectEnum()));
++			_error2_("Cannot compute Vel as VzPattyn is of type " << EnumToStringx(vzpattyn_input->ObjectEnum()));
+ 		}
+ 		GetInputListOnVertices(&vzpattyn[0],VzPattynEnum);
+ 	}
+ 	else{
+-		_error_("Cannot update solution as VzPattyn is not present");
++		_error2_("Cannot update solution as VzPattyn is not present");
+ 	}
+ 
+ 	/*Now Compute vel*/
+@@ -8557,8 +8557,8 @@
+ 		vy[i]=values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i])) _error_("NaN found in solution vector");
+-		if(isnan(vy[i])) _error_("NaN found in solution vector");
++		if(isnan(vx[i])) _error2_("NaN found in solution vector");
++		if(isnan(vy[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Now Compute vel*/
+@@ -8626,7 +8626,7 @@
+ 		vz[i]=values[i*NDOF1+0];
+ 
+ 		/*Check solution*/
+-		if(isnan(vz[i])) _error_("NaN found in solution vector");
++		if(isnan(vz[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get Vx and Vy*/
+@@ -8637,10 +8637,10 @@
+ 	if(approximation==PattynStokesApproximationEnum){
+ 		Input* vzstokes_input=inputs->GetInput(VzStokesEnum);
+ 		if (vzstokes_input){
+-			if (vzstokes_input->ObjectEnum()!=PentaP1InputEnum) _error_("Cannot compute Vel as VzStokes is of type %s",EnumToStringx(vzstokes_input->ObjectEnum()));
++			if (vzstokes_input->ObjectEnum()!=PentaP1InputEnum) _error2_("Cannot compute Vel as VzStokes is of type " << EnumToStringx(vzstokes_input->ObjectEnum()));
+ 			GetInputListOnVertices(&vzstokes[0],VzStokesEnum);
+ 		}
+-		else _error_("Cannot compute Vz as VzStokes in not present in PattynStokes element");
++		else _error2_("Cannot compute Vz as VzStokes in not present in PattynStokes element");
+ 		for(i=0;i<NUMVERTICES;i++){
+ 			vzpattyn[i]=vz[i];
+ 			vz[i]=vzpattyn[i]+vzstokes[i];
+@@ -8649,10 +8649,10 @@
+ 	else if(approximation==MacAyealStokesApproximationEnum){
+ 		Input* vzstokes_input=inputs->GetInput(VzStokesEnum);
+ 		if (vzstokes_input){
+-			if (vzstokes_input->ObjectEnum()!=PentaP1InputEnum) _error_("Cannot compute Vel as VzStokes is of type %s",EnumToStringx(vzstokes_input->ObjectEnum()));
++			if (vzstokes_input->ObjectEnum()!=PentaP1InputEnum) _error2_("Cannot compute Vel as VzStokes is of type " << EnumToStringx(vzstokes_input->ObjectEnum()));
+ 			GetInputListOnVertices(&vzstokes[0],VzStokesEnum);
+ 		}
+-		else _error_("Cannot compute Vz as VzStokes in not present in MacAyealStokes element");
++		else _error2_("Cannot compute Vz as VzStokes in not present in MacAyealStokes element");
+ 		for(i=0;i<NUMVERTICES;i++){
+ 			vzmacayeal[i]=vz[i];
+ 			vz[i]=vzmacayeal[i]+vzstokes[i];
+@@ -8724,10 +8724,10 @@
+ 		pressure[i]=values[i*NDOF4+3];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i]))       _error_("NaN found in solution vector");
+-		if(isnan(vy[i]))       _error_("NaN found in solution vector");
+-		if(isnan(vz[i]))       _error_("NaN found in solution vector");
+-		if(isnan(pressure[i])) _error_("NaN found in solution vector");
++		if(isnan(vx[i]))       _error2_("NaN found in solution vector");
++		if(isnan(vy[i]))       _error2_("NaN found in solution vector");
++		if(isnan(vz[i]))       _error2_("NaN found in solution vector");
++		if(isnan(pressure[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Recondition pressure and compute vel: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/TriaRef.cpp	(revision 12493)
+@@ -337,7 +337,7 @@
+ 	y2=*(xyz_list+3*1+1);
+ 
+ 	*Jdet=1.0/2.0*sqrt(pow(x2-x1,2.) + pow(y2-y1,2.));
+-	if(*Jdet<0) _error_("negative jacobian determinant!");
++	if(*Jdet<0) _error2_("negative jacobian determinant!");
+ 
+ }
+ /*}}}*/
+@@ -352,7 +352,7 @@
+ 
+ 	/*Get Determinant*/
+ 	Matrix2x2Determinant(Jdet,&J[0][0]);
+-	if(*Jdet<0) _error_("negative jacobian determinant!");
++	if(*Jdet<0) _error2_("negative jacobian determinant!");
+ 
+ }
+ /*}}}*/
+@@ -374,7 +374,7 @@
+ 	z3=*(xyz_list+3*2+2);
+ 
+ 	*Jdet=SQRT3/6.0*pow(pow(((y2-y1)*(z3-z1)-(z2-z1)*(y3-y1)),2.0)+pow(((z2-z1)*(x3-x1)-(x2-x1)*(z3-z1)),2.0)+pow(((x2-x1)*(y3-y1)-(y2-y1)*(x3-x1)),2.0),0.5);
+-	if(*Jdet<0) _error_("negative jacobian determinant!");
++	if(*Jdet<0) _error2_("negative jacobian determinant!");
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12493)
+@@ -184,7 +184,7 @@
+ 		if(this->objects[i]==NULL){
+ 			this->objects[i]=(Object*)dataset->GetObjectById(this->offsets+i,this->ids[i]); //remember the offset for later on.
+ 			/*check the id is correct!: */
+-			if (this->objects[i]->Id()!=this->ids[i]) _error_("%s%i%s%i%s"," wrong id: ",this->objects[i]->Id()," vs ",this->ids[i],"  in resolved pointer!");
++			if (this->objects[i]->Id()!=this->ids[i]) _error2_("" << " wrong id: " << this->objects[i]->Id() << " vs " << this->ids[i] << "  in resolved pointer!");
+ 		}
+ 	}
+ }
+@@ -193,10 +193,10 @@
+ Object* Hook::delivers(void){
+ 	
+ 	/*first, check that we only have one T object in our object list: */
+-	if (this->num!=1) _error_("%s%i%s\n"," trying to delivery a single hook object when hook holds ",this->num," objects");
++	if (this->num!=1) _error2_("" << " trying to delivery a single hook object when hook holds " << this->num << " objects" << "\n");
+ 
+ 	/*check NULL: */
+-	if (this->objects==NULL) _error_("hook is not pointing to any object, objects pointer is NULL");
++	if (this->objects==NULL) _error2_("hook is not pointing to any object, objects pointer is NULL");
+ 
+ 	return *objects;
+ }
+@@ -245,11 +245,11 @@
+ 	}
+ 
+ 	/*Else, check that we are requesting a half of num*/
+-	if (numindices>this->num) _error_("Cannot spawn hook with %i objects from a Hook of %i objects",numindices,this->num);
++	if (numindices>this->num) _error2_("Cannot spawn hook with " << numindices << " objects from a Hook of " << this->num << " objects");
+ 
+ 	/*go pickup the correct objects, ids and offsets :*/
+ 	output->num=numindices;
+-	if(output->num<1) _error_("Trying to spawn an empty ElementProperties!");
++	if(output->num<1) _error2_("Trying to spawn an empty ElementProperties!");
+ 
+ 	output->objects=xNew<Object*>(output->num);
+ 	output->ids=xNew<int>(output->num);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12493)
+@@ -47,7 +47,7 @@
+ 			maxvalues  =new PentaP1Input(enum_type,pmax);
+ 			break;
+ 		default:
+-			_error_("Input of Enum %s not supported yet by ControlInput",EnumToStringx(enum_input));
++			_error2_("Input of Enum " << EnumToStringx(enum_input) << " not supported yet by ControlInput");
+ 	}
+ 	gradient   =NULL;
+ }
+@@ -151,7 +151,7 @@
+ }/*}}}*/
+ /*FUNCTION ControlInput::ScaleGradient{{{*/
+ void ControlInput::ScaleGradient(IssmPDouble scaling_factor){
+-	if(!gradient) _error_("Gradient of ControlInput %s not found",EnumToStringx(enum_type));
++	if(!gradient) _error2_("Gradient of ControlInput " << EnumToStringx(enum_type) << " not found");
+ 	gradient->Scale(scaling_factor);
+ }/*}}}*/
+ /*FUNCTION ControlInput::SetGradient{{{*/
+@@ -169,7 +169,7 @@
+ 			gradient_in->ChangeEnum(Gradient3Enum);
+ 			break;
+ 		default:
+-			_error_("more than 3 controls not implemented yet (Gradient %i was requested). EnumDefinitions.h needs to be updated.",this->control_id);
++			_error2_("more than 3 controls not implemented yet (Gradient " << this->control_id << " was requested). EnumDefinitions.h needs to be updated.");
+ 	}
+ 
+ 	/*Delete old gradient and assign new gradient*/
+@@ -220,7 +220,7 @@
+ 		 gradient->GetVectorFromInputs(vector,doflist);
+ 	 }
+ 	 else{
+-		 _error_("Data %s not supported yet",data);
++		 _error2_("Data " << data << " not supported yet");
+ 	 }
+ }/*}}}*/
+ /*FUNCTION ControlInput::GetInputAverage(IssmPDouble* pvalue){{{*/
+@@ -257,15 +257,15 @@
+ }/*}}}*/
+ /*FUNCTION ControlInput::SaveValue{{{*/
+ void ControlInput::SaveValue(void){
+-	if(!values) _error_("Values of %s not found",EnumToStringx(this->enum_type));
++	if(!values) _error2_("Values of " << EnumToStringx(this->enum_type) << " not found");
+ 
+ 	if(savedvalues) delete this->savedvalues;
+ 	this->savedvalues=(Input*)this->values->copy();
+ }/*}}}*/
+ /*FUNCTION ControlInput::UpdateValue{{{*/
+ void ControlInput::UpdateValue(IssmPDouble scalar){
+-	if(!gradient)    _error_("Gradient of %s not found",EnumToStringx(this->enum_type));
+-	if(!savedvalues) _error_("Values of %s not found",EnumToStringx(this->enum_type));
++	if(!gradient)    _error2_("Gradient of " << EnumToStringx(this->enum_type) << " not found");
++	if(!savedvalues) _error2_("Values of " << EnumToStringx(this->enum_type) << " not found");
+ 
+ 	if(values) delete this->values;
+ 	this->values=(Input*)this->savedvalues->copy();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp	(revision 12493)
+@@ -114,7 +114,7 @@
+ void DatasetInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,int index){
+ 
+ 	/*Get requested input within dataset*/
+-	if(index<0 || index > inputs->Size()-1) _error_("index requested (%i) exceeds dataset size (%i)",index,inputs->Size());
++	if(index<0 || index > inputs->Size()-1) _error2_("index requested (" << index << ") exceeds dataset size (" << inputs->Size() << ")");
+ 	Input* input=(Input*)this->inputs->GetObjectByOffset(index);
+ 	
+ 	input->GetInputValue(pvalue,gauss);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12493)
+@@ -98,14 +98,14 @@
+ /*FUNCTION IntInput::SpawnResult{{{*/
+ ElementResult* IntInput::SpawnResult(int step, IssmPDouble time){
+ 	
+-	_error_(" not supported yet!");
++	_error2_(" not supported yet!");
+ 
+ }
+ /*}}}*/
+ 
+ /*Object functions*/
+ /*FUNCTION IntInput::GetInputValue(bool* pvalue) {{{*/
+-void IntInput::GetInputValue(bool* pvalue){_error_(" not supported yet!");}
++void IntInput::GetInputValue(bool* pvalue){_error2_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION IntInput::GetInputValue(int* pvalue){{{*/
+ void IntInput::GetInputValue(int* pvalue){
+@@ -114,20 +114,20 @@
+ /*}}}*/
+ /*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue){{{*/
+ void IntInput::GetInputValue(IssmPDouble* pvalue){
+-	_error_("IntInput cannot return a IssmPDouble in parallel");
++	_error2_("IntInput cannot return a IssmPDouble in parallel");
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
+-void IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error_(" not supported yet!");}
++void IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
+-void IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error_(" not supported yet!");}
++void IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
++void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
++void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION IntInput::ChangeEnum{{{*/
+ void IntInput::ChangeEnum(int newenumtype){
+@@ -165,7 +165,7 @@
+ 			return;
+ 
+ 		default:
+-			_error_("not implemented yet");
++			_error2_("not implemented yet");
+ 	}
+ 
+ }
+@@ -181,14 +181,14 @@
+ /*FUNCTION IntInput::GetVectorFromInputs{{{*/
+ void IntInput::GetVectorFromInputs(Vector* vector,int* doflist){
+ 
+-	_error_(" not supporte yet!");
++	_error2_(" not supporte yet!");
+ 
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::GetValuesPtr{{{*/
+ void IntInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
+ 
+-	_error_(" not supported yet!");
++	_error2_(" not supported yet!");
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12493)
+@@ -111,22 +111,22 @@
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::GetInputValue(int* pvalue){{{*/
+-void BoolInput::GetInputValue(int* pvalue){_error_(" not supported yet!");}
++void BoolInput::GetInputValue(int* pvalue){_error2_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue){{{*/
+-void BoolInput::GetInputValue(IssmPDouble* pvalue){_error_(" not supported yet!");}
++void BoolInput::GetInputValue(IssmPDouble* pvalue){_error2_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
+-void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error_(" not supported yet!");}
++void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
+-void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error_(" not supported yet!");}
++void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
++void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
++void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::ChangeEnum{{{*/
+ void BoolInput::ChangeEnum(int newenumtype){
+@@ -160,7 +160,7 @@
+ 			return;
+ 
+ 		default:
+-			_error_("not implemented yet");
++			_error2_("not implemented yet");
+ 	}
+ 
+ }
+@@ -183,14 +183,14 @@
+ /*FUNCTION BoolInput::GetVectorFromInputs{{{*/
+ void BoolInput::GetVectorFromInputs(Vector* vector,int* doflist){
+ 
+-	_error_(" not supporte yet!");
++	_error2_(" not supporte yet!");
+ 
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::GetValuesPtr{{{*/
+ void BoolInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
+ 
+-	_error_(" not supported yet!");
++	_error2_(" not supported yet!");
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12493)
+@@ -322,7 +322,7 @@
+ 			return;
+ 
+ 		default :
+-			_error_("not implemented yet");
++			_error2_("not implemented yet");
+ 	}
+ 
+ }
+@@ -367,7 +367,7 @@
+ 	IssmPDouble            minvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+-	if (inputB->ObjectEnum()!=TriaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
++	if (inputB->ObjectEnum()!=TriaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
+ 	xinputB=(TriaP1Input*)inputB;
+ 
+ 	/*Create point wise min*/
+@@ -398,7 +398,7 @@
+ 	IssmPDouble            maxvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+-	if (inputB->ObjectEnum()!=TriaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
++	if (inputB->ObjectEnum()!=TriaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
+ 	xinputB=(TriaP1Input*)inputB;
+ 
+ 	/*Create point wise max*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12493)
+@@ -445,7 +445,7 @@
+ 			}
+ 		}
+ 	}
+-	if(!found)_error_("did not find time interval on which to interpolate forcing values!");
++	if(!found)_error2_("did not find time interval on which to interpolate forcing values!");
+ 
+ 	/*Assign output pointer*/
+ 	return input;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12493)
+@@ -454,12 +454,12 @@
+ 			return;
+ 		case ControlInputEnum:{
+ 			ControlInput* cont_input=(ControlInput*)xinput;
+-			if(cont_input->values->ObjectEnum()!=PentaP1InputEnum) _error_("not supported yet");
++			if(cont_input->values->ObjectEnum()!=PentaP1InputEnum) _error2_("not supported yet");
+ 			PentaP1Input* cast_input=(PentaP1Input*)cont_input->values;
+ 			for(i=0;i<numnodes;i++)this->values[i]=this->values[i]+scalar*(cast_input->values[i]);}
+ 			return;
+ 		default:
+-			_error_("not implemented yet");
++			_error2_("not implemented yet");
+ 	}
+ 
+ }
+@@ -494,7 +494,7 @@
+ 	IssmPDouble    *thickness_values = NULL;
+ 
+ 	/*Check that input provided is a thickness*/
+-	if (thickness_input->InstanceEnum()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is %s)",EnumToStringx(thickness_input->InstanceEnum()));
++	if (thickness_input->InstanceEnum()!=ThicknessEnum) _error2_("Input provided is not a Thickness (enum_type is " << EnumToStringx(thickness_input->InstanceEnum()) << ")");
+ 
+ 	/*Get Thickness value pointer*/
+ 	thickness_input->GetValuesPtr(&thickness_values,&num_thickness_values);
+@@ -510,7 +510,7 @@
+ 			return;
+ 
+ 		default:
+-			_error_("not implemented yet");
++			_error2_("not implemented yet");
+ 	}
+ }
+ /*}}}*/
+@@ -528,7 +528,7 @@
+ 	IssmPDouble            AdotBvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+-	if (inputB->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
++	if (inputB->ObjectEnum()!=PentaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
+ 	xinputB=(PentaP1Input*)inputB;
+ 
+ 	/*Create point wise sum*/
+@@ -559,7 +559,7 @@
+ 	IssmPDouble            minvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+-	if (inputB->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
++	if (inputB->ObjectEnum()!=PentaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
+ 	xinputB=(PentaP1Input*)inputB;
+ 
+ 	/*Create point wise min*/
+@@ -590,7 +590,7 @@
+ 	IssmPDouble            maxvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+-	if (inputB->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputB is of type %s",EnumToStringx(inputB->ObjectEnum()));
++	if (inputB->ObjectEnum()!=PentaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
+ 	xinputB=(PentaP1Input*)inputB;
+ 
+ 	/*Create point wise max*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12493)
+@@ -107,13 +107,13 @@
+ /*Object functions*/
+ /*FUNCTION DoubleInput::GetInputValue(bool* pvalue) {{{*/
+ void DoubleInput::GetInputValue(bool* pvalue){
+-	_error_("Double input of enum %s cannot return a boolean",EnumToStringx(enum_type));
++	_error2_("Double input of enum " << EnumToStringx(enum_type) << " cannot return a boolean");
+ 
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetInputValue(int* pvalue){{{*/
+ void DoubleInput::GetInputValue(int* pvalue){
+-	_error_("Double input of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));
++	_error2_("Double input of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");
+ 
+ }
+ /*}}}*/
+@@ -131,10 +131,10 @@
+ void DoubleInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){*pvalue=this->value;}
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error_(" not supported yet!");}
++void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_(" not supported yet!");}
++void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_(" not supported yet!");}
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+ void DoubleInput::GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){
+@@ -216,7 +216,7 @@
+ 			return;
+ 
+ 		default:
+-			_error_("not implemented yet");
++			_error2_("not implemented yet");
+ 	}
+ 
+ }
+@@ -252,14 +252,14 @@
+ /*FUNCTION DoubleInput::GetVectorFromInputs{{{*/
+ void DoubleInput::GetVectorFromInputs(Vector* vector,int* doflist){
+ 
+-	_error_(" not supporte yet!");
++	_error2_(" not supporte yet!");
+ 
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetValuesPtr{{{*/
+ void DoubleInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
+ 
+-	_error_(" not supported yet!");
++	_error2_(" not supported yet!");
+ 
+ }
+ /*}}}*/
+@@ -275,7 +275,7 @@
+ 	IssmPDouble thickness_value;
+ 
+ 	/*Check that input provided is a thickness*/
+-	if (thickness_input->InstanceEnum()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is %s)",EnumToStringx(thickness_input->InstanceEnum()));
++	if (thickness_input->InstanceEnum()!=ThicknessEnum) _error2_("Input provided is not a Thickness (enum_type is " << EnumToStringx(thickness_input->InstanceEnum()) << ")");
+ 
+ 	/*vertically integrate depending on type:*/
+ 	switch(thickness_input->ObjectEnum()){
+@@ -286,7 +286,7 @@
+ 			return;
+ 
+ 		default:
+-			_error_("not implemented yet");
++			_error2_("not implemented yet");
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp	(revision 12493)
+@@ -38,7 +38,7 @@
+ 	if(options->GetOption("range"))  options->Get(&this->range,"range");
+ 
+ 	/*Checks*/
+-	if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
++	if(nugget==sill) _error2_("nugget and sill cannot be equal (constant semivariogram not allowed)");
+ }
+ /*}}}*/
+ /*FUNCTION ExponentialVariogram::~ExponentialVariogram(){{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12493)
+@@ -38,7 +38,7 @@
+ 	if(options->GetOption("range"))  options->Get(&this->range,"range");
+ 
+ 	/*Checks*/
+-	if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
++	if(nugget==sill) _error2_("nugget and sill cannot be equal (constant semivariogram not allowed)");
+ }
+ /*}}}*/
+ /*FUNCTION GaussianVariogram::~GaussianVariogram(){{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp	(revision 12493)
+@@ -38,7 +38,7 @@
+ 	if(options->GetOption("range"))  options->Get(&this->range,"range");
+ 
+ 	/*Checks*/
+-	if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
++	if(nugget==sill) _error2_("nugget and sill cannot be equal (constant semivariogram not allowed)");
+ }
+ /*}}}*/
+ /*FUNCTION SphericalVariogram::~SphericalVariogram(){{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp	(revision 12493)
+@@ -38,8 +38,8 @@
+ 	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");
++	if(power<=0 || power>=2) _error2_("power must be betwwen 0 and 2 (0 < power < 2)");
++	if(slope<=0) _error2_("slope must be positive");
+ }
+ /*}}}*/
+ /*FUNCTION PowerVariogram::~PowerVariogram(){{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12493)
+@@ -1,4 +1,5 @@
+ #include "../objects.h"
++
+ /*DOCUMENTATION What is a Quadtree? {{{
+  * A Quadtree is a very simple way to group vertices according
+  * to their locations. A square that holds all the points of the mesh
+@@ -81,7 +82,7 @@
+ 	/*Constructors/Destructors*/
+ /*FUNCTION Quadtree::Quadtree(){{{*/
+ Quadtree::Quadtree(){
+-	_error_("Constructor not supported");
++	_error2_("Constructor not supported");
+ 
+ }
+ /*}}}*/
+@@ -246,7 +247,7 @@
+ 		box->obs[index]->weight += 1;
+ 	}
+ 	else{
+-		_error_("Box is not full");
++		_error2_("Box is not full");
+ 	}
+ }/*}}}*/
+ /*FUNCTION Quadtree::ClosestObs{{{*/
+@@ -395,7 +396,7 @@
+ 			newbox->ycenter=master->ycenter + master->length/4;
+ 			break;
+ 		default:
+-			_error_("Case %i not supported",index);
++			_error2_("Case " << index << " not supported");
+ 	}
+ 	newbox->length=master->length/2;
+ 
+@@ -572,7 +573,7 @@
+ 			}
+ 			break;
+ 		default:
+-			_error_("Case %i not supported",this->IsWithinRange(x,y,range));
++			_error2_("Case " << this->IsWithinRange(x,y,range) << " not supported");
+ 	}
+ 
+ 	/*Assign output pointers: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12493)
+@@ -70,7 +70,7 @@
+ 	/*set single point constraints: */
+ 
+ 	/*spc all nodes on water*/
+-	if (!iomodel->Data(MaskVertexonwaterEnum)) _error_("iomodel->nodeonwater is NULL");
++	if (!iomodel->Data(MaskVertexonwaterEnum)) _error2_("iomodel->nodeonwater is NULL");
+ 	if (iomodel->Data(MaskVertexonwaterEnum)[io_index]){
+ 		for(k=1;k<=gsize;k++){
+ 			this->FreezeDof(k);
+@@ -114,7 +114,7 @@
+ 
+ 	/*Diagnostic Hutter*/
+ 	if (analysis_type==DiagnosticHutterAnalysisEnum){
+-		if (!iomodel->Data(FlowequationVertexEquationEnum)) _error_("iomodel->vertices_type is NULL");
++		if (!iomodel->Data(FlowequationVertexEquationEnum)) _error2_("iomodel->vertices_type is NULL");
+ 		/*Constrain all nodes that are not Hutter*/
+ 		if (!iomodel->Data(FlowequationVertexEquationEnum)[io_index]==HutterApproximationEnum){
+ 			for(k=1;k<=gsize;k++){
+@@ -230,7 +230,7 @@
+ 		_assert_(dofindex>=0 && dofindex<indexing.ssize);
+ 		return indexing.sdoflist[dofindex];
+ 	}
+-	else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
++	else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 
+ }
+ /*}}}*/
+@@ -302,7 +302,7 @@
+ 			}
+ 			else for(i=0;i<this->indexing.ssize;i++) outdoflist[i]=indexing.sdoflist[i];
+ 		}
+-		else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
++		else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 	}
+ }
+ /*}}}*/
+@@ -342,7 +342,7 @@
+ 				}
+ 			}
+ 		}
+-		else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
++		else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 	}
+ 	else{
+ 
+@@ -411,7 +411,7 @@
+ 				}
+ 			}
+ 		}
+-		else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
++		else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 	}
+ }
+ /*}}}*/
+@@ -597,7 +597,7 @@
+ 		if (setenum==GsetEnum) numdofs=this->indexing.gsize;
+ 		else if (setenum==FsetEnum) numdofs=this->indexing.fsize;
+ 		else if (setenum==SsetEnum) numdofs=this->indexing.ssize;
+-		else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
++		else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 	}
+ 	else{
+ 		if(setenum==GsetEnum){
+@@ -627,7 +627,7 @@
+ 			}
+ 			else numdofs=this->indexing.ssize;
+ 		}
+-		else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
++		else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 	}
+ 	return numdofs;
+ }
+@@ -834,7 +834,7 @@
+ 			ug->SetValues(this->indexing.ssize,indices,values,INS_VAL);
+ 		}
+ 	}
+-	else _error_("VecMerge can only merge from the s or f-set onto the g-set!");
++	else _error2_("VecMerge can only merge from the s or f-set onto the g-set!");
+ 
+ 	/*Free ressources:*/
+ 	xDelete<IssmDouble>(values);
+@@ -880,7 +880,7 @@
+ 			vector->SetValues(this->indexing.ssize,this->indexing.sdoflist,values,INS_VAL);
+ 		}
+ 	}
+-	else _error_("VecReduce can only merge from the s or f-set onto the g-set!");
++	else _error2_("VecReduce can only merge from the s or f-set onto the g-set!");
+ 
+ 	/*Free ressources:*/
+ 	xDelete<IssmDouble>(values);
+@@ -927,7 +927,7 @@
+ 		}
+ 		dofcount+=this->indexing.ssize;
+ 	}
+-	else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
++	else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 
+ 
+ 	/*Assign output pointers: */
+@@ -956,7 +956,7 @@
+ 	else if(setenum==SsetEnum){
+ 		for(i=0;i<this->indexing.ssize;i++) indexing.sdoflist[i]+=dofcount;
+ 	}
+-	else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
++	else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Node::ShowTrueDofs{{{*/
+@@ -972,7 +972,7 @@
+ 	if(setenum==GsetEnum)for(j=0;j<this->indexing.gsize;j++)  *(truedofs+ncols*sid+j)=indexing.gdoflist[j];
+ 	else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++)  *(truedofs+ncols*sid+j)=indexing.fdoflist[j];
+ 	else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++)  *(truedofs+ncols*sid+j)=indexing.sdoflist[j];
+-	else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
++	else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 
+ }
+ /*}}}*/
+@@ -991,7 +991,7 @@
+ 	if(setenum==GsetEnum)for(j=0;j<this->indexing.gsize;j++) indexing.gdoflist[j]=*(alltruedofs+ncols*sid+j);
+ 	else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++) indexing.fdoflist[j]=*(alltruedofs+ncols*sid+j);
+ 	else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++) indexing.sdoflist[j]=*(alltruedofs+ncols*sid+j);
+-	else _error_("%s%s%s"," set of enum type ",EnumToStringx(setenum)," not supported yet!");
++	else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12493)
+@@ -145,7 +145,7 @@
+ 			}
+ 		}
+ 
+-		if(!found)_error_("could not find time segment for constraint");
++		if(!found)_error2_("could not find time segment for constraint");
+ 
+ 		/*Apply or relax constraint: */
+ 		if(isnan(value)){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12492)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12493)
+@@ -109,7 +109,7 @@
+ 
+ 		/*Get first Enum*/
+ 		if(fread(&record_enum,sizeof(int),1,this->fid)==0){
+-			_error_("Marshalled file is empty");
++			_error2_("Marshalled file is empty");
+ 		}
+ 		else{
+ 			if(record_enum!=MaximumNumberOfEnums){
+@@ -127,7 +127,7 @@
+ 				printf("     and recompile                                                       \n");
+ 				printf("=========================================================================\n");
+ 				printf("\n");
+-				_error_("Enums not consistent (See error message above)");
++				_error2_("Enums not consistent (See error message above)");
+ 			}
+ 		}
+ 	}
+@@ -176,7 +176,7 @@
+ 
+ 	/*Find constant*/
+ 	Param* param=(Param*)this->constants->FindParamObject(constant_enum);
+-	if(!param) _error_("Constant %s not found in iomodel",EnumToStringx(constant_enum));
++	if(!param) _error2_("Constant " << EnumToStringx(constant_enum) << " not found in iomodel");
+ 
+ 	return (Param*)param->copy();
+ }
+@@ -265,7 +265,7 @@
+ 				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 ");
++						if(fread(&booleanint,sizeof(int),1,this->fid)!=1) _error2_(" could not read boolean ");
+ 						#ifdef _HAVE_MPI_
+ 						MPI_Bcast(&booleanint,1,MPI_INT,0,MPI_COMM_WORLD); 
+ 						#endif
+@@ -276,7 +276,7 @@
+ 						break;
+ 					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 ");
++						if(fread(&integer,sizeof(int),1,this->fid)!=1) _error2_(" could not read integer ");
+ 						#ifdef _HAVE_MPI_
+ 						MPI_Bcast(&integer,1,MPI_INT,0,MPI_COMM_WORLD); 
+ 						#endif
+@@ -287,7 +287,7 @@
+ 						break;
+ 					case 3:
+ 						/*Read the scalar and broadcast it to other cpus:*/
+-						if(fread(&scalar,sizeof(IssmPDouble),1,this->fid)!=1) _error_(" could not read scalar ");
++						if(fread(&scalar,sizeof(IssmPDouble),1,this->fid)!=1) _error2_(" could not read scalar ");
+ 						#ifdef _HAVE_MPI_
+ 						MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+ 						#endif
+@@ -298,7 +298,7 @@
+ 						break;
+ 					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 ");
++						if(fread(&string_size,sizeof(int),1,this->fid)!=1) _error2_(" could not read length of string ");
+ 						#ifdef _HAVE_MPI_
+ 						MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
+ 						#endif
+@@ -308,7 +308,7 @@
+ 							string[string_size]='\0';
+ 
+ 							/*Read string, then broadcast: */
+-							if(fread(string,string_size*sizeof(char),1,this->fid)!=1)_error_("  could not read string ");
++							if(fread(string,string_size*sizeof(char),1,this->fid)!=1)_error2_("  could not read string ");
+ 							#ifdef _HAVE_MPI_
+ 							MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
+ 							#endif
+@@ -359,7 +359,7 @@
+ 							break;
+ 
+ 					default: 
+-						_error_("%s%i","unknown record type:",record_code); 
++						_error2_("" << "unknown record type:" << record_code); 
+ 						break;;
+ 				}
+ 			}
+@@ -427,7 +427,7 @@
+ 				case 9: break; //do nothing. not interested in this type of data, which is memory intensive.
+ 
+ 				default: 
+-					_error_("%s%i","unknown record type:",record_code); 
++					_error2_("" << "unknown record type:" << record_code); 
+ 					break;;
+ 				}
+ 
+@@ -452,11 +452,11 @@
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+ 
+-	if(code!=1)_error_("expecting a boolean for enum %s",EnumToStringx(data_enum));
++	if(code!=1)_error2_("expecting a boolean for enum " << EnumToStringx(data_enum));
+ 	
+ 	/*We have to read a boolean from disk. */
+ 	if(my_rank==0){  
+-		if(fread(&booleanint,sizeof(int),1,fid)!=1) _error_(" could not read boolean ");
++		if(fread(&booleanint,sizeof(int),1,fid)!=1) _error2_(" could not read boolean ");
+ 	}
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&booleanint,1,MPI_INT,0,MPI_COMM_WORLD); 
+@@ -482,11 +482,11 @@
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+ 	
+-	if(code!=2)_error_("expecting an integer for enum %s",EnumToStringx(data_enum));
++	if(code!=2)_error2_("expecting an integer for enum " << EnumToStringx(data_enum));
+ 	
+ 	/*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */
+ 	if(my_rank==0){  
+-		if(fread(&integer,sizeof(int),1,fid)!=1) _error_(" could not read integer ");
++		if(fread(&integer,sizeof(int),1,fid)!=1) _error2_(" could not read integer ");
+ 	}
+ 
+ 	#ifdef _HAVE_MPI_
+@@ -513,11 +513,11 @@
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+ 	
+-	if(code!=3)_error_("expecting a IssmPDouble for enum %s",EnumToStringx(data_enum));
++	if(code!=3)_error2_("expecting a IssmPDouble for enum " << EnumToStringx(data_enum));
+ 	
+ 	/*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */
+ 	if(my_rank==0){
+-		if(fread(&scalar,sizeof(IssmPDouble),1,fid)!=1)_error_(" could not read scalar ");
++		if(fread(&scalar,sizeof(IssmPDouble),1,fid)!=1)_error2_(" could not read scalar ");
+ 	}
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+@@ -543,13 +543,13 @@
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+ 	
+-	if(code!=4)_error_("expecting a string for enum %s",EnumToStringx(data_enum));
++	if(code!=4)_error2_("expecting a string for enum " << EnumToStringx(data_enum));
+ 	
+ 	/*Now fetch: */
+ 	
+ 	/*We have to read a string from disk. First read the dimensions of the string, then the string: */
+ 	if(my_rank==0){  
+-		if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
++		if(fread(&string_size,sizeof(int),1,fid)!=1) _error2_(" could not read length of string ");
+ 	}
+ 
+ 	#ifdef _HAVE_MPI_
+@@ -563,7 +563,7 @@
+ 
+ 		/*Read string on node 0, then broadcast: */
+ 		if(my_rank==0){  
+-			if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
++			if(fread(string,string_size*sizeof(char),1,fid)!=1)_error2_("  could not read string ");
+ 		}
+ 		#ifdef _HAVE_MPI_
+ 		MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
+@@ -597,14 +597,14 @@
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
+ 
+-	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmPDouble, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
++	if((code!=5) && (code!=6) && (code!=7))_error2_("expecting a IssmPDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
+ 	
+ 	/*Now fetch: */
+ 
+ 	/*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */
+ 	/*numberofelements: */
+ 	if(my_rank==0){  
+-		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
++		if(fread(&M,sizeof(int),1,fid)!=1) _error2_("could not read number of rows for matrix ");
+ 	}
+ 
+ 	#ifdef _HAVE_MPI_
+@@ -612,7 +612,7 @@
+ 	#endif
+ 
+ 	if(my_rank==0){  
+-		if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
++		if(fread(&N,sizeof(int),1,fid)!=1) _error2_("could not read number of columns for matrix ");
+ 	}
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD);
+@@ -624,7 +624,7 @@
+ 
+ 		/*Read matrix on node 0, then broadcast: */
+ 		if(my_rank==0){  
+-			if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
++			if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error2_("could not read matrix ");
+ 		}
+ 		
+ 		#ifdef _HAVE_MPI_
+@@ -668,21 +668,21 @@
+ 	
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
+-	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmPDouble, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
++	if((code!=5) && (code!=6) && (code!=7))_error2_("expecting a IssmPDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
+ 	
+ 	/*Now fetch: */
+ 
+ 	/*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */
+ 	/*numberofelements: */
+ 	if(my_rank==0){  
+-		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
++		if(fread(&M,sizeof(int),1,fid)!=1) _error2_("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 ");
++		if(fread(&N,sizeof(int),1,fid)!=1) _error2_("could not read number of columns for matrix ");
+ 	}
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 
+@@ -694,7 +694,7 @@
+ 
+ 		/*Read matrix on node 0, then broadcast: */
+ 		if(my_rank==0){  
+-			if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
++			if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error2_("could not read matrix ");
+ 		}
+ 		#ifdef _HAVE_MPI_
+ 		MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+@@ -727,11 +727,11 @@
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+ 	
+-	if(code!=9)_error_("expecting a string array for enum %s",EnumToStringx(data_enum));
++	if(code!=9)_error2_("expecting a string array for enum " << EnumToStringx(data_enum));
+ 	
+ 	/*We have to read a bunch of strings from disk. First read the number of strings, and allocate: */
+ 	if(my_rank==0){  
+-		if(fread(&numstrings,sizeof(int),1,fid)!=1) _error_(" could not read length of string array");
++		if(fread(&numstrings,sizeof(int),1,fid)!=1) _error2_(" could not read length of string array");
+ 	}
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&numstrings,1,MPI_INT,0,MPI_COMM_WORLD); 
+@@ -746,7 +746,7 @@
+ 		for(i=0;i<numstrings;i++){
+ 			
+ 			if(my_rank==0){  
+-				if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
++				if(fread(&string_size,sizeof(int),1,fid)!=1) _error2_(" could not read length of string ");
+ 			}
+ 			#ifdef _HAVE_MPI_
+ 			MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
+@@ -757,7 +757,7 @@
+ 
+ 				/*Read string on node 0, then broadcast: */
+ 				if(my_rank==0){  
+-					if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
++					if(fread(string,string_size*sizeof(char),1,fid)!=1)_error2_("  could not read string ");
+ 				}
+ 				#ifdef _HAVE_MPI_
+ 				MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
+@@ -798,11 +798,11 @@
+ 	
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+-	if(code!=8)_error_("expecting a IssmPDouble mat array for enum %s",EnumToStringx(data_enum));
++	if(code!=8)_error2_("expecting a IssmPDouble mat array for enum " << EnumToStringx(data_enum));
+ 	
+ 	/*Now fetch: */
+ 	if(my_rank==0){  
+-		if(fread(&numrecords,sizeof(int),1,fid)!=1) _error_("could not read number of records in matrix array ");
++		if(fread(&numrecords,sizeof(int),1,fid)!=1) _error2_("could not read number of records in matrix array ");
+ 	}
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&numrecords,1,MPI_INT,0,MPI_COMM_WORLD); 
+@@ -825,14 +825,14 @@
+ 		for(i=0;i<numrecords;i++){
+ 
+ 			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");
++				if(fread(&M,sizeof(int),1,fid)!=1) _error2_("" << "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");
++				if(fread(&N,sizeof(int),1,fid)!=1) _error2_("" << "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); 
+@@ -844,7 +844,7 @@
+ 
+ 				/*Read matrix on node 0, then broadcast: */
+ 				if(my_rank==0){  
+-					if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
++					if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error2_("could not read matrix ");
+ 				}
+ 
+ 				#ifdef _HAVE_MPI_
+@@ -907,7 +907,7 @@
+ 			  break;
+ 			  }
+ 		default:
+-			  _error_("Option of format %i not supported yet",code);
++			  _error2_("Option of format " << code << " not supported yet");
+ 	}
+ 
+ 	/*Assign output pointers: */
+@@ -936,7 +936,7 @@
+ 		#ifdef _ISSM_DEBUG_
+ 		_assert_(dataenum<MaximumNumberOfEnums);
+ 		if(this->data[dataenum]){
+-			_error_("Info: trying to fetch %s but previous pointer has not been freed (DeleteData has not been called)",EnumToStringx(dataenum));
++			_error2_("Info: trying to fetch " << EnumToStringx(dataenum) << " but previous pointer has not been freed (DeleteData has not been called)");
+ 		}
+ 		#endif
+ 		/*}}}*/
+@@ -1136,7 +1136,7 @@
+ 
+ 			break; /*}}}*/
+ 		default: /*{{{*/
+-			_error_("%s%i%s","data code ",code," not supported yet!");
++			_error2_("" << "data code " << code << " not supported yet!");
+ 			break;
+ 			/*}}}*/
+ 	}
+@@ -1227,7 +1227,7 @@
+ 	}
+ #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));
++	if(!found)_error2_("" << "could not find data with name" << " " << EnumToStringx(data_enum) << " ");
+ #endif
+ 
+ 	/*Broadcast code and vector type: */
Index: /issm/oecreview/Archive/12321-12677/ISSM-12493-12494.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12493-12494.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12493-12494.diff	(revision 12679)
@@ -0,0 +1,3285 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/CorePointerFromSolutionEnum.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/CorePointerFromSolutionEnum.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/CorePointerFromSolutionEnum.cpp	(revision 12494)
+@@ -95,7 +95,7 @@
+ 			#endif
+ 			break;
+ 		default:
+-			_error2_("" << " solution type: " << EnumToStringx(solutiontype) << " not supported yet!");
++			_error2_("solution type: " << EnumToStringx(solutiontype) << " not supported yet!");
+ 			break;
+ 	}
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/WriteLockFile.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/WriteLockFile.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/WriteLockFile.cpp	(revision 12494)
+@@ -16,10 +16,10 @@
+ 	/* Open lock file and write 1 into it: */
+ 	if(my_rank==0){
+ 		fid=fopen(filename,"w");
+-		if(fid==NULL) _error2_("" << "error message: could not open lock file " << filename);
++		if(fid==NULL) _error2_("error message: could not open lock file " << filename);
+ 
+ 		/*Close file: */
+-		if(fclose(fid)!=0) _error2_("" << "could not close lock file " << filename);
++		if(fclose(fid)!=0) _error2_("could not close lock file " << filename);
+ 	}
+ 
+ }	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp	(revision 12494)
+@@ -109,7 +109,7 @@
+ 			break;
+ 		
+ 		default:
+-			_error2_("" << " solution type: " << EnumToStringx(solutiontype) << " not supported yet!");
++			_error2_("solution type: " << EnumToStringx(solutiontype) << " not supported yet!");
+ 			break;
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12494)
+@@ -1669,7 +1669,7 @@
+ 		} while (iter < MAX_GAUS_ITER);
+ 		if (iter >= MAX_GAUS_ITER) {
+ 			xDelete<IssmPDouble>(work);
+-			_error2_("" << " Max iterations exceeded for l=" << MAX_GAUS_ITER);
++			_error2_(" Max iterations exceeded for l=" << MAX_GAUS_ITER);
+ 		}
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12494)
+@@ -56,7 +56,7 @@
+ 	}
+ 	if (found==-1){
+ 		/*ok, we did not find anything, this is not good! error out: */
+-		_error2_("" << "could find neither a default analysis  nor analysis " << EnumToStringx(analysis_type));
++		_error2_("could find neither a default analysis  nor analysis " << EnumToStringx(analysis_type));
+ 	}
+ 
+ 	/*ok, grab the option string: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp	(revision 12494)
+@@ -52,7 +52,7 @@
+ 		if(nu)eps=ndu/nu;
+ 		else eps=0;
+ 	}
+-	else _error2_("" << " convergence criterion " << EnumToStringx(criterion_enum) << " not supported yet!");
++	else _error2_(" convergence criterion " << EnumToStringx(criterion_enum) << " not supported yet!");
+ 
+ 	/*Assign output pointers:*/
+ 	*peps=eps;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/String/DescriptorIndex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/String/DescriptorIndex.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/String/DescriptorIndex.cpp	(revision 12494)
+@@ -22,12 +22,12 @@
+ 
+ 	/*retrieve first token, separated by underscore: */
+ 	pch = strtok (descriptor,"_");
+-	if(!pch)_error2_("" << " descriptor " << descriptor << " is not correctly formatted!");
++	if(!pch)_error2_(" descriptor " << descriptor << " is not correctly formatted!");
+ 
+ 	if (strncmp(pch,"scaled",6)==0){
+ 		/*we have a scaled variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_("" << " scaled descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_(" scaled descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 
+ 		/*now recover  the index if it exists: */
+@@ -43,22 +43,22 @@
+ 	else if (strncmp(pch,"indexed",7)==0){
+ 		/*we have an indexed variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_("" << " indexed descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_(" indexed descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 		/*now recover  the index: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_("" << " indexed descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_(" indexed descriptor " << descriptor << " is not correctly formatted!");
+ 		sscanf(pch,"%i",pindex);
+ 		return IndexedEnum;
+ 	}
+ 	else if (strncmp(pch,"nodal",5)==0){
+ 		/*we have an indexed variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_("" << " nodal descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_(" nodal descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 		/*now recover  the index: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_("" << " nodal descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_(" nodal descriptor " << descriptor << " is not correctly formatted!");
+ 		sscanf(pch,"%i",pindex);
+ 		return NodalEnum;
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineWrite.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineWrite.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineWrite.cpp	(revision 12494)
+@@ -22,7 +22,7 @@
+ 
+ 	/*open domain outline file for writing: */
+ 	if ((fid=fopen(domainname,"w"))==NULL){
+-		_error2_("" << "could not open domain file " << domainname); 
++		_error2_("could not open domain file " << domainname); 
+ 		noerr=0; goto cleanupandreturn;
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 12494)
+@@ -37,7 +37,7 @@
+ 
+ 	/*open domain outline file for reading: */
+ 	if ((fid=fopen(domainname,"r"))==NULL){
+-		_error2_("" << "could not find domain file " << domainname); 
++		_error2_("could not find domain file " << domainname); 
+ 	}
+ 
+ 	/*Do a first pass through the domainname file, to figure out how many profiles 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/pfopen.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/pfopen.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/pfopen.cpp	(revision 12494)
+@@ -19,7 +19,7 @@
+ 	
+ 	/*Open handle to data on disk: */
+ 	fid=fopen(filename,format);
+-	if(fid==NULL) _error2_("" << "could not open file " << filename << " for binary reading or writing"); 
++	if(fid==NULL) _error2_("could not open file " << filename << " for binary reading or writing"); 
+ 
+ 	return fid;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/pfclose.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/pfclose.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/Disk/pfclose.cpp	(revision 12494)
+@@ -17,5 +17,5 @@
+ 	/*Close file handle: */
+ 	extern int my_rank;
+ 	_assert_(fid);
+-	if(fclose(fid)!=0)_error2_("" << "could not close file " << filename);
++	if(fclose(fid)!=0)_error2_("could not close file " << filename);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12494)
+@@ -26,7 +26,7 @@
+ 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
+ 
+ 	if(migration_style==NoneEnum) return;
+-	if(migration_style!=AgressiveMigrationEnum && migration_style!=SoftMigrationEnum) _error2_("" << EnumToStringx(migration_style) << " not supported yet!");
++	if(migration_style!=AgressiveMigrationEnum && migration_style!=SoftMigrationEnum) _error2_(EnumToStringx(migration_style) << " not supported yet!");
+ 
+ 	if(migration_style==SoftMigrationEnum){
+ 		/*Create flag for grounded vertices above the hydrostatic equilibrium: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp	(revision 12494)
+@@ -22,12 +22,12 @@
+ 
+ 	/*retrieve first token, separated by underscore: */
+ 	pch = strtok (descriptor,"_");
+-	if(!pch)_error2_("" << " descriptor " << descriptor << " is not correctly formatted!");
++	if(!pch)_error2_(" descriptor " << descriptor << " is not correctly formatted!");
+ 
+ 	if (strncmp(pch,"scaled",6)==0){
+ 		/*we have a scaled variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_("" << " scaled descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_(" scaled descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 
+ 		/*now recover  the index if it exists: */
+@@ -43,22 +43,22 @@
+ 	else if (strncmp(pch,"indexed",7)==0){
+ 		/*we have an indexed variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_("" << " indexed descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_(" indexed descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 		/*now recover  the index: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_("" << " indexed descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_(" indexed descriptor " << descriptor << " is not correctly formatted!");
+ 		sscanf(pch,"%i",pindex);
+ 		return IndexedEnum;
+ 	}
+ 	else if (strncmp(pch,"nodal",5)==0){
+ 		/*we have an indexed variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_("" << " nodal descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_(" nodal descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 		/*now recover  the index: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_("" << " nodal descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_(" nodal descriptor " << descriptor << " is not correctly formatted!");
+ 		sscanf(pch,"%i",pindex);
+ 		return NodalEnum;
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp	(revision 12494)
+@@ -38,7 +38,7 @@
+ 	/*Broadcast whether we found the element: */
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( &found,&sumfound,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
+-	if(!sumfound)_error2_("" << "could not find material with id" << index << " to compute ElementResponse");
++	if(!sumfound)_error2_("could not find material with id" << index << " to compute ElementResponse");
+ 	#endif
+ 
+ 	/*Ok, we found the element, compute responseocity: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 12494)
+@@ -31,7 +31,7 @@
+ 		}
+ 	}
+ 	else{
+-		_error2_("" << " vector type: " << EnumToStringx(type) << " not supported yet!");
++		_error2_(" vector type: " << EnumToStringx(type) << " not supported yet!");
+ 	}
+ 
+ 	vector->Assemble();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp	(revision 12494)
+@@ -37,7 +37,7 @@
+ 	/*Broadcast whether we found the element: */
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( &found,&sumfound,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
+-	if(!sumfound)_error2_("" << "could not find element with vertex with id" << index << " to compute nodal value " << EnumToStringx(natureofdataenum));
++	if(!sumfound)_error2_("could not find element with vertex with id" << index << " to compute nodal value " << EnumToStringx(natureofdataenum));
+ 	#endif
+ 
+ 	/*Broadcast and plug into response: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp	(revision 12494)
+@@ -123,7 +123,7 @@
+ 
+ 
+ 		default:
+-			_error2_("" << " analysis_type: " << EnumToStringx(analysis_type) << " not supported yet!");
++			_error2_(" analysis_type: " << EnumToStringx(analysis_type) << " not supported yet!");
+ 	}
+ 
+ 	/*Update Elements and Materials For Control methods*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12494)
+@@ -135,7 +135,7 @@
+ 	
+ 	/*Check convergence*/
+ 	KSPGetIterationNumber(ksp,&iteration_number);
+-	if (iteration_number<0) _error2_("" << " Solver diverged at iteration number: " << -iteration_number);
++	if (iteration_number<0) _error2_(" Solver diverged at iteration number: " << -iteration_number);
+ 
+ 	/*Free resources:*/
+ 	KSPFree(&ksp);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp	(revision 12494)
+@@ -70,7 +70,7 @@
+ 	/*Last check: is the number of elements on last column of the connectivity superior to maxels? If so, then error out and 
+ 	 * warn the user to increase the connectivity width: */
+ 	for(i=0;i<nods;i++){
+-		if (*(connectivity+width*i+maxels)>maxels)_error2_("" << " max connectivity width reached (" << *(connectivity+width*i+maxels) << ")! increase width of connectivity table");
++		if (*(connectivity+width*i+maxels)>maxels)_error2_(" max connectivity width reached (" << *(connectivity+width*i+maxels) << ")! increase width of connectivity table");
+ 	}
+ 
+ 	/*Assign output pointers: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12494)
+@@ -103,7 +103,7 @@
+ 				responses_pointer++;
+ 			}
+ 		}
+-		else _error2_("" << " flag type " << flag << " not supported yet for response analysis");
++		else _error2_(" flag type " << flag << " not supported yet for response analysis");
+ 	}
+ 
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12494)
+@@ -37,8 +37,8 @@
+ 	/*First of, find the record for the enum, and get code  of data type: */
+ 	fid=iomodel->SetFilePointerToData(&code, &vector_layout,vector_enum);
+ 
+-	if(code!=7)_error2_("" << " expecting a IssmDouble vector for constraints with enum " << EnumToStringx(vector_enum));
+-	if(vector_layout!=1)_error2_("" << " expecting a nodal vector for constraints with enum " << EnumToStringx(vector_enum));
++	if(code!=7)_error2_(" expecting a IssmDouble vector for constraints with enum " << EnumToStringx(vector_enum));
++	if(vector_layout!=1)_error2_(" expecting a nodal vector for constraints with enum " << EnumToStringx(vector_enum));
+ 
+ 	/*Fetch vector:*/
+ 	iomodel->FetchData(&IssmDoublevector,&M,&N,vector_enum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp	(revision 12494)
+@@ -54,7 +54,7 @@
+ 			 * and set the option, then end the token analysis.*/
+ 			if(first[0]!='-'){
+ 				/*This is not good, the option does not have '-'! Get out*/
+-				_error2_("" << "Option " << first << " should be preceded by '-'!");
++				_error2_("Option " << first << " should be preceded by '-'!");
+ 			}
+ 			/*Reduce first to bare option value*/
+ 			PetscStrlen(first,&len);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12494)
+@@ -142,7 +142,7 @@
+ 		if(this->ssize)this->sdoflist=xNew<int>(size);
+ 		else this->sdoflist=NULL;
+ 	}
+-	else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
++	else _error2_(" set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ }
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.h	(revision 12494)
+@@ -61,10 +61,10 @@
+ 		void   InputUpdateFromConstant(int constant, int name);
+ 		void   InputUpdateFromConstant(bool constant, int name);
+ 		void   InputUpdateFromSolution(IssmDouble* solution);
+-		void   InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
++		void   InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("not implemented yet");};
+ 		/*}}}*/
+ 		/*Material virtual functions resolution: {{{*/
+-		void   InputDuplicate(int original_enum,int new_enum){_error_("not implemented yet");};
++		void   InputDuplicate(int original_enum,int new_enum){_error2_("not implemented yet");};
+ 		void   Configure(Elements* elements);
+ 		void   GetVectorFromInputs(Vector* vector,int input_enum){return;}
+ 		/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.h	(revision 12494)
+@@ -42,33 +42,33 @@
+ 		/*}}}*/
+ 		/*Param virtual functions definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+-		void  GetParameterValue(bool* pbool){_error_("DoubleVec param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int* pinteger){_error_("DoubleVec param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(bool* pbool){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a bool");}
++		void  GetParameterValue(int* pinteger){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");}
+ 		void  GetParameterValue(int** pintarray,int* pM);
+-		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("DoubleVec param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));};
+-		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("DoubleVec param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char** pstring){_error_("DoubleVec param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleVec param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");};
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(char** pstring){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string");}
++		void  GetParameterValue(char*** pstringarray,int* pM){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string array");}
+ 		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM);
+ 		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN);
+-		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Vector** pvec){_error_("DoubleVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Matrix** pmat){_error_("DoubleVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(FILE** pfid){_error_("DoubleVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
++		void  GetParameterValue(Vector** pvec){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Vec");}
++		void  GetParameterValue(Matrix** pmat){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
++		void  GetParameterValue(FILE** pfid){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+-		void  SetValue(bool boolean){_error_("DoubleVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int integer){_error_("DoubleVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble scalar){_error_("DoubleVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char* string){_error_("DoubleVec param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char** stringarray,int M){_error_("DoubleVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(bool boolean){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a boolean");}
++		void  SetValue(int integer){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an integer");}
++		void  SetValue(IssmDouble scalar){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a scalar");}
++		void  SetValue(char* string){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(char** stringarray,int M){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
+ 		void  SetValue(IssmDouble* IssmDoublearray,int M);
+-		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("DoubleVec param of enum %i (%s) cannot hold a IssmDouble mat array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* intarray,int M){_error_("DoubleVec param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));};
+-		void  SetValue(int* pintarray,int M,int N){_error_("DoubleVec param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Vector* vec){_error_("DoubleVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Matrix* mat){_error_("DoubleVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(FILE* fid){_error_("DoubleVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble mat array");}
++		void  SetValue(int* intarray,int M){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int mat array");};
++		void  SetValue(int* pintarray,int M,int N){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int mat array");}
++		void  SetValue(Vector* vec){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Vec");}
++		void  SetValue(Matrix* mat){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
++		void  SetValue(FILE* fid){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
+ 		void  UnitConversion(int direction_enum);
+ 		
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.h	(revision 12494)
+@@ -47,28 +47,28 @@
+ 		void  GetParameterValue(int** pintarray,int* pM);
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN);
+ 		void  GetParameterValue(IssmDouble* pIssmDouble){*pIssmDouble=value;}
+-		void  GetParameterValue(char** pstring){_error_("Double param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char*** pstringarray,int* pM){_error_("Double param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(char** pstring){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string");}
++		void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string array");}
+ 		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM);
+ 		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN);
+-		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Double param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Vector** pvec){_error_("Double param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Matrix** pmat){_error_("Double param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(FILE** pfid){_error_("Double param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
++		void  GetParameterValue(Vector** pvec){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Vec");}
++		void  GetParameterValue(Matrix** pmat){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
++		void  GetParameterValue(FILE** pfid){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+ 		void  SetValue(bool boolean){this->value=(IssmDouble)boolean;}
+ 		void  SetValue(int integer){this->value=(IssmDouble)integer;}
+ 		void  SetValue(IssmDouble scalar){this->value=(IssmDouble)scalar;}
+-		void  SetValue(char* string){_error_("Double param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char** stringarray,int M){_error_("Double param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Double param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Double param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* intarray,int M){_error_("Double param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* pintarray,int M,int N){_error_("Double param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Vector* vec){_error_("Double param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Matrix* mat){_error_("Double param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(FILE* fid){_error_("Double param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Double param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(char* string){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(char** stringarray,int M){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(int* intarray,int M){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
++		void  SetValue(int* pintarray,int M,int N){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
++		void  SetValue(Vector* vec){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Vec");}
++		void  SetValue(Matrix* mat){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
++		void  SetValue(FILE* fid){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h	(revision 12494)
+@@ -44,32 +44,32 @@
+ 		/*}}}*/
+ 		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+-		void  GetParameterValue(bool* pbool){_error_("DoubleMatArray param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int* pinteger){_error_("DoubleMatArray param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("DoubleMatArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("DoubleMatArray param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char** pstring){_error_("DoubleMatArray param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("DoubleMatArray param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("DoubleMatArray param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(bool* pbool){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a bool");}
++		void  GetParameterValue(int* pinteger){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");}
++		void  GetParameterValue(int** pintarray,int* pM){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(char** pstring){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string");}
++		void  GetParameterValue(char*** pstringarray,int* pM){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
+ 		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims);
+-		void  GetParameterValue(Vector** pvec){_error_("DoubleMatArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Matrix** pmat){_error_("DoubleMatArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(FILE** pfid){_error_("DoubleMatArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(Vector** pvec){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Vec");}
++		void  GetParameterValue(Matrix** pmat){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
++		void  GetParameterValue(FILE** pfid){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+-		void  SetValue(bool boolean){_error_("DoubleMatArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int integer){_error_("DoubleMatArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble scalar){_error_("DoubleMatArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char* string){_error_("DoubleMatArray param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char** stringarray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a IssmDouble vec array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error_("DoubleMatArray param of enum %i (%s) cannot hold a IssmDouble mat array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* intarray,int M){_error_("DoubleMatArray param of enum %i (%s) cannot hold a int vec array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* intarray,int M,int N){_error_("DoubleMatArray param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Vector* vec){_error_("DoubleMatArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Matrix* mat){_error_("DoubleMatArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(FILE* fid){_error_("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(bool boolean){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a boolean");}
++		void  SetValue(int integer){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an integer");}
++		void  SetValue(IssmDouble scalar){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a scalar");}
++		void  SetValue(char* string){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(char** stringarray,int M){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble vec array");}
++		void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble mat array");}
++		void  SetValue(int* intarray,int M){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int vec array");}
++		void  SetValue(int* intarray,int M,int N){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int mat array");}
++		void  SetValue(Vector* vec){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Vec");}
++		void  SetValue(Matrix* mat){_error2_("DoubleMatArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
++		void  SetValue(FILE* fid){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
+ 		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array);
+ 		void  UnitConversion(int direction_enum);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.h	(revision 12494)
+@@ -43,33 +43,33 @@
+ 		/*}}}*/
+ 		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+-		void  GetParameterValue(bool* pbool){_error_("DoubleMat param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int* pinteger){_error_("DoubleMat param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(bool* pbool){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a bool");}
++		void  GetParameterValue(int* pinteger){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");}
++		void  GetParameterValue(int** pintarray,int* pM){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN);
+-		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("DoubleMat param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char** pstring){_error_("DoubleMat param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char*** pstringarray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("DoubleMat param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(char** pstring){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string");}
++		void  GetParameterValue(char*** pstringarray,int* pM){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
+ 		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN);
+-		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("DoubleMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Vector** pvec){_error_("DoubleMat param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Matrix** pmat){_error_("DoubleMat param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(FILE** pfid){_error_("DoubleMat param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
++		void  GetParameterValue(Vector** pvec){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Vec");}
++		void  GetParameterValue(Matrix** pmat){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
++		void  GetParameterValue(FILE** pfid){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+-		void  SetValue(bool boolean){_error_("DoubleMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int integer){_error_("DoubleMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble scalar){_error_("DoubleMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char* string){_error_("DoubleMat param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char** stringarray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a IssmDouble vec array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(bool boolean){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a boolean");}
++		void  SetValue(int integer){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an integer");}
++		void  SetValue(IssmDouble scalar){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a scalar");}
++		void  SetValue(char* string){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(char** stringarray,int M){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble vec array");}
+ 		void  SetValue(IssmDouble* IssmDoublearray,int M,int N);
+-		void  SetValue(int* intarray,int M){_error_("DoubleMat param of enum %i (%s) cannot hold a int vec array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* intarray,int M,int N){_error_("DoubleMat param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));};
+-		void  SetValue(Vector* vec){_error_("DoubleMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Matrix* mat){_error_("DoubleMat param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(FILE* fid){_error_("DoubleMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("DoubleMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(int* intarray,int M){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int vec array");}
++		void  SetValue(int* intarray,int M,int N){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int mat array");};
++		void  SetValue(Vector* vec){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Vec");}
++		void  SetValue(Matrix* mat){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
++		void  SetValue(FILE* fid){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("DoubleMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
+ 		void  UnitConversion(int direction_enum);
+ 		IssmDouble* GetPointer(void);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.h	(revision 12494)
+@@ -41,33 +41,33 @@
+ 		/*}}}*/
+ 		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+-		void  GetParameterValue(bool* pbool){  _error_("FileParam of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int* pinteger){_error_("FileParam of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("FileParam of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("FileParam of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char** pstring){_error_("FileParam of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char*** pstringarray,int* pM){_error_("FileParam of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("FileParam of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("FileParam of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("File param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Vector** pvec){_error_("FileParam of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Matrix** pmat){_error_("FileParam of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(bool* pbool){  _error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a bool");}
++		void  GetParameterValue(int* pinteger){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(int** pintarray,int* pM){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(char** pstring){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string");}
++		void  GetParameterValue(char*** pstringarray,int* pM){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("File param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
++		void  GetParameterValue(Vector** pvec){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Vec");}
++		void  GetParameterValue(Matrix** pmat){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
+ 		void  GetParameterValue(FILE** pfid){*pfid=value;};
+ 
+-		void  SetValue(bool boolean){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int integer){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble scalar){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char* string){_error_("FileParam of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char** stringarray,int M){_error_("FileParam of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("FileParam of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("FileParam of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* intarray,int M){_error_("FileParam of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* pintarray,int M,int N){_error_("FileParam of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Vector* vec){_error_("FileParam of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Matrix* mat){_error_("FileParam of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(FILE* fid){_error_("File param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("File param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(bool boolean){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(int integer){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(IssmDouble scalar){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(char* string){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(char** stringarray,int M){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(int* intarray,int M){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
++		void  SetValue(int* pintarray,int M,int N){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
++		void  SetValue(Vector* vec){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Vec");}
++		void  SetValue(Matrix* mat){_error2_("FileParam of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
++		void  SetValue(FILE* fid){_error2_("File param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("File param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.h	(revision 12494)
+@@ -43,33 +43,33 @@
+ 		/*}}}*/
+ 		/*Param virtual functions definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+-		void  GetParameterValue(bool* pbool){_error_("IntVec param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int* pinteger){_error_("IntVec param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(bool* pbool){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a bool");}
++		void  GetParameterValue(int* pinteger){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");}
+ 		void  GetParameterValue(int** pintarray,int* pM);
+-		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("IntVec param of enum %i (%s) cannot return a matrix",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("IntVec param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char** pstring){_error_("IntVec param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char*** pstringarray,int* pM){_error_("IntVec param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("IntVec param of enum %i (%s) cannot return a IssmDouble array (maybe in serial?)",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("IntVec param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("IntVec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Vector** pvec){_error_("IntVec param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Matrix** pmat){_error_("IntVec param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(FILE** pfid){_error_("IntVec param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix");}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(char** pstring){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string");}
++		void  GetParameterValue(char*** pstringarray,int* pM){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array (maybe in serial?)");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
++		void  GetParameterValue(Vector** pvec){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Vec");}
++		void  GetParameterValue(Matrix** pmat){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
++		void  GetParameterValue(FILE** pfid){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+-		void  SetValue(bool boolean){_error_("IntVec param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int integer){_error_("IntVec param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble scalar){_error_("IntVec param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char* string){_error_("IntVec param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char** stringarray,int M){_error_("IntVec param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("IntVec param of enum %i (%s) cannot hold a IssmDouble mat array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("IntVec param of enum %i (%s) cannot hold a IssmDouble mat array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(bool boolean){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a boolean");}
++		void  SetValue(int integer){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an integer");}
++		void  SetValue(IssmDouble scalar){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a scalar");}
++		void  SetValue(char* string){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(char** stringarray,int M){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble mat array");}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble mat array");}
+ 		void  SetValue(int* intarray,int M);
+-		void  SetValue(int* pintarray,int M,int N){_error_("IntVec param of enum %i (%s) cannot hold a int mat array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Vector* vec){_error_("IntVec param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Matrix* mat){_error_("IntVec param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(FILE* fid){_error_("IntVec param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("IntVec param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(int* pintarray,int M,int N){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int mat array");}
++		void  SetValue(Vector* vec){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Vec");}
++		void  SetValue(Matrix* mat){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
++		void  SetValue(FILE* fid){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("IntVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
+ 		void  UnitConversion(int direction_enum);
+ 		
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12494)
+@@ -42,33 +42,33 @@
+ 		/*}}}*/
+ 		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+-		void  GetParameterValue(bool* pbool){_error_("Int param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(bool* pbool){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a bool");}
+ 		void  GetParameterValue(int* pinteger){*pinteger=value;}
+-		void  GetParameterValue(int** pintarray,int* pM){_error_("Int param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Int param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Int param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char** pstring){_error_("Int param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char*** pstringarray,int* pM){_error_("Int param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Int param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Int param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Int param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Vector** pvec){_error_("Int param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Matrix** pmat){_error_("Int param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(FILE** pfid){_error_("Int param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(int** pintarray,int* pM){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(char** pstring){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string");}
++		void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
++		void  GetParameterValue(Vector** pvec){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Vec");}
++		void  GetParameterValue(Matrix** pmat){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
++		void  GetParameterValue(FILE** pfid){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+ 		void  SetValue(bool boolean){this->value=(int)boolean;}
+ 		void  SetValue(int integer){this->value=integer;}
+-		void  SetValue(int* intarray,int M){_error_("Int param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* intarray,int M,int N){_error_("Int param of enum %i (%s) cannot hold an int array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(int* intarray,int M){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an int array");}
++		void  SetValue(int* intarray,int M,int N){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an int array");}
+ 		void  SetValue(IssmPDouble scalar){this->value=(int)scalar;}
+-		void  SetValue(char* string){_error_("Int param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char** stringarray,int M){_error_("Int param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Int param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Int param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Vector* vec){_error_("Int param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Matrix* mat){_error_("Int param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(FILE* fid){_error_("Int param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Int param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(char* string){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(char** stringarray,int M){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(Vector* vec){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Vec");}
++		void  SetValue(Matrix* mat){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
++		void  SetValue(FILE* fid){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12494)
+@@ -42,32 +42,32 @@
+ 		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  GetParameterValue(bool* pbool){*pbool=value;}
+-		void  GetParameterValue(int* pinteger){_error_("Bool param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM){_error_("Bool param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Bool param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Bool param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char** pstring){_error_("Bool param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char*** pstringarray,int* pM){_error_("Bool param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Bool param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Bool param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Bool param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Vector** pvec){_error_("Bool param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Matrix** pmat){_error_("Bool param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(FILE** pfid){_error_("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(int* pinteger){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");}
++		void  GetParameterValue(int** pintarray,int* pM){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(char** pstring){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string");}
++		void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
++		void  GetParameterValue(Vector** pvec){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Vec");}
++		void  GetParameterValue(Matrix** pmat){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
++		void  GetParameterValue(FILE** pfid){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+ 		void  SetValue(bool boolean){this->value=boolean;}
+ 		void  SetValue(int integer){this->value=(bool)integer;}
+ 		void  SetValue(IssmPDouble scalar){this->value=(bool)scalar;}
+-		void  SetValue(char* string){_error_("Bool param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char** stringarray,int M){_error_("Bool param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Bool param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Bool param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* intarray,int M){_error_("Bool param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* pintarray,int M,int N){_error_("Bool param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Vector* vec){_error_("Bool param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Matrix* mat){_error_("Bool param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(FILE* fid){_error_("Bool param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Bool param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(char* string){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(char** stringarray,int M){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(int* intarray,int M){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
++		void  SetValue(int* pintarray,int M,int N){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
++		void  SetValue(Vector* vec){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Vec");}
++		void  SetValue(Matrix* mat){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
++		void  SetValue(FILE* fid){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
+ 		void  UnitConversion(int direction_enum);
+ 		
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.h	(revision 12494)
+@@ -43,33 +43,33 @@
+ 		/*}}}*/
+ 		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+-		void  GetParameterValue(bool* pbool){_error_("IntMat param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int* pinteger){_error_("IntMat param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM){_error_("IntMat param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(bool* pbool){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a bool");}
++		void  GetParameterValue(int* pinteger){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");}
++		void  GetParameterValue(int** pintarray,int* pM){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
+ 		void  GetParameterValue(int** pintarray,int* pM,int* pN);
+-		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("IntMat param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char** pstring){_error_("IntMat param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char*** pstringarray,int* pM){_error_("IntMat param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("IntMat param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){_error_("IntMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));};
+-		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("IntMat param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Vector** pvec){_error_("IntMat param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Matrix** pmat){_error_("IntMat param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(FILE** pfid){_error_("IntMat param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(char** pstring){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string");}
++		void  GetParameterValue(char*** pstringarray,int* pM){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");};
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
++		void  GetParameterValue(Vector** pvec){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Vec");}
++		void  GetParameterValue(Matrix** pmat){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
++		void  GetParameterValue(FILE** pfid){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+-		void  SetValue(bool boolean){_error_("IntMat param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int integer){_error_("IntMat param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble scalar){_error_("IntMat param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char* string){_error_("IntMat param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char** stringarray,int M){_error_("IntMat param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("IntMat param of enum %i (%s) cannot hold a IssmDouble vec array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error_("IntMat param of enum %i (%s) cannot hold a IssmDouble vec array",enum_type,EnumToStringx(enum_type));};
+-		void  SetValue(int* intarray,int M){_error_("IntMat param of enum %i (%s) cannot hold a int vec array",enum_type,EnumToStringx(enum_type));};
++		void  SetValue(bool boolean){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a boolean");}
++		void  SetValue(int integer){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an integer");}
++		void  SetValue(IssmDouble scalar){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a scalar");}
++		void  SetValue(char* string){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(char** stringarray,int M){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble vec array");}
++		void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble vec array");};
++		void  SetValue(int* intarray,int M){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int vec array");};
+ 		void  SetValue(int* intarray,int M,int N);
+-		void  SetValue(Vector* vec){_error_("IntMat param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Matrix* mat){_error_("IntMat param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(FILE* fid){_error_("IntMat param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("IntMat param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(Vector* vec){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Vec");}
++		void  SetValue(Matrix* mat){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
++		void  SetValue(FILE* fid){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("IntMat param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.h	(revision 12494)
+@@ -42,33 +42,33 @@
+ 		/*}}}*/
+ 		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+-		void  GetParameterValue(bool* pbool){_error_("Vector param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int* pinteger){_error_("Vector param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM){_error_("Vector param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Vector param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Vector param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char** pstring){_error_("Vector param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char*** pstringarray,int* pM){_error_("Vector param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Vector param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Vector param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Vector param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Matrix** pmat){_error_("Vector param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(bool* pbool){_error2_("Vector param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a bool");}
++		void  GetParameterValue(int* pinteger){_error2_("Vector param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");}
++		void  GetParameterValue(int** pintarray,int* pM){_error2_("Vector param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Vector param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Vector param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(char** pstring){_error2_("Vector param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string");}
++		void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Vector param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Vector param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("Vector param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Vector param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
++		void  GetParameterValue(Matrix** pmat){_error2_("Vector param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
+ 		void  GetParameterValue(Vector** poutput);
+-		void  GetParameterValue(FILE** pfid){_error_("Vector of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(FILE** pfid){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+-		void  SetValue(bool boolean){_error_("Vector of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int integer){_error_("Vector of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble scalar){_error_("Vector of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char* string){_error_("Vector of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char** stringarray,int M){_error_("Vector of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Vector of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Vector of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* intarray,int M){_error_("Vector of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* pintarray,int M,int N){_error_("Vector of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(bool boolean){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a boolean");}
++		void  SetValue(int integer){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an integer");}
++		void  SetValue(IssmDouble scalar){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a scalar");}
++		void  SetValue(char* string){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(char** stringarray,int M){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(int* intarray,int M){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
++		void  SetValue(int* pintarray,int M,int N){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
+ 		void  SetValue(Vector* vec);
+-		void  SetValue(Matrix* mat){_error_("Vector of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(FILE* fid){_error_("Vector of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Vector param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(Matrix* mat){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
++		void  SetValue(FILE* fid){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Vector param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.h	(revision 12494)
+@@ -42,33 +42,33 @@
+ 		/*}}}*/
+ 		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+-		void  GetParameterValue(bool* pbool){_error_("Matrix param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int* pinteger){_error_("Matrix param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM){_error_("Matrix param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Matrix param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Matrix param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char** pstring){_error_("Matrix param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char*** pstringarray,int* pM){_error_("Matrix param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Matrix param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Matrix param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Matrix param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Vector** pvec){_error_("Matrix param of enum %i (%s) cannot return a vec",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(bool* pbool){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a bool");}
++		void  GetParameterValue(int* pinteger){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");}
++		void  GetParameterValue(int** pintarray,int* pM){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(char** pstring){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string");}
++		void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
++		void  GetParameterValue(Vector** pvec){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a vec");}
+ 		void  GetParameterValue(Matrix** poutput);
+-		void  GetParameterValue(FILE** pfid){_error_("Matrix param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(FILE** pfid){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+-		void  SetValue(bool boolean){_error_("Matrix param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int integer){_error_("Matrix param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble scalar){_error_("Matrix param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char* string){_error_("Matrix param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char** stringarray,int M){_error_("Matrix param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Matrix param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Matrix param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* intarray,int M){_error_("Matrix param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* pintarray,int M,int N){_error_("Matrix param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Vector* vec){_error_("Matrix param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(bool boolean){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a boolean");}
++		void  SetValue(int integer){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an integer");}
++		void  SetValue(IssmDouble scalar){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a scalar");}
++		void  SetValue(char* string){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
++		void  SetValue(char** stringarray,int M){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(int* intarray,int M){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
++		void  SetValue(int* pintarray,int M,int N){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
++		void  SetValue(Vector* vec){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Vec");}
+ 		void  SetValue(Matrix* mat);
+-		void  SetValue(FILE* fid){_error_("Matrix param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Matrix param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(FILE* fid){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Matrix param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.h	(revision 12494)
+@@ -44,33 +44,33 @@
+ 		/*}}}*/
+ 		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+-		void  GetParameterValue(bool* pbool){_error_("StringArray param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int* pinteger){_error_("StringArray param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM){_error_("StringArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("StringArray param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("StringArray param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(char** pstring){_error_("StringArray param of enum %i (%s) cannot return a string",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(bool* pbool){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a bool");}
++		void  GetParameterValue(int* pinteger){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");}
++		void  GetParameterValue(int** pintarray,int* pM){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
++		void  GetParameterValue(char** pstring){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string");}
+ 		void  GetParameterValue(char*** pstringarray,int* pM);
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("StringArray param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("StringArray param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Vec param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Vector** pvec){_error_("StringArray param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Matrix** pmat){_error_("StringArray param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(FILE** pfid){_error_("StringArray param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Vec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
++		void  GetParameterValue(Vector** pvec){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Vec");}
++		void  GetParameterValue(Matrix** pmat){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
++		void  GetParameterValue(FILE** pfid){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+-		void  SetValue(bool boolean){_error_("StringArray param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int integer){_error_("StringArray param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble scalar){_error_("StringArray param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(char* string){_error_("StringArray param of enum %i (%s) cannot hold a string",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(bool boolean){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a boolean");}
++		void  SetValue(int integer){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an integer");}
++		void  SetValue(IssmDouble scalar){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a scalar");}
++		void  SetValue(char* string){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
+ 		void  SetValue(char** stringarray,int M);
+-		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("StringArray param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("StringArray param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* intarray,int M){_error_("StringArray param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* pintarray,int M,int N){_error_("StringArray param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Vector* vec){_error_("StringArray param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Matrix* mat){_error_("StringArray param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(FILE* fid){_error_("StringArray param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("StringArray param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(int* intarray,int M){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
++		void  SetValue(int* pintarray,int M,int N){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
++		void  SetValue(Vector* vec){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Vec");}
++		void  SetValue(Matrix* mat){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
++		void  SetValue(FILE* fid){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("StringArray param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.h	(revision 12494)
+@@ -42,33 +42,33 @@
+ 		/*}}}*/
+ 		/*Param vritual function definitions: {{{*/
+ 		int   InstanceEnum(){return enum_type;}
+-		void  GetParameterValue(bool* pbool){_error_("String param of enum %i (%s) cannot return a bool",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int* pinteger){_error_("String param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM){_error_("String param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("String param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble* pIssmDouble){_error_("String param of enum %i (%s) cannot return a IssmDouble",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(bool* pbool){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a bool");}
++		void  GetParameterValue(int* pinteger){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");}
++		void  GetParameterValue(int** pintarray,int* pM){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");}
++		void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
+ 		void  GetParameterValue(char** pstring);
+-		void  GetParameterValue(char*** pstringarray,int* pM){_error_("String param of enum %i (%s) cannot return a string array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("String param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("String param of enum %i (%s) cannot return a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("String param of enum %i (%s) cannot return a matrix array",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Vector** pvec){_error_("String param of enum %i (%s) cannot return a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(Matrix** pmat){_error_("String param of enum %i (%s) cannot return a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  GetParameterValue(FILE** pfid){_error_("Bool param of enum %i (%s) cannot return a FILE",enum_type,EnumToStringx(enum_type));}
++		void  GetParameterValue(char*** pstringarray,int* pM){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a string array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
++		void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
++		void  GetParameterValue(Vector** pvec){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Vec");}
++		void  GetParameterValue(Matrix** pmat){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
++		void  GetParameterValue(FILE** pfid){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+-		void  SetValue(bool boolean){_error_("String param of enum %i (%s) cannot hold a boolean",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int integer){_error_("String param of enum %i (%s) cannot hold an integer",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble scalar){_error_("String param of enum %i (%s) cannot hold a scalar",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(bool boolean){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a boolean");}
++		void  SetValue(int integer){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an integer");}
++		void  SetValue(IssmDouble scalar){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a scalar");}
+ 		void  SetValue(char* string);
+-		void  SetValue(char** stringarray,int M){_error_("String param of enum %i (%s) cannot hold a string array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("String param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("String param of enum %i (%s) cannot hold a IssmDouble array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* intarray,int M){_error_("String param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(int* pintarray,int M,int N){_error_("String param of enum %i (%s) cannot hold a int array",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Vector* vec){_error_("String param of enum %i (%s) cannot hold a Vec",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(Matrix* mat){_error_("String param of enum %i (%s) cannot hold a Mat",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(FILE* fid){_error_("String param of enum %i (%s) cannot hold a FILE",enum_type,EnumToStringx(enum_type));}
+-		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("String param of enum %i (%s) cannot hold an array of matrices",enum_type,EnumToStringx(enum_type));}
++		void  SetValue(char** stringarray,int M){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
++		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
++		void  SetValue(int* intarray,int M){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
++		void  SetValue(int* pintarray,int M,int N){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
++		void  SetValue(Vector* vec){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Vec");}
++		void  SetValue(Matrix* mat){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
++		void  SetValue(FILE* fid){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
++		void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("String param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.h	(revision 12494)
+@@ -43,13 +43,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.h	(revision 12494)
+@@ -35,13 +35,13 @@
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+ 		void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.h	(revision 12494)
+@@ -37,13 +37,13 @@
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+ 		void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.h	(revision 12494)
+@@ -43,13 +43,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_StyleSelector.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_StyleSelector.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_StyleSelector.h	(revision 12494)
+@@ -28,13 +28,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.h	(revision 12494)
+@@ -34,13 +34,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.h	(revision 12494)
+@@ -29,13 +29,13 @@
+ 		virtual void  Echo();
+ 		virtual void  DeepEcho();
+ 		virtual void  DeepEcho(const char* indent);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ 		/*virtual functions: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.h	(revision 12494)
+@@ -31,13 +31,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.h	(revision 12494)
+@@ -30,13 +30,13 @@
+ 		virtual void  Echo();
+ 		virtual void  DeepEcho();
+ 		virtual void  DeepEcho(const char* indent);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ 		/*virtual functions: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_SubStyle.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_SubStyle.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_SubStyle.h	(revision 12494)
+@@ -28,13 +28,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.h	(revision 12494)
+@@ -37,13 +37,13 @@
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+ 		void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.h	(revision 12494)
+@@ -35,13 +35,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.h	(revision 12494)
+@@ -32,13 +32,13 @@
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+ 		void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.h	(revision 12494)
+@@ -39,13 +39,13 @@
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+ 		void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Geometry.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Geometry.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Geometry.h	(revision 12494)
+@@ -28,13 +28,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.h	(revision 12494)
+@@ -34,13 +34,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.h	(revision 12494)
+@@ -33,13 +33,13 @@
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+ 		void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.h	(revision 12494)
+@@ -31,13 +31,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.h	(revision 12494)
+@@ -35,13 +35,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.h	(revision 12494)
+@@ -37,13 +37,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.h	(revision 12494)
+@@ -29,13 +29,13 @@
+ 		virtual void  Echo();
+ 		virtual void  DeepEcho();
+ 		virtual void  DeepEcho(const char* indent);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ 		/*virtual functions: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.h	(revision 12494)
+@@ -33,13 +33,13 @@
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+ 		void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.h	(revision 12494)
+@@ -30,13 +30,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.h	(revision 12494)
+@@ -29,13 +29,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.h	(revision 12494)
+@@ -29,13 +29,13 @@
+ 		void  DeepEcho(const char* indent);
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.h	(revision 12494)
+@@ -30,13 +30,13 @@
+ 		void  Write(FILE* fid,const char* indent);
+ 		void  Read(FILE* fid,char* kstr);
+ 		void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
+-		int   Id(){_error_("Not implemented yet.");};
+-		int   MyRank(){_error_("Not implemented yet.");};
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   MarshallSize(){_error_("Not implemented yet.");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
+-		int   ObjectEnum(){_error_("Not implemented yet.");};
+-		Object* copy(){_error_("Not implemented yet.");};
++		int   Id(){_error2_("Not implemented yet.");};
++		int   MyRank(){_error2_("Not implemented yet.");};
++		void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   MarshallSize(){_error2_("Not implemented yet.");};
++		void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
++		int   ObjectEnum(){_error2_("Not implemented yet.");};
++		Object* copy(){_error2_("Not implemented yet.");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12494)
+@@ -27,10 +27,10 @@
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(char* indent);
+-		int   Id(){_error_("Not implemented yet");};
+-		int   MyRank(){_error_("Not implemented yet");};
++		int   Id(){_error2_("Not implemented yet");};
++		int   MyRank(){_error2_("Not implemented yet");};
+ 		int   ObjectEnum(){return OptionStructEnum;};
+-		Object* copy(){_error_("Not implemented yet");};
++		Object* copy(){_error2_("Not implemented yet");};
+ 		/*}}}*/
+ 
+ 		/*virtual functions: */
+@@ -38,12 +38,12 @@
+ 		int   NumEl();
+ 		int   NDims();
+ 		int*  Size();
+-		void  Get(int* pvalue){_error_("An OptionStruct object cannot return a int");};
+-		void  Get(IssmPDouble* pvalue){_error_("An OptionStruct object cannot return a IssmPDouble");};
+-		void  Get(bool* pvalue){  _error_("An OptionStruct object cannot return a bool");};
+-		void  Get(char** pvalue){ _error_("An OptionStruct object cannot return a string");};
+-		void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionStruct object cannot return a string vec");};
+-		void  Get(IssmPDouble** pvalue,int *pnumel){ _error_("An OptionStruct object cannot return a IssmPDouble vec");};
++		void  Get(int* pvalue){_error2_("An OptionStruct object cannot return a int");};
++		void  Get(IssmPDouble* pvalue){_error2_("An OptionStruct object cannot return a IssmPDouble");};
++		void  Get(bool* pvalue){  _error2_("An OptionStruct object cannot return a bool");};
++		void  Get(char** pvalue){ _error2_("An OptionStruct object cannot return a string");};
++		void  Get(char*** ppvalue,int *pnumel){ _error2_("An OptionStruct object cannot return a string vec");};
++		void  Get(IssmPDouble** pvalue,int *pnumel){ _error2_("An OptionStruct object cannot return a IssmPDouble vec");};
+ 		void  Get(Options** pvalue);
+ 		void  Get(Options*** ppvalue,int *pnumel);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12494)
+@@ -27,10 +27,10 @@
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(char* indent);
+-		int   Id(){_error_("Not implemented yet");};
+-		int   MyRank(){_error_("Not implemented yet");};
++		int   Id(){_error2_("Not implemented yet");};
++		int   MyRank(){_error2_("Not implemented yet");};
+ 		int   ObjectEnum(){return OptionDoubleEnum;};
+-		Object* copy(){_error_("Not implemented yet");};
++		Object* copy(){_error2_("Not implemented yet");};
+ 		/*}}}*/
+ 
+ 		/*virtual functions: */
+@@ -40,12 +40,12 @@
+ 		int*  Size();
+ 		void  Get(int* pvalue);
+ 		void  Get(IssmPDouble* 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");};
+-		void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionDouble object cannot return a string vec");};
++		void  Get(bool* pvalue){  _error2_("An OptionDouble object cannot return a bool");};
++		void  Get(char** pvalue){ _error2_("An OptionDouble object cannot return a string");};
++		void  Get(char*** ppvalue,int *pnumel){ _error2_("An OptionDouble object cannot return a string vec");};
+ 		void  Get(IssmPDouble** pvalue,int* pnumel);
+-		void  Get(Options** pvalue){ _error_("An OptionDouble object cannot return an Options DataSet");};
+-		void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionDouble object cannot return an Options DataSet vec");};
++		void  Get(Options** pvalue){ _error2_("An OptionDouble object cannot return an Options DataSet");};
++		void  Get(Options*** ppvalue,int *pnumel){ _error2_("An OptionDouble object cannot return an Options DataSet vec");};
+ 
+ };
+ #endif  /* _OPTIONDOUBLE_H */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12494)
+@@ -27,10 +27,10 @@
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(char* indent);
+-		int   Id(){_error_("Not implemented yet");};
+-		int   MyRank(){_error_("Not implemented yet");};
++		int   Id(){_error2_("Not implemented yet");};
++		int   MyRank(){_error2_("Not implemented yet");};
+ 		int   ObjectEnum(){return OptionLogicalEnum;};
+-		Object* copy(){_error_("Not implemented yet");};
++		Object* copy(){_error2_("Not implemented yet");};
+ 		/*}}}*/
+ 
+ 		/*virtual functions: */
+@@ -38,14 +38,14 @@
+ 		int   NumEl();
+ 		int   NDims();
+ 		int*  Size();
+-		void  Get(int* pvalue){_error_("An OptionLogical object cannot return a int");};
+-		void  Get(IssmPDouble* pvalue){_error_("An OptionLogical object cannot return a IssmPDouble");};
++		void  Get(int* pvalue){_error2_("An OptionLogical object cannot return a int");};
++		void  Get(IssmPDouble* pvalue){_error2_("An OptionLogical object cannot return a IssmPDouble");};
+ 		void  Get(bool* pvalue);
+-		void  Get(char** pvalue){ _error_("An OptionLogical object cannot return a string");};
+-		void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionLogical object cannot return a string vec");};
+-		void  Get(IssmPDouble** pvalue,int *pnumel){ _error_("An OptionLogical object cannot return a IssmPDouble vec");};
+-		void  Get(Options** pvalue){ _error_("An OptionLogical object cannot return an Options DataSet");};
+-		void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionLogical object cannot return an Options DataSet vec");};
++		void  Get(char** pvalue){ _error2_("An OptionLogical object cannot return a string");};
++		void  Get(char*** ppvalue,int *pnumel){ _error2_("An OptionLogical object cannot return a string vec");};
++		void  Get(IssmPDouble** pvalue,int *pnumel){ _error2_("An OptionLogical object cannot return a IssmPDouble vec");};
++		void  Get(Options** pvalue){ _error2_("An OptionLogical object cannot return an Options DataSet");};
++		void  Get(Options*** ppvalue,int *pnumel){ _error2_("An OptionLogical object cannot return an Options DataSet vec");};
+ 
+ };
+ #endif  /* _OPTIONLOGICAL_H */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12494)
+@@ -27,10 +27,10 @@
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(char* indent);
+-		int   Id(){_error_("Not implemented yet");};
+-		int   MyRank(){_error_("Not implemented yet");};
++		int   Id(){_error2_("Not implemented yet");};
++		int   MyRank(){_error2_("Not implemented yet");};
+ 		int   ObjectEnum(){return OptionCharEnum;};
+-		Object* copy(){_error_("Not implemented yet");};
++		Object* copy(){_error2_("Not implemented yet");};
+ 		/*}}}*/
+ 
+ 		/*virtual functions: */
+@@ -38,14 +38,14 @@
+ 		int   NumEl();
+ 		int   NDims();
+ 		int*  Size();
+-		void  Get(int* pvalue){_error_("An OptionChar object cannot return a int");};
+-		void  Get(IssmPDouble* pvalue){_error_("An OptionChar object cannot return a IssmPDouble");};
+-		void  Get(bool* pvalue){  _error_("An OptionChar object cannot return a bool");};
++		void  Get(int* pvalue){_error2_("An OptionChar object cannot return a int");};
++		void  Get(IssmPDouble* pvalue){_error2_("An OptionChar object cannot return a IssmPDouble");};
++		void  Get(bool* pvalue){  _error2_("An OptionChar object cannot return a bool");};
+ 		void  Get(char** pvalue);
+ 		void  Get(char*** ppvalue,int *pnumel);
+-		void  Get(IssmPDouble** pvalue,int *pnumel){ _error_("An OptionChar object cannot return a IssmPDouble vec");};
+-		void  Get(Options** pvalue){ _error_("An OptionChar object cannot return an Options DataSet");};
+-		void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionChar object cannot return an Options DataSet vec");};
++		void  Get(IssmPDouble** pvalue,int *pnumel){ _error2_("An OptionChar object cannot return a IssmPDouble vec");};
++		void  Get(Options** pvalue){ _error2_("An OptionChar object cannot return an Options DataSet");};
++		void  Get(Options*** ppvalue,int *pnumel){ _error2_("An OptionChar object cannot return an Options DataSet vec");};
+ 
+ };
+ #endif  /* _OPTIONCHAR_H */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.h	(revision 12494)
+@@ -30,10 +30,10 @@
+ 		virtual void  Echo();
+ 		virtual void  DeepEcho();
+ 		virtual void  DeepEcho(char* indent);
+-		int   Id(){_error_("Not implemented yet");};
+-		int   MyRank(){_error_("Not implemented yet");};
++		int   Id(){_error2_("Not implemented yet");};
++		int   MyRank(){_error2_("Not implemented yet");};
+ 		int   ObjectEnum(){return OptionEnum;};
+-		Object* copy(){_error_("Not implemented yet");};
++		Object* copy(){_error2_("Not implemented yet");};
+ 		/*}}}*/
+ 
+ 		/*virtual functions: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12494)
+@@ -27,10 +27,10 @@
+ 		void  Echo();
+ 		void  DeepEcho();
+ 		void  DeepEcho(char* indent);
+-		int   Id(){_error_("Not implemented yet");};
+-		int   MyRank(){_error_("Not implemented yet");};
++		int   Id(){_error2_("Not implemented yet");};
++		int   MyRank(){_error2_("Not implemented yet");};
+ 		int   ObjectEnum(){return OptionCellEnum;};
+-		Object* copy(){_error_("Not implemented yet");};
++		Object* copy(){_error2_("Not implemented yet");};
+ 		/*}}}*/
+ 
+ 		/*virtual functions: */
+@@ -38,14 +38,14 @@
+ 		int   NumEl();
+ 		int   NDims();
+ 		int*  Size();
+-		void  Get(int* pvalue){_error_("An OptionCell object cannot return a int");};
+-		void  Get(IssmPDouble* pvalue){_error_("An OptionCell object cannot return a IssmPDouble");};
+-		void  Get(bool* pvalue){  _error_("An OptionCell object cannot return a bool");};
+-		void  Get(char** pvalue){ _error_("An OptionCell object cannot return a string");};
+-		void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionCell object cannot return a string vec");};
+-		void  Get(IssmPDouble** pvalue,int *pnumel){ _error_("An OptionCell object cannot return a IssmPDouble vec");};
++		void  Get(int* pvalue){_error2_("An OptionCell object cannot return a int");};
++		void  Get(IssmPDouble* pvalue){_error2_("An OptionCell object cannot return a IssmPDouble");};
++		void  Get(bool* pvalue){  _error2_("An OptionCell object cannot return a bool");};
++		void  Get(char** pvalue){ _error2_("An OptionCell object cannot return a string");};
++		void  Get(char*** ppvalue,int *pnumel){ _error2_("An OptionCell object cannot return a string vec");};
++		void  Get(IssmPDouble** pvalue,int *pnumel){ _error2_("An OptionCell object cannot return a IssmPDouble vec");};
+ 		void  Get(Options** pvalue);
+-		void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionCell object cannot return an Options DataSet vec");};
++		void  Get(Options*** ppvalue,int *pnumel){ _error2_("An OptionCell object cannot return an Options DataSet vec");};
+ 
+ };
+ #endif  /* _OPTIONCELL_H */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.h	(revision 12494)
+@@ -63,7 +63,7 @@
+ 		void  InputUpdateFromConstant(int constant, int name);
+ 		void  InputUpdateFromConstant(bool constant, int name);
+ 		void  InputUpdateFromSolution(IssmDouble* solution);
+-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
++		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("not implemented yet");};
+ 		/*}}}*/
+ 		/*Load virtual functions definitions: {{{*/
+ 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.h	(revision 12494)
+@@ -61,25 +61,25 @@
+ 		/*}}}*/
+ 		/*Update virtual functions resolution: {{{*/
+ 		void    InputUpdateFromVector(IssmDouble* vector, int name, int type);
+-		void    InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
+-		void    InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
+-		void    InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows,int ncols, int name, int type){_error_("Not implemented yet!");}
+-		void    InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error_("Not implemented yet!");}
+-		void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
+-		void    InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}
++		void    InputUpdateFromVector(int* vector, int name, int type){_error2_("Not implemented yet!");}
++		void    InputUpdateFromVector(bool* vector, int name, int type){_error2_("Not implemented yet!");}
++		void    InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows,int ncols, int name, int type){_error2_("Not implemented yet!");}
++		void    InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error2_("Not implemented yet!");}
++		void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error2_("Not implemented yet!");}
++		void    InputUpdateFromVectorDakota(bool* vector, int name, int type){_error2_("Not implemented yet!");}
+ 		void    InputUpdateFromConstant(IssmDouble constant, int name);
+-		void    InputUpdateFromConstant(int constant, int name){_error_("Not implemented yet!");}
++		void    InputUpdateFromConstant(int constant, int name){_error2_("Not implemented yet!");}
+ 		void    InputUpdateFromConstant(bool constant, int name);
+-		void    InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
+-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
++		void    InputUpdateFromSolution(IssmDouble* solution){_error2_("Not implemented yet!");}
++		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("not implemented yet");};
+ 		/*}}}*/
+ 		/*Load virtual functions definitions: {{{*/
+ 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
+ 		void  CreatePVector(Vector* pf);
+-		void  CreateJacobianMatrix(Matrix* Jff){_error_("Not implemented yet");};
+-		void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error_("Not implemented yet");};
++		void  CreateJacobianMatrix(Matrix* Jff){_error2_("Not implemented yet");};
++		void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error2_("Not implemented yet");};
+ 		void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, IssmDouble kmax);
+ 		void  PenaltyCreatePVector(Vector* pf, IssmDouble kmax);
+ 		bool  InAnalysis(int analysis_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.h	(revision 12494)
+@@ -49,25 +49,25 @@
+ 		/*}}}*/
+ 		/*Update virtual functions resolution: {{{*/
+ 		void    InputUpdateFromVector(IssmDouble* vector, int name, int type){/*Do nothing*/}
+-		void    InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
+-		void    InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
++		void    InputUpdateFromVector(int* vector, int name, int type){_error2_("Not implemented yet!");}
++		void    InputUpdateFromVector(bool* vector, int name, int type){_error2_("Not implemented yet!");}
+ 		void    InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){/*Do nothing*/}
+ 		void    InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){/*Do nothing*/}
+-		void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
+-		void    InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}
++		void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error2_("Not implemented yet!");}
++		void    InputUpdateFromVectorDakota(bool* vector, int name, int type){_error2_("Not implemented yet!");}
+ 		void    InputUpdateFromConstant(IssmDouble constant, int name){/*Do nothing*/};
+ 		void    InputUpdateFromConstant(int constant, int name){/*Do nothing*/};
+-		void    InputUpdateFromConstant(bool constant, int name){_error_("Not implemented yet!");}
+-		void    InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
+-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
++		void    InputUpdateFromConstant(bool constant, int name){_error2_("Not implemented yet!");}
++		void    InputUpdateFromSolution(IssmDouble* solution){_error2_("Not implemented yet!");}
++		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("not implemented yet");};
+ 		/*}}}*/
+ 		/*Load virtual functions definitions: {{{*/
+ 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
+ 		void  CreatePVector(Vector* pf);
+-		void  CreateJacobianMatrix(Matrix* Jff){_error_("Not implemented yet");};
+-		void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error_("Not implemented yet");};
++		void  CreateJacobianMatrix(Matrix* Jff){_error2_("Not implemented yet");};
++		void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error2_("Not implemented yet");};
+ 		void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, IssmDouble kmax);
+ 		void  PenaltyCreatePVector(Vector* pf, IssmDouble kmax);
+ 		bool  InAnalysis(int analysis_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.h	(revision 12494)
+@@ -43,15 +43,15 @@
+ 		void  InputUpdateFromVector(IssmDouble* vector, int name, int type);
+ 		void  InputUpdateFromVector(int* vector, int name, int type);
+ 		void  InputUpdateFromVector(bool* vector, int name, int type);
+-		void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrow, int ncols,int name, int type){_error_("Not implemented yet!");}
+-		void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error_("Not implemented yet!");}
+-		void  InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
+-		void  InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}
++		void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrow, int ncols,int name, int type){_error2_("Not implemented yet!");}
++		void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error2_("Not implemented yet!");}
++		void  InputUpdateFromVectorDakota(int* vector, int name, int type){_error2_("Not implemented yet!");}
++		void  InputUpdateFromVectorDakota(bool* vector, int name, int type){_error2_("Not implemented yet!");}
+ 		void  InputUpdateFromConstant(IssmDouble constant, int name);
+ 		void  InputUpdateFromConstant(int constant, int name);
+ 		void  InputUpdateFromConstant(bool constant, int name);
+-		void  InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
+-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
++		void  InputUpdateFromSolution(IssmDouble* solution){_error2_("Not implemented yet!");}
++		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("not implemented yet");};
+ 		/*}}}*/
+ 			/*Load virtual functions definitions: {{{*/
+ 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.h	(revision 12494)
+@@ -64,15 +64,15 @@
+ 		void  InputUpdateFromConstant(int constant, int name);
+ 		void  InputUpdateFromConstant(bool constant, int name);
+ 		void  InputUpdateFromSolution(IssmDouble* solution);
+-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
++		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("not implemented yet");};
+ 		/*}}}*/
+ 		/*Load virtual functions definitions: {{{*/
+ 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+ 		void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
+ 		void  CreatePVector(Vector* pf);
+-		void  CreateJacobianMatrix(Matrix* Jff){_error_("Not implemented yet");};
+-		void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error_("Not implemented yet");};
++		void  CreateJacobianMatrix(Matrix* Jff){_error2_("Not implemented yet");};
++		void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error2_("Not implemented yet");};
+ 		void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, IssmDouble kmax);
+ 		void  PenaltyCreatePVector(Vector* pf, IssmDouble kmax);
+ 		bool  InAnalysis(int analysis_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12494)
+@@ -535,7 +535,7 @@
+ 	}
+ 	else if(fill==MelangeEnum){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice)
+ 
+-		if(!shelf) _error2_("" << "fill type " << fill << " not supported on ice sheets yet.");
++		if(!shelf) _error2_("fill type " << fill << " not supported on ice sheets yet.");
+ 
+ 		pressure_litho=rho_ice*gravity*pow(thickness,(IssmDouble)2)/(IssmDouble)2;
+ 		pressure_air=0;
+@@ -545,7 +545,7 @@
+ 		pressure=pressure_litho-pressure_air-pressure_melange-pressure_water;
+ 	}
+ 	else{
+-		_error2_("" << "fill type " << fill << " not supported yet.");
++		_error2_("fill type " << fill << " not supported yet.");
+ 	}
+ 
+ 	/*Ok, add contribution to first node, along the normal i==0: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h	(revision 12494)
+@@ -28,12 +28,12 @@
+ 						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"); };
++					void    Echo()       {_error2_("not implemented yet"); };
++					void    DeepEcho()   {_error2_("not implemented yet"); };
++					int     Id()         {_error2_("not implemented yet"); };
++					int     MyRank()     {_error2_("not implemented yet"); };
++					int     ObjectEnum() {_error2_("not implemented yet"); };
++					Object *copy()       {_error2_("not implemented yet"); };
+ 			};
+ 
+ 			/*BamgQuadtree private Fields*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.h	(revision 12494)
+@@ -33,7 +33,7 @@
+ 				R2 F(double s){ 
+ 					double c01=lEnd-lBegin, c0=(lEnd-s)/c01, c1=(s-lBegin)/c01;
+ 					if (lBegin>s || s>lEnd){
+-						_error_("lBegin>s || s>lEnd");
++						_error2_("lBegin>s || s>lEnd");
+ 					}
+ 					return e->F(sBegin*c0+sEnd*c1);
+ 				}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12494)
+@@ -3562,7 +3562,7 @@
+ 		}
+ 	}
+ 	if(k) {
+-		_error2_("" << k << " boundary edges (from the geometry) are not defined as mesh edges");
++		_error2_(k << " boundary edges (from the geometry) are not defined as mesh edges");
+ 	}
+ 
+ 	/* mesh generation with boundary points*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 12494)
+@@ -47,8 +47,8 @@
+ 		/*}}}*/
+ 		/*DoubleElementResult management: {{{*/
+ 		int   InstanceEnum();
+-		void GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){_error_("not implemented");};
+-		void GetElementVectorFromResults(Vector* vector,int dof){_error_("not implemented");};
++		void GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){_error2_("not implemented");};
++		void GetElementVectorFromResults(Vector* vector,int dof){_error2_("not implemented");};
+ 		/*}}}*/
+ };
+ #endif  /* _DOUBLEELEMENTRESULT_H */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.h	(revision 12494)
+@@ -44,7 +44,7 @@
+ 		int   Id(); 
+ 		int   MyRank();
+ 		int   ObjectEnum();
+-		Object* copy(){_error_("Not implemented yet (similar to Elements)");};
++		Object* copy(){_error2_("Not implemented yet (similar to Elements)");};
+ 		/*}}}*/
+ 		/*Update virtual functions definitions: {{{*/
+ 		
+@@ -58,8 +58,8 @@
+ 		void  InputUpdateFromConstant(IssmDouble constant, int name);
+ 		void  InputUpdateFromConstant(int constant, int name);
+ 		void  InputUpdateFromConstant(bool constant, int name);
+-		void  InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
+-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("Not implemented yet!");}
++		void  InputUpdateFromSolution(IssmDouble* solution){_error2_("Not implemented yet!");}
++		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("Not implemented yet!");}
+ 		/*}}}*/
+ 		/*Node numerical routines {{{*/
+ 		void   Configure(DataSet* nodes,Vertices* vertices);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12494)
+@@ -1251,8 +1251,8 @@
+ 	for(i=0;i<num_enums/2;i++){
+ 		new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
+ 		old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]);
+-		if(!new_inputs[i])_error2_("" << " could not find input with enum " << EnumToStringx(enums[2*i+0]));
+-		if(!old_inputs[i])_error2_("" << " could not find input with enum " << EnumToStringx(enums[2*i+0]));
++		if(!new_inputs[i])_error2_(" could not find input with enum " << EnumToStringx(enums[2*i+0]));
++		if(!old_inputs[i])_error2_(" could not find input with enum " << EnumToStringx(enums[2*i+0]));
+ 	}
+ 
+ 	/*ok, we've got the inputs (new and old), now loop throught the number of criterions and fill the eps array:*/
+@@ -1281,7 +1281,7 @@
+ 	 oldinput=(Input*)this->matice->inputs->GetInput(enum_type);
+ 	else
+ 	 _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
+-	if(!oldinput)_error2_("" << " could not find old input with enum: " << EnumToStringx(enum_type));
++	if(!oldinput)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
+ 	newinput=(Input*)oldinput->copy();
+ 
+ 	/*Assign new name (average)*/
+@@ -1656,7 +1656,7 @@
+ 	else if ((code==7) || (code==3)){ //IssmDouble
+ 		this->inputs->AddInput(new DoubleInput(name,(int)scalar));
+ 	}
+-	else _error2_("" << " could not recognize nature of vector from code " << code);
++	else _error2_(" could not recognize nature of vector from code " << code);
+ 
+ }
+ /*}}}*/
+@@ -1738,7 +1738,7 @@
+ 			else if (code==7){ //IssmDouble
+ 				this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index]));
+ 			}
+-			else _error2_("" << " could not recognize nature of vector from code " << code);
++			else _error2_(" could not recognize nature of vector from code " << code);
+ 		}
+ 		else {
+ 			_error2_("transient elementary inputs not supported yet!");
+@@ -2650,7 +2650,7 @@
+ 	rho_ice=matpar->GetRhoIce();
+ 
+ 	/*First off, check that this segment belongs to this element: */
+-	if ((int)*(segment+4)!=this->id)_error2_("" << "error message: segment with id " << (int)*(segment+4) << " does not belong to element with id:" << this->id);
++	if ((int)*(segment+4)!=this->id)_error2_("error message: segment with id " << (int)*(segment+4) << " does not belong to element with id:" << this->id);
+ 
+ 	/*Recover segment node locations: */
+ 	x1=*(segment+0); y1=*(segment+1); x2=*(segment+2); y2=*(segment+3);
+@@ -3537,7 +3537,7 @@
+ 			GradjVyBalancedthickness(gradient,control_index);
+ 			break;
+ 		default:
+-			_error2_("" << "control type not supported yet: " << control_type);
++			_error2_("control type not supported yet: " << control_type);
+ 	}
+ 
+ 	/*Now deal with ∂J/∂alpha*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h	(revision 12494)
+@@ -98,7 +98,7 @@
+ 		void   InputScale(int enum_type,IssmDouble scale_factor);
+ 		void   InputToResult(int enum_type,int step,IssmDouble time);
+ 		void   DeleteResults(void);
+-		void   MaterialUpdateFromTemperature(void){_error_("not implemented yet");};
++		void   MaterialUpdateFromTemperature(void){_error2_("not implemented yet");};
+ 		void   MigrateGroundingLine(IssmDouble* oldfloating,IssmDouble* sheet_ungrounding);
+ 		int    NodalValue(IssmDouble* pvalue, int index, int natureofdataenum,bool process_units);
+ 		void   PotentialSheetUngrounding(Vector* potential_sheet_ungrounding);
+@@ -108,7 +108,7 @@
+ 		void   PatchFill(int* pcount, Patch* patch);
+ 		void   PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes);
+ 		void   ProcessResultsUnits(void);
+-		void   ResetCoordinateSystem(void){_error_("not implemented yet");};
++		void   ResetCoordinateSystem(void){_error2_("not implemented yet");};
+ 		IssmDouble SurfaceArea(void);
+ 		void   Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type);
+ 		int    UpdatePotentialSheetUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12494)
+@@ -1152,8 +1152,8 @@
+ 	for(i=0;i<num_enums/2;i++){
+ 		new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
+ 		old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]);
+-		if(!new_inputs[i])_error2_("" << " could not find input with enum " << EnumToStringx(enums[2*i+0]));
+-		if(!old_inputs[i])_error2_("" << " could not find input with enum " << EnumToStringx(enums[2*i+0]));
++		if(!new_inputs[i])_error2_(" could not find input with enum " << EnumToStringx(enums[2*i+0]));
++		if(!old_inputs[i])_error2_(" could not find input with enum " << EnumToStringx(enums[2*i+0]));
+ 	}
+ 
+ 	/*ok, we've got the inputs (new and old), now loop throught the number of criterions and fill the eps array:*/
+@@ -1185,7 +1185,7 @@
+ 	else if ((code==7) || (code==3)){ //IssmDouble
+ 		this->inputs->AddInput(new DoubleInput(name,(IssmDouble)scalar));
+ 	}
+-	else _error2_("" << " could not recognize nature of vector from code " << code);
++	else _error2_(" could not recognize nature of vector from code " << code);
+ 
+ }
+ /*}}}*/
+@@ -1267,7 +1267,7 @@
+ 			else if (code==7){ //IssmDouble
+ 				this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index]));
+ 			}
+-			else _error2_("" << " could not recognize nature of vector from code " << code);
++			else _error2_(" could not recognize nature of vector from code " << code);
+ 		}
+ 		else {
+ 			_error2_("transient elementary inputs not supported yet!");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/PentaRef.h	(revision 12494)
+@@ -55,9 +55,9 @@
+ 		void GetLStokesMacAyeal(IssmDouble* LStokesMacAyeal, GaussPenta* gauss);
+ 		void GetLprimeStokesMacAyeal(IssmDouble* LprimeStokesMacAyeal, IssmDouble* xyz_list, GaussPenta* gauss);
+ 		void GetInputValue(IssmDouble* pvalue,IssmDouble* plist, GaussPenta* gauss);
+-		void GetInputValue(IssmDouble* pvalue,IssmDouble* plist,GaussTria* gauss){_error_("only PentaGauss are supported");};
++		void GetInputValue(IssmDouble* pvalue,IssmDouble* plist,GaussTria* gauss){_error2_("only PentaGauss are supported");};
+ 		void GetInputDerivativeValue(IssmDouble* pvalues, IssmDouble* plist,IssmDouble* xyz_list, GaussPenta* gauss);
+-		void GetInputDerivativeValue(IssmDouble* pvalues, IssmDouble* plist,IssmDouble* xyz_list, GaussTria* gauss){_error_("only PentaGauss are supported");};
++		void GetInputDerivativeValue(IssmDouble* pvalues, IssmDouble* plist,IssmDouble* xyz_list, GaussTria* gauss){_error2_("only PentaGauss are supported");};
+ 
+ };
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12494)
+@@ -184,7 +184,7 @@
+ 		if(this->objects[i]==NULL){
+ 			this->objects[i]=(Object*)dataset->GetObjectById(this->offsets+i,this->ids[i]); //remember the offset for later on.
+ 			/*check the id is correct!: */
+-			if (this->objects[i]->Id()!=this->ids[i]) _error2_("" << " wrong id: " << this->objects[i]->Id() << " vs " << this->ids[i] << "  in resolved pointer!");
++			if (this->objects[i]->Id()!=this->ids[i]) _error2_(" wrong id: " << this->objects[i]->Id() << " vs " << this->ids[i] << "  in resolved pointer!");
+ 		}
+ 	}
+ }
+@@ -193,7 +193,7 @@
+ Object* Hook::delivers(void){
+ 	
+ 	/*first, check that we only have one T object in our object list: */
+-	if (this->num!=1) _error2_("" << " trying to delivery a single hook object when hook holds " << this->num << " objects" << "\n");
++	if (this->num!=1) _error2_(" trying to delivery a single hook object when hook holds " << this->num << " objects" << "\n");
+ 
+ 	/*check NULL: */
+ 	if (this->objects==NULL) _error2_("hook is not pointing to any object, objects pointer is NULL");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12494)
+@@ -39,7 +39,7 @@
+ 		Input* PointwiseMin(Input* inputB);
+ 		Input* PointwiseMax(Input* inputB);
+ 		ElementResult* SpawnResult(int step, IssmPDouble time);
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+@@ -47,10 +47,10 @@
+ 		void GetInputValue(int* pvalue);
+ 		void GetInputValue(IssmPDouble* pvalue);
+ 		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+ 		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+ 		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
+ 		void GetInputAverage(IssmPDouble* pvalue);
+@@ -65,15 +65,15 @@
+ 		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
+ 		void ConstrainMin(IssmPDouble minimum);
+ 		void Scale(IssmPDouble scale_factor);
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
+ 		void AXPY(Input* xinput,IssmPDouble scalar);
+ 		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
+-		IssmPDouble InfinityNorm(void){_error_("not implemented yet");};
++		IssmPDouble InfinityNorm(void){_error2_("not implemented yet");};
+ 		IssmPDouble Max(void);
+ 		IssmPDouble MaxAbs(void);
+ 		IssmPDouble Min(void);
+ 		IssmPDouble MinAbs(void);
+-		void Extrude(void){_error_("not supported yet");};
++		void Extrude(void){_error2_("not supported yet");};
+ 		void VerticallyIntegrate(Input* thickness_input);
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+ 		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12494)
+@@ -40,11 +40,11 @@
+ 		/*ControlInput management: {{{*/
+ 		int    InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+-		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+-		Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
+-		Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
++		Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
++		Input* PointwiseMin(Input* inputB){_error2_("not implemented yet");};
++		Input* PointwiseMax(Input* inputB){_error2_("not implemented yet");};
+ 		ElementResult* SpawnResult(int step, IssmPDouble time);
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+@@ -53,38 +53,38 @@
+ 		void GetInputValue(int* pvalue);
+ 		void GetInputValue(IssmPDouble* pvalue);
+ 		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+ 		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+ 		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
+ 		void GetInputAverage(IssmPDouble* pvalue);
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void ChangeEnum(int newenumtype){_error_("not implemented yet");};
+-		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){_error_("not implemented yet");};
+-		void ConstrainMin(IssmPDouble minimum){_error_("not implemented yet");};
+-		void Scale(IssmPDouble scale_factor){_error_("not implemented yet");};
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
+-		void AXPY(Input* xinput,IssmPDouble scalar){_error_("not implemented yet");};
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void ChangeEnum(int newenumtype){_error2_("not implemented yet");};
++		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){_error2_("not implemented yet");};
++		void ConstrainMin(IssmPDouble minimum){_error2_("not implemented yet");};
++		void Scale(IssmPDouble scale_factor){_error2_("not implemented yet");};
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
++		void AXPY(Input* xinput,IssmPDouble scalar){_error2_("not implemented yet");};
+ 		void Constrain(void);
+ 		void Constrain(IssmPDouble min,IssmPDouble max);
+-		IssmPDouble InfinityNorm(void){_error_("not implemented yet");};
+-		IssmPDouble Max(void){_error_("not implemented yet");};
+-		IssmPDouble MaxAbs(void){_error_("not implemented yet");};
+-		IssmPDouble Min(void){_error_("not implemented yet");};
+-		IssmPDouble MinAbs(void){_error_("not implemented yet");};
++		IssmPDouble InfinityNorm(void){_error2_("not implemented yet");};
++		IssmPDouble Max(void){_error2_("not implemented yet");};
++		IssmPDouble MaxAbs(void){_error2_("not implemented yet");};
++		IssmPDouble Min(void){_error2_("not implemented yet");};
++		IssmPDouble MinAbs(void){_error2_("not implemented yet");};
+ 		void Extrude(void);
+ 		void VerticallyIntegrate(Input* thickness_input);
+ 		void GetVectorFromInputs(Vector* vector,int* doflist,const char* data);
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){_error_("not implemented yet");};
++		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){_error2_("not implemented yet");};
+ 		ElementResult* SpawnGradient(int step, IssmPDouble time);
+ 		void GetGradient(Vector* gradient_vec,int* doflist);
+ 		void ScaleGradient(IssmPDouble scale);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12494)
+@@ -36,55 +36,55 @@
+ 		/*DatasetInput management: {{{*/
+ 		int    InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+-		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+-		Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
+-		Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
+-		ElementResult* SpawnResult(int step, IssmPDouble time){_error_("not implemented yet");};
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
++		Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
++		Input* PointwiseMin(Input* inputB){_error2_("not implemented yet");};
++		Input* PointwiseMax(Input* inputB){_error2_("not implemented yet");};
++		ElementResult* SpawnResult(int step, IssmPDouble time){_error2_("not implemented yet");};
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numeriics: {{{*/
+-		void GetInputValue(bool* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(int* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputValue(bool* pvalue){_error2_("not implemented yet");};
++		void GetInputValue(int* pvalue){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index);
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetInputAverage(IssmPDouble* pvalue){_error_("not implemented yet");};
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void ChangeEnum(int newenumtype){_error_("not implemented yet");};
+-		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){_error_("not implemented yet");};
+-		void ConstrainMin(IssmPDouble minimum){_error_("not implemented yet");};
+-		void Scale(IssmPDouble scale_factor){_error_("not implemented yet");};
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
+-		void AXPY(Input* xinput,IssmPDouble scalar){_error_("not implemented yet");};
+-		void Constrain(void){_error_("not implemented yet");};
+-		void Constrain(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
+-		IssmPDouble InfinityNorm(void){_error_("not implemented yet");};
+-		IssmPDouble Max(void){_error_("not implemented yet");};
+-		IssmPDouble MaxAbs(void){_error_("not implemented yet");};
+-		IssmPDouble Min(void){_error_("not implemented yet");};
+-		IssmPDouble MinAbs(void){_error_("not implemented yet");};
+-		void Extrude(void){_error_("not implemented yet");};
+-		void VerticallyIntegrate(Input* thickness_input){_error_("not implemented yet");};
+-		void GetVectorFromInputs(Vector* vector,int* doflist){_error_("not implemented yet");};
+-		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){_error_("not implemented yet");};
+-		ElementResult* SpawnGradient(int step, IssmPDouble time){_error_("not implemented yet");};
+-		void GetGradient(Vector* gradient_vec,int* doflist){_error_("not implemented yet");};
+-		void ScaleGradient(IssmPDouble scale){_error_("not implemented yet");};
+-		void SetGradient(Input* gradient_in){_error_("not implemented yet");};
+-		void UpdateValue(IssmPDouble scalar){_error_("not implemented yet");};
+-		void SaveValue(void){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputAverage(IssmPDouble* pvalue){_error2_("not implemented yet");};
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void ChangeEnum(int newenumtype){_error2_("not implemented yet");};
++		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){_error2_("not implemented yet");};
++		void ConstrainMin(IssmPDouble minimum){_error2_("not implemented yet");};
++		void Scale(IssmPDouble scale_factor){_error2_("not implemented yet");};
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
++		void AXPY(Input* xinput,IssmPDouble scalar){_error2_("not implemented yet");};
++		void Constrain(void){_error2_("not implemented yet");};
++		void Constrain(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
++		IssmPDouble InfinityNorm(void){_error2_("not implemented yet");};
++		IssmPDouble Max(void){_error2_("not implemented yet");};
++		IssmPDouble MaxAbs(void){_error2_("not implemented yet");};
++		IssmPDouble Min(void){_error2_("not implemented yet");};
++		IssmPDouble MinAbs(void){_error2_("not implemented yet");};
++		void Extrude(void){_error2_("not implemented yet");};
++		void VerticallyIntegrate(Input* thickness_input){_error2_("not implemented yet");};
++		void GetVectorFromInputs(Vector* vector,int* doflist){_error2_("not implemented yet");};
++		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){_error2_("not implemented yet");};
++		ElementResult* SpawnGradient(int step, IssmPDouble time){_error2_("not implemented yet");};
++		void GetGradient(Vector* gradient_vec,int* doflist){_error2_("not implemented yet");};
++		void ScaleGradient(IssmPDouble scale){_error2_("not implemented yet");};
++		void SetGradient(Input* gradient_in){_error2_("not implemented yet");};
++		void UpdateValue(IssmPDouble scalar){_error2_("not implemented yet");};
++		void SaveValue(void){_error2_("not implemented yet");};
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12494)
+@@ -36,11 +36,11 @@
+ 		/*IntInput management: {{{*/
+ 		int   InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+-		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+-		Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
+-		Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
++		Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
++		Input* PointwiseMin(Input* inputB){_error2_("not implemented yet");};
++		Input* PointwiseMax(Input* inputB){_error2_("not implemented yet");};
+ 		ElementResult* SpawnResult(int step, IssmPDouble time);
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+@@ -48,34 +48,34 @@
+ 		void GetInputValue(int* pvalue);
+ 		void GetInputValue(IssmPDouble* pvalue);
+ 		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+ 		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+ 		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetInputAverage(IssmPDouble* pvalue){_error_("not implemented yet");};
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputAverage(IssmPDouble* pvalue){_error2_("not implemented yet");};
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+ 		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(IssmPDouble minimum){_error_("not implemented yet");};
++		void ConstrainMin(IssmPDouble minimum){_error2_("not implemented yet");};
+ 		void Scale(IssmPDouble scale_factor);
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
+ 		void AXPY(Input* xinput,IssmPDouble scalar);
+ 		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
+-		IssmPDouble InfinityNorm(void){_error_("InfinityNorm not implemented for integers");};
+-		IssmPDouble Max(void){_error_("Max not implemented for integers");};
+-		IssmPDouble MaxAbs(void){_error_("Max not implemented for integers");};
+-		IssmPDouble Min(void){_error_("Min not implemented for integers");};
+-		IssmPDouble MinAbs(void){_error_("Min not implemented for integers");};
+-		void Extrude(void){_error_("not supported yet");};
+-		void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
++		IssmPDouble InfinityNorm(void){_error2_("InfinityNorm not implemented for integers");};
++		IssmPDouble Max(void){_error2_("Max not implemented for integers");};
++		IssmPDouble MaxAbs(void){_error2_("Max not implemented for integers");};
++		IssmPDouble Min(void){_error2_("Min not implemented for integers");};
++		IssmPDouble MinAbs(void){_error2_("Min not implemented for integers");};
++		void Extrude(void){_error2_("not supported yet");};
++		void VerticallyIntegrate(Input* thickness_input){_error2_("not supported yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+ 		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
+ 		/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12494)
+@@ -36,46 +36,46 @@
+ 		/*BoolInput management: {{{*/
+ 		int   InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+-		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+-		Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
+-		Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
++		Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
++		Input* PointwiseMin(Input* inputB){_error2_("not implemented yet");};
++		Input* PointwiseMax(Input* inputB){_error2_("not implemented yet");};
+ 		ElementResult* SpawnResult(int step, IssmPDouble time);
+ 		void Configure(Parameters* parameters);
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue);
+ 		void GetInputValue(int* pvalue);
+ 		void GetInputValue(IssmPDouble* pvalue);
+ 		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+ 		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+ 		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetInputAverage(IssmPDouble* pvalue){_error_("not implemented yet");};
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputAverage(IssmPDouble* pvalue){_error2_("not implemented yet");};
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+ 		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(IssmPDouble minimum){_error_("not implemented yet");};
+-		IssmPDouble InfinityNorm(void){_error_("InfinityNorm not implemented for booleans");};
+-		IssmPDouble Max(void){_error_("Max not implemented for booleans");};
+-		IssmPDouble MaxAbs(void){_error_("Max not implemented for booleans");};
+-		IssmPDouble Min(void){_error_("Min not implemented for booleans");};
+-		IssmPDouble MinAbs(void){_error_("Min not implemented for booleans");};
++		void ConstrainMin(IssmPDouble minimum){_error2_("not implemented yet");};
++		IssmPDouble InfinityNorm(void){_error2_("InfinityNorm not implemented for booleans");};
++		IssmPDouble Max(void){_error2_("Max not implemented for booleans");};
++		IssmPDouble MaxAbs(void){_error2_("Max not implemented for booleans");};
++		IssmPDouble Min(void){_error2_("Min not implemented for booleans");};
++		IssmPDouble MinAbs(void){_error2_("Min not implemented for booleans");};
+ 		void Scale(IssmPDouble scale_factor);
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
+ 		void AXPY(Input* xinput,IssmPDouble scalar);
+ 		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
+ 		void Extrude(void);
+-		void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
++		void VerticallyIntegrate(Input* thickness_input){_error2_("not supported yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+ 		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
+ 		/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12494)
+@@ -36,32 +36,32 @@
+ 		/*TriaP1Input management: {{{*/
+ 		int   InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+-		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
++		Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
+ 		Input* PointwiseMin(Input* inputB);
+ 		Input* PointwiseMax(Input* inputB);
+ 		ElementResult* SpawnResult(int step, IssmPDouble time);
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+-		void GetInputValue(bool* pvalue){_error_("not implemented yet");}
+-		void GetInputValue(int* pvalue){_error_("not implemented yet");}
+-		void GetInputValue(IssmPDouble* pvalue){_error_("not implemented yet");}
++		void GetInputValue(bool* pvalue){_error2_("not implemented yet");}
++		void GetInputValue(int* pvalue){_error2_("not implemented yet");}
++		void GetInputValue(IssmPDouble* pvalue){_error2_("not implemented yet");}
+ 		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss,int index){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss,int index){_error2_("not implemented yet");};
+ 		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void GetInputAverage(IssmPDouble* pvalue);
+ 		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss);
+ 		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+ 
+ 		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
+@@ -75,8 +75,8 @@
+ 		IssmPDouble MaxAbs(void);
+ 		IssmPDouble Min(void);
+ 		IssmPDouble MinAbs(void);
+-		void Extrude(void){_error_("not supported yet");};
+-		void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
++		void Extrude(void){_error2_("not supported yet");};
++		void VerticallyIntegrate(Input* thickness_input){_error2_("not supported yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+ 		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
+ 		/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12494)
+@@ -39,49 +39,49 @@
+ 		/*TransientInput management: {{{*/
+ 		int    InstanceEnum();
+ 		Input* SpawnTriaInput(int* indices);
+-		Input* PointwiseDivide(Input* forcingB){_error_("not implemented yet");};
+-		Input* PointwiseMin(Input* forcingB){_error_("not implemented yet");};
+-		Input* PointwiseMax(Input* forcingB){_error_("not implemented yet");};
++		Input* PointwiseDivide(Input* forcingB){_error2_("not implemented yet");};
++		Input* PointwiseMin(Input* forcingB){_error2_("not implemented yet");};
++		Input* PointwiseMax(Input* forcingB){_error2_("not implemented yet");};
+ 		ElementResult* SpawnResult(int step, IssmPDouble time);
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+-		void GetInputValue(bool* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(int* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue){_error_("not implemented yet");};
++		void GetInputValue(bool* pvalue){_error2_("not implemented yet");};
++		void GetInputValue(int* pvalue){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
+ 		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time);
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+ 		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void GetInputAverage(IssmPDouble* pvalue);
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+ 
+ 		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(IssmPDouble minimum){_error_("not implemented yet");};
+-		void Scale(IssmPDouble scale_factor){_error_("not implemented yet");};
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
+-		void AXPY(Input* xforcing,IssmPDouble scalar){_error_("not implemented yet");};
+-		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max){_error_("not implemented yet");};
++		void ConstrainMin(IssmPDouble minimum){_error2_("not implemented yet");};
++		void Scale(IssmPDouble scale_factor){_error2_("not implemented yet");};
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
++		void AXPY(Input* xforcing,IssmPDouble scalar){_error2_("not implemented yet");};
++		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max){_error2_("not implemented yet");};
+ 		IssmPDouble InfinityNorm(void);
+ 		IssmPDouble Max(void);
+ 		IssmPDouble MaxAbs(void);
+ 		IssmPDouble Min(void);
+ 		IssmPDouble MinAbs(void);
+-		void Extrude(void){_error_("not supported yet");}
+-		void VerticallyIntegrate(Input* thickness_forcing){_error_("not supported yet");};
++		void Extrude(void){_error2_("not supported yet");}
++		void VerticallyIntegrate(Input* thickness_forcing){_error2_("not supported yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){_error_("not supported yet");};
+-      void GetTimeValues(IssmPDouble* values,IssmPDouble time){_error_("not implemented yet");};
++		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){_error2_("not supported yet");};
++      void GetTimeValues(IssmPDouble* values,IssmPDouble time){_error2_("not implemented yet");};
+ 		Input* GetTimeInput(IssmPDouble time);
+ 		/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12494)
+@@ -40,23 +40,23 @@
+ 		Input* PointwiseMin(Input* inputB);
+ 		Input* PointwiseMax(Input* inputB);
+ 		ElementResult* SpawnResult(int step, IssmPDouble time);
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error_("not supported yet");};
++		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+-		void GetInputValue(bool* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(int* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error_("not implemented yet");};
++		void GetInputValue(bool* pvalue){_error2_("not implemented yet");};
++		void GetInputValue(int* pvalue){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+ 		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
+ 		void GetInputAverage(IssmPDouble* pvalue);
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
++		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+ 		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
+ 		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
+ 		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss);
+@@ -67,7 +67,7 @@
+ 		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
+ 		void ConstrainMin(IssmPDouble minimum);
+ 		void Scale(IssmPDouble scale_factor);
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error_("not implemented yet");};
++		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
+ 		void AXPY(Input* xinput,IssmPDouble scalar);
+ 		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
+ 		IssmPDouble InfinityNorm(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12494)
+@@ -26,11 +26,11 @@
+ 
+ 				/*Object functions (Needed because the Quadtree uses a Container*/
+ 				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"); };
++				void    DeepEcho()  {_error2_("not implemented yet"); };
++				int     Id()        {_error2_("not implemented yet"); };
++				int     MyRank()    {_error2_("not implemented yet"); };
++				int     ObjectEnum(){_error2_("not implemented yet"); };
++				Object *copy()      {_error2_("not implemented yet"); };
+ 
+ 				/*Methods*/
+ 				int          IsWithinRange(double  x,double y,double range);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Observation.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Observation.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Observation.h	(revision 12494)
+@@ -23,11 +23,11 @@
+ 
+ 		/*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"); };
++		void    DeepEcho()  {_error2_("Not implemented yet"); };
++		int     Id()        {_error2_("Not implemented yet"); };
++		int     MyRank()    {_error2_("Not implemented yet"); };
++		int     ObjectEnum(){_error2_("Not implemented yet"); };
++		Object *copy()      {_error2_("Not implemented yet"); };
+ 
+ 		/*Management*/
+ 		void WriteXYObs(double* px,double* py,double* pobs);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.h	(revision 12494)
+@@ -22,11 +22,11 @@
+ 
+ 		/*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");};
++		void  DeepEcho(){_error2_("Not implemented yet");};
++		int   Id(){_error2_("Not implemented yet");}; 
++		int   MyRank(){_error2_("Not implemented yet");};
++		int   ObjectEnum(){_error2_("Not implemented yet");};
++		Object* copy(){_error2_("Not implemented yet");};
+ 
+ 		/*Variogram functions*/
+ 		double SemiVariogram(double deltax,double deltay);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.h	(revision 12494)
+@@ -22,11 +22,11 @@
+ 
+ 		/*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");};
++		void  DeepEcho(){_error2_("Not implemented yet");};
++		int   Id(){_error2_("Not implemented yet");}; 
++		int   MyRank(){_error2_("Not implemented yet");};
++		int   ObjectEnum(){_error2_("Not implemented yet");};
++		Object* copy(){_error2_("Not implemented yet");};
+ 
+ 		/*Variogram functions*/
+ 		double SemiVariogram(double deltax,double deltay);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/SphericalVariogram.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/SphericalVariogram.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/SphericalVariogram.h	(revision 12494)
+@@ -22,11 +22,11 @@
+ 
+ 		/*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");};
++		void  DeepEcho(){_error2_("Not implemented yet");};
++		int   Id(){_error2_("Not implemented yet");}; 
++		int   MyRank(){_error2_("Not implemented yet");};
++		int   ObjectEnum(){_error2_("Not implemented yet");};
++		Object* copy(){_error2_("Not implemented yet");};
+ 
+ 		/*Variogram functions*/
+ 		double SemiVariogram(double deltax,double deltay);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/PowerVariogram.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/PowerVariogram.h	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/PowerVariogram.h	(revision 12494)
+@@ -22,11 +22,11 @@
+ 
+ 		/*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");};
++		void  DeepEcho(){_error2_("Not implemented yet");};
++		int   Id(){_error2_("Not implemented yet");}; 
++		int   MyRank(){_error2_("Not implemented yet");};
++		int   ObjectEnum(){_error2_("Not implemented yet");};
++		Object* copy(){_error2_("Not implemented yet");};
+ 
+ 		/*Variogram functions*/
+ 		double SemiVariogram(double deltax,double deltay);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12494)
+@@ -230,7 +230,7 @@
+ 		_assert_(dofindex>=0 && dofindex<indexing.ssize);
+ 		return indexing.sdoflist[dofindex];
+ 	}
+-	else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
++	else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 
+ }
+ /*}}}*/
+@@ -302,7 +302,7 @@
+ 			}
+ 			else for(i=0;i<this->indexing.ssize;i++) outdoflist[i]=indexing.sdoflist[i];
+ 		}
+-		else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
++		else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 	}
+ }
+ /*}}}*/
+@@ -342,7 +342,7 @@
+ 				}
+ 			}
+ 		}
+-		else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
++		else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 	}
+ 	else{
+ 
+@@ -411,7 +411,7 @@
+ 				}
+ 			}
+ 		}
+-		else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
++		else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 	}
+ }
+ /*}}}*/
+@@ -597,7 +597,7 @@
+ 		if (setenum==GsetEnum) numdofs=this->indexing.gsize;
+ 		else if (setenum==FsetEnum) numdofs=this->indexing.fsize;
+ 		else if (setenum==SsetEnum) numdofs=this->indexing.ssize;
+-		else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
++		else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 	}
+ 	else{
+ 		if(setenum==GsetEnum){
+@@ -627,7 +627,7 @@
+ 			}
+ 			else numdofs=this->indexing.ssize;
+ 		}
+-		else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
++		else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 	}
+ 	return numdofs;
+ }
+@@ -927,7 +927,7 @@
+ 		}
+ 		dofcount+=this->indexing.ssize;
+ 	}
+-	else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
++	else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 
+ 
+ 	/*Assign output pointers: */
+@@ -956,7 +956,7 @@
+ 	else if(setenum==SsetEnum){
+ 		for(i=0;i<this->indexing.ssize;i++) indexing.sdoflist[i]+=dofcount;
+ 	}
+-	else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
++	else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Node::ShowTrueDofs{{{*/
+@@ -972,7 +972,7 @@
+ 	if(setenum==GsetEnum)for(j=0;j<this->indexing.gsize;j++)  *(truedofs+ncols*sid+j)=indexing.gdoflist[j];
+ 	else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++)  *(truedofs+ncols*sid+j)=indexing.fdoflist[j];
+ 	else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++)  *(truedofs+ncols*sid+j)=indexing.sdoflist[j];
+-	else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
++	else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 
+ }
+ /*}}}*/
+@@ -991,7 +991,7 @@
+ 	if(setenum==GsetEnum)for(j=0;j<this->indexing.gsize;j++) indexing.gdoflist[j]=*(alltruedofs+ncols*sid+j);
+ 	else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++) indexing.fdoflist[j]=*(alltruedofs+ncols*sid+j);
+ 	else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++) indexing.sdoflist[j]=*(alltruedofs+ncols*sid+j);
+-	else _error2_("" << " set of enum type " << EnumToStringx(setenum) << " not supported yet!");
++	else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12493)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12494)
+@@ -359,7 +359,7 @@
+ 							break;
+ 
+ 					default: 
+-						_error2_("" << "unknown record type:" << record_code); 
++						_error2_("unknown record type:" << record_code); 
+ 						break;;
+ 				}
+ 			}
+@@ -427,7 +427,7 @@
+ 				case 9: break; //do nothing. not interested in this type of data, which is memory intensive.
+ 
+ 				default: 
+-					_error2_("" << "unknown record type:" << record_code); 
++					_error2_("unknown record type:" << record_code); 
+ 					break;;
+ 				}
+ 
+@@ -825,14 +825,14 @@
+ 		for(i=0;i<numrecords;i++){
+ 
+ 			if(my_rank==0){  
+-				if(fread(&M,sizeof(int),1,fid)!=1) _error2_("" << "could not read number of rows in " << i << "th matrix of matrix array");
++				if(fread(&M,sizeof(int),1,fid)!=1) _error2_("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) _error2_("" << "could not read number of columns in " << i << "th matrix of matrix array");
++				if(fread(&N,sizeof(int),1,fid)!=1) _error2_("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); 
+@@ -1136,7 +1136,7 @@
+ 
+ 			break; /*}}}*/
+ 		default: /*{{{*/
+-			_error2_("" << "data code " << code << " not supported yet!");
++			_error2_("data code " << code << " not supported yet!");
+ 			break;
+ 			/*}}}*/
+ 	}
+@@ -1227,7 +1227,7 @@
+ 	}
+ #ifdef _HAVE_MPI_
+ 	MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD); 
+-	if(!found)_error2_("" << "could not find data with name" << " " << EnumToStringx(data_enum) << " ");
++	if(!found)_error2_("could not find data with name" << " " << EnumToStringx(data_enum) << " ");
+ #endif
+ 
+ 	/*Broadcast code and vector type: */
Index: /issm/oecreview/Archive/12321-12677/ISSM-12494-12495.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12494-12495.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12494-12495.diff	(revision 12679)
@@ -0,0 +1,1022 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Inputs.cpp	(revision 12495)
+@@ -212,7 +212,7 @@
+ 	constrain_input=(Input*)this->GetInput(constrain_enum);
+ 
+ 	/*some checks: */
+-	if(!constrain_input) _error2_(" input " << EnumToStringx(constrain_enum) << " could not be found!");
++	if(!constrain_input) _error2_("input " << EnumToStringx(constrain_enum) << " could not be found!");
+ 
+ 	/*Apply ContrainMin: */
+ 	constrain_input->ConstrainMin(minimum);
+@@ -415,8 +415,8 @@
+ 	yinput=(Input*)this->GetInput(MeshYEnum);
+ 
+ 	/*some checks: */
+-	if(!xinput) _error2_(" input " << EnumToStringx(MeshXEnum) << " could not be found!");
+-	if(!yinput) _error2_(" input " << EnumToStringx(MeshYEnum) << " could not be found!");
++	if(!xinput) _error2_("input " << EnumToStringx(MeshXEnum) << " could not be found!");
++	if(!yinput) _error2_("input " << EnumToStringx(MeshYEnum) << " could not be found!");
+ 
+ 	/*Apply AXPY: */
+ 	yinput->AXPY(xinput,scalar);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12495)
+@@ -132,7 +132,7 @@
+ 
+ 	vector<Object*>::iterator object;
+ 
+-	if(this==NULL)_error2_(" trying to echo a NULL dataset");
++	if(this==NULL)_error2_("trying to echo a NULL dataset");
+ 
+ 	_printf_(true,"DataSet echo: %i objects\n",objects.size());
+ 
+@@ -149,7 +149,7 @@
+ 
+ 	vector<Object*>::iterator object;
+ 
+-	if(this==NULL)_error2_(" trying to echo a NULL dataset");
++	if(this==NULL)_error2_("trying to echo a NULL dataset");
+ 
+ 	_printf_(true,"DataSet echo: %i objects\n",objects.size());
+ 
+@@ -193,7 +193,7 @@
+ 	int i;
+ 
+ 	_assert_(this);
+-	if(!sorted)_error2_(" trying to binary search on a non-sorted dataset!");
++	if(!sorted)_error2_("trying to binary search on a non-sorted dataset!");
+ 
+ 	/*Carry out a binary search on the sorted_ids: */
+ 	if(!binary_search(&id_offset,eid, sorted_ids,objects.size())){
+@@ -258,7 +258,7 @@
+ 
+ 	/*Only sort if we are not already sorted: */
+ 	if(!sorted){
+-		_error2_(" not implemented yet!");
++		_error2_("not implemented yet!");
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/Synchronize.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/Synchronize.sh	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/Synchronize.sh	(revision 12495)
+@@ -134,7 +134,7 @@
+ /*FUNCTION SetVerbosityLevel {{{*/
+ void SetVerbosityLevel(int level){
+ 
+-	if(level<0) _error_("vebosity level should be a positive integer (user provided %i)",level);
++	if(level<0) _error2_("vebosity level should be a positive integer (user provided " << level << ")");
+ 
+ 	verbositylevel = level;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12495)
+@@ -1669,7 +1669,7 @@
+ 		} while (iter < MAX_GAUS_ITER);
+ 		if (iter >= MAX_GAUS_ITER) {
+ 			xDelete<IssmPDouble>(work);
+-			_error2_(" Max iterations exceeded for l=" << MAX_GAUS_ITER);
++			_error2_("Max iterations exceeded for l=" << MAX_GAUS_ITER);
+ 		}
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp	(revision 12495)
+@@ -28,7 +28,7 @@
+ 	/*Now, which direction are we going? once determined, use scale factor: */
+ 	if(direction_enum==IuToExtEnum) for(i=0;i<numvalues;i++)values[i]=values[i]*scale; 
+ 	else if(direction_enum==ExtToIuEnum) for(i=0;i<numvalues;i++)values[i]=values[i]/scale; 
+-	else _error2_(" wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");
++	else _error2_("wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");
+ 
+ }
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp	(revision 12495)
+@@ -52,7 +52,7 @@
+ 		if(nu)eps=ndu/nu;
+ 		else eps=0;
+ 	}
+-	else _error2_(" convergence criterion " << EnumToStringx(criterion_enum) << " not supported yet!");
++	else _error2_("convergence criterion " << EnumToStringx(criterion_enum) << " not supported yet!");
+ 
+ 	/*Assign output pointers:*/
+ 	*peps=eps;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/String/DescriptorIndex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/String/DescriptorIndex.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/String/DescriptorIndex.cpp	(revision 12495)
+@@ -22,12 +22,12 @@
+ 
+ 	/*retrieve first token, separated by underscore: */
+ 	pch = strtok (descriptor,"_");
+-	if(!pch)_error2_(" descriptor " << descriptor << " is not correctly formatted!");
++	if(!pch)_error2_("descriptor " << descriptor << " is not correctly formatted!");
+ 
+ 	if (strncmp(pch,"scaled",6)==0){
+ 		/*we have a scaled variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_(" scaled descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_("scaled descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 
+ 		/*now recover  the index if it exists: */
+@@ -43,22 +43,22 @@
+ 	else if (strncmp(pch,"indexed",7)==0){
+ 		/*we have an indexed variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_(" indexed descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_("indexed descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 		/*now recover  the index: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_(" indexed descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_("indexed descriptor " << descriptor << " is not correctly formatted!");
+ 		sscanf(pch,"%i",pindex);
+ 		return IndexedEnum;
+ 	}
+ 	else if (strncmp(pch,"nodal",5)==0){
+ 		/*we have an indexed variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_(" nodal descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_("nodal descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 		/*now recover  the index: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_(" nodal descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_("nodal descriptor " << descriptor << " is not correctly formatted!");
+ 		sscanf(pch,"%i",pindex);
+ 		return NodalEnum;
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/alloc.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/alloc.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Alloc/alloc.cpp	(revision 12495)
+@@ -30,7 +30,7 @@
+ 
+ 	void* memptr=NULL;
+ 
+-	if(!size)_error2_(" attempting to 0 size allocation!");
++	if(!size)_error2_("attempting to 0 size allocation!");
+ 
+ 	/* Use the c library to do the allocation: */
+ 	memptr=malloc(size);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Threads/LaunchThread.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Threads/LaunchThread.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Threads/LaunchThread.cpp	(revision 12495)
+@@ -43,12 +43,12 @@
+ 	for(i=0;i<num_threads;i++){
+ 
+ 		if(pthread_create(threads+i,NULL,function,(void*)(handles+i))){
+-			_error2_(" pthread_create error");
++			_error2_("pthread_create error");
+ 		}
+ 	}
+ 	for(i=0;i<num_threads;i++){
+ 		if(pthread_join(threads[i],(void**)&status)){
+-			_error2_(" pthread_join error");
++			_error2_("pthread_join error");
+ 		}
+ 	}
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp	(revision 12495)
+@@ -58,7 +58,7 @@
+ 	}
+ 
+ 	if((numcontours) && (interpolation_type==2)){
+-		_error2_(" element interpolation_type with contours not supported yet!");
++		_error2_("element interpolation_type with contours not supported yet!");
+ 	}
+ 
+ 	/*Get prime mesh extrema coordinates*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Responsex/Responsex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Responsex/Responsex.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Responsex/Responsex.cpp	(revision 12495)
+@@ -45,9 +45,9 @@
+ 		case MaterialsRheologyBbarEnum:ElementResponsex(responses, elements,nodes, vertices, loads, materials, parameters,MaterialsRheologyBbarEnum,process_units); break;
+ 		case VelEnum:ElementResponsex(responses, elements,nodes, vertices, loads, materials, parameters,VelEnum,process_units); break;
+ 		case FrictionCoefficientEnum:NodalValuex(responses, FrictionCoefficientEnum,elements,nodes, vertices, loads, materials, parameters,process_units); break;
+-		default: _error2_(" response descriptor \"" << response_descriptor << "\" not supported yet!"); break;
++		default: _error2_("response descriptor \"" << response_descriptor << "\" not supported yet!"); break;
+ 		#else
+-		default: _error2_(" ISSM was not compiled with responses capabilities, exiting!");
++		default: _error2_("ISSM was not compiled with responses capabilities, exiting!");
+ 		#endif
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp	(revision 12495)
+@@ -22,12 +22,12 @@
+ 
+ 	/*retrieve first token, separated by underscore: */
+ 	pch = strtok (descriptor,"_");
+-	if(!pch)_error2_(" descriptor " << descriptor << " is not correctly formatted!");
++	if(!pch)_error2_("descriptor " << descriptor << " is not correctly formatted!");
+ 
+ 	if (strncmp(pch,"scaled",6)==0){
+ 		/*we have a scaled variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_(" scaled descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_("scaled descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 
+ 		/*now recover  the index if it exists: */
+@@ -43,22 +43,22 @@
+ 	else if (strncmp(pch,"indexed",7)==0){
+ 		/*we have an indexed variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_(" indexed descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_("indexed descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 		/*now recover  the index: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_(" indexed descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_("indexed descriptor " << descriptor << " is not correctly formatted!");
+ 		sscanf(pch,"%i",pindex);
+ 		return IndexedEnum;
+ 	}
+ 	else if (strncmp(pch,"nodal",5)==0){
+ 		/*we have an indexed variable. recover the root: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_(" nodal descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_("nodal descriptor " << descriptor << " is not correctly formatted!");
+ 		memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
+ 		/*now recover  the index: */
+ 		pch = strtok (NULL, "_");
+-		if(!pch)_error2_(" nodal descriptor " << descriptor << " is not correctly formatted!");
++		if(!pch)_error2_("nodal descriptor " << descriptor << " is not correctly formatted!");
+ 		sscanf(pch,"%i",pindex);
+ 		return NodalEnum;
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp	(revision 12495)
+@@ -37,7 +37,7 @@
+ 
+ 	if(    (edge1==IntersectEnum) && (edge2==IntersectEnum) && (edge3==IntersectEnum)   ){
+ 		/*This case is impossible: */
+-		_error2_(" error: a line cannot go through 3 different vertices!");
++		_error2_("error: a line cannot go through 3 different vertices!");
+ 	}
+ 	else if(    ((edge1==IntersectEnum) && (edge2==IntersectEnum)) || ((edge2==IntersectEnum) && (edge3==IntersectEnum)) || ((edge3==IntersectEnum) && (edge1==IntersectEnum))   ){
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp	(revision 12495)
+@@ -94,10 +94,10 @@
+ 			xDelete<double>(distributed_values);
+ 		}
+ 		else if (strncmp(descriptor,"indexed_",8)==0){
+-			_error2_(" indexed variables not supported yet!");
++			_error2_("indexed variables not supported yet!");
+ 		}
+ 		else if (strncmp(descriptor,"nodal_",8)==0){
+-			_error2_(" nodal variables not supported yet!");
++			_error2_("nodal variables not supported yet!");
+ 		}
+ 		else{
+ 			/*Ok, standard variable, just update inputs using the variable: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 12495)
+@@ -31,7 +31,7 @@
+ 		}
+ 	}
+ 	else{
+-		_error2_(" vector type: " << EnumToStringx(type) << " not supported yet!");
++		_error2_("vector type: " << EnumToStringx(type) << " not supported yet!");
+ 	}
+ 
+ 	vector->Assemble();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp	(revision 12495)
+@@ -152,7 +152,7 @@
+ 			
+ 			/*Fetch the mass flux segments necessary to compute the mass fluxes.  Build a DoubleMatArrayParam object out of them: */ 
+ 			iomodel->FetchData(&array,&mdims_array,&ndims_array,&qmu_mass_flux_num_profiles,QmuMassFluxSegmentsEnum);
+-			if(qmu_mass_flux_num_profiles==0)_error2_(" qmu_mass_flux_num_profiles is 0, when MassFlux computations were requested!");
++			if(qmu_mass_flux_num_profiles==0)_error2_("qmu_mass_flux_num_profiles is 0, when MassFlux computations were requested!");
+ 
+ 			/*Go through segments, and extract those that belong to this cpu: */
+ 			for(i=0;i<qmu_mass_flux_num_profiles;i++){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp	(revision 12495)
+@@ -123,7 +123,7 @@
+ 
+ 
+ 		default:
+-			_error2_(" analysis_type: " << EnumToStringx(analysis_type) << " not supported yet!");
++			_error2_("analysis_type: " << EnumToStringx(analysis_type) << " not supported yet!");
+ 	}
+ 
+ 	/*Update Elements and Materials For Control methods*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12495)
+@@ -135,7 +135,7 @@
+ 	
+ 	/*Check convergence*/
+ 	KSPGetIterationNumber(ksp,&iteration_number);
+-	if (iteration_number<0) _error2_(" Solver diverged at iteration number: " << -iteration_number);
++	if (iteration_number<0) _error2_("Solver diverged at iteration number: " << -iteration_number);
+ 
+ 	/*Free resources:*/
+ 	KSPFree(&ksp);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp	(revision 12495)
+@@ -70,7 +70,7 @@
+ 	/*Last check: is the number of elements on last column of the connectivity superior to maxels? If so, then error out and 
+ 	 * warn the user to increase the connectivity width: */
+ 	for(i=0;i<nods;i++){
+-		if (*(connectivity+width*i+maxels)>maxels)_error2_(" max connectivity width reached (" << *(connectivity+width*i+maxels) << ")! increase width of connectivity table");
++		if (*(connectivity+width*i+maxels)>maxels)_error2_("max connectivity width reached (" << *(connectivity+width*i+maxels) << ")! increase width of connectivity table");
+ 	}
+ 
+ 	/*Assign output pointers: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12495)
+@@ -85,7 +85,7 @@
+ 			}
+ 		}
+ 		else if (flag==NodalEnum){
+-			_error2_(" nodal response functions not supported yet!");
++			_error2_("nodal response functions not supported yet!");
+ 
+ 			/*increment response_pointer :*/
+ 			responses_pointer++;
+@@ -103,7 +103,7 @@
+ 				responses_pointer++;
+ 			}
+ 		}
+-		else _error2_(" flag type " << flag << " not supported yet for response analysis");
++		else _error2_("flag type " << flag << " not supported yet for response analysis");
+ 	}
+ 
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12495)
+@@ -37,8 +37,8 @@
+ 	/*First of, find the record for the enum, and get code  of data type: */
+ 	fid=iomodel->SetFilePointerToData(&code, &vector_layout,vector_enum);
+ 
+-	if(code!=7)_error2_(" expecting a IssmDouble vector for constraints with enum " << EnumToStringx(vector_enum));
+-	if(vector_layout!=1)_error2_(" expecting a nodal vector for constraints with enum " << EnumToStringx(vector_enum));
++	if(code!=7)_error2_("expecting a IssmDouble vector for constraints with enum " << EnumToStringx(vector_enum));
++	if(vector_layout!=1)_error2_("expecting a nodal vector for constraints with enum " << EnumToStringx(vector_enum));
+ 
+ 	/*Fetch vector:*/
+ 	iomodel->FetchData(&IssmDoublevector,&M,&N,vector_enum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp	(revision 12495)
+@@ -50,7 +50,7 @@
+ 	MatGetLocalSize(*A,&local_mA,&local_nA);
+ 
+ 	/*Some dimensions checks: */
+-	if (mA!=nA) _error2_(" trying to take the invert of a non-square matrix!");
++	if (mA!=nA) _error2_("trying to take the invert of a non-square matrix!");
+ 
+ 	/* Set default Plapack parameters */
+ 	//First find nprows*npcols=num_procs;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12495)
+@@ -142,7 +142,7 @@
+ 		if(this->ssize)this->sdoflist=xNew<int>(size);
+ 		else this->sdoflist=NULL;
+ 	}
+-	else _error2_(" set of enum type " << EnumToStringx(setenum) << " not supported yet!");
++	else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
+ }
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12495)
+@@ -749,7 +749,7 @@
+ 	}
+ 	#endif
+ 	else{
+-		_error2_(" Mesh type not supported yet!");
++		_error2_("Mesh type not supported yet!");
+ 	}
+ 
+ 	return;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12495)
+@@ -294,7 +294,7 @@
+ 		}
+ 	}
+ 	else{
+-		_error2_(" non dofsymmetrical matrix AddToGlobal routine not support yet!");
++		_error2_("non dofsymmetrical matrix AddToGlobal routine not support yet!");
+ 	}
+ 
+ }
+@@ -331,7 +331,7 @@
+ 
+ 	}
+ 	else{
+-		_error2_(" non dofsymmetrical matrix AddToGlobal routine not support yet!");
++		_error2_("non dofsymmetrical matrix AddToGlobal routine not support yet!");
+ 	}
+ 
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12495)
+@@ -396,7 +396,7 @@
+ 	Tria       *tria2               = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
+ 	tria1=(Tria*)elements[0];
+ 	tria2=(Tria*)elements[1];
+ 
+@@ -409,7 +409,7 @@
+ 	this->inputs->GetInputValue(&friction,FrictionEnum);
+ 	tria1->GetInputValue(&h[0],nodes[0],ThicknessEnum);
+ 	tria2->GetInputValue(&h[1],nodes[1],ThicknessEnum);
+-	if (h[0]!=h[1])_error2_(" different thicknesses not supported for rift fronts");
++	if (h[0]!=h[1])_error2_("different thicknesses not supported for rift fronts");
+ 	thickness=h[0];
+ 
+ 	/*There is contact, we need to constrain the normal velocities (zero penetration), and the 
+@@ -487,7 +487,7 @@
+ 	Tria       *tria2               = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
+ 	tria1=(Tria*)elements[0];
+ 	tria2=(Tria*)elements[1];
+ 
+@@ -503,11 +503,11 @@
+ 	gravity=matpar->GetG();
+ 	tria1->GetInputValue(&h[0],nodes[0],ThicknessEnum);
+ 	tria2->GetInputValue(&h[1],nodes[1],ThicknessEnum);
+-	if (h[0]!=h[1])_error2_(" different thicknesses not supported for rift fronts");
++	if (h[0]!=h[1])_error2_("different thicknesses not supported for rift fronts");
+ 	thickness=h[0];
+ 	tria1->GetInputValue(&b[0],nodes[0],BedEnum);
+ 	tria2->GetInputValue(&b[1],nodes[1],BedEnum);
+-	if (b[0]!=b[1])_error2_(" different beds not supported for rift fronts");
++	if (b[0]!=b[1])_error2_("different beds not supported for rift fronts");
+ 	bed=b[0];
+ 
+ 	/*Ok, this rift is opening. We should put loads on both sides of the rift flanks. Because we are dealing with contact mechanics, 
+@@ -584,7 +584,7 @@
+ 	Tria       *tria2           = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
+ 
+ 	/*recover elements on both side of rift: */
+ 	tria1=(Tria*)elements[0];
+@@ -705,7 +705,7 @@
+ 	Tria       *tria2           = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
+ 
+ 	/*recover elements on both side of rift: */
+ 	tria1=(Tria*)elements[0];
+@@ -750,7 +750,7 @@
+ 	Tria     *tria2       = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
+ 
+ 	/*recover elements on both side of rift: */
+ 	tria1=(Tria*)elements[0];
+@@ -793,7 +793,7 @@
+ 	Tria       *tria2           = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
+ 
+ 	/*recover elements on both side of rift: */
+ 	tria1=(Tria*)elements[0];
+@@ -843,7 +843,7 @@
+ 	Tria       *tria2       = NULL;
+ 
+ 	/*enum of element? */
+-	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_(" only Tria element allowed for Riftfront load!");
++	if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
+ 
+ 	/*recover elements on both side of rift: */
+ 	tria1=(Tria*)elements[0];
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12495)
+@@ -5528,7 +5528,7 @@
+ 								break;
+ 							}
+ 							if (!ee.adj[k1]) {
+-								_error2_(" adj edge " << BTh.GetId(ee) << ", nbe=" << nbe << ", Gh.vertices=" << Gh.vertices);
++								_error2_("adj edge " << BTh.GetId(ee) << ", nbe=" << nbe << ", Gh.vertices=" << Gh.vertices);
+ 							}
+ 							pe = ee.adj[k1]; // next edge
+ 							k0 = pe->Intersection(ee); 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12495)
+@@ -1231,7 +1231,7 @@
+ 
+ 	/*Make a copy of the original input: */
+ 	input=(Input*)this->inputs->GetInput(enum_type);
+-	if(!input)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
++	if(!input)_error2_("could not find old input with enum: " << EnumToStringx(enum_type));
+ 
+ 	/*ArtificialNoise: */
+ 	input->ArtificialNoise(min,max);
+@@ -1251,8 +1251,8 @@
+ 	for(i=0;i<num_enums/2;i++){
+ 		new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
+ 		old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]);
+-		if(!new_inputs[i])_error2_(" could not find input with enum " << EnumToStringx(enums[2*i+0]));
+-		if(!old_inputs[i])_error2_(" could not find input with enum " << EnumToStringx(enums[2*i+0]));
++		if(!new_inputs[i])_error2_("could not find input with enum " << EnumToStringx(enums[2*i+0]));
++		if(!old_inputs[i])_error2_("could not find input with enum " << EnumToStringx(enums[2*i+0]));
+ 	}
+ 
+ 	/*ok, we've got the inputs (new and old), now loop throught the number of criterions and fill the eps array:*/
+@@ -1281,7 +1281,7 @@
+ 	 oldinput=(Input*)this->matice->inputs->GetInput(enum_type);
+ 	else
+ 	 _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
+-	if(!oldinput)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
++	if(!oldinput)_error2_("could not find old input with enum: " << EnumToStringx(enum_type));
+ 	newinput=(Input*)oldinput->copy();
+ 
+ 	/*Assign new name (average)*/
+@@ -1311,7 +1311,7 @@
+ 
+ 	/*Make a copy of the original input: */
+ 	input=(Input*)this->inputs->GetInput(enum_type);
+-	if(!input)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
++	if(!input)_error2_("could not find old input with enum: " << EnumToStringx(enum_type));
+ 
+ 	/*Scale: */
+ 	input->Scale(scale_factor);
+@@ -1633,12 +1633,12 @@
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromVector(int* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVector(int* vector, int name, int type){
+-	_error2_(" not supported yet!");
++	_error2_("not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromVector(bool* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVector(bool* vector, int name, int type){
+-	_error2_(" not supported yet!");
++	_error2_("not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputCreate(IssmDouble scalar,int enum,int code);{{{*/
+@@ -1656,7 +1656,7 @@
+ 	else if ((code==7) || (code==3)){ //IssmDouble
+ 		this->inputs->AddInput(new DoubleInput(name,(int)scalar));
+ 	}
+-	else _error2_(" could not recognize nature of vector from code " << code);
++	else _error2_("could not recognize nature of vector from code " << code);
+ 
+ }
+ /*}}}*/
+@@ -1738,7 +1738,7 @@
+ 			else if (code==7){ //IssmDouble
+ 				this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index]));
+ 			}
+-			else _error2_(" could not recognize nature of vector from code " << code);
++			else _error2_("could not recognize nature of vector from code " << code);
+ 		}
+ 		else {
+ 			_error2_("transient elementary inputs not supported yet!");
+@@ -5432,12 +5432,12 @@
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVectorDakota(int* vector, int name, int type){
+-	_error2_(" not supported yet!");
++	_error2_("not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/
+ void  Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type){
+-	_error2_(" not supported yet!");
++	_error2_("not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Tria::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type);{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12495)
+@@ -1132,7 +1132,7 @@
+ 
+ 	/*Make a copy of the original input: */
+ 	input=(Input*)this->inputs->GetInput(enum_type);
+-	if(!input)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
++	if(!input)_error2_("could not find old input with enum: " << EnumToStringx(enum_type));
+ 
+ 	/*ArtificialNoise: */
+ 	input->ArtificialNoise(min,max);
+@@ -1152,8 +1152,8 @@
+ 	for(i=0;i<num_enums/2;i++){
+ 		new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
+ 		old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]);
+-		if(!new_inputs[i])_error2_(" could not find input with enum " << EnumToStringx(enums[2*i+0]));
+-		if(!old_inputs[i])_error2_(" could not find input with enum " << EnumToStringx(enums[2*i+0]));
++		if(!new_inputs[i])_error2_("could not find input with enum " << EnumToStringx(enums[2*i+0]));
++		if(!old_inputs[i])_error2_("could not find input with enum " << EnumToStringx(enums[2*i+0]));
+ 	}
+ 
+ 	/*ok, we've got the inputs (new and old), now loop throught the number of criterions and fill the eps array:*/
+@@ -1185,7 +1185,7 @@
+ 	else if ((code==7) || (code==3)){ //IssmDouble
+ 		this->inputs->AddInput(new DoubleInput(name,(IssmDouble)scalar));
+ 	}
+-	else _error2_(" could not recognize nature of vector from code " << code);
++	else _error2_("could not recognize nature of vector from code " << code);
+ 
+ }
+ /*}}}*/
+@@ -1267,7 +1267,7 @@
+ 			else if (code==7){ //IssmDouble
+ 				this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index]));
+ 			}
+-			else _error2_(" could not recognize nature of vector from code " << code);
++			else _error2_("could not recognize nature of vector from code " << code);
+ 		}
+ 		else {
+ 			_error2_("transient elementary inputs not supported yet!");
+@@ -1463,7 +1463,7 @@
+ 
+ 	/*Make a copy of the original input: */
+ 	input=(Input*)this->inputs->GetInput(enum_type);
+-	if(!input)_error2_(" could not find old input with enum: " << EnumToStringx(enum_type));
++	if(!input)_error2_("could not find old input with enum: " << EnumToStringx(enum_type));
+ 
+ 	/*Scale: */
+ 	input->Scale(scale_factor);
+@@ -1893,12 +1893,12 @@
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromVector(int* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVector(int* vector, int name, int type){
+-	_error2_(" not supported yet!");
++	_error2_("not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromVector(bool* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVector(bool* vector, int name, int type){
+-	_error2_(" not supported yet!");
++	_error2_("not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::IsOnBed{{{*/
+@@ -5621,12 +5621,12 @@
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVectorDakota(int* vector, int name, int type){
+-	_error2_(" not supported yet!");
++	_error2_("not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/
+ void  Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type){
+-	_error2_(" not supported yet!");
++	_error2_("not supported yet!");
+ }
+ /*}}}*/
+ /*FUNCTION Penta::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type);{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12495)
+@@ -184,7 +184,7 @@
+ 		if(this->objects[i]==NULL){
+ 			this->objects[i]=(Object*)dataset->GetObjectById(this->offsets+i,this->ids[i]); //remember the offset for later on.
+ 			/*check the id is correct!: */
+-			if (this->objects[i]->Id()!=this->ids[i]) _error2_(" wrong id: " << this->objects[i]->Id() << " vs " << this->ids[i] << "  in resolved pointer!");
++			if (this->objects[i]->Id()!=this->ids[i]) _error2_("wrong id: " << this->objects[i]->Id() << " vs " << this->ids[i] << "  in resolved pointer!");
+ 		}
+ 	}
+ }
+@@ -193,7 +193,7 @@
+ Object* Hook::delivers(void){
+ 	
+ 	/*first, check that we only have one T object in our object list: */
+-	if (this->num!=1) _error2_(" trying to delivery a single hook object when hook holds " << this->num << " objects" << "\n");
++	if (this->num!=1) _error2_("trying to delivery a single hook object when hook holds " << this->num << " objects" << "\n");
+ 
+ 	/*check NULL: */
+ 	if (this->objects==NULL) _error2_("hook is not pointing to any object, objects pointer is NULL");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12495)
+@@ -98,14 +98,14 @@
+ /*FUNCTION IntInput::SpawnResult{{{*/
+ ElementResult* IntInput::SpawnResult(int step, IssmPDouble time){
+ 	
+-	_error2_(" not supported yet!");
++	_error2_("not supported yet!");
+ 
+ }
+ /*}}}*/
+ 
+ /*Object functions*/
+ /*FUNCTION IntInput::GetInputValue(bool* pvalue) {{{*/
+-void IntInput::GetInputValue(bool* pvalue){_error2_(" not supported yet!");}
++void IntInput::GetInputValue(bool* pvalue){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION IntInput::GetInputValue(int* pvalue){{{*/
+ void IntInput::GetInputValue(int* pvalue){
+@@ -118,16 +118,16 @@
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
+-void IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_(" not supported yet!");}
++void IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
+-void IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_(" not supported yet!");}
++void IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_(" not supported yet!");}
++void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_(" not supported yet!");}
++void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION IntInput::ChangeEnum{{{*/
+ void IntInput::ChangeEnum(int newenumtype){
+@@ -181,14 +181,14 @@
+ /*FUNCTION IntInput::GetVectorFromInputs{{{*/
+ void IntInput::GetVectorFromInputs(Vector* vector,int* doflist){
+ 
+-	_error2_(" not supporte yet!");
++	_error2_("not supporte yet!");
+ 
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::GetValuesPtr{{{*/
+ void IntInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
+ 
+-	_error2_(" not supported yet!");
++	_error2_("not supported yet!");
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12495)
+@@ -111,22 +111,22 @@
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::GetInputValue(int* pvalue){{{*/
+-void BoolInput::GetInputValue(int* pvalue){_error2_(" not supported yet!");}
++void BoolInput::GetInputValue(int* pvalue){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue){{{*/
+-void BoolInput::GetInputValue(IssmPDouble* pvalue){_error2_(" not supported yet!");}
++void BoolInput::GetInputValue(IssmPDouble* pvalue){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
+-void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_(" not supported yet!");}
++void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
+-void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_(" not supported yet!");}
++void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_(" not supported yet!");}
++void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_(" not supported yet!");}
++void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::ChangeEnum{{{*/
+ void BoolInput::ChangeEnum(int newenumtype){
+@@ -183,14 +183,14 @@
+ /*FUNCTION BoolInput::GetVectorFromInputs{{{*/
+ void BoolInput::GetVectorFromInputs(Vector* vector,int* doflist){
+ 
+-	_error2_(" not supporte yet!");
++	_error2_("not supporte yet!");
+ 
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::GetValuesPtr{{{*/
+ void BoolInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
+ 
+-	_error2_(" not supported yet!");
++	_error2_("not supported yet!");
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12495)
+@@ -131,10 +131,10 @@
+ void DoubleInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){*pvalue=this->value;}
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_(" not supported yet!");}
++void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_(" not supported yet!");}
++void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+ void DoubleInput::GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){
+@@ -252,14 +252,14 @@
+ /*FUNCTION DoubleInput::GetVectorFromInputs{{{*/
+ void DoubleInput::GetVectorFromInputs(Vector* vector,int* doflist){
+ 
+-	_error2_(" not supporte yet!");
++	_error2_("not supporte yet!");
+ 
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetValuesPtr{{{*/
+ void DoubleInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
+ 
+-	_error2_(" not supported yet!");
++	_error2_("not supported yet!");
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12494)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12495)
+@@ -265,7 +265,7 @@
+ 				switch(record_code){
+ 					case 1: 
+ 						/*Read the boolean and broadcast it to other cpus:*/
+-						if(fread(&booleanint,sizeof(int),1,this->fid)!=1) _error2_(" could not read boolean ");
++						if(fread(&booleanint,sizeof(int),1,this->fid)!=1) _error2_("could not read boolean ");
+ 						#ifdef _HAVE_MPI_
+ 						MPI_Bcast(&booleanint,1,MPI_INT,0,MPI_COMM_WORLD); 
+ 						#endif
+@@ -276,7 +276,7 @@
+ 						break;
+ 					case 2:
+ 						/*Read the integer and broadcast it to other cpus:*/
+-						if(fread(&integer,sizeof(int),1,this->fid)!=1) _error2_(" could not read integer ");
++						if(fread(&integer,sizeof(int),1,this->fid)!=1) _error2_("could not read integer ");
+ 						#ifdef _HAVE_MPI_
+ 						MPI_Bcast(&integer,1,MPI_INT,0,MPI_COMM_WORLD); 
+ 						#endif
+@@ -287,7 +287,7 @@
+ 						break;
+ 					case 3:
+ 						/*Read the scalar and broadcast it to other cpus:*/
+-						if(fread(&scalar,sizeof(IssmPDouble),1,this->fid)!=1) _error2_(" could not read scalar ");
++						if(fread(&scalar,sizeof(IssmPDouble),1,this->fid)!=1) _error2_("could not read scalar ");
+ 						#ifdef _HAVE_MPI_
+ 						MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+ 						#endif
+@@ -298,7 +298,7 @@
+ 						break;
+ 					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) _error2_(" could not read length of string ");
++						if(fread(&string_size,sizeof(int),1,this->fid)!=1) _error2_("could not read length of string ");
+ 						#ifdef _HAVE_MPI_
+ 						MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
+ 						#endif
+@@ -308,7 +308,7 @@
+ 							string[string_size]='\0';
+ 
+ 							/*Read string, then broadcast: */
+-							if(fread(string,string_size*sizeof(char),1,this->fid)!=1)_error2_("  could not read string ");
++							if(fread(string,string_size*sizeof(char),1,this->fid)!=1)_error2_(" could not read string ");
+ 							#ifdef _HAVE_MPI_
+ 							MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
+ 							#endif
+@@ -456,7 +456,7 @@
+ 	
+ 	/*We have to read a boolean from disk. */
+ 	if(my_rank==0){  
+-		if(fread(&booleanint,sizeof(int),1,fid)!=1) _error2_(" could not read boolean ");
++		if(fread(&booleanint,sizeof(int),1,fid)!=1) _error2_("could not read boolean ");
+ 	}
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&booleanint,1,MPI_INT,0,MPI_COMM_WORLD); 
+@@ -486,7 +486,7 @@
+ 	
+ 	/*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */
+ 	if(my_rank==0){  
+-		if(fread(&integer,sizeof(int),1,fid)!=1) _error2_(" could not read integer ");
++		if(fread(&integer,sizeof(int),1,fid)!=1) _error2_("could not read integer ");
+ 	}
+ 
+ 	#ifdef _HAVE_MPI_
+@@ -517,7 +517,7 @@
+ 	
+ 	/*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */
+ 	if(my_rank==0){
+-		if(fread(&scalar,sizeof(IssmPDouble),1,fid)!=1)_error2_(" could not read scalar ");
++		if(fread(&scalar,sizeof(IssmPDouble),1,fid)!=1)_error2_("could not read scalar ");
+ 	}
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+@@ -549,7 +549,7 @@
+ 	
+ 	/*We have to read a string from disk. First read the dimensions of the string, then the string: */
+ 	if(my_rank==0){  
+-		if(fread(&string_size,sizeof(int),1,fid)!=1) _error2_(" could not read length of string ");
++		if(fread(&string_size,sizeof(int),1,fid)!=1) _error2_("could not read length of string ");
+ 	}
+ 
+ 	#ifdef _HAVE_MPI_
+@@ -563,7 +563,7 @@
+ 
+ 		/*Read string on node 0, then broadcast: */
+ 		if(my_rank==0){  
+-			if(fread(string,string_size*sizeof(char),1,fid)!=1)_error2_("  could not read string ");
++			if(fread(string,string_size*sizeof(char),1,fid)!=1)_error2_(" could not read string ");
+ 		}
+ 		#ifdef _HAVE_MPI_
+ 		MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
+@@ -731,7 +731,7 @@
+ 	
+ 	/*We have to read a bunch of strings from disk. First read the number of strings, and allocate: */
+ 	if(my_rank==0){  
+-		if(fread(&numstrings,sizeof(int),1,fid)!=1) _error2_(" could not read length of string array");
++		if(fread(&numstrings,sizeof(int),1,fid)!=1) _error2_("could not read length of string array");
+ 	}
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&numstrings,1,MPI_INT,0,MPI_COMM_WORLD); 
+@@ -746,7 +746,7 @@
+ 		for(i=0;i<numstrings;i++){
+ 			
+ 			if(my_rank==0){  
+-				if(fread(&string_size,sizeof(int),1,fid)!=1) _error2_(" could not read length of string ");
++				if(fread(&string_size,sizeof(int),1,fid)!=1) _error2_("could not read length of string ");
+ 			}
+ 			#ifdef _HAVE_MPI_
+ 			MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
+@@ -757,7 +757,7 @@
+ 
+ 				/*Read string on node 0, then broadcast: */
+ 				if(my_rank==0){  
+-					if(fread(string,string_size*sizeof(char),1,fid)!=1)_error2_("  could not read string ");
++					if(fread(string,string_size*sizeof(char),1,fid)!=1)_error2_(" could not read string ");
+ 				}
+ 				#ifdef _HAVE_MPI_
+ 				MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12495-12496.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12495-12496.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12495-12496.diff	(revision 12679)
@@ -0,0 +1,120 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Scotch/Scotch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Scotch/Scotch.cpp	(revision 12495)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Scotch/Scotch.cpp	(revision 12496)
+@@ -24,7 +24,7 @@
+ {
+ 
+ #ifndef _HAVE_SCOTCH_ //only works if scotch library has been compiled in.
+-	_error_(" Scotch not available! Cannot carry out Scotch partitioning!");
++	_error_("Scotch not available! Cannot carry out Scotch partitioning!");
+ 	#else
+ 
+ 	int     argcm;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 12495)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 12496)
+@@ -53,7 +53,7 @@
+ 	/*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!");
++	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: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 12495)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 12496)
+@@ -45,7 +45,7 @@
+ 	//CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InterpFromGridToMeshUsage);
+ 	if((nlhs!=NLHS) || (nrhs!=6 && nrhs!=7)){
+ 		InterpFromGridToMeshUsage();
+-		_error_(" usage. See above");
++		_error_("usage. See above");
+ 	}
+ 
+ 	/*Input datasets: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12495)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12496)
+@@ -24,7 +24,7 @@
+ 	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!");
++	_error_("Shapelib not available! Cannot carry out shp file translation!");
+ 	#endif
+ 
+ 	/*Boot module: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/EnumToString/EnumToString.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 12495)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 12496)
+@@ -11,7 +11,7 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if(nrhs!=NRHS){
+-		EnumToStringUsage(); _error_(" usage. See above");
++		EnumToStringUsage(); _error_("usage. See above");
+ 	}
+ 
+ 	/*Fetch inputs: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 12495)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 12496)
+@@ -11,7 +11,7 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if(nrhs!=NRHS){
+-		StringToEnumUsage(); _error_(" usage. See above");
++		StringToEnumUsage(); _error_("usage. See above");
+ 	}
+ 
+ 	/*Fetch inputs: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12495)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12496)
+@@ -46,13 +46,13 @@
+ 	#ifdef _HAVE_MATLAB_MODULES_
+ 	if(nlhs!=1 && nlhs!=2){
+ 		ContourToMeshUsage();
+-		_error_(" usage. See above");
++		_error_("usage. See above");
+ 	}
+ 	#endif
+ 	/*check on input arguments: */
+ 	if(nrhs!=NRHS){
+ 		ContourToMeshUsage();
+-		_error_(" usage. See above");
++		_error_("usage. See above");
+ 	}
+ 
+ 
+@@ -81,7 +81,7 @@
+ 		WriteData(PLHS0,in_nod);
+ 		WriteData(PLHS1,in_elem);
+ 	}
+-	else _error_(" wrong interpolation type");
++	else _error_("wrong interpolation type");
+ 
+ 	/*end module: */
+ 	MODULEEND();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12495)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12496)
+@@ -41,7 +41,7 @@
+    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!");
++	_error_("Chaco not available! Cannot carry out Chaco partitioning!");
+ 	#endif
+ 
+ 	/*Boot module: */
Index: /issm/oecreview/Archive/12321-12677/ISSM-12496-12497.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12496-12497.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12496-12497.diff	(revision 12679)
@@ -0,0 +1,564 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Scotch/Scotch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Scotch/Scotch.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Scotch/Scotch.cpp	(revision 12497)
+@@ -24,7 +24,7 @@
+ {
+ 
+ #ifndef _HAVE_SCOTCH_ //only works if scotch library has been compiled in.
+-	_error_("Scotch not available! Cannot carry out Scotch partitioning!");
++	_error2_("Scotch not available! Cannot carry out Scotch partitioning!");
+ 	#else
+ 
+ 	int     argcm;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12497)
+@@ -43,19 +43,19 @@
+ 
+ 	/*Check inputs*/
+ 	if (nels<0){
+-		_error_("Number of elements must be positive, check index number of lines");
++		_error2_("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");
++		_error2_("Number of nods must be positive, check x and y sizes");
+ 	}
+ 	if (index_rows!=3){
+-		_error_("index should have 3 columns");
++		_error2_("index should have 3 columns");
+ 	}
+ 	if (y_rows!=nods){
+-		_error_("x and y do not have the same length");
++		_error2_("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");
++		_error2_("x and y should have only one column");
+ 	}
+ 
+ 	/* Run core computations: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12497)
+@@ -30,10 +30,10 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if(nlhs>NLHS){
+-		KMLOverlayUsage(); _error_("KMLOverlay usage error");
++		KMLOverlayUsage(); _error2_("KMLOverlay usage error");
+ 	}
+ 	if(nrhs<NRHS){
+-		KMLOverlayUsage(); _error_("KMLOverlay usage error");
++		KMLOverlayUsage(); _error2_("KMLOverlay usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+@@ -50,9 +50,9 @@
+ 	if (verbose) printf("  dzip=%g\n",dzip);
+ 
+ 	/*some checks*/
+-	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 (nlat !=2) _error2_("Latitudinal axes \"lataxis\" require two double values, not " << nlat << ".");
++	if (nlong!=2) _error2_("Longitudinal axes \"longaxis\" require two double values, not " << nlong << ".");
++	if (!nimages) _error2_("No image files provided.");
+ 
+ 	if ((int)dzip){
+ 		filkmz=filkml;
+@@ -89,7 +89,7 @@
+ 		if (verbose) printf("Zipping file \"%s\".\n",filkmz);
+ 		if (verbose) printf("%s\n",czip);
+ 
+-		if (mexEvalString(czip)) _error_("Error zipping file \"%s\".",filkmz);
++		if (mexEvalString(czip)) _error2_("Error zipping file \"" << filkmz << "\".");
+ 		xfree((void**)&czip);
+ 		xfree((void**)&filkmz);
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 12497)
+@@ -53,7 +53,7 @@
+ 	/*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!");
++	if(dummy!=3 && dummy!=6)_error2_("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: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 12497)
+@@ -75,10 +75,10 @@
+ 
+ 	/*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!");
++		_error2_("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!");
++		_error2_("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;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 12497)
+@@ -24,10 +24,10 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		Ll2xyUsage(); _error_("Ll2xy usage error");
++		Ll2xyUsage(); _error2_("Ll2xy usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		Ll2xyUsage(); _error_("Ll2xy usage error");
++		Ll2xyUsage(); _error2_("Ll2xy usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+@@ -46,11 +46,11 @@
+ 
+ 	/*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){_error2_("Must have same number of lat[" << nlat << "] and lon[" << nlon << "] coordinates.");}
+ 	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);
++	if (sgn != +1 && sgn != -1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
++	if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
++	if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
+ 
+ 	x=(double*)mxMalloc(ncoord*sizeof(double));
+ 	y=(double*)mxMalloc(ncoord*sizeof(double));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 12497)
+@@ -45,7 +45,7 @@
+ 	//CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InterpFromGridToMeshUsage);
+ 	if((nlhs!=NLHS) || (nrhs!=6 && nrhs!=7)){
+ 		InterpFromGridToMeshUsage();
+-		_error_("usage. See above");
++		_error2_("usage. See above");
+ 	}
+ 
+ 	/*Input datasets: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 12497)
+@@ -44,10 +44,10 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		KMLFileReadUsage(); _error_("KMLFileRead usage error");
++		KMLFileReadUsage(); _error2_("KMLFileRead usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		KMLFileReadUsage(); _error_("KMLFileRead usage error");
++		KMLFileReadUsage(); _error2_("KMLFileRead usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12497)
+@@ -24,7 +24,7 @@
+ 	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!");
++	_error2_("Shapelib not available! Cannot carry out shp file translation!");
+ 	#endif
+ 
+ 	/*Boot module: */
+@@ -32,10 +32,10 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		Shp2KmlUsage(); _error_("Shp2Kml usage error");
++		Shp2KmlUsage(); _error2_("Shp2Kml usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		Shp2KmlUsage(); _error_("Shp2Kml usage error");
++		Shp2KmlUsage(); _error2_("Shp2Kml usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+@@ -53,9 +53,9 @@
+ 	}
+ 
+ 	/*some checks*/
+-	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);
++	if (sgn < -1 || sgn > +1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north), -1 (south), or 0 (no translation).");
++	if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
++	if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
+ 
+ 	/* Run core computations: */
+ 	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 12497)
+@@ -24,10 +24,10 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		Exp2KmlUsage(); _error_("Exp2Kml usage error");
++		Exp2KmlUsage(); _error2_("Exp2Kml usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		Exp2KmlUsage(); _error_("Exp2Kml usage error");
++		Exp2KmlUsage(); _error2_("Exp2Kml usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+@@ -48,9 +48,9 @@
+ 	}
+ 
+ 	/*some checks*/
+-	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);
++	if (sgn !=+1 && sgn !=-1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
++	if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
++	if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
+ 
+ 	/* Run core computations: */
+ 	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 12497)
+@@ -21,10 +21,10 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		Kml2ExpUsage(); _error_("Kml2Exp usage error");
++		Kml2ExpUsage(); _error2_("Kml2Exp usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		Kml2ExpUsage(); _error_("Kml2Exp usage error");
++		Kml2ExpUsage(); _error2_("Kml2Exp usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+@@ -42,9 +42,9 @@
+ 	}
+ 
+ 	/*some checks*/
+-	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);
++	if (sgn !=+1 && sgn!= -1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
++	if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
++	if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
+ 
+ 	/* Run core computations: */
+ 	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InternalFront/InternalFront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 12497)
+@@ -25,13 +25,13 @@
+ 
+ 	/*Fetch required fields*/
+ 	FetchData(&numberofelements,mxGetAssignedField(MODEL,0,"numberofelements"));
+-	if(numberofelements<=0) _error_("No elements found in the model");
++	if(numberofelements<=0) _error2_("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]");
++	if(M!=numberofelements || N!=3) _error2_("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]");
++	if(M!=numberofelements || N!=1) _error2_("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]");
++	if(M!=numberofelements || N!=3) _error2_("Field 'elementconnectivity' should be of size [md.numberofelements 3]");
+ 
+ 	/*Allocate and initialize all variables*/
+ 	numberofsegments=0;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12497)
+@@ -68,11 +68,11 @@
+ 	/*checks on arguments on the matlab side: */
+ 	if(nlhs!=NLHS){
+ 		InterpFromMesh2dUsage();
+-		_error_("InterpFromMeshToMesh2dUsage usage error");
++		_error2_("InterpFromMeshToMesh2dUsage usage error");
+ 	}
+ 	if((nrhs!=6) && (nrhs!=7) && (nrhs!=8)){
+ 		InterpFromMesh2dUsage();
+-		_error_("InterpFromMeshToMesh2dUsage usage error");
++		_error2_("InterpFromMeshToMesh2dUsage usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+@@ -130,10 +130,10 @@
+ 
+ 	/*some checks*/
+ 	if (x_data_rows!=y_data_rows){
+-		_error_("vectors x and y should have the same length!");
++		_error2_("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!");
++		_error2_("vectors x_prime and y_prime should have the same length!");
+ 	}
+ 	
+ 	/*get number of elements and number of nodes in the data*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kriging/Kriging.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12497)
+@@ -21,15 +21,15 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nrhs<NRHS || nlhs>NLHS){
+-		KrigingUsage(); _error_("Kriging usage error");
++		KrigingUsage(); _error2_("Kriging usage error");
+ 	}
+ 
+ 	/*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(&y,&N,Y);                       if(n_obs!=N) _error2_("x and y should have the same size");
++	FetchData(&observations,&N,OBSERVATIONS); if(n_obs!=N) _error2_("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(&y_interp,&M,&N,YINTERP);       if(N!=N_interp || M!=M_interp) _error2_("x_interp and y_interp should have the same size");
+ 	FetchData(&options,NRHS,nrhs,prhs);
+ 
+ 	/*Call x layer*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/EnumToString/EnumToString.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 12497)
+@@ -11,7 +11,7 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if(nrhs!=NRHS){
+-		EnumToStringUsage(); _error_("usage. See above");
++		EnumToStringUsage(); _error2_("usage. See above");
+ 	}
+ 
+ 	/*Fetch inputs: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 12497)
+@@ -11,7 +11,7 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if(nrhs!=NRHS){
+-		StringToEnumUsage(); _error_("usage. See above");
++		StringToEnumUsage(); _error2_("usage. See above");
+ 	}
+ 
+ 	/*Fetch inputs: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/matlab/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/matlab/Makefile.am	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/matlab/Makefile.am	(revision 12497)
+@@ -49,9 +49,12 @@
+ 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 
++if CIRCULAR_DEPENDENCIES
++LDADD       += $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
++endif
++LDADD       += ../../c/libISSMModules.a
+ 
+-LDADD       += ../../c/libISSMCore.a ../../c/libISSMModules.a 
+-
+ #Optimization flags:
+ AM_CXXFLAGS += $(CXXOPTFLAGS) 
+ #}}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 12497)
+@@ -31,9 +31,9 @@
+ 	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");
++	if(y_rows!=nods)         _error2_("x and y do not have the same length");
++	if(x_cols>1 || y_cols>1) _error2_("x and y should have only one column");
++	if(nods<3)               _error2_("At least 3 points are required");
+ 
+ 	/* Run core computations: */
+ 	if (verbose) printf("Call core\n");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12497)
+@@ -38,13 +38,13 @@
+ 	#ifdef _HAVE_MATLAB_MODULES_
+ 	if(nlhs!=NLHS){
+ 		InterpFromMeshToMesh2dUsage();
+-		_error_("InterpFromMeshToMesh2dUsage usage error");
++		_error2_("InterpFromMeshToMesh2dUsage usage error");
+ 	}
+ 	#endif
+ 	/*check on input arguments: */
+ 	if((nrhs!=6) & (nrhs!=8)){
+ 		InterpFromMeshToMesh2dUsage();
+-		_error_("InterpFromMeshToMesh2dUsage usage error");
++		_error2_("InterpFromMeshToMesh2dUsage usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+@@ -70,13 +70,13 @@
+ 
+ 	/*some checks*/
+ 	if (x_data_rows!=y_data_rows){
+-		_error_("vectors x and y should have the same length!");
++		_error2_("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!");
++		_error2_("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);
++		_error2_("index should have 3 columns (input provided has " << index_cols << " columns)");
+ 	}
+ 
+ 	/* Run core computations: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12497)
+@@ -46,13 +46,13 @@
+ 	#ifdef _HAVE_MATLAB_MODULES_
+ 	if(nlhs!=1 && nlhs!=2){
+ 		ContourToMeshUsage();
+-		_error_("usage. See above");
++		_error2_("usage. See above");
+ 	}
+ 	#endif
+ 	/*check on input arguments: */
+ 	if(nrhs!=NRHS){
+ 		ContourToMeshUsage();
+-		_error_("usage. See above");
++		_error2_("usage. See above");
+ 	}
+ 
+ 
+@@ -81,7 +81,7 @@
+ 		WriteData(PLHS0,in_nod);
+ 		WriteData(PLHS1,in_elem);
+ 	}
+-	else _error_("wrong interpolation type");
++	else _error2_("wrong interpolation type");
+ 
+ 	/*end module: */
+ 	MODULEEND();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 12497)
+@@ -23,10 +23,10 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		Xy2llUsage(); _error_("Xy2ll usage error");
++		Xy2llUsage(); _error2_("Xy2ll usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		Xy2llUsage(); _error_("Xy2ll usage error");
++		Xy2llUsage(); _error2_("Xy2ll usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+@@ -44,11 +44,11 @@
+ 	}
+ 
+ 	/*some checks*/
+-	if   (nx != ny) _error_("Must have same number of x[%d] and y[%d] coordinates.",nx,ny);
++	if   (nx != ny){_error2_("Must have same number of x[" << nx << "] and y[" << ny << "] coordinates.");}
+ 	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);
++	if (sgn != +1 && sgn != -1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
++	if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
++	if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
+ 
+ 	lat=(double*)mxMalloc(ncoord*sizeof(double));
+ 	lon=(double*)mxMalloc(ncoord*sizeof(double));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12497)
+@@ -39,10 +39,10 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		KMLMeshWriteUsage(); _error_("KMLMeshWrite usage error");
++		KMLMeshWriteUsage(); _error2_("KMLMeshWrite usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		KMLMeshWriteUsage(); _error_("KMLMeshWrite usage error");
++		KMLMeshWriteUsage(); _error2_("KMLMeshWrite usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+@@ -86,17 +86,17 @@
+ 	if(part) for (i=0; i<lprt; i++) if (part[i]+1 > nparts) nparts=part[i]+1;
+ 
+ 	if (nodecon && (mncon != nnodes))
+-		_error_("Nodal connectivity table, if supplied, must be supplied for all nodes.");
++	  {_error2_("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.");
++		_error2_("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.");
++		_error2_("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.");
++		_error2_("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.");
++		_error2_("Colormap matrix, if supplied, must have three columns for rgb.");
+ 	if (!strlen(filnam))
+ 		strcpy(filnam,"stdout");
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12496)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12497)
+@@ -41,7 +41,7 @@
+    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!");
++	_error2_("Chaco not available! Cannot carry out Chaco partitioning!");
+ 	#endif
+ 
+ 	/*Boot module: */
Index: /issm/oecreview/Archive/12321-12677/ISSM-12497-12498.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12497-12498.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12497-12498.diff	(revision 12679)
@@ -0,0 +1,27 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12497)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12498)
+@@ -990,6 +990,8 @@
+ 	fi
+ 	AC_MSG_RESULT(done)
+ 	dnl }}}
++
++	dnl Capabilities
+ 	dnl with-kriging{{{
+ 	AC_ARG_WITH([kriging],
+ 		AS_HELP_STRING([--with-kriging = YES],[compile with kriging capabilities (default is yes)]),
+@@ -1324,4 +1326,13 @@
+ 	fi
+ 	AC_MSG_RESULT($USE_64BIT_INDICES)
+ 	dnl }}}
++	dnl circular-dependency{{{
++	AC_ARG_WITH([circular-dependency],
++	  AS_HELP_STRING([--with-circular-dependency = bool],[do we look for circular dependencies, default "yes", ex: --with-circular-dependency="no"]),
++	  [CIRCULAR_DEPENDENCIES=$withval],[CIRCULAR_DEPENDENCIES=yes]) 
++	AC_MSG_CHECKING(for circular dependencies)
++	AM_CONDITIONAL([CIRCULAR_DEPENDENCIES], [test x$CIRCULAR_DEPENDENCIES = xyes])
++	AC_MSG_RESULT($CIRCULAR_DEPENDENCIES) 
++
++	dnl }}}
+ ])
Index: /issm/oecreview/Archive/12321-12677/ISSM-12498-12499.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12498-12499.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12498-12499.diff	(revision 12679)
@@ -0,0 +1,37 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-discover.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-discover.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-discover.sh	(revision 12499)
+@@ -0,0 +1,26 @@
++#!/bin/bash
++
++#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 ./
++unzip triangle.zip
++
++#copy new makefile
++cp ../configs/pleiades/configure.make ./
++cp ../makefile ./
++
++#Patch triangle.c 
++patch triangle.c ../triangle.c.patch
++
++#Compile triangle
++make
++
++#Patch triangle.h
++patch triangle.h ../triangle.h.patch
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-discover.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12499-12500.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12499-12500.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12499-12500.diff	(revision 12679)
@@ -0,0 +1,24 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp	(revision 12499)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/exprintf.cpp	(revision 12500)
+@@ -24,8 +24,7 @@
+ 	while(true){
+ 
+ 		/*allocate buffer for given string size*/
+-		//buffer=xNew<char>(size);
+-		buffer=(char*)xmalloc(size*sizeof(char));
++		buffer=xNew<char>(size);
+ 
+ 		/* Try to print in the allocated space. */
+ 		va_start(args, format);
+@@ -45,8 +44,7 @@
+ 		else       /* glibc 2.0 */
+ 		 size*=2;  /* twice the old size */
+ 
+-		//xDelete<char>(buffer);
+-		xfree((void**)&buffer);
++		xDelete<char>(buffer);
+ 	}
+ 
+ 	return buffer;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12500-12501.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12500-12501.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12500-12501.diff	(revision 12679)
@@ -0,0 +1,194 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/discover.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/discover.m	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/discover.m	(revision 12501)
+@@ -0,0 +1,189 @@
++%PFE class definition
++%
++%   Usage:
++%      cluster=discover();
++%      cluster=discover('np',3);
++%      cluster=discover('np',3,'login','username');
++
++classdef discover 
++    properties (SetAccess=public)  
++		 % {{{
++		 name=oshostname();
++		 login='';
++		 numnodes=20;
++		 cpuspernode=8; 
++		 port=1025;
++		 queue='long';
++		 time=12*60;
++		 processor='west';
++		 codepath='';
++		 executionpath='';
++		 interactive=0;
++		 bbftp=0;
++		 numstreams=8;
++		 hyperthreading=0;
++	 end
++	 properties (SetAccess=private) 
++		 np=20*8;
++		 % }}}
++	 end
++	 methods
++		 function cluster=discover(varargin) % {{{
++
++			 %initialize cluster using default settings if provided
++			 if (exist('discover_settings')==2), discover_settings; end
++
++			 %use provided options to change fields
++			 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster);
++		 end
++		 %}}}
++		 function disp(cluster) % {{{
++			 %  display the object
++			 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
++			 disp(sprintf('    name: %s',cluster.name));
++			 disp(sprintf('    login: %s',cluster.login));
++			 disp(sprintf('    port: %i',cluster.port));
++			 disp(sprintf('    numnodes: %i',cluster.numnodes));
++			 disp(sprintf('    cpuspernode: %i',cluster.cpuspernode));
++			 disp(sprintf('    np: %i',cluster.cpuspernode*cluster.numnodes));
++			 disp(sprintf('    queue: %s',cluster.queue));
++			 disp(sprintf('    time: %i',cluster.time));
++			 disp(sprintf('    processor: %s',cluster.processor));
++			 disp(sprintf('    codepath: %s',cluster.codepath));
++			 disp(sprintf('    executionpath: %s',cluster.executionpath));
++			 disp(sprintf('    interactive: %i',cluster.interactive));
++			 disp(sprintf('    hyperthreading: %i',cluster.hyperthreading));
++		 end
++		 %}}}
++		 function checkconsistency(cluster,md,solution,analyses) % {{{
++
++			 available_queues={'general_long','general','general_small','debug'};
++			 queue_requirements_time=[24*60 12*60 12*60 60];
++			 queue_requirements_np=[516 1024 16 32];
++
++			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
++
++			 %now, check cluster.cpuspernode according to processor type
++			 if ( strcmpi(cluster.processor,'neha')),
++				 if ((cluster.cpuspernode>8 ) | (cluster.cpuspernode<1)),
++					 checkmessage('cpuspernode should be between 1 and 8 for ''neha'' processors');
++				 end
++			 elseif strcmpi(cluster.processor,'west'),
++				 if ((cluster.cpuspernode>12 ) | (cluster.cpuspernode<1)),
++					 checkmessage('cpuspernode should be between 1 and 12 for ''west'' processors');
++				 end
++			 else
++				 checkmessage('unknown processor type, should be ''neha'' or ''west'' ');
++			 end
++
++			 %Miscelaneous
++			 if isempty(cluster.login), checkmessage('login empty'); end
++			 if isempty(cluster.codepath), checkmessage('codepath empty'); end
++			 if isempty(cluster.executionpath), checkmessage('executionpath empty'); end
++
++		 end
++		 %}}}
++		 function BuildQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
++
++			 if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
++
++			 %compute number of processors
++			 cluster.np=cluster.numnodes*cluster.cpuspernode;
++
++			 %write queuing script 
++			 fid=fopen([modelname '.queue'],'w');
++			 fprintf(fid,'#PBS -S /bin/bash\n');
++%			 fprintf(fid,'#PBS -N %s\n',modelname);
++			 fprintf(fid,'#PBS -l select=%i:ncpus=%i:proc=%s\n',cluster.numnodes,cluster.cpuspernode,cluster.processor);
++			 fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds.
++			 fprintf(fid,'#PBS -q %s \n',cluster.queue);
++			 fprintf(fid,'#PBS -W group_list=s1010\n');
++			 fprintf(fid,'#PBS -m e\n');
++			 fprintf(fid,'#PBS -o %s.outlog \n',modelname);
++			 fprintf(fid,'#PBS -e %s.errlog \n\n',modelname);
++			 fprintf(fid,'. /usr/share/modules/init/bash\n\n');
++			 fprintf(fid,'module load comp/intel-10.1.023\n');
++			 fprintf(fid,'module load mpi/impi-3.2.2.006\n');
++			 fprintf(fid,'module load lib/mkl-10.1.2.024\n\n');
++			 fprintf(fid,'export PATH="$PATH:."\n\n');
++			 fprintf(fid,'export MPI_GROUP_MAX=64\n\n');
++			 fprintf(fid,'cd $PBS_O_WORKDIR\n\n');
++			 fprintf(fid,'mpirun -np %i %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution),modelname);
++			 if ~io_gather, %concatenate the output files:
++				 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
++			 end
++			 fclose(fid);
++
++			 %in interactive mode, create a run file, and errlog and outlog file
++			 if cluster.interactive,
++				 fid=fopen([modelname '.run'],'w');
++				 if ~isvalgrind,
++					 fprintf(fid,'mpirun -np %i %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution),modelname);
++				 else
++					 fprintf(fid,'mpirun -np %i valgrind --leak-check=full %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution),modelname);
++				 end
++				 if ~io_gather, %concatenate the output files:
++					 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
++				 end
++				 fclose(fid);
++				 fid=fopen([modelname '.errlog'],'w');
++				 fclose(fid);
++				 fid=fopen([modelname '.outlog'],'w');
++				 fclose(fid);
++			 end
++		 end %}}}
++		 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
++
++			 %compress the files into one zip.
++			 compressstring=['tar -zcf ' dirname '.tar.gz '];
++			 for i=1:numel(filelist),
++				 compressstring = [compressstring ' ' filelist{i}];
++			 end
++			 if cluster.interactive,
++				 compressstring = [compressstring ' ' modelname '.run '  modelname '.errlog ' modelname '.outlog '];
++			 end
++			 system(compressstring);
++
++			 disp('uploading input file and queueing script');
++			 if cluster.interactive,
++				 directory=[cluster.executionpath '/Interactive' num2str(cluster.interactive)];
++			 else 
++				 directory=cluster.executionpath;
++			 end
++
++			 if ~cluster.bbftp,
++				 issmscpout(cluster.name,directory,cluster.login,cluster.port,{[dirname '.tar.gz']});
++			 else
++				 issmbbftpout(cluster.name,directory,cluster.login,cluster.port,cluster.numstreams,{[dirname '.tar.gz']});
++			 end
++
++			 %lauch command, to be executed via ssh
++			 if ~cluster.interactive, 
++				 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
++					 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && qsub ' modelname '.queue '];
++			 else
++				 launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive) ' && tar -zxf ' dirname '.tar.gz'];
++			 end
++
++			 disp('launching solution sequence on remote cluster');
++			 issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
++		 end
++		 %}}}
++		 function Download(cluster,dirname,filelist)% {{{
++
++			 %copy files from cluster to current directory
++			 if ~cluster.interactive,
++				 directory=[cluster.executionpath '/' dirname '/'];
++			 else
++				 directory=[cluster.executionpath '/Interactive' num2str(cluster.interactive) '/'];
++			 end
++
++			 if ~cluster.bbftp,
++				 issmscpin(cluster.name,cluster.login,cluster.port,directory,filelist);
++			 else
++				 issmbbftpin(cluster.name, cluster.login, cluster.port, cluster.numstreams, directory, filelist);
++			 end
++
++		 end %}}}
++	end
++end
Index: /issm/oecreview/Archive/12321-12677/ISSM-12501-12502.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12501-12502.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12501-12502.diff	(revision 12679)
@@ -0,0 +1,28 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/matlab/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/matlab/install.sh	(revision 12501)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/matlab/install.sh	(revision 12502)
+@@ -4,7 +4,8 @@
+ 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 /discover/vis/mathworks/matlab_r2011b/ install
+ #ln -s /usr/local/matlab704/ install
+ #ln -s /usr/local/matlab711/ install
+ #ln -s /usr/local/matlab712/ install
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-discover.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-discover.sh	(revision 12501)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-discover.sh	(revision 12502)
+@@ -5,7 +5,8 @@
+ 
+ ./configure \
+  --prefix=$ISSM_DIR \
+- --with-modules=no \
++ --without-serial \
++ --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 \
Index: /issm/oecreview/Archive/12321-12677/ISSM-12502-12503.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12502-12503.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12502-12503.diff	(revision 12679)
@@ -0,0 +1,45 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12502)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12503)
+@@ -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=1;
+ 
+ #Different steps here. 
+ #1: install sdk, ant and sdk tools
+@@ -19,16 +19,15 @@
+ 	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'
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-sdk_r18-macosx.zip' 'android-sdk_r18-macosx.zip'
+ 
+ 	# Install Android SDK and NDK.
+-	unzip -o android-sdk-r16-macosx.zip
++	unzip -o android-sdk_r18-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
++	mv -f android-sdk-macosx install-sdk
++	mv -f apache-ant-1.8.2 install-ant
+ 
+ 	#Post_install configuration: 
+ 	#We need specific settings for specific platforms, for the SDK to 
+@@ -36,8 +35,8 @@
+ 
+ 	#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
++	#and a specific android api: API 15 and API 14
++	#Note: API 15 and 14 correspond to Android 4.0.3 and 4.0 respectively. 
+ 
+ 	cd install-sdk/tools/ && source ./android update sdk -t platform-tools,android-15,android-14,system-image --no-ui
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12503-12504.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12503-12504.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12503-12504.diff	(revision 12679)
@@ -0,0 +1,15 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/matlab/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/matlab/install.sh	(revision 12503)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/matlab/install.sh	(revision 12504)
+@@ -4,8 +4,8 @@
+ rm -rf install
+ 
+ #Select or create a new simlink
+-#ln -s /usr/local/pkgs/matlab-7.6/ install
+-ln -s /discover/vis/mathworks/matlab_r2011b/ install
++ln -s /usr/local/pkgs/matlab-7.6/ install
++#ln -s /discover/vis/mathworks/matlab_r2011b/ install
+ #ln -s /usr/local/matlab704/ install
+ #ln -s /usr/local/matlab711/ install
+ #ln -s /usr/local/matlab712/ install
Index: /issm/oecreview/Archive/12321-12677/ISSM-12504-12505.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12504-12505.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12504-12505.diff	(revision 12679)
@@ -0,0 +1,35 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12504)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12505)
+@@ -219,18 +219,23 @@
+ void ElementVector::Echo(void){
+ 
+ 	int i,j;
+-	printf("Element Vector echo: \n");
+-	printf("   nrows: %i\n",nrows);
++	_printLine_("Element Vector echo:");
++	_printLine_("   nrows: " << nrows);
+ 
+-	printf("   values: \n");
++	_printLine_("   test:");
++	for(i=0;i<nrows;i++) _printString_(" " << i);
++	_printLine_("HERE");
++
++	_printLine_("   values:");
+ 	for(i=0;i<nrows;i++){
+-		printf("      %i: %10g\n",i,values[i]);
++		_printLine_(setw(4) << right << i << ": " << setw(10) << values[i]);
+ 	}
+ 
+-	printf("   gglobaldoflist (%p): ",gglobaldoflist);
+-	if(gglobaldoflist) for(i=0;i<nrows;i++)printf("%i ",gglobaldoflist[i]); printf("\n");
++	_printString_("   gglobaldoflist (" << gglobaldoflist << "): ");
++	if(gglobaldoflist) for(i=0;i<nrows;i++) _printString_(" " << gglobaldoflist[i] );
++	_printLine_(" ");
+ 
+-	printf("   fsize: %i\n",fsize);
++	_printLine_("   fsize: " << fsize);
+ 	printf("   flocaldoflist (%p): ",flocaldoflist);
+ 	if(flocaldoflist) for(i=0;i<fsize;i++)printf("%i ",flocaldoflist[i]); printf("\n");
+ 	printf("   fglobaldoflist (%p): ",fglobaldoflist);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12505-12506.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12505-12506.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12505-12506.diff	(revision 12679)
@@ -0,0 +1,49 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12505)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12506)
+@@ -8,6 +8,7 @@
+ 
+ #include <iostream>
+ #include <sstream>
++#include <iomanip>
+ #include "./typedefs.h"
+ 
+ #ifdef HAVE_CONFIG_H
+@@ -19,7 +20,7 @@
+ 
+ /* _printf_ {{{*/
+ /*Printing macro: only cpu number 0 */
+-#define _printf_(flag,...) do { if(flag) PrintfFunction(__VA_ARGS__); }while (0)
++#define _printf_(flag,...) do{if(flag) PrintfFunction(__VA_ARGS__);}while(0)
+ /*}}}*/
+ /* _error_ {{{*/
+ /*Error exception macro*/
+@@ -35,14 +36,14 @@
+ /*new Error exception macro*/
+ #ifdef _INTEL_WIN_
+ #define _error2_(StreamArgs)\
+-   {std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
++   do{std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
+    aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \
+-   throw ErrorException(aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}
++   throw ErrorException(aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}while(0)
+ #else
+ #define _error2_(StreamArgs)\
+-	{std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
++	do{std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
+    aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \
+-   throw ErrorException(__FILE__,__func__,__LINE__,aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}
++   throw ErrorException(__FILE__,__func__,__LINE__,aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}while(0)
+ #endif
+ /*}}}*/
+ /* _printLine_ {{{*/
+@@ -53,7 +54,7 @@
+ /* _printString_ {{{*/
+ /* macro to print some string, adds std::ends */
+ #define _printString_(StreamArgs)\
+-   {std::cout << StreamArgs << std::ends;}
++   {std::cout << StreamArgs;}
+ /*}}}*/
+ /* _assert_ {{{*/
+ /*Assertion macro: do nothing if macro _ISSM_DEBUG_ undefined*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12506-12507.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12506-12507.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12506-12507.diff	(revision 12679)
@@ -0,0 +1,637 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12507)
+@@ -49,12 +49,12 @@
+ /* _printLine_ {{{*/
+ /* macro to print a line, adds std::endl */
+ #define _printLine_(StreamArgs)\
+-   {std::cout << StreamArgs << std::endl;}
++   do{std::cout << StreamArgs << std::endl;}while(0)
+ /*}}}*/
+ /* _printString_ {{{*/
+ /* macro to print some string, adds std::ends */
+ #define _printString_(StreamArgs)\
+-   {std::cout << StreamArgs;}
++   do{std::cout << StreamArgs;}while(0)
+ /*}}}*/
+ /* _assert_ {{{*/
+ /*Assertion macro: do nothing if macro _ISSM_DEBUG_ undefined*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12507)
+@@ -14,6 +14,7 @@
+ #include "../../io/io.h"
+ #include "../../shared/shared.h"
+ #include <float.h>
++#include <iomanip>
+ 
+ void BrentSearch(IssmDouble* psearch_scalar,IssmDouble* pJ,OptPars* optpars,IssmDouble (*f)(IssmDouble,OptArgs*), OptArgs* optargs){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/elements.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/elements.h	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/elements.h	(revision 12507)
+@@ -29,31 +29,30 @@
+ #endif
+ 
+ inline void printarray(IssmDouble* array,int lines,int cols=1){
+-	printf("\n");
++	_printLine_("");
+ 	for(int i=0;i<lines;i++){  
+-		printf("   [ ");
+-		for(int j=0;j<cols;j++) printf(" %12.7g ",array[i*cols+j]);
+-		printf(" ]\n");
++		_printString_("   [ ");
++		for(int j=0;j<cols;j++) _printString_( " " << setw(11) << setprecision (5) << array[i*cols+j]);
++		_printLine_(" ]");
+ 	}  
+-	printf("\n");
++	_printLine_("");
+ }
+ inline void printarray(int* array,int lines,int cols=1){
+-	printf("\n");
++	_printLine_("");
+ 	for(int i=0;i<lines;i++){  
+-		printf("   [ ");
+-		for(int j=0;j<cols;j++) printf(" %6i",array[i*cols+j]);
+-		printf(" ]\n");
++		_printString_("   [ ");
++		for(int j=0;j<cols;j++) _printString_( " " << setw(11) << setprecision (5) << array[i*cols+j]);
++		_printLine_(" ]");
+ 	}  
+-	printf("\n");
++	_printLine_("");
+ }
+ inline void printbinary(int n) {
+ 	unsigned int i=1L<<(sizeof(n)*8-1);
+-
+ 	while (i>0) {
+ 		if (n&i)
+-		 printf("1");
++		 _printString_("1");
+ 		else
+-		 printf("0");
++		 _printString_("0");
+ 		i>>=1;
+ 	}
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp	(revision 12507)
+@@ -16,19 +16,19 @@
+ 	int interpolation_type;
+ 	bool debug;
+ 	int  nels_data;
+-	double* index_data=NULL;
+-	double* x_data=NULL;
+-	double* y_data=NULL;
+-	double* data=NULL;
+-	double xmin,xmax;
+-	double ymin,ymax;
+-	int    nods_prime;
+-	Vector*    data_prime=NULL;
+-	double* x_prime=NULL;
+-	double* y_prime=NULL;
+-	double* default_values=NULL;
++	double *index_data         = NULL;
++	double *x_data             = NULL;
++	double *y_data             = NULL;
++	double *data               = NULL;
++	double  xmin                 ,xmax;
++	double  ymin                 ,ymax;
++	int     nods_prime;
++	Vector *data_prime         = NULL;
++	double *x_prime            = NULL;
++	double *y_prime            = NULL;
++	double *default_values     = NULL;
+ 	int     num_default_values;
+-	double*    incontour=NULL;
++	double *incontour          = NULL;
+ 
+ 	/*intermediary: */
+ 	int     i0;
+@@ -45,35 +45,34 @@
+ 	num_threads=handle->num;
+ 	
+ 	/*recover parameters :*/
+-	interpolation_type=gate->interpolation_type;
+-	debug=gate->debug;
+-	nels_data=gate->nels_data;
+-	index_data=gate->index_data;
+-	x_data=gate->x_data;
+-	y_data=gate->y_data;
+-	data=gate->data;
+-	xmin=gate->xmin;
+-	xmax=gate->xmax;
+-	ymin=gate->ymin;
+-	ymax=gate->ymax;
+-	nods_prime=gate->nods_prime;
+-	data_prime=gate->data_prime;
+-	x_prime=gate->x_prime;
+-	y_prime=gate->y_prime;
+-	default_values=gate->default_values;
+-	num_default_values=gate->num_default_values;
+-	incontour=gate->incontour;
++	interpolation_type = gate->interpolation_type;
++	debug              = gate->debug;
++	nels_data          = gate->nels_data;
++	index_data         = gate->index_data;
++	x_data             = gate->x_data;
++	y_data             = gate->y_data;
++	data               = gate->data;
++	xmin               = gate->xmin;
++	xmax               = gate->xmax;
++	ymin               = gate->ymin;
++	ymax               = gate->ymax;
++	nods_prime         = gate->nods_prime;
++	data_prime         = gate->data_prime;
++	x_prime            = gate->x_prime;
++	y_prime            = gate->y_prime;
++	default_values     = gate->default_values;
++	num_default_values = gate->num_default_values;
++	incontour          = gate->incontour;
+ 
+ 	/*partition loop across threads: */
+ 	PartitionRange(&i0,&i1,nels_data,num_threads,my_thread);
+ 
+ 	/*Loop over the elements*/
+-	if (debug && my_thread==0) printf("      interpolation progress:   %5.2lf %%",0.0);
+-
+ 	for (i=i0;i<i1;i++){
+ 
+ 		/*display current iteration*/
+-		if (debug && my_thread==0 && fmod((double)i,(double)100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nels_data*100*num_threads);
++		if (debug && my_thread==0 && fmod((double)i,(double)100)==0)
++		 _printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%");
+ 
+ 		/*if there is no point inside the domain, go to next iteration*/
+ 		if ( (x_data[(int)index_data[3*i+0]-1]<xmin) && (x_data[(int)index_data[3*i+1]-1]<xmin) && (x_data[(int)index_data[3*i+2]-1]<xmin)) continue;
+@@ -124,8 +123,7 @@
+ 			}
+ 		}
+ 	}
+-	if (debug && my_thread==0) printf("\b\b\b\b\b\b\b%5.2lf %%\n",100.0);
+-	
++	if(debug && my_thread==0)
++	 _printLine_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%");
+ 	return NULL;
+-
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 12507)
+@@ -84,11 +84,11 @@
+ 	}
+ 
+ 	/*Loop over the elements*/
+-	if (debug) printf("      interpolation progress:   %5.2lf %%",0.0);
+ 	for (n=0;n<nels;n++){
+ 
+ 		/*display current iteration*/
+-		if (debug && fmod((double)n,(double)100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)n/nels*100);
++		if (debug && fmod((double)n,(double)100)==0)
++		 _printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<double(n)/double(nels)*100<<"%");
+ 
+ 		/*Get extrema coordinates of current elements*/
+ 		x_tria_min=x_mesh[(int)index_mesh[3*n+0]-1]; x_tria_max=x_tria_min;
+@@ -167,7 +167,8 @@
+ 			}
+ 		}
+ 	}
+-	if (debug) printf("\b\b\b\b\b\b\b%5.2lf %%\n",100.0);
++	if (debug)
++	 _printLine_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%");
+ 
+ 	/*Assign output pointers:*/
+ 	*pgriddata=griddata;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp	(revision 12507)
+@@ -76,7 +76,7 @@
+ 			}
+ 		}
+ 		printf( "\n" );
+-		printf("Number of zeroes remaining: %10ld",lines*samps-counter);
++		printf("Number of zeroes remaining: %d",lines*samps-counter);
+ 		fflush( stdout );
+ 	#endif
+ 
+@@ -95,7 +95,7 @@
+ 		}
+ 		//        n u m b e r   o f   z e r o e s   r e m a i n i n g :   1 2 3 4 5 6 7 8 9 10        
+ 		printf( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );
+-		printf("Number of zeroes remaining: %10ld",lines*samps-counter);
++		printf("Number of zeroes remaining: %d",lines*samps-counter);
+ 		fflush( stdout );
+ 	#endif
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12507)
+@@ -95,7 +95,7 @@
+ 
+ 		/*launch the thread manager with Krigingxt as a core: */
+ 		LaunchThread(NearestNeighbort,(void*)&gate,num);
+-		printf("\r      interpolation progress:  100.00%%\n");
++		_printLine_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%");
+ 		xDelete<double>(gate.percent);
+ 	}
+ 	else if(strcmp(output,"idw")==0){ //Inverse distance weighting
+@@ -114,7 +114,7 @@
+ 
+ 		/*launch the thread manager with Krigingxt as a core: */
+ 		LaunchThread(idwt,(void*)&gate,num);
+-		printf("\r      interpolation progress:  100.00%%\n");
++		_printLine_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%");
+ 		xDelete<double>(gate.percent);
+ 	}
+ 	else if(strcmp(output,"prediction")==0){
+@@ -134,7 +134,7 @@
+ 
+ 		/*launch the thread manager with Krigingxt as a core: */
+ 		LaunchThread(Krigingxt,(void*)&gate,num);
+-		printf("\r      interpolation progress:  100.00%%\n");
++		_printLine_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%");
+ 		xDelete<double>(gate.percent);
+ 	}
+ 	else{
+@@ -189,7 +189,7 @@
+ 		percent[my_thread]=double(idx-i0)/double(i1-i0)*100.;
+ 		localpercent=percent[0];
+ 		for(int i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]);
+-		printf("\r      interpolation progress: %5.2lf%%",localpercent);
++		_printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
+ 
+ 		/*Kriging interpolation*/
+ 		observations->InterpolationKriging(&predictions[idx],&error[idx],x_interp[idx],y_interp[idx],radius,mindata,maxdata,variogram);
+@@ -238,7 +238,7 @@
+ 		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);
++		_printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
+ 
+ 		observations->InterpolationNearestNeighbor(&predictions[idx],x_interp[idx],y_interp[idx],radius);
+ 	}
+@@ -286,7 +286,7 @@
+ 		percent[my_thread]=double(idx-i0)/double(i1-i0)*100.;
+ 		localpercent=percent[0];
+ 		for(int i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]);
+-		printf("\r      interpolation progress: %5.2lf%%",localpercent);
++		_printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
+ 
+ 		observations->InterpolationIDW(&predictions[idx],x_interp[idx],y_interp[idx],radius,mindata,maxdata,power);
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp	(revision 12507)
+@@ -57,11 +57,11 @@
+ 	for (i=0;i<nods_prime;i++) data_prime->SetValue(i,default_value,INS_VAL);
+ 
+ 	/*Loop over the elements*/
+-	if (debug) printf("      interpolation progress:   %5.2lf %%",0.0);
+ 	for (i=0;i<nels_data;i++){
+ 
+ 		/*display current iteration*/
+-		if (debug && fmod((double)i,(double)100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nels_data*100);
++		if (debug && fmod((double)i,(double)100)==0)
++		 _printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<double(i)/double(nels_data)*100<<"%");
+ 
+ 		/*Get extrema coordinates of current elements*/
+ 		x_tria_min=x_data[(int)index_data[6*i+0]-1]; x_tria_max=x_tria_min;
+@@ -131,7 +131,8 @@
+ 			}
+ 		}
+ 	}
+-	if (debug) printf("\b\b\b\b\b\b\b%5.2lf %%\n",100.0);
++	if (debug)
++	 _printLine_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%");
+ 
+ 	/*Assign output pointers:*/
+ 	*pdata_prime=data_prime;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12507)
+@@ -123,17 +123,22 @@
+ 	double *x             = gate->x;
+ 	double *y             = gate->y;
+ 	int     nods          = gate->nods;
+-	Vector*     data_mesh     = gate->data_mesh;
++	Vector *data_mesh     = gate->data_mesh;
+ 	double *data          = gate->data;
+ 	double  default_value = gate->default_value;
+ 	int     interpenum    = gate->interp;
+ 	int     M             = gate->M;
+ 	int     N             = gate->N;
+ 
++	bool debug = M*N>1? true:false;
++	debug = true;
++
+ 	/*partition loop across threads: */
+ 	PartitionRange(&i0,&i1,nods,num_threads,my_thread);
+ 	for (i=i0;i<i1;i++) {
+ 
++		if(debug && my_thread==0)
++		 _printLine_("\r      interpolation progress: "<<setw(5)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%%");
+ 		x_grid=*(x_mesh+i);
+ 		y_grid=*(y_mesh+i);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp	(revision 12507)
+@@ -44,12 +44,11 @@
+ 	PartitionRange(&i0,&i1,nods,num_threads,my_thread);
+ 
+ 	/*Loop over the nodes*/
+-	if (my_thread==0) printf("      loop progress:   %5.2lf %%",0.0);
+-
+ 	for (i=i0;i<i1;i++){
+ 
+ 		/*display current iteration*/
+-		if (my_thread==0 && fmod((double)i,(double)100)==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)i/nods*100*num_threads);
++		if (my_thread==0 && fmod((double)i,(double)100)==0)
++		 _printString_("\r      loop progress: "<<setw(6)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%");
+ 
+ 		distance=mindistance+100; //make sure initialization respects min distance criterion.
+ 		for (j=0;j<nods;j++){
+@@ -69,7 +68,8 @@
+ 			}
+ 		}
+ 	}
+-	if (my_thread==0) printf("\b\b\b\b\b\b\b%5.2lf %%\n",100.0);
++	if (my_thread==0)
++	 _printLine_("\r      loop progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%");
+ 
+ 	/*Free ressources:*/
+ 	xDelete<bool>(already);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12507)
+@@ -376,45 +376,45 @@
+ void ElementMatrix::Echo(void){
+ 
+ 	int i,j;
+-	printf("Element Matrix echo: \n");
+-	printf("   nrows: %i\n",nrows);
+-	printf("   ncols: %i\n",ncols);
+-	printf("   dofsymmetrical: %s\n",dofsymmetrical?"true":"false");
++	_printLine_("Element Matrix echo:");
++	_printLine_("   nrows: " << nrows);
++	_printLine_("   ncols: " << nrows);
++	_printLine_("   dofsymmetrical: " << (dofsymmetrical?"true":"false"));
+ 
+-	printf("   values: \n");
++	_printLine_("   values:");
+ 	for(i=0;i<nrows;i++){
+-		printf("      %i: ",i);
+-		for(j=0;j<ncols;j++) printf("%10g ",*(values+ncols*i+j));
+-		printf("\n");
++		_printString_(setw(4) << right << i << ": ");
++		for(j=0;j<ncols;j++) _printString_( " " << setw(11) << setprecision (5) << right << values[i*ncols+j]);
++		_printLine_("");
+ 	}
+ 
+-	printf("   gglobaldoflist (%p): ",gglobaldoflist);
+-	if(gglobaldoflist) for(i=0;i<nrows;i++)printf("%i ",gglobaldoflist[i]); printf("\n");
++	_printString_("   gglobaldoflist (" << gglobaldoflist << "): ");
++	if(gglobaldoflist) for(i=0;i<nrows;i++) _printString_(" " << gglobaldoflist[i]); _printLine_("");
+ 
+-	printf("   row_fsize: %i\n",row_fsize);
+-	printf("   row_flocaldoflist (%p): ",row_flocaldoflist);
+-	if(row_flocaldoflist) for(i=0;i<row_fsize;i++)printf("%i ",row_flocaldoflist[i]); printf("\n");
+-	printf("   row_fglobaldoflist (%p): ",row_fglobaldoflist);
+-	if(row_fglobaldoflist)for(i=0;i<row_fsize;i++)printf("%i ",row_fglobaldoflist[i]); printf("\n");
++	_printLine_("   row_fsize: " << row_fsize);
++	_printString_("   row_flocaldoflist  (" << row_flocaldoflist << "): ");
++	if(row_flocaldoflist) for(i=0;i<row_fsize;i++) _printString_(" " << row_flocaldoflist[i]); _printLine_(" ");
++	_printString_("   row_fglobaldoflist  (" << row_fglobaldoflist << "): ");
++	if(row_fglobaldoflist) for(i=0;i<row_fsize;i++) _printString_(" " << row_fglobaldoflist[i]); _printLine_(" ");
+ 
+-	printf("   row_ssize: %i\n",row_ssize);
+-	printf("   row_slocaldoflist (%p): ",row_slocaldoflist);
+-	if(row_slocaldoflist)for(i=0;i<row_ssize;i++)printf("%i ",row_slocaldoflist[i]); printf("\n");
+-	printf("   row_sglobaldoflist (%p): ",row_sglobaldoflist);
+-	if(row_sglobaldoflist)for(i=0;i<row_ssize;i++)printf("%i ",row_sglobaldoflist[i]); printf("\n");
++	_printLine_("   row_ssize: " << row_ssize);
++	_printString_("   row_slocaldoflist  (" << row_slocaldoflist << "): ");
++	if(row_slocaldoflist) for(i=0;i<row_ssize;i++) _printString_(" " << row_slocaldoflist[i]); _printLine_(" ");
++	_printString_("   row_sglobaldoflist  (" << row_sglobaldoflist << "): ");
++	if(row_sglobaldoflist) for(i=0;i<row_ssize;i++) _printString_(" " << row_sglobaldoflist[i]); _printLine_(" ");
+ 
+ 	if(!dofsymmetrical){
+-		printf("   col_fsize: %i\n",col_fsize);
+-		printf("   col_flocaldoflist (%p): ",col_flocaldoflist);
+-		if(col_flocaldoflist)for(i=0;i<col_fsize;i++)printf("%i ",col_flocaldoflist[i]); printf("\n");
+-		printf("   col_fglobaldoflist (%p): ",col_fglobaldoflist);
+-		if(col_fglobaldoflist)for(i=0;i<col_fsize;i++)printf("%i ",col_fglobaldoflist[i]); printf("\n");
++		_printLine_("   col_fsize: " << col_fsize);
++		_printString_("   col_flocaldoflist  (" << col_flocaldoflist << "): ");
++		if(col_flocaldoflist) for(i=0;i<col_fsize;i++) _printString_(" " << col_flocaldoflist[i]); _printLine_(" ");
++		_printString_("   col_fglobaldoflist  (" << col_fglobaldoflist << "): ");
++		if(col_fglobaldoflist) for(i=0;i<col_fsize;i++) _printString_(" " << col_fglobaldoflist[i]); _printLine_(" ");
+ 
+-		printf("   col_ssize: %i\n",col_ssize);
+-		printf("   col_slocaldoflist (%p): ",col_slocaldoflist);
+-		if(col_slocaldoflist)for(i=0;i<col_ssize;i++)printf("%i ",col_slocaldoflist[i]); printf("\n");
+-		printf("   col_sglobaldoflist (%p): ",col_sglobaldoflist);
+-		if(col_sglobaldoflist)for(i=0;i<col_ssize;i++)printf("%i ",col_sglobaldoflist[i]); printf("\n");
++		_printLine_("   col_ssize: " << col_ssize);
++		_printString_("   col_slocaldoflist  (" << col_slocaldoflist << "): ");
++		if(col_slocaldoflist) for(i=0;i<col_ssize;i++) _printString_(" " << col_slocaldoflist[i]); _printLine_(" ");
++		_printString_("   col_sglobaldoflist  (" << col_sglobaldoflist << "): ");
++		if(col_sglobaldoflist) for(i=0;i<col_ssize;i++) _printString_(" " << col_sglobaldoflist[i]); _printLine_(" ");
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12507)
+@@ -221,11 +221,6 @@
+ 	int i,j;
+ 	_printLine_("Element Vector echo:");
+ 	_printLine_("   nrows: " << nrows);
+-
+-	_printLine_("   test:");
+-	for(i=0;i<nrows;i++) _printString_(" " << i);
+-	_printLine_("HERE");
+-
+ 	_printLine_("   values:");
+ 	for(i=0;i<nrows;i++){
+ 		_printLine_(setw(4) << right << i << ": " << setw(10) << values[i]);
+@@ -236,10 +231,12 @@
+ 	_printLine_(" ");
+ 
+ 	_printLine_("   fsize: " << fsize);
+-	printf("   flocaldoflist (%p): ",flocaldoflist);
+-	if(flocaldoflist) for(i=0;i<fsize;i++)printf("%i ",flocaldoflist[i]); printf("\n");
+-	printf("   fglobaldoflist (%p): ",fglobaldoflist);
+-	if(fglobaldoflist)for(i=0;i<fsize;i++)printf("%i ",fglobaldoflist[i]); printf("\n");
++	_printString_("   flocaldoflist  (" << flocaldoflist << "): ");
++	if(flocaldoflist) for(i=0;i<fsize;i++) _printString_(" " << flocaldoflist[i] );
++	_printLine_(" ");
++	_printString_("   fglobaldoflist (" << fglobaldoflist << "): ");
++	if(fglobaldoflist) for(i=0;i<fsize;i++) _printString_(" " << fglobaldoflist[i] );
++	_printLine_(" ");
+ }
+ /*}}}*/
+ /*FUNCTION ElementVector::Init{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12507)
+@@ -76,13 +76,12 @@
+ 	printf("   time: %g\n",this->time);
+ 	printf("   matrix size: %i-%i\n",this->M,this->N);
+ 	for (i=0;i<this->M;i++){  
+-		printf("   [ ");
++		_printString_("   [ ");
+ 		for (j=0;j<this->N;j++){
+-			printf(" %12.6g ",this->values[i*this->N+j]);
++			_printString_( " " << setw(11) << setprecision (5) << this->values[i*this->N+j]);
+ 		}  
+-		printf(" ]\n");
++		_printLine_(" ]");
+ 	}  
+-	printf("\n");
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12507)
+@@ -2404,14 +2404,14 @@
+ 		printf("   nbq = %i\n",nbq);
+ 		printf("   index:\n");
+ 		for (i=0;i<nbt;i++){
+-			printf("   %4i: [%4i %4i %4i]\n",i+1,
+-						((BamgVertex *)triangles[i](0))?GetId(triangles[i][0])+1:0,
+-						((BamgVertex *)triangles[i](1))?GetId(triangles[i][1])+1:0,
+-						((BamgVertex *)triangles[i](2))?GetId(triangles[i][2])+1:0);
++			_printLine_("   " << setw(4) << i+1 << ": [" 
++						<< setw(4) << (((BamgVertex *)triangles[i](0))?GetId(triangles[i][0])+1:0) << " " 
++						<< setw(4) << (((BamgVertex *)triangles[i](0))?GetId(triangles[i][1])+1:0) << " " 
++						<< setw(4) << (((BamgVertex *)triangles[i](0))?GetId(triangles[i][2])+1:0) << "]");
+ 		}
+ 		printf("   coordinates:\n");
+ 		for (i=0;i<nbv;i++){
+-			printf("   %4i: [%g %g]\n",i+1,vertices[i].r.x,vertices[i].r.y);
++			_printLine_("   " << setw(4) << i+1 << ": [" << vertices[i].r.x << " " << vertices[i].r.y << "]");
+ 		}
+ 
+ 	}
+@@ -4066,11 +4066,11 @@
+ 	printf("      length of edge in   | %% of edge  | Nb of edges \n"); 
+ 	printf("      --------------------+-------------+-------------\n"); 
+ 	for   (i=0;i<=kmax;i++){ 
+-		if (i==0) printf("      %10i",0);
+-		else      printf("      %10g",exp(lmin+i/delta));
++		if (i==0) _printString_( "      " << setw(10) << 0.);
++		else      _printString_( "      " << setw(10) << exp(lmin+i/delta));
+ 		if (i==kmax) printf("          +inf   ");
+-		else printf("      %10g",exp(lmin+(i+1)/delta));
+-		printf("|  %10g |\n",((long)  ((10000.0 * histo[i])/ nbedges))/100.0);
++		else      _printString_( "      " << setw(10) << exp(lmin+(i+1)/delta));
++		_printLine_("|  " << setw(10) << (long((10000. * histo[i])/ nbedges)/100.) << " |");
+ 		printf("  %i\n",histo[i]);
+ 	}
+ 	printf("      --------------------+-------------+-------------\n"); 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 12506)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 12507)
+@@ -65,8 +65,7 @@
+ 	if (!(  (nlhs==6) || (nrhs==5))){
+ 		mexPrintf("   %s format error.\n", __FUNCT__);
+ 		TriMeshProcessRiftsUsage();
+-		printf("   ");
+-		mexErrMsgTxt(" ");
++		_error_("bad usage");
+ 	}
+ 
+ 	/*Fetch index_in: */
+@@ -81,8 +80,7 @@
+ 		}
+ 	}
+ 	else{
+-		printf("%s%s\n",__FUNCT__," error message: first argument should be the element list!");
+-		mexErrMsgTxt(" ");
++		_error_("first argument should be the element list");
+ 	}
+ 
+ 	/*Fetch x_in: */
+@@ -95,8 +93,7 @@
+ 		}
+ 	}
+ 	else{
+-		printf("%s%s\n",__FUNCT__," error message: second argument should be the x corrdinate list!");
+-		mexErrMsgTxt(" ");
++		_error_("second argument should be the x corrdinate list");
+ 	}
+ 
+ 	/*Fetch y_in: */
+@@ -108,8 +105,7 @@
+ 		}
+ 	}
+ 	else{
+-		printf("%s%s\n",__FUNCT__," error message: third argument should be the y corrdinate list!");
+-		mexErrMsgTxt(" ");
++		_error_("third argument should be the y corrdinate list");
+ 	}	
+ 
+ 	/*Fetch segments_in: */
+@@ -124,8 +120,7 @@
+ 		}
+ 	}
+ 	else{
+-		printf("%s%s\n",__FUNCT__," error message: fourth argument should be the segments list!");
+-		mexErrMsgTxt(" ");
++		_error_("fourth argument should be the segments list");
+ 	}
+ 
+ 	/*Fetch segment markers: */
+@@ -137,32 +132,9 @@
+ 		}
+ 	}
+ 	else{
+-		printf("%s%s\n",__FUNCT__," error message: fourth argument should be the segmentmarkers list!");
+-		mexErrMsgTxt(" ");
++		_error_("fourth argument should be the segmentmarkers list");
+ 	}
+ 
+-	/*
+-	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);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12507-12508.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12507-12508.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12507-12508.diff	(revision 12679)
@@ -0,0 +1,71 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12507)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12508)
+@@ -75,17 +75,17 @@
+ 
+ 	int i;
+ 	if (num){
+-		printf("   Hook: \n");
+-		printf("      num=%i\n",this->num);
+-		printf("      ids: ");
+-		for (i=0;i<this->num;i++) printf("%i ",this->ids[i]);
+-		printf("\n");
+-		printf("      offsets: ");
+-		for (i=0;i<this->num;i++) printf("%i ",this->offsets[i]);
+-		printf("\n");
++		_printLine_("   Hook: ");
++		_printLine_("      num=" << this->num);
++		_printString_("      ids: ");
++		for (i=0;i<this->num;i++) _printString_("" << this->ids[i] << " ");
++		_printLine_("");
++		_printString_("      offsets: ");
++		for (i=0;i<this->num;i++) _printString_("" << this->offsets[i] << " ");
++		_printLine_("");
+ 	}
+ 	else{
+-		printf("   Hook: num=0 \n");
++		_printLine_("   Hook: num=0 ");
+ 	}
+ }
+ /*}}}*/
+@@ -94,26 +94,26 @@
+ 
+ 	int i;
+ 	if (num){
+-		printf("   Hook: \n");
+-		printf("      num=%i\n",this->num);
+-		printf("      ids: ");
+-		for (i=0;i<this->num;i++) printf("%i ",this->ids[i]);
+-		printf("\n");
+-		printf("      offsets: ");
+-		for (i=0;i<this->num;i++) printf("%i ",this->offsets[i]);
+-		printf("\n");
+-		if (!objects) printf("      warning: object not hooked yet\n");
++		_printLine_("   Hook: ");
++		_printLine_("      num=" << this->num);
++		_printString_("      ids: ");
++		for (i=0;i<this->num;i++) _printString_("" << this->ids[i] << " ");
++		_printLine_("");
++		_printString_("      offsets: ");
++		for (i=0;i<this->num;i++) _printString_("" << this->offsets[i] << " ");
++		_printLine_("");
++		if (!objects) _printLine_("      warning: object not hooked yet");
+ 		else{
+-			printf("      objects:\n   ");
++			_printString_("      objects:\n   ");
+ 			for (i=0;i<this->num;i++){
+-				printf("         object %i\n",i);
++				_printLine_("         object " << i);
+ 				if(objects[i]) objects[i]->DeepEcho();
+-				else           printf("            no object hooked yet (not configured)\n");
++				else           _printLine_("            no object hooked yet (not configured)");
+ 			}
+ 		}
+ 	}
+ 	else{
+-		printf("   Hook: num=0 \n");
++		_printLine_("   Hook: num=0 ");
+ 	}
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12508-12509.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12508-12509.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12508-12509.diff	(revision 12679)
@@ -0,0 +1,1403 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp	(revision 12508)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp	(revision 12509)
+@@ -166,7 +166,7 @@
+ 			//C.Echo();
+ 			//x.Echo();
+ 			//y.Echo();
+-			//printf("cx = %g, cy=%g\n",cx,cy);
++			//_printLine_("cx = " << cx << ", cy=" << cy);
+ 
+ 			si += sint;
+ 			if ( nbv<maxnbv) {
+@@ -185,7 +185,7 @@
+ 			int mneo= MaxNbSeg;
+ 			MaxNbSeg *= 2;
+ 			if (verbosity>3){
+-				printf("   reshape lSegsI from %i to %i\n",mneo,MaxNbSeg);
++				_printLine_("   reshape lSegsI from " << mneo << " to " << MaxNbSeg);
+ 			}
+ 			_assert_(lSegsI && NbSeg<MaxNbSeg);
+ 			SegInterpolation * lEn =  new SegInterpolation[MaxNbSeg];
+@@ -210,7 +210,7 @@
+ 		// recopy
+ 		for (int i=0;i<MaxSize;i++) nw[i] = lIntTria[i];       
+ 		long int verbosity=0;
+-		if(verbosity>3) printf("   ListofIntersectionTriangles  ReShape Maxsize %i -> %i\n",MaxSize,MaxNbSeg);
++		if(verbosity>3) _printLine_("   ListofIntersectionTriangles  ReShape Maxsize " << MaxSize << " -> " << MaxNbSeg);
+ 		MaxSize = newsize; 
+ 		delete [] lIntTria;// remove old
+ 		lIntTria = nw; // copy pointer
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Triangle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Triangle.cpp	(revision 12508)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Triangle.cpp	(revision 12509)
+@@ -106,26 +106,26 @@
+ 
+ 		int i;
+ 
+-		printf("Triangle:\n");
+-		printf("   vertices pointer towards three vertices\n");
+-		printf("      vertices[0] vertices[1] vertices[2] = %p %p %p\n",vertices[0],vertices[1],vertices[2]);
+-		printf("   adj pointer towards three adjacent triangles\n");
+-		printf("      adj[0] adj[1] adj[2] = %p %p %p\n",adj[0],adj[1],adj[2]);
+-		printf("   det (integer triangle determinant) = %i\n",det);
++		_printLine_("Triangle:");
++		_printLine_("   vertices pointer towards three vertices");
++		_printLine_("      vertices[0] vertices[1] vertices[2] = " << vertices[0] << " " << vertices[1] << " " << vertices[2]);
++		_printLine_("   adj pointer towards three adjacent triangles");
++		_printLine_("      adj[0] adj[1] adj[2] = " << adj[0] << " " << adj[1] << " " << adj[2]);
++		_printLine_("   det (integer triangle determinant) = " << det);
+ 		if (link){
+-			printf("   link (pointer toward duplicate triangle)= %p\n",link);
++			_printLine_("   link (pointer toward duplicate triangle)= " << link);
+ 		}
+ 		else{
+-			printf("   color = %i\n",color);
++			_printLine_("   color = " << color);
+ 		}
+ 
+-		printf("\nThree vertices:\n");
++		_printLine_("\nThree vertices:");
+ 		for(i=0;i<3;i++){
+ 			if (vertices[i]){
+ 				vertices[i]->Echo();
+ 			}
+ 			else{
+-				printf("   vertex %i does not exist\n",i+1);
++				_printLine_("   vertex " << i+1 << " does not exist");
+ 			}
+ 		}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Metric.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Metric.cpp	(revision 12508)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Metric.cpp	(revision 12509)
+@@ -71,8 +71,8 @@
+ 	/*FUNCTION Metric::Echo {{{*/
+ 	void Metric::Echo(void){
+ 
+-		printf("Metric:\n");
+-		printf("   [a11 a21 a22]: [%g %g %g]\n",a11,a21,a22);
++		_printLine_("Metric:");
++		_printLine_("   [a11 a21 a22]: [" << a11 << " " << a21 << " " << a22 << "]");
+ 
+ 		return;
+ 	}
+@@ -200,7 +200,7 @@
+ 		}
+ 		LastMetricInterpole.lab=l;
+ 		LastMetricInterpole.opt=i;
+-		if (i>200 && kkk++<10) printf("WARNING: LengthInterpole: ( i=%i l=%i sss=%g ) %g\n",i,l,sss,sstop); 
++		if (i>200 && kkk++<10) _printLine_("WARNING: LengthInterpole: ( i=" << i << " l=" << l << " sss=" << sss << " ) " << sstop); 
+ 		return l;
+ 	}
+ 	/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp	(revision 12508)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp	(revision 12509)
+@@ -47,7 +47,7 @@
+ 	/*FUNCTION Geometry::~Geometry(){{{*/
+ 	Geometry::~Geometry() {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, MeshGeom.cpp/~Geometry)*/
+-		if(NbRef>0){   printf("Trying to delete geometry and NbRef>0, probably due to an error"); return;}
++		if(NbRef>0){   _printString_("Trying to delete geometry and NbRef>0, probably due to an error"); return;}
+ 		if(vertices)   delete [] vertices;  vertices=0;
+ 		if(edges)      delete [] edges;     edges=0;
+ 		if(quadtree)   delete    quadtree;  quadtree=0;
+@@ -80,7 +80,7 @@
+ 
+ 		//Vertices
+ 		if (bamggeom->Vertices){
+-			if(verbose>5) printf("      processing Vertices\n");
++			if(verbose>5) _printLine_("      processing Vertices");
+ 			if (bamggeom->VerticesSize[1]!=3) _error2_("Vertices should have 3 columns");
+ 			vertices = new GeomVertex[nbv];
+ 			for (i=0;i<nbv;i++) {
+@@ -125,7 +125,7 @@
+ 			R2      zerovector(0,0);
+ 			double* verticeslength=NULL;
+ 
+-			if(verbose>5) printf("      processing Edges\n");
++			if(verbose>5) _printLine_("      processing Edges");
+ 			if (bamggeom->EdgesSize[1]!=3) _error2_("Edges should have 3 columns");
+ 			edges = new GeomEdge[nbe];
+ 
+@@ -180,7 +180,7 @@
+ 
+ 		//hVertices
+ 		if(bamgopts->hVertices && bamgopts->hVerticesSize[0]==nbv){
+-			if(verbose>5) printf("      processing hVertices\n");
++			if(verbose>5) _printLine_("      processing hVertices");
+ 			for (i=0;i< nbv;i++){
+ 				if (!isnan(bamgopts->hVertices[i])){
+ 					vertices[i].m=Metric((double)bamgopts->hVertices[i]);
+@@ -190,7 +190,7 @@
+ 
+ 		//MetricVertices
+ 		if(bamgopts->metric && bamgopts->metric[0]==nbv){
+-			if(verbose>5) printf("      processing MetricVertices\n");
++			if(verbose>5) _printLine_("      processing MetricVertices");
+ 			for (i=0;i< nbv;i++) {
+ 				vertices[i].m = Metric((double)bamgopts->metric[i*3+0],(double)bamgopts->metric[i*3+1],(double)bamgopts->metric[i*3+2]);
+ 			}
+@@ -198,13 +198,13 @@
+ 
+ 		//MaxCornerAngle
+ 		if (bamgopts->MaxCornerAngle){
+-			if(verbose>5) printf("      processing MaxCornerAngle\n");
++			if(verbose>5) _printLine_("      processing MaxCornerAngle");
+ 			MaxCornerAngle=bamgopts->MaxCornerAngle*Pi/180;
+ 		}
+ 
+ 		//TangentAtEdges
+ 		if (bamggeom->TangentAtEdges){
+-			if(verbose>5) printf("      processing TangentAtEdges");
++			if(verbose>5) _printString_("      processing TangentAtEdges");
+ 			if (bamggeom->TangentAtEdgesSize[1]!=4) _error2_("TangentAtEdges should have 4 columns");
+ 			int n,i,j,k;
+ 			R2 tg;
+@@ -223,7 +223,7 @@
+ 
+ 		//Corners
+ 		if(bamggeom->Corners){
+-			if(verbose>5) printf("      processing Corners");
++			if(verbose>5) _printString_("      processing Corners");
+ 			if (bamggeom->CornersSize[1]!=1) _error2_("Corners should have 1 column");
+ 			n=bamggeom->CornersSize[0];
+ 			for (i=0;i<n;i++) {     
+@@ -237,7 +237,7 @@
+ 
+ 		//RequiredVertices
+ 		if(bamggeom->RequiredVertices){
+-			if(verbose>5) printf("      processing RequiredVertices\n");
++			if(verbose>5) _printLine_("      processing RequiredVertices");
+ 			if (bamggeom->RequiredVerticesSize[1]!=1) _error2_("RequiredVertices should have 1 column");
+ 			n=bamggeom->RequiredVerticesSize[0];
+ 			for (i=0;i<n;i++) {     
+@@ -249,7 +249,7 @@
+ 
+ 		//RequiredEdges
+ 		if(bamggeom->RequiredEdges){
+-			if(verbose>5) printf("      processing RequiredEdges\n");
++			if(verbose>5) _printLine_("      processing RequiredEdges");
+ 			if (bamggeom->RequiredEdgesSize[1]!=1) _error2_("RequiredEdges should have 1 column");
+ 			n=bamggeom->RequiredEdgesSize[0];
+ 			for (i=0;i<n;i++) {     
+@@ -261,7 +261,7 @@
+ 
+ 		//SubDomain
+ 		if(bamggeom->SubDomains){
+-			if(verbose>5) printf("      processing SubDomains\n");
++			if(verbose>5) _printLine_("      processing SubDomains");
+ 			if (bamggeom->SubDomainsSize[1]!=4) _error2_("SubDomains should have 4 columns");
+ 			nbsubdomains=bamggeom->SubDomainsSize[0];
+ 			subdomains = new GeomSubDomain[nbsubdomains];
+@@ -293,7 +293,7 @@
+ 		verbose=bamgopts->verbose;
+ 
+ 		/*Vertices*/
+-		if(verbose>5) printf("      writing Vertices\n");
++		if(verbose>5) _printLine_("      writing Vertices");
+ 		bamggeom->VerticesSize[0]=nbv;
+ 		bamggeom->VerticesSize[1]=3;
+ 		if (nbv){
+@@ -309,7 +309,7 @@
+ 		}
+ 
+ 		/*Edges*/
+-		if(verbose>5) printf("      writing Edges\n");
++		if(verbose>5) _printLine_("      writing Edges");
+ 		bamggeom->EdgesSize[0]=nbe;
+ 		bamggeom->EdgesSize[1]=3;
+ 		if (nbe){
+@@ -327,7 +327,7 @@
+ 		}
+ 
+ 		/*RequiredEdges*/
+-		if(verbose>5) printf("      writing %i RequiredEdges\n",nbreq);
++		if(verbose>5) _printLine_("      writing " << nbreq << " RequiredEdges");
+ 		bamggeom->RequiredEdgesSize[0]=nbreq;
+ 		bamggeom->RequiredEdgesSize[1]=1;
+ 		if (nbreq){
+@@ -344,7 +344,7 @@
+ 		//No corners
+ 
+ 		/*RequiredVertices*/
+-		if(verbose>5) printf("      writing %i RequiredVertices\n",nbreqv);
++		if(verbose>5) _printLine_("      writing " << nbreqv << " RequiredVertices");
+ 		bamggeom->RequiredVerticesSize[0]=nbreqv;
+ 		bamggeom->RequiredVerticesSize[1]=1;
+ 		if (nbreqv){
+@@ -359,7 +359,7 @@
+ 		}
+ 
+ 		/*SubDomains*/
+-		if(verbose>5) printf("      writing SubDomains\n");
++		if(verbose>5) _printLine_("      writing SubDomains");
+ 		bamggeom->SubDomainsSize[0]=nbsubdomains;
+ 		bamggeom->SubDomainsSize[1]=4;
+ 		if (nbsubdomains){
+@@ -373,7 +373,7 @@
+ 		}
+ 
+ 		/*TangentAtEdges*/
+-		if(verbose>5) printf("      writing TangentAtEdges\n");
++		if(verbose>5) _printLine_("      writing TangentAtEdges");
+ 		bamggeom->TangentAtEdgesSize[0]=nbtan;
+ 		bamggeom->TangentAtEdgesSize[1]=4;
+ 		if (nbtan){
+@@ -402,20 +402,20 @@
+ 	/*FUNCTION Geometry::Echo {{{*/
+ 	void Geometry::Echo(void){
+ 
+-		printf("Geometry:\n");
+-		printf("   nbv  (number of vertices) : %i\n",nbv);
+-		printf("   nbe  (number of edges)    : %i\n",nbe);
+-		printf("   nbsubdomains: %i\n",nbsubdomains);
+-		printf("   nbcurves: %i\n",nbcurves);
+-		printf("   vertices: %p\n",vertices);
+-		printf("   edges: %p\n",edges);
+-		printf("   quadtree: %p\n",quadtree);
+-		printf("   subdomains: %p\n",subdomains);
+-		printf("   curves: %p\n",curves);
+-		printf("   pmin (x,y): (%g %g)\n",pmin.x,pmin.y);
+-		printf("   pmax (x,y): (%g %g)\n",pmax.x,pmax.y);
+-		printf("   coefIcoor: %g\n",coefIcoor);
+-		printf("   MaxCornerAngle: %g\n",MaxCornerAngle);
++		_printLine_("Geometry:");
++		_printLine_("   nbv  (number of vertices) : " << nbv);
++		_printLine_("   nbe  (number of edges)    : " << nbe);
++		_printLine_("   nbsubdomains: " << nbsubdomains);
++		_printLine_("   nbcurves: " << nbcurves);
++		_printLine_("   vertices: " << vertices);
++		_printLine_("   edges: " << edges);
++		_printLine_("   quadtree: " << quadtree);
++		_printLine_("   subdomains: " << subdomains);
++		_printLine_("   curves: " << curves);
++		_printLine_("   pmin (x,y): (" << pmin.x << " " << pmin.y << ")");
++		_printLine_("   pmax (x,y): (" << pmax.x << " " << pmax.y << ")");
++		_printLine_("   coefIcoor: " << coefIcoor);
++		_printLine_("   MaxCornerAngle: " << MaxCornerAngle);
+ 
+ 		return;
+ 	}
+@@ -526,8 +526,8 @@
+ 
+ 			/*if there is a vertex found that is to close to vertices[i] -> error*/
+ 			if( v && Norme1(v->r - vertices[i].r) < eps ){
+-				printf("reference numbers: %i %i\n",v->ReferenceNumber,vertices[i].ReferenceNumber);
+-				printf("Id: %i\n",i+1);
++				_printLine_("reference numbers: " << v->ReferenceNumber << " " << vertices[i].ReferenceNumber);
++				_printLine_("Id: " << i+1);
+ 				delete [] next_p;
+ 				delete [] head_v;
+ 				delete [] eangle;
+@@ -869,11 +869,11 @@
+ 		while (eg0!=(GeomEdge*)vg0 && (*eg0)(direction0)!=(GeomVertex*)vg0){ 
+ 			if (bge<=0) {
+ 				if(NbTry) {
+-					printf("Fatal Error: on the class Mesh before call Geometry::ProjectOnCurve\n");
+-					printf("That bug might come from:\n");
+-					printf(" 1)  a mesh edge  containing more than %i geometrical edges\n",mxe/2);
+-					printf(" 2)  code bug : be sure that we call   Mesh::SetVertexFieldOn() before\n");
+-					printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n");
++					_printLine_("Fatal Error: on the class Mesh before call Geometry::ProjectOnCurve");
++					_printLine_("That bug might come from:");
++					_printLine_(" 1)  a mesh edge  containing more than " << mxe/2 << " geometrical edges");
++					_printLine_(" 2)  code bug : be sure that we call   Mesh::SetVertexFieldOn() before");
++					_printLine_("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)");
+ 					_error2_("see above");
+ 				}
+ 				NbTry++;
+@@ -886,14 +886,14 @@
+ 		}
+ 		while (eg1 != (GeomEdge*) vg1  &&  (*eg1)(direction1) != (GeomVertex*) vg1) { 
+ 			if(tge>=mxe ) { 
+-				printf("WARNING: on the class Mesh before call Geometry::ProjectOnCurve is having issues (isn't it Eric?)\n");
++				_printLine_("WARNING: on the class Mesh before call Geometry::ProjectOnCurve is having issues (isn't it Eric?)");
+ 				NbTry++;
+ 				if (NbTry<2) goto retry;
+-				printf("Fatal Error: on the class Mesh before call Geometry::ProjectOnCurve\n");
+-				printf("That bug might come from:\n");
+-				printf(" 1)  a mesh edge  contening more than %i geometrical edges\n",mxe/2);
+-				printf(" 2)  code bug : be sure that we call   Mesh::SetVertexFieldOn() before\n");
+-				printf("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)\n");
++				_printLine_("Fatal Error: on the class Mesh before call Geometry::ProjectOnCurve");
++				_printLine_("That bug might come from:");
++				_printLine_(" 1)  a mesh edge  contening more than " << mxe/2 << " geometrical edges");
++				_printLine_(" 2)  code bug : be sure that we call   Mesh::SetVertexFieldOn() before");
++				_printLine_("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)");
+ 				_error2_("see above");
+ 			}
+ 			GeomEdge* tmpge = eg1;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp	(revision 12508)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp	(revision 12509)
+@@ -12,10 +12,10 @@
+ 
+ 	void BamgVertex::Echo(void){
+ 
+-		printf("Vertex:\n");
+-		printf("  integer   coordinates i.x: %i, i.y: %i\n",i.x,i.y);
+-		printf("  Euclidean coordinates r.x: %g, r.y: %g\n",r.x,r.y);
+-		printf("  ReferenceNumber = %i\n",ReferenceNumber);
++		_printLine_("Vertex:");
++		_printLine_("  integer   coordinates i.x: " << i.x << ", i.y: " << i.y);
++		_printLine_("  Euclidean coordinates r.x: " << r.x << ", r.y: " << r.y);
++		_printLine_("  ReferenceNumber = " << ReferenceNumber);
+ 		m.Echo();
+ 
+ 		return;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Edge.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Edge.cpp	(revision 12508)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Edge.cpp	(revision 12509)
+@@ -25,11 +25,11 @@
+ 	/*}}}*/
+ 	/*FUNCTION Edge::Echo {{{*/
+ 	void Edge::Echo(void){ 
+-		printf("Edge:\n");
+-		printf("   pointers towards two vertices: %p %p\n",v[0],v[1]);
+-		printf("   ReferenceNumber = %i\n",ReferenceNumber);
+-		printf("   GeomEdgeHook = %p\n",GeomEdgeHook);
+-		printf("   two adjacent edges on the same curve: %p %p\n",adj[0],adj[1]);
++		_printLine_("Edge:");
++		_printLine_("   pointers towards two vertices: " << v[0] << " " << v[1]);
++		_printLine_("   ReferenceNumber = " << ReferenceNumber);
++		_printLine_("   GeomEdgeHook = " << GeomEdgeHook);
++		_printLine_("   two adjacent edges on the same curve: " << adj[0] << " " << adj[1]);
+ 	}
+ 	/*}}}*/
+ 	/*FUNCTION Edge::Renumbering{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/EigenMetric.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/EigenMetric.cpp	(revision 12508)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/EigenMetric.cpp	(revision 12509)
+@@ -113,11 +113,11 @@
+ 	/*FUNCTION EigenMetric::Echo {{{*/
+ 	void EigenMetric::Echo(void){
+ 
+-		printf("EigenMetric:\n");
+-		printf("   lambda1: %g\n",lambda1);
+-		printf("   lambda2: %g\n",lambda2);
+-		printf("   v.x: %g\n",v.x);
+-		printf("   v.y: %g\n",v.y);
++		_printLine_("EigenMetric:");
++		_printLine_("   lambda1: " << lambda1);
++		_printLine_("   lambda2: " << lambda2);
++		_printLine_("   v.x: " << v.x);
++		_printLine_("   v.y: " << v.y);
+ 
+ 		return;
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12508)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12509)
+@@ -28,7 +28,7 @@
+ 		/*Build Geometry if not provided*/
+ 		if(bamggeom->Edges==NULL) {
+ 			/*Recreate geometry if needed*/
+-			printf("WARNING: mesh present but no geometry found. Reconstructing...\n");
++			_printLine_("WARNING: mesh present but no geometry found. Reconstructing...");
+ 			BuildGeometryFromMesh(bamgopts);
+ 			Gh.PostRead();
+ 		}
+@@ -100,9 +100,9 @@
+ 		  for (i=0;i<Tho.nbv;i++){
+ 			  if (kk[i]>=0) kk[i]=k++;
+ 			}
+-		  printf("   number of vertices %i, remove = %i\n",k,Tho.nbv - k);
+-		  printf("   number of triangles %i, remove = %i\n",kt,nbInT-kt);
+-		  printf("   number of New boundary edge %i\n",nbNewBedge);
++		  _printLine_("   number of vertices " << k << ", remove = " << Tho.nbv - k);
++		  _printLine_("   number of triangles " << kt << ", remove = " << nbInT-kt);
++		  _printLine_("   number of New boundary edge " << nbNewBedge);
+ 		  long imaxnbv =k;
+ 		  Init(imaxnbv);
+ 		  for (i=0;i<Tho.nbv;i++)
+@@ -279,7 +279,7 @@
+ 		nbt=nels;
+ 
+ 		//Vertices
+-		if (verbose) printf("Reading vertices (%i)\n",nbv);
++		if (verbose) _printLine_("Reading vertices (" << nbv << ")");
+ 		vertices=xNew<BamgVertex>(nbv);
+ 		orderedvertices=xNew<BamgVertex*>(nbv);
+ 		for (i=0;i<nbv;i++){
+@@ -293,7 +293,7 @@
+ 		maxnbt=2*maxnbv-2; // for filling The Holes and quadrilaterals 
+ 
+ 		//Triangles
+-		if (verbose) printf("Reading triangles (%i)\n",nbt);
++		if (verbose) _printLine_("Reading triangles (" << nbt << ")");
+ 		triangles =new Triangle[maxnbt]; //we cannot allocate only nbt triangles since 
+ 		nodeflags=xNew<bool>(nbv);
+ 		for(i=0;i<nbv;i++) nodeflags[i]=false;
+@@ -309,16 +309,16 @@
+ 		}
+ 
+ 		/*Recreate geometry: */
+-		if (verbose) printf("Building Geometry\n");
++		if (verbose) _printLine_("Building Geometry");
+ 		BuildGeometryFromMesh();
+-		if (verbose) printf("Completing geometry\n");
++		if (verbose) _printLine_("Completing geometry");
+ 		Gh.PostRead();
+ 
+ 		/*Check that there is no orphan*/
+ 		bool isorphan=false;
+ 		for(i=0;i<nbv;i++){
+ 			if(!nodeflags[i]){
+-				printf("Vertex %i does not belong to any element\n",i+1);
++				_printLine_("Vertex " << i+1 << " does not belong to any element");
+ 				isorphan=true;
+ 			}
+ 		}
+@@ -345,7 +345,7 @@
+ 
+ 		//Vertices
+ 		if(bamgmesh->Vertices){
+-			if(verbose>5) printf("      processing Vertices\n");
++			if(verbose>5) _printLine_("      processing Vertices");
+ 
+ 			vertices=xNew<BamgVertex>(nbv);
+ 			orderedvertices=xNew<BamgVertex*>(nbv);
+@@ -366,7 +366,7 @@
+ 
+ 		//Triangles
+ 		if(bamgmesh->Triangles){
+-			if(verbose>5) printf("      processing Triangles\n");
++			if(verbose>5) _printLine_("      processing Triangles");
+ 			triangles =new Triangle[maxnbt]; //we cannot allocate only nbt triangles since 
+ 			//other triangles will be added for each edge
+ 			for (i=0;i<nbt;i++){
+@@ -384,7 +384,7 @@
+ 
+ 		//Quadrilaterals
+ 		if(bamgmesh->Quadrilaterals){
+-			if(verbose>5) printf("      processing Quadrilaterals\n");
++			if(verbose>5) _printLine_("      processing Quadrilaterals");
+ 			long i1,i2,i3,i4,iref;
+ 			triangles =new Triangle[nbt];
+ 			for (i=0;i<bamgmesh->QuadrilateralsSize[0];i++){
+@@ -406,7 +406,7 @@
+ 
+ 		//VerticesOnGeomEdge
+ 		if(bamgmesh->VerticesOnGeomEdge){
+-			if(verbose>5) printf("      processing VerticesOnGeomEdge\n");
++			if(verbose>5) _printLine_("      processing VerticesOnGeomEdge");
+ 			NbVerticesOnGeomEdge=bamgmesh->VerticesOnGeomEdgeSize[0];
+ 			VerticesOnGeomEdge= new  VertexOnGeom[NbVerticesOnGeomEdge] ;
+ 			for (i=0;i<NbVerticesOnGeomEdge;i++){
+@@ -421,7 +421,7 @@
+ 
+ 		//VerticesOnGeomVertex
+ 		if(bamgmesh->VerticesOnGeomVertexSize[0]){
+-			if(verbose>5) printf("      processing VerticesOnGeomVertex\n");
++			if(verbose>5) _printLine_("      processing VerticesOnGeomVertex");
+ 			NbVerticesOnGeomVertex=bamgmesh->VerticesOnGeomVertexSize[0];
+ 			VerticesOnGeomVertex  = new  VertexOnGeom[NbVerticesOnGeomVertex] ;
+ 			for (i=0;i<NbVerticesOnGeomVertex;i++){
+@@ -437,7 +437,7 @@
+ 			int i1,i2;
+ 			double* len=NULL;
+ 
+-			if(verbose>5) printf("      processing Edges\n");
++			if(verbose>5) _printLine_("      processing Edges");
+ 			nbe=bamgmesh->EdgesSize[0];
+ 			edges= new Edge[nbe];
+ 			//initialize length of each edge (used to provided metric)
+@@ -497,7 +497,7 @@
+ 
+ 		//EdgeOnGeomEdge
+ 		if(bamgmesh->EdgesOnGeomEdge){
+-			if(verbose>5) printf("      processing EdgesOnGeomEdge\n");
++			if(verbose>5) _printLine_("      processing EdgesOnGeomEdge");
+ 			int i1,i2,i,j;
+ 			i2=bamgmesh->EdgesOnGeomEdgeSize[0];
+ 			for (i1=0;i1<i2;i1++) {
+@@ -514,7 +514,7 @@
+ 		//SubDomain
+ 		if(bamgmesh->SubDomains){
+ 			long i3,head,direction;
+-			if(verbose>5) printf("      processing SubDomains\n");
++			if(verbose>5) _printLine_("      processing SubDomains");
+ 			nbsubdomains=bamgmesh->SubDomainsSize[0];
+ 			subdomains = new SubDomain [ nbsubdomains ];
+ 			for (i=0;i<nbsubdomains;i++) {
+@@ -583,7 +583,7 @@
+ 		/*OK, now build outputs*/
+ 
+ 		/*Vertices*/
+-		if(verbose>5) printf("      writing Vertices\n");
++		if(verbose>5) _printLine_("      writing Vertices");
+ 		bamgmesh->VerticesSize[0]=nbv;
+ 		bamgmesh->VerticesSize[1]=3;
+ 		if (nbv){
+@@ -596,7 +596,7 @@
+ 		}
+ 
+ 		/*Edges*/
+-		if(verbose>5) printf("      writing Edges\n");
++		if(verbose>5) _printLine_("      writing Edges");
+ 		bamgmesh->EdgesSize[0]=nbe;
+ 		bamgmesh->EdgesSize[1]=3;
+ 		int NumIssmSegments=0;
+@@ -613,7 +613,7 @@
+ 		}
+ 
+ 		/*Element edges*/
+-		if(verbose>5) printf("      writing element edges\n");
++		if(verbose>5) _printLine_("      writing element edges");
+ 		SetOfEdges4* edge4=new SetOfEdges4(nbt*3,nbv);
+ 		double* elemedge=NULL;
+ 		elemedge=xNew<double>(3*nbt);
+@@ -669,7 +669,7 @@
+ 		xDelete<double>(elemedge);
+ 
+ 		/*IssmSegments*/
+-		if(verbose>5) printf("      writing IssmSegments\n");
++		if(verbose>5) _printLine_("      writing IssmSegments");
+ 		bamgmesh->IssmSegmentsSize[0]=NumIssmSegments;
+ 		bamgmesh->IssmSegmentsSize[1]=4;
+ 		bamgmesh->IssmSegments=xNew<double>(4*NumIssmSegments);
+@@ -712,7 +712,7 @@
+ 		}
+ 
+ 		/*Triangles*/
+-		if(verbose>5) printf("      writing Triangles\n");
++		if(verbose>5) _printLine_("      writing Triangles");
+ 		k=nbInT-nbq*2;
+ 		num=0;
+ 		bamgmesh->TrianglesSize[0]=k;
+@@ -733,7 +733,7 @@
+ 		}
+ 
+ 		/*Quadrilaterals*/
+-		if(verbose>5) printf("      writing Quadrilaterals\n");
++		if(verbose>5) _printLine_("      writing Quadrilaterals");
+ 		bamgmesh->QuadrilateralsSize[0]=nbq;
+ 		bamgmesh->QuadrilateralsSize[1]=5;
+ 		if (nbq){
+@@ -754,7 +754,7 @@
+ 		}
+ 
+ 		/*SubDomains*/
+-		if(verbose>5) printf("      writing SubDomains\n");
++		if(verbose>5) _printLine_("      writing SubDomains");
+ 		bamgmesh->SubDomainsSize[0]=nbsubdomains;
+ 		bamgmesh->SubDomainsSize[1]=4;
+ 		if (nbsubdomains){
+@@ -768,7 +768,7 @@
+ 		}
+ 
+ 		/*SubDomainsFromGeom*/
+-		if(verbose>5) printf("      writing SubDomainsFromGeom\n");
++		if(verbose>5) _printLine_("      writing SubDomainsFromGeom");
+ 		bamgmesh->SubDomainsFromGeomSize[0]=Gh.nbsubdomains;
+ 		bamgmesh->SubDomainsFromGeomSize[1]=4;
+ 		if (Gh.nbsubdomains){
+@@ -782,7 +782,7 @@
+ 		}
+ 
+ 		/*VerticesOnGeomVertex*/
+-		if(verbose>5) printf("      writing VerticesOnGeomVertex\n");
++		if(verbose>5) _printLine_("      writing VerticesOnGeomVertex");
+ 		bamgmesh->VerticesOnGeomVertexSize[0]=NbVerticesOnGeomVertex;
+ 		bamgmesh->VerticesOnGeomVertexSize[1]=2;
+ 		if (NbVerticesOnGeomVertex){
+@@ -796,7 +796,7 @@
+ 		}
+ 
+ 		/*VertexOnGeomEdge*/
+-		if(verbose>5) printf("      writing VerticesOnGeomEdge\n");
++		if(verbose>5) _printLine_("      writing VerticesOnGeomEdge");
+ 		bamgmesh->VerticesOnGeomEdgeSize[0]=NbVerticesOnGeomEdge;
+ 		bamgmesh->VerticesOnGeomEdgeSize[1]=3;
+ 		if (NbVerticesOnGeomEdge){
+@@ -813,7 +813,7 @@
+ 		}
+ 
+ 		/*EdgesOnGeomEdge*/
+-		if(verbose>5) printf("      writing EdgesOnGeomEdge\n");
++		if(verbose>5) _printLine_("      writing EdgesOnGeomEdge");
+ 		k=0;
+ 		for (i=0;i<nbe;i++){
+ 			if (edges[i].GeomEdgeHook) k=k+1;
+@@ -833,7 +833,7 @@
+ 		}
+ 
+ 		/*Element Connectivity*/
+-		if(verbose>5) printf("      writing Element connectivity\n");
++		if(verbose>5) _printLine_("      writing Element connectivity");
+ 		bamgmesh->ElementConnectivitySize[0]=nbt-nbtout;
+ 		bamgmesh->ElementConnectivitySize[1]=3;
+ 		bamgmesh->ElementConnectivity=xNew<double>(3*(nbt-nbtout));
+@@ -853,7 +853,7 @@
+ 		}
+ 
+ 		/*ElementNodal Connectivity*/
+-		if(verbose>5) printf("      writing Nodal element connectivity\n");
++		if(verbose>5) _printLine_("      writing Nodal element connectivity");
+ 		bamgmesh->NodalElementConnectivitySize[0]=nbv;
+ 		bamgmesh->NodalElementConnectivitySize[1]=connectivitymax_1;
+ 		bamgmesh->NodalElementConnectivity=xNew<double>(connectivitymax_1*nbv);
+@@ -868,7 +868,7 @@
+ 		}
+ 
+ 		/*Nodal Connectivity*/
+-		if(verbose>5) printf("      writing Nodal connectivity\n");
++		if(verbose>5) _printLine_("      writing Nodal connectivity");
+ 		//chaining algorithm (again...)
+ 		int* head_2=NULL;
+ 		int* next_2=NULL;
+@@ -920,7 +920,7 @@
+ 		}
+ 
+ 		/*Cracked vertices*/
+-		if(verbose>5) printf("      writing Cracked vertices\n");
++		if(verbose>5) _printLine_("      writing Cracked vertices");
+ 		bamgmesh->CrackedVerticesSize[0]=NbCrackedVertices;
+ 		bamgmesh->CrackedVerticesSize[1]=2;
+ 		if (NbCrackedVertices){
+@@ -932,7 +932,7 @@
+ 		}
+ 
+ 		/*Cracked vertices*/
+-		if(verbose>5) printf("      writing Cracked vertices\n");
++		if(verbose>5) _printLine_("      writing Cracked vertices");
+ 		bamgmesh->CrackedEdgesSize[0]=NbCrackedEdges;
+ 		bamgmesh->CrackedEdgesSize[1]=4;
+ 		if (NbCrackedEdges){
+@@ -960,7 +960,7 @@
+ 		/*Intermediary*/
+ 		int  i,j;
+ 
+-		if(bamgopts->verbose>3) printf("      processing metric\n");
++		if(bamgopts->verbose>3) _printLine_("      processing metric");
+ 		double hmin = Max(bamgopts->hmin,MinimalHmin());
+ 		double hmax = Min(bamgopts->hmax,MaximalHmax());
+ 		double coef = bamgopts->coeff;
+@@ -1263,7 +1263,7 @@
+ 		double lminaniso = 1/ (Max(hminaniso*hminaniso,1e-100));
+ 
+ 		//display info
+-		if (verbose > 1)  printf("   BoundAnisotropy by %g\n",anisomax);
++		if (verbose > 1)  _printLine_("   BoundAnisotropy by " << anisomax);
+ 
+ 		double h1=1.e30,h2=1e-30;
+ 		double coef = 1./(anisomax*anisomax);
+@@ -1290,8 +1290,8 @@
+ 
+ 		//display info
+ 		if (verbose>2){
+-			printf("      input:  Hmin = %g, Hmax = %g, factor of anisotropy max  = %g\n",pow(h2,-0.5),pow(h1,-0.5),pow(rx,0.5));
+-			printf("      output: Hmin = %g, Hmax = %g, factor of anisotropy max  = %g\n",pow(hn2,-0.5),pow(hn1,-0.5),pow(rnx,0.5));
++			_printLine_("      input:  Hmin = " << pow(h2,-0.5)  << ", Hmax = " << pow(h1,-0.5) << ", factor of anisotropy max  = " << pow(rx,0.5));
++			_printLine_("      output: Hmin = " << pow(hn2,-0.5) << ", Hmax = " << pow(hn1,-0.5)<< ", factor of anisotropy max  = " <<pow(rnx,0.5));
+ 		}
+ 	}
+ 	/*}}}*/
+@@ -1313,7 +1313,7 @@
+ 		}
+ 
+ 		//display info
+-		if (verbose>1) printf("   construction of the geometry from the 2d mesh\n");
++		if (verbose>1) _printLine_("   construction of the geometry from the 2d mesh");
+ 
+ 		//check that the mesh is not empty
+ 		if (nbt<=0 || nbv <=0 ) {
+@@ -1373,10 +1373,10 @@
+ 				}
+ 				//else (see 3 lines above), the edge has been called more than twice: return error
+ 				else {
+-					printf("The edge (%i,%i) belongs to more than 2 triangles (%i)\n",GetId(triangles[i][VerticesOfTriangularEdge[j][0]]),GetId(triangles[i][VerticesOfTriangularEdge[j][1]]),k);
+-					printf("Edge %i of triangle %i\n",j,i);
+-					printf("Edge %i of triangle %i\n",(-st[k]+2)%3,(-st[k]+2)/3);
+-					printf("Edge %i of triangle %i\n",triangles[(-st[k]+2)/3].NuEdgeTriangleAdj((int)((-st[k]+2)%3)),GetId(triangles[(-st[k]+2)/3].TriangleAdj((int)((-st[k]+2)%3))));
++					_printLine_("The edge (" << GetId(triangles[i][VerticesOfTriangularEdge[j][0]]) << "," << GetId(triangles[i][VerticesOfTriangularEdge[j][1]]) << ") belongs to more than 2 triangles (" << k << ")");
++					_printLine_("Edge " << j << " of triangle " << i);
++					_printLine_("Edge " << (-st[k]+2)%3 << " of triangle " << (-st[k]+2)/3);
++					_printLine_("Edge " << triangles[(-st[k]+2)/3].NuEdgeTriangleAdj((int)((-st[k]+2)%3)) << " of triangle " << GetId(triangles[(-st[k]+2)/3].TriangleAdj((int)((-st[k]+2)%3))));
+ 					_error2_("An edge belongs to more than 2 triangles");
+ 				}	
+ 			}
+@@ -1388,12 +1388,12 @@
+ 
+ 		//display info
+ 		if(verbose>5) {
+-			printf("         info on Mesh:\n");
+-			printf("            - number of vertices    = %i \n",nbv); 
+-			printf("            - number of triangles   = %i \n",nbt); 
+-			printf("            - number of given edges = %i \n",nbe); 
+-			printf("            - number of all edges   = %i \n",nbedges); 
+-			printf("            - Euler number 1 - nb of holes = %i \n"  ,nbt-nbedges+nbv); 
++			_printLine_("         info on Mesh:");
++			_printLine_("            - number of vertices    = " << nbv); 
++			_printLine_("            - number of triangles   = " << nbt); 
++			_printLine_("            - number of given edges = " << nbe); 
++			_printLine_("            - number of all edges   = " << nbedges); 
++			_printLine_("            - Euler number 1 - nb of holes = " << nbt-nbedges+nbv); 
+ 		}
+ 
+ 		// check consistency of edge[].adj and geometrical required  vertices
+@@ -1424,7 +1424,7 @@
+ 			k =0;
+ 
+ 			//display info
+-			if(verbose>4) printf("   Construction of the edges %i\n",nbe);
++			if(verbose>4) _printLine_("   Construction of the edges " << nbe);
+ 
+ 			for (i=0;i<nbedges;i++){ 
+ 				long  add= -1;
+@@ -1450,7 +1450,7 @@
+ 					if (i<nbeold){
+ 						edges[add].ReferenceNumber=edgessave[i].ReferenceNumber; 		      
+ 						edges[add].GeomEdgeHook=edgessave[i].GeomEdgeHook; //  HACK to get required edges
+-						printf("oh no...\n");
++						_printLine_("oh no...");
+ 					}
+ 					else
+ 					 edges[add].ReferenceNumber=Min(edges[add].v[0]->GetReferenceNumber(),edges[add].v[1]->GetReferenceNumber());
+@@ -1565,7 +1565,7 @@
+ 				nbsubdomains++;
+ 			}
+ 		}
+-		if (verbose> 3) printf("      The Number of sub domain = %i\n",nbsubdomains); 
++		if (verbose> 3) _printLine_("      The Number of sub domain = " << nbsubdomains); 
+ 
+ 		//build subdomains
+ 		long isd;
+@@ -1617,7 +1617,7 @@
+ 		Gh.edges = new GeomEdge[nbe];
+ 		Gh.nbsubdomains = nbsubdomains;
+ 		Gh.subdomains = new GeomSubDomain[nbsubdomains];
+-		if (verbose>3) printf("   number of vertices = %i\n   number of edges = %i\n",Gh.nbv,Gh.nbe);
++		if (verbose>3) _printLine_("   number of vertices = " << Gh.nbv << "\n   number of edges = " << Gh.nbe);
+ 		NbVerticesOnGeomVertex = Gh.nbv;
+ 		VerticesOnGeomVertex = new VertexOnGeom[NbVerticesOnGeomVertex];
+ 		NbVerticesOnGeomEdge =0;
+@@ -1789,7 +1789,7 @@
+ 
+ 		//display infos
+ 		if(verbose>1) {
+-			printf("   Construction of Metric: number of field: %i (nbt=%i, nbv=%i)\n",nbsol,nbt,nbv);
++			_printLine_("   Construction of Metric: number of field: " << nbsol << " (nbt=" << nbt << ", nbv=" << nbv << ")");
+ 		}
+ 
+ 		//first, build the chains that will be used for the Hessian computation, as weel as the area of each element
+@@ -1861,11 +1861,11 @@
+ 			double absmax=Max(Abs(smin),Abs(smax));
+ 
+ 			//display info
+-			if(verbose>2) printf("      Solution %i, Min = %g, Max = %g, Delta = %g\n",nusol,smin,smax,sdelta);
++			if(verbose>2) _printLine_("      Solution " << nusol << ", Min = " << smin << ", Max = " << smax << ", Delta = " << sdelta);
+ 
+ 			//skip constant field
+ 			if (sdelta < 1.0e-10*Max(absmax,1e-20)){
+-				printf("      Solution %i is constant, skipping...\n",nusol);
++				_printLine_("      Solution " << nusol << " is constant, skipping...");
+ 				continue;
+ 			}
+ 
+@@ -1991,7 +1991,7 @@
+ 
+ 		//display infos
+ 		if(verbose>1) {
+-			printf("   Construction of Metric: number of field: %i (nbt=%i, nbv=%i)\n",nbsol,nbt,nbv);
++			_printLine_("   Construction of Metric: number of field: " << nbsol << " (nbt=" << nbt << ", nbv=" << nbv << ")");
+ 		}
+ 
+ 		//initialize Mmass, OnBoundary and Massxx by zero
+@@ -2074,11 +2074,11 @@
+ 			double absmax=Max(Abs(smin),Abs(smax));
+ 
+ 			//display info
+-			if(verbose>2) printf("      Solution %i, Min = %g, Max = %g, Delta = %g, number of fields = %i\n",nusol,smin,smax,sdelta,nbsol);
++			if(verbose>2) _printLine_("      Solution " << nusol << ", Min = " << smin << ", Max = " << smax << ", Delta = " << sdelta << ", number of fields = " << nbsol);
+ 
+ 			//skip constant field
+ 			if (sdelta < 1.0e-10*Max(absmax,1e-20) ){
+-				if (verbose>2) printf("      Solution %i is constant, skipping...\n",nusol);
++				if (verbose>2) _printLine_("      Solution " << nusol << " is constant, skipping...");
+ 				continue;
+ 			}
+ 
+@@ -2263,7 +2263,7 @@
+ 
+ 		//Return if no edge is cracked
+ 		if(k==0) return;
+-		if (verbose>4) printf("      number of Cracked Edges = %i\n",k);
++		if (verbose>4) _printLine_("      number of Cracked Edges = " << k);
+ 
+ 		//Initialize Cracked edge
+ 		NbCrackedEdges=k;
+@@ -2304,7 +2304,7 @@
+ 		_assert_(k==NbCrackedEdges);
+ 
+ 		//Add new vertices
+-		if (verbose>4) printf("      number of Cracked Vertices = %i\n",NbCrackedVertices);
++		if (verbose>4) _printLine_("      number of Cracked Vertices = " << NbCrackedVertices);
+ 		if (NbCrackedVertices){
+ 			CrackedVertices=xNew<long>(2*NbCrackedVertices);
+ 			num=0;
+@@ -2373,7 +2373,7 @@
+ 						break;
+ 					}
+ 				}
+-				//printf("%i -> %i %i %i, edge [%i->%i %i->%i]\n",element_renu[GetId(ta.t)],GetId((*ta.t)[0])+1,GetId((*ta.t)[1])+1,GetId((*ta.t)[2])+1,i1,j1,i2,j2);
++				//_printLine_("" << element_renu[GetId(ta.t)] << " -> " << GetId((*ta.t)[0])+1 << " " << GetId((*ta.t)[1])+1 << " " << GetId((*ta.t)[2])+1 << ", edge [" << i1 << "->" << j1 << " " << i2 << "->" << j2 << "]");
+ 				ta = Next(ta).Adj(); 
+ 				if (count++>50) _error2_("Maximum number of iteration exceeded");
+ 			}while ((tbegin != ta)); 
+@@ -2397,19 +2397,19 @@
+ 
+ 		int i;
+ 
+-		printf("Mesh Echo:\n");
+-		printf("   nbv = %i\n",nbv);
+-		printf("   nbt = %i\n",nbt);
+-		printf("   nbe = %i\n",nbe);
+-		printf("   nbq = %i\n",nbq);
+-		printf("   index:\n");
++		_printLine_("Mesh Echo:");
++		_printLine_("   nbv = " << nbv);
++		_printLine_("   nbt = " << nbt);
++		_printLine_("   nbe = " << nbe);
++		_printLine_("   nbq = " << nbq);
++		_printLine_("   index:");
+ 		for (i=0;i<nbt;i++){
+ 			_printLine_("   " << setw(4) << i+1 << ": [" 
+ 						<< setw(4) << (((BamgVertex *)triangles[i](0))?GetId(triangles[i][0])+1:0) << " " 
+ 						<< setw(4) << (((BamgVertex *)triangles[i](0))?GetId(triangles[i][1])+1:0) << " " 
+ 						<< setw(4) << (((BamgVertex *)triangles[i](0))?GetId(triangles[i][2])+1:0) << "]");
+ 		}
+-		printf("   coordinates:\n");
++		_printLine_("   coordinates:");
+ 		for (i=0;i<nbv;i++){
+ 			_printLine_("   " << setw(4) << i+1 << ": [" << vertices[i].r.x << " " << vertices[i].r.y << "]");
+ 		}
+@@ -2425,7 +2425,7 @@
+ 			int nbfe=0,nbswp=0,Nbswap=0;
+ 
+ 			//display
+-			if (verbose > 2) printf("   ForceBoundary  nb of edge: %i\n",nbe);
++			if (verbose > 2) _printLine_("   ForceBoundary  nb of edge: " << nbe);
+ 
+ 			//check that there is no triangle with 0 determinant
+ 			for (int t = 0; t < nbt; t++){
+@@ -2456,7 +2456,7 @@
+ 			for (int j=0;j<nbv;j++){
+ 				Nbswap +=  vertices[j].Optim(1,0);
+ 			}
+-			if (verbose > 3) printf("      number of inforced edge = %i, number of swap= %i\n",nbfe,Nbswap); 
++			if (verbose > 3) _printLine_("      number of inforced edge = " << nbfe << ", number of swap= " << Nbswap); 
+ 		}
+ 	/*}}}*/
+ 	/*FUNCTION Mesh::FindSubDomain{{{*/
+@@ -2466,8 +2466,8 @@
+ 		long int verbose=0;
+ 
+ 		if (verbose >2){
+-			if (OutSide) printf("   Find all external sub-domain\n"); 
+-			else printf("   Find all internal sub-domain\n");
++			if (OutSide) _printLine_("   Find all external sub-domain"); 
++			else _printLine_("   Find all internal sub-domain");
+ 		  }
+ 		short * HeapArete = new short[nbt];
+ 		Triangle  **  HeapTriangle = new Triangle*  [nbt];
+@@ -2612,7 +2612,7 @@
+ 									 t1->link=0;
+ 								 }//while (t)
+ 								}
+-							if(verbose>4) printf("      Number of removes subdomains (OutSideMesh) = %i\n",nbsubdomains-j);
++							if(verbose>4) _printLine_("      Number of removes subdomains (OutSideMesh) = " << nbsubdomains-j);
+ 							nbsubdomains=j;
+ 						  }
+ 
+@@ -2691,7 +2691,7 @@
+ 				}
+ 
+ 				if (inew < nbsubdomains) {
+-					if (verbose>5) printf("WARNING: %i SubDomains are being removed\n",nbsubdomains-inew);
++					if (verbose>5) _printLine_("WARNING: " << nbsubdomains-inew << " SubDomains are being removed");
+ 					nbsubdomains=inew;}
+ 
+ 
+@@ -2799,7 +2799,7 @@
+ 		long int verbose=2;
+ 
+ 		//Display info
+-		if (verbose>2) printf("   Insert initial %i vertices\n",nbv);
++		if (verbose>2) _printLine_("   Insert initial " << nbv << " vertices");
+ 
+ 		//Compute integer coordinates for the existing vertices
+ 		SetIntCoor();
+@@ -2890,7 +2890,7 @@
+ 
+ 		/*Now, add the vertices One by One*/
+ 		long NbSwap=0;
+-		if (verbose>3) printf("   Begining of insertion process...\n");
++		if (verbose>3) _printLine_("   Begining of insertion process...");
+ 
+ 		for (int icount=2; icount<nbv; icount++) {
+ 
+@@ -2913,8 +2913,8 @@
+ 
+ 		//Display info
+ 		if (verbose>3) {
+-			printf("      NbSwap of insertion: %i\n",NbSwap);
+-			printf("      NbSwap/nbv:          %i\n",NbSwap/nbv);
++			_printLine_("      NbSwap of insertion: " << NbSwap);
++			_printLine_("      NbSwap/nbv:          " << NbSwap/nbv);
+ 		}
+ 
+ #ifdef NBLOOPOPTIM
+@@ -2928,8 +2928,8 @@
+ 			for (int is1=0; is1<nbv; is1++) 
+ 			 NbSwap += orderedvertices[is1]->Optim(0,0);
+ 			if (verbose>3) {
+-				printf("      Optim Loop: %i\n",Nbloop);
+-				printf("      NbSwap/nbv:          %i\n",NbSwap/nbv);
++				_printLine_("      Optim Loop: " << Nbloop);
++				_printLine_("      NbSwap/nbv:          " << NbSwap/nbv);
+ 			}
+ 			if(!NbSwap) break;
+ 		}
+@@ -2952,7 +2952,7 @@
+ 		const long nbvnew=nbv-nbvold;
+ 
+ 		//display info if required
+-		if (verbose>5) printf("      Try to Insert %i new points\n",nbvnew);
++		if (verbose>5) _printLine_("      Try to Insert " << nbvnew << " new points");
+ 
+ 		//return if no new points
+ 		if (!nbvnew) return 0; 
+@@ -3002,14 +3002,14 @@
+ 			}
+ 		} 
+ 		if (verbose>3) {
+-			printf("         number of new points: %i\n",iv);
+-			printf("         number of to close (?) points: %i\n",nbv-iv);
+-			printf("         number of swap after: %i\n",NbSwap);
++			_printLine_("         number of new points: " << iv);
++			_printLine_("         number of to close (?) points: " << nbv-iv);
++			_printLine_("         number of swap after: " << NbSwap);
+ 		}
+ 		nbv = iv;
+ 
+ 		for (i=nbvold;i<nbv;i++) NbSwap += vertices[i].Optim(1);  
+-		if (verbose>3) printf("   NbSwap=%i\n",NbSwap);
++		if (verbose>3) _printLine_("   NbSwap=" << NbSwap);
+ 
+ 		NbTSwap +=  NbSwap ;
+ 		return nbv-nbvold;
+@@ -3055,7 +3055,7 @@
+ 		for ( i=0;i<Gh.nbe ; i++){
+ 			if (!e[i]){
+ 				kk++;
+-				if(kk<10) printf("BUG: the geometrical edge %i is on no edge curve\n",i);
++				if(kk<10) _printLine_("BUG: the geometrical edge " << i << " is on no edge curve");
+ 			}
+ 		}
+ 		if(kk) _error2_("See above");
+@@ -3069,10 +3069,10 @@
+ 
+ 		long int verbose=0;
+ 
+-		if (verbose>2) printf("MakeQuadrangles costheta = %g\n",costheta);
++		if (verbose>2) _printLine_("MakeQuadrangles costheta = " << costheta);
+ 
+ 		if (costheta >1) {
+-			if (verbose>5) printf("   do nothing: costheta > 1\n");
++			if (verbose>5) _printLine_("   do nothing: costheta > 1");
+ 		}
+ 
+ 
+@@ -3099,9 +3099,9 @@
+ 			  }
+ 			nbq = kk;
+ 			if (verbose>2){
+-				printf("   number of quadrilaterals    = %i\n",nbq);
+-				printf("   number of triangles         = %i\n",nbt-nbtout- nbq*2);
+-				printf("   number of outside triangles = %i\n",nbtout);
++				_printLine_("   number of quadrilaterals    = " << nbq);
++				_printLine_("   number of triangles         = " << nbt-nbtout- nbq*2);
++				_printLine_("   number of outside triangles = " << nbtout);
+ 			}
+ 			delete [] qq;
+ 	}
+@@ -3127,7 +3127,7 @@
+ 		long int verbose=0;
+ 
+ 		const  double maxsubdiv2 = maxsubdiv*maxsubdiv;
+-		if(verbose>1) printf("   Limit the subdivision of a edges in the new mesh by %g\n",maxsubdiv);
++		if(verbose>1) _printLine_("   Limit the subdivision of a edges in the new mesh by " << maxsubdiv);
+ 		// for all the edges 
+ 		// if the len of the edge is to long 
+ 		long it,nbchange=0;    
+@@ -3170,7 +3170,7 @@
+ 			}
+ 		}
+ 		if(verbose>3){
+-			printf("      number of metric changes = %i, maximum number of subdivision of a edges before change = %g\n",nbchange,pow(lmax,0.5));
++			_printLine_("      number of metric changes = " << nbchange << ", maximum number of subdivision of a edges before change = " << pow(lmax,0.5));
+ 		}
+ 	}
+ 	/*}}}*/
+@@ -3224,7 +3224,7 @@
+ 
+ 		/*First, insert old points if requested*/
+ 		if (KeepVertices && (&Bh != this) && (nbv+Bh.nbv< maxnbv)){
+-			if (verbose>5) printf("         Inserting initial mesh points\n");
++			if (verbose>5) _printLine_("         Inserting initial mesh points");
+ 			for (i=0;i<Bh.nbv;i++){ 
+ 				BamgVertex &bv=Bh[i];
+ 				if (!bv.GeomEdgeHook){
+@@ -3243,7 +3243,7 @@
+ 
+ 		// Big loop (most time consuming)
+ 		int iter=0;
+-		if (verbose>5) printf("         Big loop\n");
++		if (verbose>5) _printLine_("         Big loop");
+ 		do {
+ 			/*Update variables*/
+ 			iter++;
+@@ -3474,7 +3474,7 @@
+ 
+ 	// find extrema coordinates of vertices pmin,pmax
+ 	long i;
+-	if(verbose>2) printf("      Reconstruct mesh of %i vertices\n",nbv); 
++	if(verbose>2) _printLine_("      Reconstruct mesh of " << nbv << " vertices"); 
+ 
+ 	//initialize orderedvertices
+ 	_assert_(orderedvertices);
+@@ -3531,12 +3531,12 @@
+ 
+ 	//Display info if required
+ 	if(verbose>5) {
+-		printf("         info of Mesh:\n");
+-		printf("            - number of vertices    = %i \n",nbv); 
+-		printf("            - number of triangles   = %i \n",nbt); 
+-		printf("            - number of given edges = %i \n",nbe); 
+-		printf("            - number of all edges   = %i \n"  ,edge4->nb()); 
+-		printf("            - Euler number 1 - nb of holes = %i \n"  ,nbt-edge4->nb()+nbv); 
++		_printLine_("         info of Mesh:");
++		_printLine_("            - number of vertices    = " << nbv << " "); 
++		_printLine_("            - number of triangles   = " << nbt << " "); 
++		_printLine_("            - number of given edges = " << nbe << " "); 
++		_printLine_("            - number of all edges   = " << edge4->nb()); 
++		_printLine_("            - Euler number 1 - nb of holes = " << nbt-edge4->nb()+nbv); 
+ 	}
+ 
+ 	//check the consistency of edge[].adj and the geometrical required vertex
+@@ -3553,10 +3553,10 @@
+ 				k=k+1;
+ 				if (k<10) {
+ 					//print only 10 edges
+-					printf("Lost boundary edges %i : %i %i\n",i,edge4->i(i),edge4->j(i));
++					_printLine_("Lost boundary edges " << i << " : " << edge4->i(i) << " " << edge4->j(i));
+ 				}
+ 				else if (k==10){
+-					printf("Other lost boundary edges not shown...\n");
++					_printLine_("Other lost boundary edges not shown...");
+ 				}
+ 			}
+ 		}
+@@ -3744,16 +3744,16 @@
+ 					/*The edge is on Geometry and does not have 2 adjacent edges... (not on a closed curve)*/
+ 					/*Check that the 2 vertices are on geometry AND required*/
+ 					if(!edges[i][j].GeomEdgeHook->IsRequiredVertex()){
+-						printf("ReconstructExistingMesh error message: problem with the edge number %i: [%i %i]\n",i+1,GetId(edges[i][0])+1,GetId(edges[i][1])+1);
+-						printf("This edge is on geometrical edge number %i\n",Gh.GetId(edges[i].GeomEdgeHook)+1);
++						_printLine_("ReconstructExistingMesh error message: problem with the edge number " << i+1 << ": [" << GetId(edges[i][0])+1 << " " << GetId(edges[i][1])+1 << "]");
++						_printLine_("This edge is on geometrical edge number " << Gh.GetId(edges[i].GeomEdgeHook)+1);
+ 						if (edges[i][j].GeomEdgeHook->OnGeomVertex())
+-						 printf("the vertex number %i of this edge is a geometric BamgVertex number %i\n",GetId(edges[i][j])+1,Gh.GetId(edges[i][j].GeomEdgeHook->gv)+1);
++						 _printLine_("the vertex number " << GetId(edges[i][j])+1 << " of this edge is a geometric BamgVertex number " << Gh.GetId(edges[i][j].GeomEdgeHook->gv)+1);
+ 						else if (edges[i][j].GeomEdgeHook->OnGeomEdge())
+-						 printf("the vertex number %i of this edge is a geometric Edge number %i\n",GetId(edges[i][j])+1,Gh.GetId(edges[i][j].GeomEdgeHook->ge)+1);
++						 _printLine_("the vertex number " << GetId(edges[i][j])+1 << " of this edge is a geometric Edge number " << Gh.GetId(edges[i][j].GeomEdgeHook->ge)+1);
+ 						else
+-						 printf("Its pointer is %p\n",edges[i][j].GeomEdgeHook);
++						 _printLine_("Its pointer is " << edges[i][j].GeomEdgeHook);
+ 
+-						printf("This edge is on geometry and has no adjacent edge (open curve) and one of the tip is not required\n");
++						_printLine_("This edge is on geometry and has no adjacent edge (open curve) and one of the tip is not required");
+ 						_error2_("See above (might be cryptic...)");
+ 					}
+ 				}
+@@ -3841,15 +3841,15 @@
+ 		BamgVertex * ve = vertices+nbv;
+ 		long it,ie,i;
+ 
+-		printf("renumbering triangles\n");
++		_printLine_("renumbering triangles");
+ 		for ( it=0;it<nbt;it++) 
+ 		 triangles[it].Renumbering(vertices,ve,renu);
+ 
+-		printf("renumbering edges\n");
++		_printLine_("renumbering edges");
+ 		for ( ie=0;ie<nbe;ie++) 
+ 		 edges[ie].Renumbering(vertices,ve,renu);
+ 
+-		printf("renumbering vertices on geom\n");
++		_printLine_("renumbering vertices on geom");
+ 		for (i=0;i< NbVerticesOnGeomVertex;i++)
+ 		  {
+ 			BamgVertex *v = VerticesOnGeomVertex[i].meshvertex;
+@@ -3857,7 +3857,7 @@
+ 			 VerticesOnGeomVertex[i].meshvertex=vertices+renu[GetId(v)];
+ 		  }
+ 
+-		printf("renumbering vertices on edge\n");
++		_printLine_("renumbering vertices on edge");
+ 		for (i=0;i< NbVerticesOnGeomEdge;i++)
+ 		  {
+ 			BamgVertex *v =VerticesOnGeomEdge[i].meshvertex;
+@@ -3865,7 +3865,7 @@
+ 			 VerticesOnGeomEdge[i].meshvertex=vertices+renu[GetId(v)];
+ 		  }
+ 
+-		printf("renumbering vertices on Bth vertex\n");
++		_printLine_("renumbering vertices on Bth vertex");
+ 		for (i=0;i< NbVertexOnBThVertex;i++)
+ 		  {
+ 			BamgVertex *v=VertexOnBThVertex[i].v;
+@@ -3955,7 +3955,7 @@
+ 				/*increase number_of_errors and print error only for the first 20 triangles*/
+ 				number_of_errors++;
+ 				if (number_of_errors<20){
+-					printf("Area of Triangle %i < 0 (det=%i)\n",i+1,triangles[i].det);
++					_printLine_("Area of Triangle " << i+1 << " < 0 (det=" << triangles[i].det << ")");
+ 				}
+ 			}
+ 		}
+@@ -4023,12 +4023,12 @@
+ 	area*=3; 
+ 	gammamn=sqrt(gammamn);
+ 	gammamx=sqrt(gammamx);    
+-	printf("   Adaptmesh info:\n");
+-	printf("      number of triangles = %i\n",nt);
+-	printf("      hmin = %g, hmax=%g\n",hmin,hmax);
+-	printf("      area = %g, M area = %g, M area/( |Khat| nt) = %g\n",area,Marea, Marea/(aireKh*nt));
+-	printf("      infinite-regularity(?): min = %g, max = %g\n",gammamn,gammamx);
+-	printf("      anisomax = %g, beta max = %g, min = %g\n",pow(alpha2,0.5),1./pow(beta/aireKh,0.5), 1./pow(beta0/aireKh,0.5));
++	_printLine_("   Adaptmesh info:");
++	_printLine_("      number of triangles = " << nt);
++	_printLine_("      hmin = " << hmin << ", hmax=" << hmax);
++	_printLine_("      area = " << area << ", M area = " << Marea << ", M area/( |Khat| nt) = " <<  Marea/(aireKh*nt));
++	_printLine_("      infinite-regularity(?): min = " << gammamn << ", max = " << gammamx);
++	_printLine_("      anisomax = " << pow(alpha2,0.5) << ", beta max = " << 1./pow(beta/aireKh,0.5) << ", min = " << 1./pow(beta0/aireKh,0.5));
+ }
+ /*}}}*/
+ /*FUNCTION Mesh::ShowHistogram{{{*/
+@@ -4062,18 +4062,18 @@
+ 				}
+ 			}
+ 		}  
+-	printf(" --- Histogram of the unit mesh,  nb of edges = %i\n",nbedges);
+-	printf("      length of edge in   | %% of edge  | Nb of edges \n"); 
+-	printf("      --------------------+-------------+-------------\n"); 
++	_printLine_(" --- Histogram of the unit mesh,  nb of edges = " << nbedges);
++	_printLine_("      length of edge in   | %% of edge  | Nb of edges "); 
++	_printLine_("      --------------------+-------------+-------------"); 
+ 	for   (i=0;i<=kmax;i++){ 
+ 		if (i==0) _printString_( "      " << setw(10) << 0.);
+ 		else      _printString_( "      " << setw(10) << exp(lmin+i/delta));
+-		if (i==kmax) printf("          +inf   ");
++		if (i==kmax) _printString_("          +inf   ");
+ 		else      _printString_( "      " << setw(10) << exp(lmin+(i+1)/delta));
+ 		_printLine_("|  " << setw(10) << (long((10000. * histo[i])/ nbedges)/100.) << " |");
+-		printf("  %i\n",histo[i]);
++		_printLine_("  " << histo[i]);
+ 	}
+-	printf("      --------------------+-------------+-------------\n"); 
++	_printLine_("      --------------------+-------------+-------------"); 
+ }
+ /*}}}*/
+ /*FUNCTION Mesh::SmoothingVertex{{{*/
+@@ -4099,7 +4099,7 @@
+ 	 tstart[ GetId(VerticesOnGeomVertex[j].meshvertex)]=&vide;
+ 	for ( k=0;k<NbVerticesOnGeomEdge;k++ ) 
+ 	 tstart[ GetId(VerticesOnGeomEdge[k].meshvertex)]=&vide;
+-	if(verbose>2) printf("   SmoothingVertex: nb Iteration = %i, Omega=%g\n",nbiter,omega);
++	if(verbose>2) _printLine_("   SmoothingVertex: nb Iteration = " << nbiter << ", Omega=" << omega);
+ 	for (k=0;k<nbiter;k++)
+ 	  {
+ 		long i,NbSwap =0;
+@@ -4111,7 +4111,7 @@
+ 		 for ( i=0;i<nbv;i++)
+ 		  if (tstart[i] != &vide) // not a boundary vertex 
+ 			NbSwap += vertices[i].Optim(1);
+-		if (verbose>3) printf("      move max = %g, iteration = %i, nb of swap = %i\n",pow(delta,0.5),k,NbSwap);
++		if (verbose>3) _printLine_("      move max = " << pow(delta << ", iteration = " << 0.5) << ", nb of swap = " << k);
+ 	  }
+ 
+ 	delete [] tstart;
+@@ -4125,7 +4125,7 @@
+ 	long int verbose=0;
+ 
+ 	if(raisonmax<1.1) return;
+-	if(verbose > 1) printf("   Mesh::SmoothMetric raisonmax = %g\n",raisonmax);
++	if(verbose > 1) _printLine_("   Mesh::SmoothMetric raisonmax = " << raisonmax);
+ 	CreateSingleVertexToTriangleConnectivity();
+ 	long i,j,kch,kk,ip;
+ 	long *first_np_or_next_t0 = new long[nbv];
+@@ -4191,7 +4191,7 @@
+ 		Head1 = -1;
+ 		Exchange(first_np_or_next_t0,first_np_or_next_t1);
+ 	}
+-	if(verbose>2) printf("      number of iterations = %i\n",kch); 
++	if(verbose>2) _printLine_("      number of iterations = " << kch); 
+ 	delete [] first_np_or_next_t0;
+ 	delete [] first_np_or_next_t1;
+ }
+@@ -4381,7 +4381,7 @@
+ 						if (t.link && ( (aa=Area2( A.r    , t[1].r , t[2].r )) < 0.0 
+ 										||   (bb=Area2( t[0].r , A.r    , t[2].r )) < 0.0  
+ 										||   (cc=Area2( t[0].r , t[1].r , A.r    )) < 0.0)){
+-							printf("%i not in triangle %i In= %i %g %g %g %g\n",ke + nbvold,i,!!t.link,aa,bb,cc,dd);
++							_printLine_("" << ke + nbvold << " not in triangle " << i << " In= " << !!t.link << " " << aa << " " << bb << " " << cc << " " << dd);
+ 							_error2_("Number of triangles with P2 interpolation Problem");
+ 						}
+ 					}
+@@ -4389,7 +4389,7 @@
+ 						if (tt.link && ( (aa=Area2( A.r     , tt[1].r , tt[2].r )) < 0 
+ 										||   (bb=Area2( tt[0].r , A.r     , tt[2].r )) < 0 
+ 										||   (cc=Area2( tt[0].r , tt[1].r , A.r     )) < 0)){
+-							printf("%i not in triangle %i In= %i %g %g %g %g\n",ke + nbvold,ii,!!tt.link,aa,bb,cc,dd);
++							_printLine_("" << ke + nbvold << " not in triangle " << ii << " In= " << !!tt.link << " " << aa << " " << bb << " " << cc << " " << dd);
+ 							_error2_("Number of triangles with P2 interpolation Problem");
+ 						}
+ 					} 
+@@ -4684,9 +4684,9 @@
+ 		ReconstructExistingMesh();
+ 
+ 		if (verbose>2){
+-			printf("   number of quadrilaterals    = %i\n",nbq);
+-			printf("   number of triangles         = %i\n",nbt-nbtout- nbq*2);
+-			printf("   number of outside triangles = %i\n",nbtout);
++			_printLine_("   number of quadrilaterals    = " << nbq);
++			_printLine_("   number of triangles         = " << nbt-nbtout- nbq*2);
++			_printLine_("   number of outside triangles = " << nbtout);
+ 		}
+ 
+ 		return 0; //ok
+@@ -4753,7 +4753,7 @@
+ 			vi.DirOfSearch =NoDirOfSearch;
+ 			Triangle *tcvi = TriangleFindFromCoord(vi.i,det3);
+ 			if (tcvi && !tcvi->link) {
+-				printf("problem inserting point in SplitInternalEdgeWithBorderVertices (tcvj && !tcvj->link)\n");
++				_printLine_("problem inserting point in SplitInternalEdgeWithBorderVertices (tcvj && !tcvj->link)");
+ 			}
+ 
+ 			quadtree->Add(vi);
+@@ -4766,13 +4766,13 @@
+ 			//      }
+ 	}
+ 	if (verbose>3) {
+-		printf("   number of points: %i\n",iv);
+-		printf("   number of swap to  split internal edges with border vertices: %i\n",NbSwap);
++		_printLine_("   number of points: " << iv);
++		_printLine_("   number of swap to  split internal edges with border vertices: " << NbSwap);
+ 		nbv = iv;
+ 	}
+ }
+-if (NbSplitEdge>nbv-nbvold) printf("WARNING: not enough vertices  to split all internal edges, we lost %i edges...\n",NbSplitEdge - ( nbv-nbvold));
+-if (verbose>2) printf("SplitInternalEdgeWithBorderVertices: Number of splited edge %i\n",NbSplitEdge);
++if (NbSplitEdge>nbv-nbvold) _printLine_("WARNING: not enough vertices  to split all internal edges, we lost " << NbSplitEdge - ( nbv-nbvold) << " edges...");
++if (verbose>2) _printLine_("SplitInternalEdgeWithBorderVertices: Number of splited edge " << NbSplitEdge);
+ 
+ return  NbSplitEdge;
+ }
+@@ -4942,7 +4942,7 @@
+ 	nbv=nods;
+ 
+ 	//Vertices
+-	if(verbose) printf("Reading vertices (%i)\n",nbv);
++	if(verbose) _printLine_("Reading vertices (" << nbv << ")");
+ 	for (i=0;i<nbv;i++){
+ 		vertices[i].r.x=x[i];
+ 		vertices[i].r.y=y[i];
+@@ -5254,22 +5254,22 @@
+ 		}
+ 
+ 		//Insert points inside existing triangles
+-		if (verbose>4) printf("      -- current number of vertices = %i\n",nbv);
+-		if (verbose>3) printf("      Creating initial Constrained Delaunay Triangulation...\n");
+-		if (verbose>3) printf("         Inserting boundary points\n");
++		if (verbose>4) _printLine_("      -- current number of vertices = " << nbv);
++		if (verbose>3) _printLine_("      Creating initial Constrained Delaunay Triangulation...");
++		if (verbose>3) _printLine_("         Inserting boundary points");
+ 		Insert();
+ 
+ 		//Force the boundary
+-		if (verbose>3) printf("         Forcing boundaries\n");
++		if (verbose>3) _printLine_("         Forcing boundaries");
+ 		ForceBoundary();
+ 
+ 		//Extract SubDomains
+-		if (verbose>3) printf("         Extracting subdomains\n");
++		if (verbose>3) _printLine_("         Extracting subdomains");
+ 		FindSubDomain();
+ 
+-		if (verbose>3) printf("      Inserting internal points\n");
++		if (verbose>3) _printLine_("      Inserting internal points");
+ 		NewPoints(*this,bamgopts,0) ;
+-		if (verbose>4) printf("      -- current number of vertices = %i\n",nbv);
++		if (verbose>4) _printLine_("      -- current number of vertices = " << nbv);
+ 	}
+ 	/*}}}*/
+ 	/*FUNCTION Mesh::TriangulateFromGeom1{{{*/
+@@ -5372,11 +5372,11 @@
+ 					/*Get curve number*/
+ 					int nc=ei.GeomEdgeHook->CurveNumber;
+ 					
+-					//printf("Dealing with curve number %i\n",nc);
+-					//printf("edge on geometry is same as GhCurve? %s\n",(ei.GeomEdgeHook==Gh.curves[nc].FirstEdge || ei.GeomEdgeHook==Gh.curves[nc].LastEdge)?"yes":"no");
++					//_printLine_("Dealing with curve number " << nc);
++					//_printLine_("edge on geometry is same as GhCurve? " << (ei.GeomEdgeHook==Gh.curves[nc].FirstEdge || ei.GeomEdgeHook==Gh.curves[nc].LastEdge)?"yes":"no");
+ 					//if(ei.GeomEdgeHook==Gh.curves[nc].FirstEdge || ei.GeomEdgeHook==Gh.curves[nc].LastEdge){
+-					//	printf("Do we have the right extremity? curve first vertex -> %s\n",((GeomVertex *)*ei[je].GeomEdgeHook==&(*Gh.curves[nc].FirstEdge)[Gh.curves[nc].FirstVertexIndex])?"yes":"no");
+-					//	printf("Do we have the right extremity? curve last  vertex -> %s\n",((GeomVertex *)*ei[je].GeomEdgeHook==&(*Gh.curves[nc].LastEdge)[Gh.curves[nc].LastVertexIndex])?"yes":"no");
++					//	_printLine_("Do we have the right extremity? curve first vertex -> " << ((GeomVertex *)*ei[je].GeomEdgeHook==&(*Gh.curves[nc].FirstEdge)[Gh.curves[nc].FirstVertexIndex])?"yes":"no");
++					//	_printLine_("Do we have the right extremity? curve last  vertex -> " << ((GeomVertex *)*ei[je].GeomEdgeHook==&(*Gh.curves[nc].LastEdge)[Gh.curves[nc].LastVertexIndex])?"yes":"no");
+ 					//}
+ 					//BUG FIX from original bamg
+ 					/*Check that we are on the same edge and right vertex (0 or 1) */
+@@ -5584,22 +5584,22 @@
+ 		delete [] bcurve;
+ 
+ 		//Insert points inside existing triangles
+-		if (verbose>4) printf("      -- current number of vertices = %i\n",nbv);
+-		if (verbose>3) printf("      Creating initial Constrained Delaunay Triangulation...\n");
+-		if (verbose>3) printf("         Inserting boundary points\n");
++		if (verbose>4) _printLine_("      -- current number of vertices = " << nbv);
++		if (verbose>3) _printLine_("      Creating initial Constrained Delaunay Triangulation...");
++		if (verbose>3) _printLine_("         Inserting boundary points");
+ 		Insert();
+ 
+ 		//Force the boundary
+-		if (verbose>3) printf("         Forcing boundaries\n");
++		if (verbose>3) _printLine_("         Forcing boundaries");
+ 		ForceBoundary();
+ 
+ 		//Extract SubDomains
+-		if (verbose>3) printf("         Extracting subdomains\n");
++		if (verbose>3) _printLine_("         Extracting subdomains");
+ 		FindSubDomain();
+ 
+-		if (verbose>3) printf("      Inserting internal points\n");
++		if (verbose>3) _printLine_("      Inserting internal points");
+ 		NewPoints(BTh,bamgopts,KeepVertices) ;
+-		if (verbose>4) printf("      -- current number of vertices = %i\n",nbv);
++		if (verbose>4) _printLine_("      -- current number of vertices = " << nbv);
+ 	}
+ 	/*}}}*/
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12509-12510.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12509-12510.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12509-12510.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12509)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12510)
+@@ -4111,7 +4111,7 @@
+ 		 for ( i=0;i<nbv;i++)
+ 		  if (tstart[i] != &vide) // not a boundary vertex 
+ 			NbSwap += vertices[i].Optim(1);
+-		if (verbose>3) _printLine_("      move max = " << pow(delta << ", iteration = " << 0.5) << ", nb of swap = " << k);
++		if (verbose>3) _printLine_("      move max = " << pow(delta,0.5) << ", iteration = " << k << ", nb of swap = " << NbSwap);
+ 	  }
+ 
+ 	delete [] tstart;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12510-12511.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12510-12511.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12510-12511.diff	(revision 12679)
@@ -0,0 +1,2630 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12511)
+@@ -35,7 +35,7 @@
+ 		}
+ 		else{
+ 			if(!mxIsClass(dataref,"double") && !mxIsClass(dataref,"single")){
+-				printf("Warning: converting matlab data from '%s' to 'double'\n",mxGetClassName(dataref));
++				_printLine_("Warning: converting matlab data from '" << mxGetClassName(dataref) << "' to 'double'");
+ 			}
+ 			/*Convert matlab matrix to double* matrix: */
+ 			MatlabMatrixToDoubleMatrix(&outmatrix,&outmatrix_rows,&outmatrix_cols,dataref);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/PrintfFunction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/PrintfFunction.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/PrintfFunction.cpp	(revision 12511)
+@@ -50,7 +50,7 @@
+ 	}
+ 
+ 	/*Ok, if we are running in parallel, get node 0 to print*/
+-	if(my_rank==0)printf(buffer);
++	if(my_rank==0)_printString_(buffer);
+ 
+ 	/*Clean up and return*/
+ 	xDelete<char>(buffer);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp	(revision 12511)
+@@ -43,16 +43,16 @@
+ 	extern int num_procs;
+ 
+ 	if (function_name=="" || file_line==0){ //WINDOWS
+-		printf("%s%s","Error message: ",what());
++		_printString_("" << "Error message: " << what());
+ 	}
+ 	else{
+ 		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());
++			_printLine_("\n??? Error using ==> " << file_name.c_str() << ":" << file_line);
++			_printLine_("" << function_name.c_str() << " error message: " << what() << "\n");
+ 		}
+ 		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());
++			_printLine_("\n[" << my_rank << "] ??? Error using ==> " << file_name.c_str() << ":" << file_line);
++			_printLine_("[" << my_rank << "] " << function_name.c_str() << " error message: " << what() << "\n");
+ 		}
+ 	}
+ 	return;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp	(revision 12511)
+@@ -48,7 +48,7 @@
+ 	}
+ 
+ 	/*Ok, if we are running in parallel, get node 0 to print*/
+-	if(my_rank==0)printf(buffer);
++	if(my_rank==0)_printString_(buffer);
+ 
+ 	/*Clean up and return*/
+ 	xDelete<char>(buffer);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 12511)
+@@ -53,16 +53,16 @@
+ 	}
+ 
+ 	/*Initialize output*/
+-	if (verbose) printf("Initializing output vector\n");
++	if (verbose) _printLine_("Initializing output vector");
+ 	data_interp=xNew<double>(nods_interp*data_cols);
+ 
+ 	// read background mesh 
+-	if (verbose) printf("Reading mesh\n");
++	if (verbose) _printLine_("Reading mesh");
+ 	Mesh Th(index_data,x_data,y_data,nods_data,nels_data); 
+ 	Th.CreateSingleVertexToTriangleConnectivity();
+ 
+ 	//Loop over output nodes
+-	if (verbose) printf("Loop over the nodes\n");
++	if (verbose) _printLine_("Loop over the nodes");
+ 	for(i=0;i<nods_interp;i++){
+ 		
+ 		/*reset skip_bamg: */
+@@ -137,7 +137,7 @@
+ 	}
+ 
+ 	/*Assign output pointers:*/
+-	if (verbose) printf("Assigning output\n");
++	if (verbose) _printLine_("Assigning output");
+ 	*pdata_interp=data_interp;
+ 
+ 	/*No error return*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.cpp	(revision 12511)
+@@ -23,13 +23,13 @@
+ 	bamgopts=new BamgOpts();
+ 
+ 	// read mesh
+-	if(verbose) printf("Reading mesh\n");
++	if(verbose) _printLine_("Reading mesh");
+ 	Mesh Th(index,x,y,nods,nels); 
+ 
+ 	//write mesh and geometry
+-	if (verbose) printf("Write Geometry\n");
++	if (verbose) _printLine_("Write Geometry");
+ 	Th.Gh.WriteGeometry(bamggeom,bamgopts);
+-	if (verbose) printf("Write Mesh\n");
++	if (verbose) _printLine_("Write Mesh");
+ 	Th.WriteMesh(bamgmesh,bamgopts);
+ 
+ 	//clean up
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12511)
+@@ -56,7 +56,7 @@
+   itm = (int)(2*siglim/DT + 1.5);
+   
+   if (itm >= NPDMAX){
+-    printf("increase NPDMAX in massBalance.cpp\n");
++    _printLine_("increase NPDMAX in massBalance.cpp");
+     exit (1);
+       }
+   for (it = 0; it < itm; it++){  
+@@ -82,7 +82,7 @@
+   siglimc = 2.5*signormc ;
+   itm = (int)((PDCUT+2.*siglimc)/DT + 1.5);
+   if (itm >= NPDCMAX){
+-    printf("'increase NPDCMAX in p35com'\n");
++    _printLine_("'increase NPDCMAX in p35com'");
+     exit (1);
+       }
+   for (it = 0; it < itm; it++ ){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Chacox/Chacox.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Chacox/Chacox.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Chacox/Chacox.cpp	(revision 12511)
+@@ -65,12 +65,12 @@
+ 
+ 
+ 	if (DEBUG_TRACE > 0) {
+-		printf("<Entering main>\n");
++		_printLine_("<Entering main>");
+ 	}
+ 
+ 	if (PRINT_HEADERS) {
+-		printf("\n                    Chaco 2.0\n");
+-		printf("          Sandia National Laboratories\n\n");
++		_printLine_("\n                    Chaco 2.0");
++		_printLine_("          Sandia National Laboratories\n");
+ 	}
+ 
+ 	Using_Main = TRUE;
+@@ -176,7 +176,7 @@
+ 	for (i=0; i<start[nvtxs]; adjacency[i++]--);
+ 
+ 	if (DEBUG_MEMORY > 0) {
+-		printf("\n");
++		_printLine_("");
+ 		smalloc_stats();
+ 	}
+ 
+@@ -184,7 +184,7 @@
+ 		fclose(params_file);
+ 
+ 	if (DEBUG_TRACE > 1) {
+-		printf("<Leaving main>\n");
++		_printLine_("<Leaving main>");
+ 	}
+ 	
+ 	return(0);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Chacox/input_parse.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Chacox/input_parse.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Chacox/input_parse.cpp	(revision 12511)
+@@ -37,15 +37,15 @@
+ 	int       eigensolver;	/* which kind of eigensolver to use */
+ 
+ 	if (DEBUG_TRACE > 0) {
+-		printf("<Entering input_parse>\n");
++		_printLine_("<Entering input_parse>");
+ 	}
+ 
+ 	if (PROMPT) {
+-		printf("Parallel machine architecture:\n");
+-		printf("  (0) Hypercube\n");
+-		printf("  (1) One-dimensional mesh\n");
+-		printf("  (2) Two-dimensional mesh\n");
+-		printf("  (3) Three-dimensional mesh\n");
++		_printLine_("Parallel machine architecture:");
++		_printLine_("  (0) Hypercube");
++		_printLine_("  (1) One-dimensional mesh");
++		_printLine_("  (2) Two-dimensional mesh");
++		_printLine_("  (3) Three-dimensional mesh");
+ 	}
+ 	*architecture = (int)options[OPT_ARCH];
+ 	if (*architecture < 0 || *architecture > 3) {
+@@ -56,12 +56,12 @@
+ 
+ 	/* Name output assignment file. */
+ 	if (PROMPT)
+-		printf("Assignment output file: ");
++		_printString_("Assignment output file: ");
+ 	outassignname = NULL;
+ 
+ 	/* Name output results file. */
+ 	if (PROMPT)
+-		printf("File name for saving run results: ");
++		_printString_("File name for saving run results: ");
+ 	outfilename = NULL;
+ 
+ 	/* Initialize the method flags */
+@@ -74,14 +74,14 @@
+ 	}
+ 	else {
+ 		if (PROMPT) {
+-			printf("Global partitioning method:\n");
+-			printf("  (1) Multilevel-KL\n");
+-			printf("  (2) Spectral\n");
+-			printf("  (3) Inertial\n");
+-			printf("  (4) Linear\n");
+-			printf("  (5) Random\n");
+-			printf("  (6) Scattered\n");
+-			printf("  (7) Read-from-file\n");
++			_printLine_("Global partitioning method:");
++			_printLine_("  (1) Multilevel-KL");
++			_printLine_("  (2) Spectral");
++			_printLine_("  (3) Inertial");
++			_printLine_("  (4) Linear");
++			_printLine_("  (5) Random");
++			_printLine_("  (6) Scattered");
++			_printLine_("  (7) Read-from-file");
+ 		}
+ 		*global_method = (int)options[OPT_GLOBAL];
+ 		if (*global_method < 1 || *global_method > 7) {
+@@ -93,19 +93,19 @@
+ 
+ 	if (*global_method == 7) {	/* Name and open input assignment file. */
+ 		if (PROMPT)
+-			printf("Assignment input file: ");
++			_printString_("Assignment input file: ");
+ 	}
+ 
+ 	else if (*global_method == 3) {
+ 		if (PROMPT)
+-			printf("Geometry input file name: ");
++			_printString_("Geometry input file name: ");
+ 	}
+ 
+ 	else if (*global_method == 2) {
+ 		if (PROMPT) {
+-			printf("Eigensolver:\n");
+-			printf("  (1) Multilevel RQI/Symmlq\n");
+-			printf("  (2) Lanczos\n"); 
++			_printLine_("Eigensolver:");
++			_printLine_("  (1) Multilevel RQI/Symmlq");
++			_printLine_("  (2) Lanczos"); 
+ 		}
+ 		eigensolver = (int)options[OPT_RQI];
+ 		if (eigensolver < 0 || eigensolver > 2) {
+@@ -116,11 +116,11 @@
+ 		if (eigensolver == 1) {
+ 			if (MATCH_TYPE == 5) {	/* geometric matching */
+ 				if (PROMPT)
+-					printf("Geometry input file name: ");
++					_printString_("Geometry input file name: ");
+ 			}
+ 			*rqi_flag = 1;
+ 			if (PROMPT)
+-				printf("Number of vertices to coarsen down to: ");
++				_printString_("Number of vertices to coarsen down to: ");
+ 			*vmax = (int)options[OPT_VMAX];
+ 			if (*vmax <= 0) {
+ 				printf("%s -- Vmax %d must be greater then 0.\n",
+@@ -136,10 +136,10 @@
+ 	else if (*global_method == 1) {
+ 		if (MATCH_TYPE == 5) {		/* geometric matching */
+ 			if (PROMPT)
+-				printf("Geometry input file name: ");
++				_printString_("Geometry input file name: ");
+ 		}
+ 		if (PROMPT)
+-			printf("Number of vertices to coarsen down to: ");
++			_printString_("Number of vertices to coarsen down to: ");
+ 		*vmax = (int)options[OPT_VMAX];
+ 		if (*vmax <= 0) {
+ 			printf("%s -- Vmax %d must be greater then 0.\n",
+@@ -167,9 +167,9 @@
+ 		*local_method = 1;
+ 	else {
+ 		if (PROMPT) {
+-			printf("Local refinement method:\n");
+-			printf("  (1) Kernighan-Lin\n");
+-			printf("  (2) None\n");
++			_printLine_("Local refinement method:");
++			_printLine_("  (1) Kernighan-Lin");
++			_printLine_("  (2) None");
+ 		}
+ 		*local_method = (int)options[OPT_LOCAL];
+ 		if (*local_method < 1 || *local_method > 2) {
+@@ -184,10 +184,10 @@
+ 	/* Get total number of hypercube dimensions in which to partition. */
+ 		*ndims_tot = 0;
+ 		if (PROMPT)
+-			printf("Total number of target hypercube dimensions: ");
++			_printString_("Total number of target hypercube dimensions: ");
+ 		*ndims_tot = nparts[0];
+ 		if (*ndims_tot < 1) {
+-			printf(" Number of divisions must be at least 1\n");
++			_printLine_(" Number of divisions must be at least 1");
+ 			printf("%s -- Number of divisions %d must be at least 1.\n",
+ 				   __FUNCT__,nparts[0]);
+ 			return(-1);
+@@ -199,20 +199,20 @@
+ 		mesh_dims[1] = mesh_dims[2] = 1;
+ 		if (*architecture == 2) {
+ 			if (PROMPT)
+-				printf("X and Y extent of of 2-D mesh: ");
++				_printString_("X and Y extent of of 2-D mesh: ");
+ 			mesh_dims[0] = nparts[0];
+ 			mesh_dims[1] = nparts[1];
+ 		}
+ 		else if (*architecture == 3) {
+ 			if (PROMPT)
+-				printf("X, Y and Z extent of 3-D mesh: ");
++				_printString_("X, Y and Z extent of 3-D mesh: ");
+ 			mesh_dims[0] = nparts[0];
+ 			mesh_dims[1] = nparts[1];
+ 			mesh_dims[2] = nparts[2];
+ 		}
+ 		else {			/* Anything else => 1-D mesh */
+ 			if (PROMPT)
+-				printf("Size of 1-D mesh: ");
++				_printString_("Size of 1-D mesh: ");
+ 			mesh_dims[0] = nparts[0];
+ 			*architecture = 1;
+ 		}
+@@ -226,9 +226,9 @@
+ 	}
+ 	else if (*nprocs <= 7) {
+ 		if (PROMPT) {
+-			printf("Partitioning dimension: \n");
+-			printf("  (1) Bisection\n");
+-			printf("  (2) Quadrisection\n");
++			_printLine_("Partitioning dimension: ");
++			_printLine_("  (1) Bisection");
++			_printLine_("  (2) Quadrisection");
+ 		}
+ 		*ndims = (int)options[OPT_NDIMS];
+ 		if (*ndims < 1 || *ndims > 2) {
+@@ -239,10 +239,10 @@
+ 	}
+ 	else {
+ 		if (PROMPT) {
+-			printf("Partitioning dimension: \n");
+-			printf("  (1) Bisection\n");
+-			printf("  (2) Quadrisection\n");
+-			printf("  (3) Octasection\n");
++			_printLine_("Partitioning dimension: ");
++			_printLine_("  (1) Bisection");
++			_printLine_("  (2) Quadrisection");
++			_printLine_("  (3) Octasection");
+ 		}
+ 		*ndims = (int)options[OPT_NDIMS];
+ 		if (*ndims < 1 || *ndims > 3) {
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12511)
+@@ -57,7 +57,7 @@
+ 		_error2_("Error reading exp file.");
+ 	_printf_(true,"Exp2Kmlx -- Reading %d exp profiles from file \"%s\".\n",nprof,filexp);
+ //	for (i=0; i<nprof; i++)
+-//		printf("i=%d; nvert=%d, closed=%d\n",i,pnvert[i],closed[i]);
++//		_printLine_("i=" << i << "; nvert=" << pnvert[i] << ", closed=" << closed[i]);
+ 
+ /*  construct kml file  */
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp	(revision 12511)
+@@ -75,8 +75,8 @@
+ 				}
+ 			}
+ 		}
+-		printf( "\n" );
+-		printf("Number of zeroes remaining: %d",lines*samps-counter);
++		_printLine_( "" );
++		_printString_("Number of zeroes remaining: " << lines*samps-counter);
+ 		fflush( stdout );
+ 	#endif
+ 
+@@ -94,8 +94,8 @@
+ 			}
+ 		}
+ 		//        n u m b e r   o f   z e r o e s   r e m a i n i n g :   1 2 3 4 5 6 7 8 9 10        
+-		printf( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );
+-		printf("Number of zeroes remaining: %d",lines*samps-counter);
++		_printString_( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );
++		_printString_("Number of zeroes remaining: " << lines*samps-counter);
+ 		fflush( stdout );
+ 	#endif
+ 	
+@@ -103,7 +103,7 @@
+ 
+ /***************** FIRST RUN *********************/
+ /*
+-fprintf ( stdout, "First  Application:  " ); time(&t2); printf( ctime(&t2) );
++fprintf ( stdout, "First  Application:  " ); time(&t2); _printString_( ctime(&t2) );
+ */
+ 	for ( i = 0; i < lines; i++ ){
+ 		for ( j = 0; j < samps; j++ ){
+@@ -276,7 +276,7 @@
+ 			//if ( temp <     0 ) temp =     0;
+ 			
+ 			#ifdef _DEBUG2_
+-				//printf("%g %g %g \n",temp,elev,range);
++				//_printLine_("" << temp << " " << elev << " " << range << " ");
+ 			#endif
+ 
+ 			*(image3+samps*i+j) = temp ;			
+@@ -353,8 +353,8 @@
+ 	time(&t2);	
+ 	
+ 	#ifdef _DEBUG2_
+-		printf( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );
+-		printf("Number of zeroes remaining:          0\n\n");
++		_printString_( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );
++		_printLine_("Number of zeroes remaining:          0\n");
+ 		printf ( "\n");
+ 	#endif
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12511)
+@@ -65,13 +65,13 @@
+ 
+ 		observations->ObservationList(&x,&y,&data,&nobs);
+ 
+-		printf("Generation Delaunay Triangulation\n");
++		_printLine_("Generation Delaunay Triangulation");
+ 		BamgTriangulatex(&index,&nel,x,y,nobs);
+ 		indexd =xNewZeroInit<double>(nel*3);
+ 		for(int i=0;i<nel*3;i++) indexd[i]=(double)index[i];
+ 		xDelete<int>(index);
+ 
+-		printf("Interpolating\n");
++		_printLine_("Interpolating");
+ 		xDelete<double>(predictions);
+ 		InterpFromMeshToMesh2dx(&predictions,indexd,x,y,nobs,nel,data,nobs,1,x_interp,y_interp,n_interp,NULL,0,new DataSet());
+ 		xDelete<double>(x);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12511)
+@@ -174,7 +174,7 @@
+ 					data_value=nearestinterp(x1,x2,y1,y2, Q11,Q12,Q21,Q22,x_grid,y_grid);
+ 					break;
+ 				default:
+-					printf("Interpolation %s not supported yet\n",EnumToStringx(interpenum));
++					_printLine_("Interpolation " << EnumToStringx(interpenum) << " not supported yet");
+ 					return NULL; /*WARNING: no error because it would blow up the multithreading!*/
+ 			}
+ 			if(isnan(data_value)) data_value=default_value;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12511)
+@@ -109,10 +109,10 @@
+ 
+ 	/*Synthesize echo: {{{*/
+ 	if(my_rank==0){
+-		printf("   responses: %i: ",d_numresponses);
+-		for(i=0;i<d_numresponses-1;i++)printf("%g|",d_responses[i]);
+-		printf("%g",d_responses[d_numresponses-1]);
+-		printf("\n");
++		_printString_("   responses: " << d_numresponses << ": ");
++		for(i=0;i<d_numresponses-1;i++)_printString_("" << d_responses[i] << "|");
++		_printString_("" << d_responses[d_numresponses-1]);
++		_printLine_("");
+ 	}
+ 	/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp	(revision 12511)
+@@ -40,8 +40,8 @@
+ 		/*Mesh generation {{{*/
+ 
+ 		//Step1: generate geometry Gh
+-		if (verbosity>0) printf("Construction of a mesh from a given geometry\n");
+-		if (verbosity>1) printf("   Processing geometry...\n");
++		if (verbosity>0) _printLine_("Construction of a mesh from a given geometry");
++		if (verbosity>1) _printLine_("   Processing geometry...");
+ 		Geometry Gh(bamggeom_in,bamgopts);
+ 
+ 		//get hmin and hmax from geometry to generate the metric
+@@ -49,7 +49,7 @@
+ 		bamgopts->hmax = Min(bamgopts->hmax,Gh.MaximalHmax());
+ 
+ 		//build metric using geometry
+-		if (verbosity>1) printf("   Generating Metric...\n");
++		if (verbosity>1) _printLine_("   Generating Metric...");
+ 		for(i=0;i<Gh.nbv;i++){
+ 			Metric M=Gh[i];
+ 			EigenMetric Vp(M/coef);
+@@ -59,7 +59,7 @@
+ 		}
+ 
+ 		//generate mesh
+-		if (verbosity>1) printf("   Generating Mesh...\n");
++		if (verbosity>1) _printLine_("   Generating Mesh...");
+ 		Mesh Th(maxnbv,Gh,bamgopts);
+ 
+ 		//Split corners if requested
+@@ -72,9 +72,9 @@
+ 		if(bamgopts->Crack) Th.CrackMesh(bamgopts);
+ 
+ 		//Build output
+-		if (verbosity>1) printf("   Write Mesh...\n");
++		if (verbosity>1) _printLine_("   Write Mesh...");
+ 		Th.WriteMesh(bamgmesh_out,bamgopts);
+-		if (verbosity>1) printf("   Write Geometry...\n");
++		if (verbosity>1) _printLine_("   Write Geometry...");
+ 		Gh.WriteGeometry(bamggeom_out,bamgopts);
+ 
+ 		//clean up
+@@ -86,8 +86,8 @@
+ 		/*Anisotropic mesh adaptation {{{*/
+ 
+ 		// read background mesh 
+-		if (verbosity>0) printf("Anisotropic mesh adaptation\n");
+-		if (verbosity>1) printf("   Processing initial mesh and geometry...\n");
++		if (verbosity>0) _printLine_("Anisotropic mesh adaptation");
++		if (verbosity>1) _printLine_("   Processing initial mesh and geometry...");
+ 		Mesh BTh(bamggeom_in,bamgmesh_in,bamgopts); 
+ 
+ 		//Make Quadtree from background mesh
+@@ -99,24 +99,24 @@
+ 
+ 		//Generate initial metric
+ 		if (bamgopts->metric){
+-			if (verbosity>1) printf("   Processing Metric...\n");
++			if (verbosity>1) _printLine_("   Processing Metric...");
+ 			BTh.ReadMetric(bamgopts);
+ 		}
+ 		else { 
+-			if (verbosity>1) printf("   Generating initial Metric...\n");
++			if (verbosity>1) _printLine_("   Generating initial Metric...");
+ 			Metric Mhmax(bamgopts->hmax);
+ 			for (int iv=0;iv<BTh.nbv;iv++) BTh[iv].m = Mhmax;
+ 		}
+ 
+ 		//use present fields to generate metric if present
+ 		if (bamgopts->field){
+-			if (verbosity>1) printf("   Merge metric with field provided...\n");
++			if (verbosity>1) _printLine_("   Merge metric with field provided...");
+ 			BTh.AddMetric(bamgopts);
+ 		}
+ 
+ 		// change using hVertices if provided
+ 		if(bamgopts->hVertices && bamgopts->hVerticesSize[0]==BTh.nbv){
+-			if (verbosity>1) printf("   Merging Metric with hVertices...\n");
++			if (verbosity>1) _printLine_("   Merging Metric with hVertices...");
+ 			for (i=0;i<BTh.nbv;i++){
+ 				if (!isnan(bamgopts->hVertices[i])){
+ 					BTh[i].m=Metric((float)bamgopts->hVertices[i]);
+@@ -126,7 +126,7 @@
+ 
+ 		// change using hminVertices if provided
+ 		if (bamgopts->hminVertices){
+-			if (verbosity>1) printf("   Merging Metric with hminVertices...\n");
++			if (verbosity>1) _printLine_("   Merging Metric with hminVertices...");
+ 			for (i=0;i<BTh.nbv;i++){
+ 				if (!isnan(bamgopts->hminVertices[i])){
+ 					Metric M=BTh.vertices[i].m;
+@@ -139,7 +139,7 @@
+ 
+ 		// change using hmaxVertices if provided
+ 		if (bamgopts->hmaxVertices){
+-			if (verbosity>1) printf("   Merging Metric with hmaxVertices...\n");
++			if (verbosity>1) _printLine_("   Merging Metric with hmaxVertices...");
+ 			for (i=0;i<BTh.nbv;i++){
+ 				if (!isnan(bamgopts->hmaxVertices[i])){
+ 					Metric M=BTh.vertices[i].m;
+@@ -163,7 +163,7 @@
+ 		BTh.BoundAnisotropy(bamgopts->anisomax,hminaniso);
+ 
+ 		//Build new mesh
+-		if (verbosity>1) printf("   Generating Mesh...\n");
++		if (verbosity>1) _printLine_("   Generating Mesh...");
+ 		Thr=&BTh,Thb=0;
+ 		Mesh & Th( *(0 ?  new Mesh(*Thr,&Thr->Gh,Thb,maxnbv) :  new Mesh(maxnbv,BTh,bamgopts,bamgopts->KeepVertices)));
+ 		if (Thr != &BTh) delete Thr;
+@@ -184,19 +184,19 @@
+ 		//display info
+ 		if(verbosity>0) {
+ 			if (Th.nbt-Th.nbtout-Th.nbq*2){
+-				printf("   new number of triangles = %i\n",(Th.nbt-Th.nbtout-Th.nbq*2));
++				_printLine_("   new number of triangles = " << (Th.nbt-Th.nbtout-Th.nbq*2));
+ 			}
+ 			if (Th.nbq ){
+-				printf("   new number of quads = %i\n",Th.nbq);
++				_printLine_("   new number of quads = " << Th.nbq);
+ 			}
+ 		}
+ 
+ 		//Build output
+-		if (verbosity>1) printf("   Write Mesh...\n");
++		if (verbosity>1) _printLine_("   Write Mesh...");
+ 		Th.WriteMesh(bamgmesh_out,bamgopts);
+-		if (verbosity>1) printf("   Write Geometry...\n");
++		if (verbosity>1) _printLine_("   Write Geometry...");
+ 		Th.Gh.WriteGeometry(bamggeom_out,bamgopts);
+-		if (verbosity>1) printf("   Write Metric...\n");
++		if (verbosity>1) _printLine_("   Write Metric...");
+ 		BTh.WriteMetric(bamgopts);
+ 
+ 		/*clean up*/
+@@ -206,7 +206,7 @@
+ 	}
+ 
+ 	/*No error return*/
+-	if (verbosity>1) printf("   Exiting Bamg.\n");
++	if (verbosity>1) _printLine_("   Exiting Bamg.");
+ 	return noerr;
+ 
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12511)
+@@ -58,9 +58,9 @@
+ void SeqVec::Echo(void){
+ 
+ 	int i;
+-	printf("SeqVec size %i\n",this->M);
++	_printLine_("SeqVec size " << this->M);
+ 	for(i=0;i<M;i++){
+-		printf("%g\n ",vector[i]);
++		_printString_("" << vector[i] << "\n ");
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12511)
+@@ -82,12 +82,12 @@
+ void SeqMat::Echo(void){
+ 
+ 	int i,j;
+-	printf("SeqMat size %i-%i\n",this->M,this->N);
++	_printLine_("SeqMat size " << this->M << "-" << this->N);
+ 	for(i=0;i<M;i++){
+ 		for(j=0;j<N;j++){
+-			printf("%g ",this->matrix[N*i+j]);
++			_printString_("" << this->matrix[N*i+j] << " ");
+ 		}
+-		printf("\n");
++		_printLine_("");
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12511)
+@@ -152,9 +152,9 @@
+ 
+ 	int i;
+ 
+-	printf("DofIndexing:\n");
+-	printf("   gsize: %i\n",gsize);
+-	printf("   clone: %i\n",clone);
++	_printLine_("DofIndexing:");
++	_printLine_("   gsize: " << gsize);
++	_printLine_("   clone: " << clone);
+ }
+ /*}}}*/
+ /*FUNCTION DofIndexing::DeepEcho{{{*/
+@@ -162,49 +162,49 @@
+ 
+ 	int i;
+ 
+-	printf("DofIndexing:\n");
+-	printf("   gsize: %i\n",gsize);
+-	printf("   fsize: %i\n",fsize);
+-	printf("   ssize: %i\n",ssize);
+-	printf("   clone: %i\n",clone);
++	_printLine_("DofIndexing:");
++	_printLine_("   gsize: " << gsize);
++	_printLine_("   fsize: " << fsize);
++	_printLine_("   ssize: " << ssize);
++	_printLine_("   clone: " << clone);
+ 	
+-	printf("   set membership: f,s sets \n");
++	_printLine_("   set membership: f,s sets ");
+ 	for(i=0;i<gsize;i++){
+-		printf("      dof %i: %s %s\n",i,f_set[i]?"true":"false",s_set[i]?"true":"false");
++		_printLine_("      dof " << i << ": " <<(f_set[i]?"true":"false")<< " " <<(s_set[i]?"true":"false"));
+ 	}
+ 
+-	printf("   svalues (%i): |",this->ssize);
++	_printString_("   svalues (" << this->ssize << "): |");
+ 	for(i=0;i<this->gsize;i++){
+-		if(this->s_set[i])printf(" %g |",svalues[i]);
++		if(this->s_set[i])_printString_(" " << svalues[i] << " |");
+ 	}
+-	printf("\n");
++	_printLine_("");
+ 
+ 	if(doftype){
+-		printf("   doftype: |");
++		_printString_("   doftype: |");
+ 		for(i=0;i<gsize;i++){
+-			printf(" %i |",doftype[i]);
++			_printString_(" " << doftype[i] << " |");
+ 		}
+-		printf("\n");
++		_printLine_("");
+ 	}
+-	else printf("   doftype: NULL\n");
++	else _printLine_("   doftype: NULL");
+ 
+-	printf("   g_doflist (%i): |",this->gsize);
++	_printString_("   g_doflist (" << this->gsize << "): |");
+ 	for(i=0;i<this->gsize;i++){
+-		printf(" %i |",gdoflist[i]);
++		_printString_(" " << gdoflist[i] << " |");
+ 	}
+-	printf("\n");
++	_printLine_("");
+ 
+-	printf("   f_doflist (%i): |",this->fsize);
++	_printString_("   f_doflist (" << this->fsize << "): |");
+ 	for(i=0;i<this->fsize;i++){
+-		printf(" %i |",fdoflist[i]);
++		_printString_(" " << fdoflist[i] << " |");
+ 	}
+-	printf("\n");
++	_printLine_("");
+ 
+-	printf("   s_doflist (%i): |",this->ssize);
++	_printString_("   s_doflist (" << this->ssize << "): |");
+ 	for(i=0;i<this->ssize;i++){
+-		printf(" %i |",sdoflist[i]);
++		_printString_(" " << sdoflist[i] << " |");
+ 	}
+-	printf("\n");
++	_printLine_("");
+ }		
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12511)
+@@ -59,22 +59,22 @@
+ /*FUNCTION Matice::Echo {{{*/
+ void Matice::Echo(void){
+ 
+-	printf("Matice:\n");
+-	printf("   mid: %i\n",mid);
+-	printf("   inputs:\n");
++	_printLine_("Matice:");
++	_printLine_("   mid: " << mid);
++	_printLine_("   inputs:");
+ 	inputs->Echo();
+-	printf("   element:\n");
++	_printLine_("   element:");
+ 	helement->Echo();
+ }
+ /*}}}*/
+ /*FUNCTION Matice::DeepEcho {{{*/
+ void Matice::DeepEcho(void){
+ 
+-	printf("Matice:\n");
+-	printf("   mid: %i\n",mid);
+-	printf("   inputs:\n");
++	_printLine_("Matice:");
++	_printLine_("   mid: " << mid);
++	_printLine_("   inputs:");
+ 	inputs->DeepEcho();
+-	printf("   element:\n");
++	_printLine_("   element:");
+ 	helement->Echo();
+ }		
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matpar.cpp	(revision 12511)
+@@ -56,21 +56,21 @@
+ /*FUNCTION Matpar::Echo {{{*/
+ void Matpar::Echo(void){
+ 
+-	printf("Matpar:\n");
+-	printf("   mid: %i\n",mid);
+-	printf("   rho_ice: %g\n",rho_ice);
+-	printf("   rho_water: %g\n",rho_water);
+-	printf("   rho_freshwater: %g\n",rho_freshwater);
+-	printf("   mu_water: %g\n",mu_water);
+-	printf("   heatcapacity: %g\n",heatcapacity);
+-	printf("   thermalconductivity: %g\n",thermalconductivity);
+-	printf("   latentheat: %g\n",latentheat);
+-	printf("   beta: %g\n",beta);
+-	printf("   meltingpoint: %g\n",meltingpoint);
+-	printf("   referencetemperature: %g\n",referencetemperature);
+-	printf("   mixed_layer_capacity: %g\n",mixed_layer_capacity);
+-	printf("   thermal_exchange_velocity: %g\n",thermal_exchange_velocity);
+-	printf("   g: %g\n",g);
++	_printLine_("Matpar:");
++	_printLine_("   mid: " << mid);
++	_printLine_("   rho_ice: " << rho_ice);
++	_printLine_("   rho_water: " << rho_water);
++	_printLine_("   rho_freshwater: " << rho_freshwater);
++	_printLine_("   mu_water: " << mu_water);
++	_printLine_("   heatcapacity: " << heatcapacity);
++	_printLine_("   thermalconductivity: " << thermalconductivity);
++	_printLine_("   latentheat: " << latentheat);
++	_printLine_("   beta: " << beta);
++	_printLine_("   meltingpoint: " << meltingpoint);
++	_printLine_("   referencetemperature: " << referencetemperature);
++	_printLine_("   mixed_layer_capacity: " << mixed_layer_capacity);
++	_printLine_("   thermal_exchange_velocity: " << thermal_exchange_velocity);
++	_printLine_("   g: " << g);
+ 	return;
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussTria.cpp	(revision 12511)
+@@ -107,38 +107,38 @@
+ /*FUNCTION GaussTria::Echo{{{*/
+ void GaussTria::Echo(void){
+ 
+-	printf("GaussTria:\n");
+-	printf("   numgauss: %i\n",numgauss);
++	_printLine_("GaussTria:");
++	_printLine_("   numgauss: " << numgauss);
+ 
+ 	if (weights){
+-	 printf("   weights = ["); 
+-	 for(int i=0;i<numgauss;i++) printf(" %g\n",weights[i]);
+-	 printf("]\n");
++	 _printString_("   weights = ["); 
++	 for(int i=0;i<numgauss;i++) _printLine_(" " << weights[i]);
++	 _printLine_("]");
+ 	}
+-	else printf("weights = NULL\n");
++	else _printLine_("weights = NULL");
+ 	if (coords1){
+-	 printf("   coords1 = ["); 
+-	 for(int i=0;i<numgauss;i++) printf(" %g\n",coords1[i]);
+-	 printf("]\n");
++	 _printString_("   coords1 = ["); 
++	 for(int i=0;i<numgauss;i++) _printLine_(" " << coords1[i]);
++	 _printLine_("]");
+ 	}
+-	else printf("coords1 = NULL\n");
++	else _printLine_("coords1 = NULL");
+ 	if (coords2){
+-	 printf("   coords2 = ["); 
+-	 for(int i=0;i<numgauss;i++) printf(" %g\n",coords2[i]);
+-	 printf("]\n");
++	 _printString_("   coords2 = ["); 
++	 for(int i=0;i<numgauss;i++) _printLine_(" " << coords2[i]);
++	 _printLine_("]");
+ 	}
+-	else printf("coords2 = NULL\n");
++	else _printLine_("coords2 = NULL");
+ 	if (coords3){
+-	 printf("   coords3 = ["); 
+-	 for(int i=0;i<numgauss;i++) printf(" %g\n",coords3[i]);
+-	 printf("]\n");
++	 _printString_("   coords3 = ["); 
++	 for(int i=0;i<numgauss;i++) _printLine_(" " << coords3[i]);
++	 _printLine_("]");
+ 	}
+-	else printf("coords3 = NULL\n");
++	else _printLine_("coords3 = NULL");
+ 
+-	printf("   weight = %g\n",weight);
+-	printf("   coord1 = %g\n",coord1);
+-	printf("   coord2 = %g\n",coord2);
+-	printf("   coord3 = %g\n",coord3);
++	_printLine_("   weight = " << weight);
++	_printLine_("   coord1 = " << coord1);
++	_printLine_("   coord2 = " << coord2);
++	_printLine_("   coord3 = " << coord3);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp	(revision 12511)
+@@ -246,45 +246,45 @@
+ /*FUNCTION GaussPenta::Echo{{{*/
+ void GaussPenta::Echo(void){
+ 
+-	printf("GaussPenta:\n");
+-	printf("   numgauss: %i\n",numgauss);
++	_printLine_("GaussPenta:");
++	_printLine_("   numgauss: " << numgauss);
+ 
+ 	if (weights){
+-	 printf("   weights = ["); 
+-	 for(int i=0;i<numgauss;i++) printf(" %g\n",weights[i]);
+-	 printf("]\n");
++	 _printString_("   weights = ["); 
++	 for(int i=0;i<numgauss;i++) _printLine_(" " << weights[i]);
++	 _printLine_("]");
+ 	}
+-	else printf("weights = NULL\n");
++	else _printLine_("weights = NULL");
+ 	if (coords1){
+-	 printf("   coords1 = ["); 
+-	 for(int i=0;i<numgauss;i++) printf(" %g\n",coords1[i]);
+-	 printf("]\n");
++	 _printString_("   coords1 = ["); 
++	 for(int i=0;i<numgauss;i++) _printLine_(" " << coords1[i]);
++	 _printLine_("]");
+ 	}
+-	else printf("coords1 = NULL\n");
++	else _printLine_("coords1 = NULL");
+ 	if (coords2){
+-	 printf("   coords2 = ["); 
+-	 for(int i=0;i<numgauss;i++) printf(" %g\n",coords2[i]);
+-	 printf("]\n");
++	 _printString_("   coords2 = ["); 
++	 for(int i=0;i<numgauss;i++) _printLine_(" " << coords2[i]);
++	 _printLine_("]");
+ 	}
+-	else printf("coords2 = NULL\n");
++	else _printLine_("coords2 = NULL");
+ 	if (coords3){
+-	 printf("   coords3 = ["); 
+-	 for(int i=0;i<numgauss;i++) printf(" %g\n",coords3[i]);
+-	 printf("]\n");
++	 _printString_("   coords3 = ["); 
++	 for(int i=0;i<numgauss;i++) _printLine_(" " << coords3[i]);
++	 _printLine_("]");
+ 	}
+-	else printf("coords3 = NULL\n");
++	else _printLine_("coords3 = NULL");
+ 	if (coords4){
+-		printf("   coords4 = ["); 
+-		for(int i=0;i<numgauss;i++) printf(" %g\n",coords4[i]);
+-		printf("]\n");
++		_printString_("   coords4 = ["); 
++		for(int i=0;i<numgauss;i++) _printLine_(" " << coords4[i]);
++		_printLine_("]");
+ 	}
+-	else printf("coords4 = NULL\n");
++	else _printLine_("coords4 = NULL");
+ 
+-	printf("   weight = %g\n",weight);
+-	printf("   coord1 = %g\n",coord1);
+-	printf("   coord2 = %g\n",coord2);
+-	printf("   coord3 = %g\n",coord3);
+-	printf("   coord4 = %g\n",coord4);
++	_printLine_("   weight = " << weight);
++	_printLine_("   coord1 = " << coord1);
++	_printLine_("   coord2 = " << coord2);
++	_printLine_("   coord3 = " << coord3);
++	_printLine_("   coord4 = " << coord4);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/FileParam.cpp	(revision 12511)
+@@ -47,9 +47,9 @@
+ /*FUNCTION FileParam::DeepEcho{{{*/
+ void FileParam::DeepEcho(void){
+ 
+-	printf("FileParam:\n");
+-	printf("   enum:  %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %p\n",this->value);
++	_printLine_("FileParam:");
++	_printLine_("   enum:  " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: " << this->value);
+ }
+ /*}}}*/
+ /*FUNCTION FileParam::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12511)
+@@ -62,9 +62,9 @@
+ /*FUNCTION IntVecParam::Echo {{{*/
+ void IntVecParam::Echo(void){
+ 
+-	printf("IntVecParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   vector size: %i\n",this->M);
++	_printLine_("IntVecParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   vector size: " << this->M);
+ 
+ }
+ /*}}}*/
+@@ -73,11 +73,11 @@
+ 
+ 	int i;
+ 	
+-	printf("IntVecParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   vector size: %i\n",this->M);
++	_printLine_("IntVecParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   vector size: " << this->M);
+ 	for(i=0;i<this->M;i++){
+-		printf("%i %i\n",i,this->values[i]);
++		_printLine_("" << i << " " << this->values[i]);
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.cpp	(revision 12511)
+@@ -47,9 +47,9 @@
+ /*FUNCTION IntParam::DeepEcho{{{*/
+ void IntParam::DeepEcho(void){
+ 
+-	printf("IntParam:\n");
+-	printf("   enum:  %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %i\n",this->value);
++	_printLine_("IntParam:");
++	_printLine_("   enum:  " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: " << this->value);
+ }
+ /*}}}*/
+ /*FUNCTION IntParam::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.cpp	(revision 12511)
+@@ -47,9 +47,9 @@
+ /*FUNCTION BoolParam::DeepEcho{{{*/
+ void BoolParam::DeepEcho(void){
+ 
+-	printf("BoolParam:\n");
+-	printf("   enum:  %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %s\n",this->value?"true":"false");
++	_printLine_("BoolParam:");
++	_printLine_("   enum:  " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: " <<(this->value?"true":"false"));
+ }
+ /*}}}*/
+ /*FUNCTION BoolParam::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12511)
+@@ -47,9 +47,9 @@
+ /*FUNCTION IntMatParam::Echo {{{*/
+ void IntMatParam::Echo(void){
+ 
+-	printf("IntMatParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   matrix size: %ix%i\n",this->M,this->N);
++	_printLine_("IntMatParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   matrix size: " << this->M << "x" << this->N);
+ 
+ }
+ /*}}}*/
+@@ -58,12 +58,12 @@
+ 
+ 	int i,j;
+ 	
+-	printf("IntMatParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   matrix size: %ix%i\n",this->M,this->N);
++	_printLine_("IntMatParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   matrix size: " << this->M << "x" << this->N);
+ 	for(i=0;i<this->M;i++){
+ 		for(i=0;i<this->N;i++){
+-			printf("(%i,%i) %i\n",i,j,*(this->value+N*i+j));
++			_printLine_("(" << i << "," << j << ") " << *(this->value+N*i+j));
+ 		}
+ 	}
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/VectorParam.cpp	(revision 12511)
+@@ -48,8 +48,8 @@
+ /*FUNCTION VectorParam::Echo {{{*/
+ void VectorParam::Echo(void){
+ 
+-	printf("VectorParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
++	_printLine_("VectorParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
+ 
+ }
+ /*}}}*/
+@@ -57,8 +57,8 @@
+ void VectorParam::DeepEcho(void){
+ 
+ 	int i;
+-	printf("VectorParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
++	_printLine_("VectorParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
+ 	value->Echo();
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/MatrixParam.cpp	(revision 12511)
+@@ -46,8 +46,8 @@
+ /*FUNCTION MatrixParam::Echo {{{*/
+ void MatrixParam::Echo(void){
+ 
+-	printf("MatrixParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
++	_printLine_("MatrixParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
+ 
+ }
+ /*}}}*/
+@@ -55,8 +55,8 @@
+ void MatrixParam::DeepEcho(void){
+ 
+ 	int i;
+-	printf("MatrixParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
++	_printLine_("MatrixParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
+ 	this->value->Echo();
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12511)
+@@ -74,11 +74,11 @@
+ 	int i;
+ 	char* string=NULL;
+ 
+-	printf("StringArrayParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
++	_printLine_("StringArrayParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
+ 	for(i=0;i<this->numstrings;i++){
+ 		string=this->value[i];
+-		printf("   %i: %s\n",i,string);
++		_printLine_("   " << i << ": " << string);
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12511)
+@@ -49,9 +49,9 @@
+ /*}}}*/
+ /*FUNCTION StringParam::DeepEcho{{{*/
+ void StringParam::DeepEcho(void){
+-	printf("StringParam:\n");
+-	printf("   enum:  %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %s\n",this->value);
++	_printLine_("StringParam:");
++	_printLine_("   enum:  " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: " << this->value);
+ }
+ /*}}}*/
+ /*FUNCTION StringParam::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12511)
+@@ -46,9 +46,9 @@
+ /*FUNCTION DoubleVecParam::Echo {{{*/
+ void DoubleVecParam::Echo(void){
+ 
+-	printf("DoubleVecParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   vector size: %i\n",this->M);
++	_printLine_("DoubleVecParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   vector size: " << this->M);
+ 
+ }
+ /*}}}*/
+@@ -57,11 +57,11 @@
+ 
+ 	int i;
+ 	
+-	printf("DoubleVecParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   vector size: %i\n",this->M);
++	_printLine_("DoubleVecParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   vector size: " << this->M);
+ 	for(i=0;i<this->M;i++){
+-		printf("%i %g\n",i,this->values[i]);
++		_printLine_("" << i << " " << this->values[i]);
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12511)
+@@ -44,9 +44,9 @@
+ /*FUNCTION DoubleParam::DeepEcho{{{*/
+ void DoubleParam::DeepEcho(void){
+ 
+-	printf("DoubleParam:\n");
+-	printf("   enum:  %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %g\n",this->value);
++	_printLine_("DoubleParam:");
++	_printLine_("   enum:  " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: " << this->value);
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12511)
+@@ -86,10 +86,10 @@
+ /*FUNCTION DoubleMatArrayParam::Echo {{{*/
+ void DoubleMatArrayParam::Echo(void){
+ 
+-	printf("DoubleMatArrayParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   array size: %i\n",this->M);
+-	printf("   array pointer: %p\n",this->array);
++	_printLine_("DoubleMatArrayParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   array size: " << this->M);
++	_printLine_("   array pointer: " << this->array);
+ 
+ }
+ /*}}}*/
+@@ -100,19 +100,19 @@
+ 	int m,n;
+ 	IssmDouble* matrix=NULL;
+ 	
+-	printf("DoubleMatArrayParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   array size: %i\n",this->M);
++	_printLine_("DoubleMatArrayParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   array size: " << this->M);
+ 	for(i=0;i<M;i++){
+-		printf("   array %i (%ix%i):\n",i,mdim_array[i],ndim_array[i]);
++		_printLine_("   array " << i << " (" << mdim_array[i] << "x" << ndim_array[i] << "):");
+ 		matrix=array[i];
+ 		m=mdim_array[i];
+ 		n=ndim_array[i];
+ 
+ 		for(j=0;j<m;j++){
+-			printf("   ");
+-			for(k=0;k<n;k++)printf("%g ",*(matrix+n*j+k));
+-			printf("\n");
++			_printString_("   ");
++			for(k=0;k<n;k++)_printString_("" << *(matrix+n*j+k) << " ");
++			_printLine_("");
+ 		}
+ 	}
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12511)
+@@ -47,9 +47,9 @@
+ /*FUNCTION DoubleMatParam::Echo {{{*/
+ void DoubleMatParam::Echo(void){
+ 
+-	printf("DoubleMatParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   matrix size: %ix%i\n",this->M,this->N);
++	_printLine_("DoubleMatParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   matrix size: " << this->M << "x" << this->N);
+ 
+ }
+ /*}}}*/
+@@ -58,12 +58,12 @@
+ 
+ 	int i,j;
+ 	
+-	printf("DoubleMatParam:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   matrix size: %ix%i\n",this->M,this->N);
++	_printLine_("DoubleMatParam:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   matrix size: " << this->M << "x" << this->N);
+ 	for(i=0;i<this->M;i++){
+ 		for(i=0;i<this->N;i++){
+-			printf("%i %i %g\n",i,j,*(this->value+N*i+j));
++			_printLine_("" << i << " " << j << " " << *(this->value+N*i+j));
+ 		}
+ 	}
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Segment.cpp	(revision 12511)
+@@ -48,10 +48,10 @@
+ /*FUNCTION Segment::Echo{{{*/
+ void Segment::Echo(void){
+ 
+-	printf("Segment:\n");
+-	printf("   eid: %i\n",eid);
+-	printf("   node 1: %g|%g\n",this->x1,this->y1);
+-	printf("   node 2: %g|%g\n",this->x2,this->y2);
++	_printLine_("Segment:");
++	_printLine_("   eid: " << eid);
++	_printLine_("   node 1: " << this->x1 << "|" << this->y1);
++	_printLine_("   node 2: " << this->x2 << "|" << this->y2);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12511)
+@@ -129,12 +129,12 @@
+ 
+ 	#ifdef _HAVE_ADOLC_
+ 	/*Not sure about that one. Should we use the overloaded operator >>?*/
+-	printf("ADOLC Matrix equivalent:" );
++	_printString_("ADOLC Matrix equivalent:" );
+ 	for(i=0;i<M;i++){
+ 		for(j=0;j<N;j++){
+-			printf("%g ",*(amatrix+N*i+j));
++			_printString_("" << *(amatrix+N*i+j) << " ");
+ 		}
+-		printf("\n");
++		_printLine_("");
+ 	}
+ 	#endif
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Vertex.cpp	(revision 12511)
+@@ -63,16 +63,16 @@
+ /*FUNCTION Vertex::Echo{{{*/
+ void Vertex::Echo(void){
+ 
+-	printf("Vertex:\n");
+-	printf("   id: %i\n",id);
+-	printf("   sid: %i\n",sid);
+-	printf("   x: %g\n",x);
+-	printf("   y: %g\n",y);
+-	printf("   z: %g\n",z);
+-	printf("   sigma: %g\n",sigma);
+-	printf("   connectivity: %i\n",connectivity);
+-	printf("   dof: %i\n",dof);
+-	printf("   clone: %i\n",clone);
++	_printLine_("Vertex:");
++	_printLine_("   id: " << id);
++	_printLine_("   sid: " << sid);
++	_printLine_("   x: " << x);
++	_printLine_("   y: " << y);
++	_printLine_("   z: " << z);
++	_printLine_("   sigma: " << sigma);
++	_printLine_("   connectivity: " << connectivity);
++	_printLine_("   dof: " << dof);
++	_printLine_("   clone: " << clone);
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12511)
+@@ -150,29 +150,29 @@
+ /*Object virtual functions definitions:*/
+ /*FUNCTION Numericalflux::Echo {{{*/
+ void Numericalflux::Echo(void){
+-	printf("Numericalflux:\n");
+-	printf("   id: %i\n",id);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
++	_printLine_("Numericalflux:");
++	_printLine_("   id: " << id);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	hnodes->Echo();
+ 	helement->Echo();
+-	printf("   parameters: %p\n",parameters);
+-	printf("   inputs: %p\n",inputs);
++	_printLine_("   parameters: " << parameters);
++	_printLine_("   inputs: " << inputs);
+ }
+ /*}}}*/
+ /*FUNCTION Numericalflux::DeepEcho {{{*/
+ void Numericalflux::DeepEcho(void){
+ 
+-	printf("Numericalflux:\n");
+-	printf("   id: %i\n",id);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
++	_printLine_("Numericalflux:");
++	_printLine_("   id: " << id);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	hnodes->DeepEcho();
+ 	helement->DeepEcho();
+-	printf("   parameters\n");
++	_printLine_("   parameters");
+ 	if(parameters)
+ 	 parameters->DeepEcho();
+ 	else
+-	 printf("      NULL\n");
+-	printf("   inputs\n");
++	 _printLine_("      NULL");
++	_printLine_("   inputs");
+ 	inputs->DeepEcho();
+ 	
+ }		
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Penpair.cpp	(revision 12511)
+@@ -56,9 +56,9 @@
+ 
+ 	int i;
+ 
+-	printf("Penpair:\n");
+-	printf("   id: %i\n",id);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
++	_printLine_("Penpair:");
++	_printLine_("   id: " << id);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	hnodes->Echo();
+ 	
+ 	return;
+@@ -67,9 +67,9 @@
+ /*FUNCTION Penpair::DeepEcho {{{*/
+ void Penpair::DeepEcho(void){
+ 
+-	printf("Penpair:\n");
+-	printf("   id: %i\n",id);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
++	_printLine_("Penpair:");
++	_printLine_("   id: " << id);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	hnodes->DeepEcho();
+ 
+ 	return;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Pengrid.cpp	(revision 12511)
+@@ -108,17 +108,17 @@
+ /*FUNCTION Pengrid::DeepEcho{{{*/
+ void Pengrid::DeepEcho(void){
+ 
+-	printf("Pengrid:\n");
+-	printf("   id: %i\n",id);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
++	_printLine_("Pengrid:");
++	_printLine_("   id: " << id);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	hnode->DeepEcho();
+ 	helement->DeepEcho();
+ 	hmatpar->DeepEcho();
+-	printf("   active %i\n",this->active);
+-	printf("   zigzag_counter %i\n",this->zigzag_counter);
+-	printf("   parameters\n");
++	_printLine_("   active " << this->active);
++	_printLine_("   zigzag_counter " << this->zigzag_counter);
++	_printLine_("   parameters");
+ 	parameters->DeepEcho();
+-	printf("   inputs\n");
++	_printLine_("   inputs");
+ 	inputs->DeepEcho();
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12511)
+@@ -126,30 +126,30 @@
+ /*Object virtual functions definitions:*/
+ /*FUNCTION Icefront::Echo {{{*/
+ void Icefront::Echo(void){
+-	printf("Icefront:\n");
+-	printf("   id: %i\n",id);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
++	_printLine_("Icefront:");
++	_printLine_("   id: " << id);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	hnodes->Echo();
+ 	helement->Echo();
+ 	hmatpar->Echo();
+-	printf("   parameters: %p\n",parameters);
++	_printLine_("   parameters: " << parameters);
+ 	if(parameters)parameters->Echo();
+-	printf("   inputs: %p\n",inputs);
++	_printLine_("   inputs: " << inputs);
+ 	if(inputs)inputs->Echo();
+ }
+ /*}}}*/
+ /*FUNCTION Icefront::DeepEcho{{{*/
+ void Icefront::DeepEcho(void){
+ 
+-	printf("Icefront:\n");
+-	printf("   id: %i\n",id);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
++	_printLine_("Icefront:");
++	_printLine_("   id: " << id);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	hnodes->DeepEcho();
+ 	helement->DeepEcho();
+ 	hmatpar->DeepEcho();
+-	printf("   parameters: %p\n",parameters);
++	_printLine_("   parameters: " << parameters);
+ 	if(parameters)parameters->DeepEcho();
+-	printf("   inputs: %p\n",inputs);
++	_printLine_("   inputs: " << inputs);
+ 	if(inputs)inputs->DeepEcho();
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12511)
+@@ -47,9 +47,9 @@
+ /*methods: */
+ /*FUNCTION Friction::Echo {{{*/
+ void Friction::Echo(void){
+-	printf("Friction:\n");
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
+-	printf("   element_type: %s\n",this->element_type);
++	_printLine_("Friction:");
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
++	_printLine_("   element_type: " << this->element_type);
+ 	inputs->Echo();
+ 	matpar->Echo();
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12511)
+@@ -142,43 +142,43 @@
+ 	input=(Input*)this->inputs->GetInput(FrictionEnum); input->GetInputValue(&friction);
+ 	input=(Input*)this->inputs->GetInput(FractionIncrementEnum); input->GetInputValue(&fractionincrement);
+ 
+-	printf("Riftfront:\n");
+-	printf("   id: %i\n",id);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
+-	printf("   hnodes: %p\n",hnodes);
+-	printf("   helements: %p\n",helements);
+-	printf("   hmatpar: %p\n",hmatpar);
+-	printf("   parameters: %p\n",parameters);
+-	printf("   inputs: %p\n",inputs);
+-	printf("   internal parameters: \n");
+-	printf("   normal: %g|%g\n",normal[0],normal[1]);
+-	printf("   length: %g\n",length);
+-	printf("   penalty_lock: %i\n",penalty_lock);
+-	printf("   active: %s\n",active ? "true":"false");
+-	printf("   counter: %i\n",counter);
+-	printf("   prestable: %s\n",prestable ? "true":"false");
+-	printf("   material_converged: %s\n",material_converged ? "true":"false");
+-	printf("   fill: %i\n",fill);
+-	printf("   friction: %g\n",friction);
+-	printf("   fraction: %g\n",fraction);
+-	printf("   fractionincrement: %g\n",fractionincrement);
+-	printf("   state: %i\n",state);
+-	printf("   frozen: %s\n",frozen ? "true":"false");
++	_printLine_("Riftfront:");
++	_printLine_("   id: " << id);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
++	_printLine_("   hnodes: " << hnodes);
++	_printLine_("   helements: " << helements);
++	_printLine_("   hmatpar: " << hmatpar);
++	_printLine_("   parameters: " << parameters);
++	_printLine_("   inputs: " << inputs);
++	_printLine_("   internal parameters: ");
++	_printLine_("   normal: " << normal[0] << "|" << normal[1]);
++	_printLine_("   length: " << length);
++	_printLine_("   penalty_lock: " << penalty_lock);
++	_printLine_("   active: " <<(active ? "true":"false"));
++	_printLine_("   counter: " << counter);
++	_printLine_("   prestable: " << (prestable ? "true":"false"));
++	_printLine_("   material_converged: " << (material_converged ? "true":"false"));
++	_printLine_("   fill: " << fill);
++	_printLine_("   friction: " << friction);
++	_printLine_("   fraction: " << fraction);
++	_printLine_("   fractionincrement: " << fractionincrement);
++	_printLine_("   state: " << state);
++	_printLine_("   frozen: " << (frozen ? "true":"false"));
+ 		
+ }
+ /*}}}*/
+ /*FUNCTION Riftfront::DeepEcho{{{*/
+ void Riftfront::DeepEcho(void){
+ 
+-	printf("Riftfront:\n");
+-	printf("   id: %i\n",id);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
++	_printLine_("Riftfront:");
++	_printLine_("   id: " << id);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	hnodes->DeepEcho();
+ 	helements->DeepEcho();
+ 	hmatpar->DeepEcho();
+-	printf("   parameters\n");
++	_printLine_("   parameters");
+ 	if(parameters)parameters->DeepEcho();
+-	printf("   inputs\n");
++	_printLine_("   inputs");
+ 	if(inputs)inputs->DeepEcho();
+ }
+ /*}}}*/
+@@ -632,7 +632,7 @@
+ 		/*increase melange fraction: */
+ 		this->fraction+=fractionincrement;
+ 		if (this->fraction>1)this->fraction=(IssmDouble)1.0;
+-		//printf("riftfront %i fraction: %g\n",this->Id(),this->fraction);
++		//_printLine_("riftfront " << this->Id() << " fraction: " << this->fraction);
+ 	}
+ 
+ 	//Figure out stability of this penalty
+@@ -647,7 +647,7 @@
+ 	//Set penalty flag
+ 	this->active=activate;
+ 
+-	//if ((penetration>0) && (this->active==1))printf("Riftfront %i wants to be released\n",Id());
++	//if ((penetration>0) && (this->active==1))_printLine_("Riftfront " << Id() << " wants to be released");
+ 
+ 	/*assign output pointer: */
+ 	*punstable=unstable;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12511)
+@@ -56,11 +56,11 @@
+ /*FUNCTION DoubleMatExternalResult::Echo {{{*/
+ void DoubleMatExternalResult::Echo(void){
+ 
+-	printf("DoubleMatExternalResult:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   step: %i\n",this->step);
+-	printf("   time: %g\n",this->time);
+-	printf("   matrix size: %i-%i\n",this->M,this->N);
++	_printLine_("DoubleMatExternalResult:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   step: " << this->step);
++	_printLine_("   time: " << this->time);
++	_printLine_("   matrix size: " << this->M << "-" << this->N);
+ 
+ }
+ /*}}}*/
+@@ -69,12 +69,12 @@
+ 
+ 	int i,j;
+ 	
+-	printf("DoubleMatExternalResult:\n");
+-	printf("   id: %i\n",this->id);
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   step: %i\n",this->step);
+-	printf("   time: %g\n",this->time);
+-	printf("   matrix size: %i-%i\n",this->M,this->N);
++	_printLine_("DoubleMatExternalResult:");
++	_printLine_("   id: " << this->id);
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   step: " << this->step);
++	_printLine_("   time: " << this->time);
++	_printLine_("   matrix size: " << this->M << "-" << this->N);
+ 	for (i=0;i<this->M;i++){  
+ 		_printString_("   [ ");
+ 		for (j=0;j<this->N;j++){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12511)
+@@ -53,8 +53,8 @@
+ /*FUNCTION PetscVecExternalResult::Echo {{{*/
+ void PetscVecExternalResult::Echo(void){
+ 
+-	printf("PetscVecExternalResult:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
++	_printLine_("PetscVecExternalResult:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
+ 
+ }
+ /*}}}*/
+@@ -62,11 +62,11 @@
+ void PetscVecExternalResult::DeepEcho(void){
+ 
+ 	int i;
+-	printf("PetscVecExternalResult:\n");
+-	printf("   id: %i\n",this->id);
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   step: %i\n",this->step);
+-	printf("   time: %g\n",this->time);
++	_printLine_("PetscVecExternalResult:");
++	_printLine_("   id: " << this->id);
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   step: " << this->step);
++	_printLine_("   time: " << this->time);
+ 	VecView(value,PETSC_VIEWER_STDOUT_WORLD);
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12511)
+@@ -52,12 +52,12 @@
+ /*FUNCTION StringExternalResult::DeepEcho{{{*/
+ void StringExternalResult::DeepEcho(void){
+ 
+-	printf("StringExternalResult:\n");
+-	printf("   id: %i\n",this->id);
+-	printf("   enum:  %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %s\n",this->value);
+-	printf("   step: %i\n",this->step);
+-	printf("   time: %g\n",this->time);
++	_printLine_("StringExternalResult:");
++	_printLine_("   id: " << this->id);
++	_printLine_("   enum:  " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: " << this->value);
++	_printLine_("   step: " << this->step);
++	_printLine_("   time: " << this->time);
+ }
+ /*}}}*/
+ /*FUNCTION StringExternalResult::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12511)
+@@ -53,11 +53,11 @@
+ /*FUNCTION DoubleVecExternalResult::Echo {{{*/
+ void DoubleVecExternalResult::Echo(void){
+ 
+-	printf("DoubleVecExternalResult:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   vector size: %i\n",this->M);
+-	printf("   step: %i\n",this->step);
+-	printf("   time: %g\n",this->time);
++	_printLine_("DoubleVecExternalResult:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   vector size: " << this->M);
++	_printLine_("   step: " << this->step);
++	_printLine_("   time: " << this->time);
+ 
+ }
+ /*}}}*/
+@@ -66,15 +66,15 @@
+ 
+ 	int i;
+ 	
+-	printf("DoubleVecExternalResult:\n");
+-	printf("   id: %i\n",this->id);
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   vector size: %i\n",this->M);
++	_printLine_("DoubleVecExternalResult:");
++	_printLine_("   id: " << this->id);
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   vector size: " << this->M);
+ 	for(i=0;i<this->M;i++){
+-		printf("%i %g\n",i,this->values[i]);
++		_printLine_("" << i << " " << this->values[i]);
+ 	}
+-	printf("   step: %i\n",this->step);
+-	printf("   time: %g\n",this->time);
++	_printLine_("   step: " << this->step);
++	_printLine_("   time: " << this->time);
+ }
+ /*}}}*/
+ /*FUNCTION DoubleVecExternalResult::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12511)
+@@ -50,12 +50,12 @@
+ /*FUNCTION DoubleExternalResult::DeepEcho{{{*/
+ void DoubleExternalResult::DeepEcho(void){
+ 
+-	printf("DoubleExternalResult:\n");
+-	printf("   id: %i\n",this->id);
+-	printf("   enum:  %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %g\n",this->value);
+-	printf("   step: %i\n",this->step);
+-	printf("   time: %g\n",this->time);
++	_printLine_("DoubleExternalResult:");
++	_printLine_("   id: " << this->id);
++	_printLine_("   enum:  " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: " << this->value);
++	_printLine_("   step: " << this->step);
++	_printLine_("   time: " << this->time);
+ }
+ /*}}}*/
+ /*FUNCTION DoubleExternalResult::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12511)
+@@ -50,12 +50,12 @@
+ /*FUNCTION IntExternalResult::DeepEcho{{{*/
+ void IntExternalResult::DeepEcho(void){
+ 
+-	printf("IntExternalResult:\n");
+-	printf("   id: %i\n",this->id);
+-	printf("   enum:  %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %i\n",this->value);
+-	printf("   step: %i\n",this->step);
+-	printf("   time: %g\n",this->time);
++	_printLine_("IntExternalResult:");
++	_printLine_("   id: " << this->id);
++	_printLine_("   enum:  " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: " << this->value);
++	_printLine_("   step: " << this->step);
++	_printLine_("   time: " << this->time);
+ }
+ /*}}}*/
+ /*FUNCTION IntExternalResult::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12511)
+@@ -50,12 +50,12 @@
+ /*FUNCTION BoolExternalResult::DeepEcho{{{*/
+ void BoolExternalResult::DeepEcho(void){
+ 
+-	printf("BoolExternalResult:\n");
+-	printf("   id: %i\n",this->id);
+-	printf("   enum:  %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %s\n",this->value?"true":"false");
+-	printf("   step: %i\n",this->step);
+-	printf("   time: %g\n",this->time);
++	_printLine_("BoolExternalResult:");
++	_printLine_("   id: " << this->id);
++	_printLine_("   enum:  " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: " <<(this->value?"true":"false"));
++	_printLine_("   step: " << this->step);
++	_printLine_("   time: " << this->time);
+ }
+ /*}}}*/
+ /*FUNCTION BoolExternalResult::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp	(revision 12511)
+@@ -101,12 +101,12 @@
+ /*FUNCTION FemModel::Echo {{{*/
+ void FemModel::Echo(void){
+ 
+-	printf("FemModel echo: \n");
+-	printf("   number of fem models: %i\n",nummodels);
+-	printf("   analysis_type_list: \n");
+-	for(int i=0;i<nummodels;i++)printf("     %i: %s\n",i,EnumToStringx(analysis_type_list[i]));
+-	printf("   current analysis_type: \n");
+-	printf("     %i: %s\n",analysis_counter,EnumToStringx(analysis_type_list[analysis_counter]));
++	_printLine_("FemModel echo: ");
++	_printLine_("   number of fem models: " << nummodels);
++	_printLine_("   analysis_type_list: ");
++	for(int i=0;i<nummodels;i++)_printLine_("     " << i << ": " << EnumToStringx(analysis_type_list[i]));
++	_printLine_("   current analysis_type: ");
++	_printLine_("     " << analysis_counter << ": " << EnumToStringx(analysis_type_list[analysis_counter]));
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12511)
+@@ -49,11 +49,11 @@
+ /*FUNCTION PentaP1ElementResult::DeepEcho{{{*/
+ void PentaP1ElementResult::DeepEcho(void){
+ 
+-	printf("PentaP1ElementResult:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   values: [%g %g %g %g %g %g]\n",this->values[0],this->values[1],this->values[2],this->values[3],this->values[4],this->values[5]);
+-	printf("   step: %i\n",this->step);
+-	printf("   time: %g\n",this->time);
++	_printLine_("PentaP1ElementResult:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   values: [" << this->values[0] << " " << this->values[1] << " " << this->values[2] << " " << this->values[3] << " " << this->values[4] << " " << this->values[5] << "]");
++	_printLine_("   step: " << this->step);
++	_printLine_("   time: " << this->time);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp	(revision 12511)
+@@ -47,11 +47,11 @@
+ /*FUNCTION DoubleElementResult::DeepEcho{{{*/
+ void DoubleElementResult::DeepEcho(void){
+ 
+-	printf("DoubleElementResult:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %g\n",this->value);
+-	printf("   step: %i\n",this->step);
+-	printf("   time: %g\n",this->time);
++	_printLine_("DoubleElementResult:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: " << this->value);
++	_printLine_("   step: " << this->step);
++	_printLine_("   time: " << this->time);
+ }
+ /*}}}*/
+ /*FUNCTION DoubleElementResult::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 12511)
+@@ -47,11 +47,11 @@
+ /*FUNCTION BoolElementResult::DeepEcho{{{*/
+ void BoolElementResult::DeepEcho(void){
+ 
+-	printf("BoolElementResult:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %s\n",this->value?"true":"false");
+-	printf("   step: %i\n",this->step);
+-	printf("   time: %g\n",this->time);
++	_printLine_("BoolElementResult:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: "<<(this->value?"true":"false"));
++	_printLine_("   step: " << this->step);
++	_printLine_("   time: " << this->time);
+ }
+ /*}}}*/
+ /*FUNCTION BoolElementResult::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12511)
+@@ -49,11 +49,11 @@
+ /*FUNCTION TriaP1ElementResult::DeepEcho{{{*/
+ void TriaP1ElementResult::DeepEcho(void){
+ 		
+-	printf("TriaP1ElementResult:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   values: [%g %g %g]\n",this->values[0],this->values[1],this->values[2]);
+-	printf("   step: %i\n",this->step);
+-	printf("   time: %g\n",this->time);
++	_printLine_("TriaP1ElementResult:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   values: [" << this->values[0] << " " << this->values[1] << " " << this->values[2] << "]");
++	_printLine_("   step: " << this->step);
++	_printLine_("   time: " << this->time);
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1ElementResult::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12511)
+@@ -866,34 +866,34 @@
+ /*FUNCTION Tria::DeepEcho{{{*/
+ void Tria::DeepEcho(void){
+ 
+-	printf("Tria:\n");
+-	printf("   id: %i\n",id);
++	_printLine_("Tria:");
++	_printLine_("   id: " << id);
+ 	if(nodes){
+ 		nodes[0]->DeepEcho();
+ 		nodes[1]->DeepEcho();
+ 		nodes[2]->DeepEcho();
+ 	}
+-	else printf("nodes = NULL\n");
++	else _printLine_("nodes = NULL");
+ 
+ 	if (matice) matice->DeepEcho();
+-	else printf("matice = NULL\n");
++	else _printLine_("matice = NULL");
+ 
+ 	if (matpar) matpar->DeepEcho();
+-	else printf("matpar = NULL\n");
++	else _printLine_("matpar = NULL");
+ 
+-	printf("   parameters\n");
++	_printLine_("   parameters");
+ 	if (parameters) parameters->DeepEcho();
+-	else printf("parameters = NULL\n");
++	else _printLine_("parameters = NULL");
+ 
+-	printf("   inputs\n");
++	_printLine_("   inputs");
+ 	if (inputs) inputs->DeepEcho();
+-	else printf("inputs=NULL\n");
++	else _printLine_("inputs=NULL");
+ 
+ 	if (results) results->DeepEcho();
+-	else printf("results=NULL\n");
++	else _printLine_("results=NULL");
+ 
+-	printf("neighboor sids: \n");
+-	printf(" %i %i %i\n",horizontalneighborsids[0],horizontalneighborsids[1],horizontalneighborsids[2]);
++	_printLine_("neighboor sids: ");
++	_printLine_(" " << horizontalneighborsids[0] << " " << horizontalneighborsids[1] << " " << horizontalneighborsids[2]);
+ 	
+ 	return;
+ }
+@@ -909,34 +909,34 @@
+ /*}}}*/
+ /*FUNCTION Tria::Echo{{{*/
+ void Tria::Echo(void){
+-	printf("Tria:\n");
+-	printf("   id: %i\n",id);
++	_printLine_("Tria:");
++	_printLine_("   id: " << id);
+ 	if(nodes){
+ 		nodes[0]->Echo();
+ 		nodes[1]->Echo();
+ 		nodes[2]->Echo();
+ 	}
+-	else printf("nodes = NULL\n");
++	else _printLine_("nodes = NULL");
+ 
+ 	if (matice) matice->Echo();
+-	else printf("matice = NULL\n");
++	else _printLine_("matice = NULL");
+ 
+ 	if (matpar) matpar->Echo();
+-	else printf("matpar = NULL\n");
++	else _printLine_("matpar = NULL");
+ 
+-	printf("   parameters\n");
++	_printLine_("   parameters");
+ 	if (parameters) parameters->Echo();
+-	else printf("parameters = NULL\n");
++	else _printLine_("parameters = NULL");
+ 
+-	printf("   inputs\n");
++	_printLine_("   inputs");
+ 	if (inputs) inputs->Echo();
+-	else printf("inputs=NULL\n");
++	else _printLine_("inputs=NULL");
+ 
+ 	if (results) results->Echo();
+-	else printf("results=NULL\n");
++	else _printLine_("results=NULL");
+ 
+-	printf("neighboor sids: \n");
+-	printf(" %i %i %i\n",horizontalneighborsids[0],horizontalneighborsids[1],horizontalneighborsids[2]);
++	_printLine_("neighboor sids: ");
++	_printLine_(" " << horizontalneighborsids[0] << " " << horizontalneighborsids[1] << " " << horizontalneighborsids[2]);
+ }
+ /*}}}*/
+ /*FUNCTION Tria::ObjectEnum{{{*/
+@@ -1206,7 +1206,7 @@
+ 		elementresult->GetElementVectorFromResults(vector,sid);
+ 	}
+ 	else{
+-		printf("Interpolation %s not supported\n",EnumToStringx(interp));
++		_printLine_("Interpolation " << EnumToStringx(interp) << " not supported");
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12511)
+@@ -652,8 +652,8 @@
+ 
+ 	int i;
+ 	
+-	printf("Penta:\n");
+-	printf("   id: %i\n",id);
++	_printLine_("Penta:");
++	_printLine_("   id: " << id);
+ 	nodes[0]->DeepEcho();
+ 	nodes[1]->DeepEcho();
+ 	nodes[2]->DeepEcho();
+@@ -662,15 +662,15 @@
+ 	nodes[5]->DeepEcho();
+ 	matice->DeepEcho();
+ 	matpar->DeepEcho();
+-	printf("   neighbor ids: %i-%i\n",verticalneighbors[0]->Id(),verticalneighbors[1]->Id());
+-	printf("   parameters\n");
++	_printLine_("   neighbor ids: " << verticalneighbors[0]->Id() << "-" << verticalneighbors[1]->Id());
++	_printLine_("   parameters");
+ 	parameters->DeepEcho();
+-	printf("   inputs\n");
++	_printLine_("   inputs");
+ 	inputs->DeepEcho();
+-	printf("   results\n");
++	_printLine_("   results");
+ 	results->DeepEcho();
+-	printf("neighboor sids: \n");
+-	printf(" %i %i %i\n",horizontalneighborsids[0],horizontalneighborsids[1],horizontalneighborsids[2]);
++	_printLine_("neighboor sids: ");
++	_printLine_(" " << horizontalneighborsids[0] << " " << horizontalneighborsids[1] << " " << horizontalneighborsids[2]);
+ 
+ 	return;
+ }
+@@ -1094,7 +1094,7 @@
+ 		elementresult->GetElementVectorFromResults(vector,sid);
+ 	}
+ 	else{
+-		printf("Interpolation %s not supported\n",EnumToStringx(interp));
++		_printLine_("Interpolation " << EnumToStringx(interp) << " not supported");
+ 	}
+ }
+ /*}}}*/
+@@ -4328,8 +4328,8 @@
+ 
+ 		/*Check solution*/
+ 		if(isnan(values[i])) _error2_("NaN found in solution vector");
+-		//if(values[i]<0)      printf("temperature < 0°K found in solution vector\n");
+-		//if(values[i]>275)    printf("temperature > 275°K found in solution vector (Paterson's rheology associated is negative)\n");
++		//if(values[i]<0)      _printLine_("temperature < 0°K found in solution vector");
++		//if(values[i]>275)    _printLine_("temperature > 275°K found in solution vector (Paterson's rheology associated is negative)");
+ 	}
+ 
+ 	/*Get all inputs and parameters*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12511)
+@@ -71,13 +71,13 @@
+ /*FUNCTION ControlInput::DeepEcho{{{*/
+ void ControlInput::DeepEcho(void){
+ 
+-	printf("ControlInput:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("---values: \n");     if (values)      values->Echo();
+-	printf("---savedvalues: \n");if (savedvalues) savedvalues->Echo();
+-	printf("---minvalues: \n");  if (minvalues)   minvalues->Echo();
+-	printf("---maxvalues: \n");  if (maxvalues)   maxvalues->Echo();
+-	printf("---gradient: \n");   if (gradient)    gradient->Echo();
++	_printLine_("ControlInput:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("---values: ");     if (values)      values->Echo();
++	_printLine_("---savedvalues: ");if (savedvalues) savedvalues->Echo();
++	_printLine_("---minvalues: ");  if (minvalues)   minvalues->Echo();
++	_printLine_("---maxvalues: ");  if (maxvalues)   maxvalues->Echo();
++	_printLine_("---gradient: ");   if (gradient)    gradient->Echo();
+ }
+ /*}}}*/
+ /*FUNCTION ControlInput::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp	(revision 12511)
+@@ -46,9 +46,9 @@
+ /*FUNCTION DatasetInput::DeepEcho{{{*/
+ void DatasetInput::DeepEcho(void){
+ 
+-	printf("DatasetInput:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("---inputs: \n"); inputs->Echo();
++	_printLine_("DatasetInput:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("---inputs: "); inputs->Echo();
+ }
+ /*}}}*/
+ /*FUNCTION DatasetInput::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12511)
+@@ -39,9 +39,9 @@
+ /*FUNCTION IntInput::DeepEcho{{{*/
+ void IntInput::DeepEcho(void){
+ 
+-	printf("IntInput:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %i\n",(int)this->value);
++	_printLine_("IntInput:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: " << (int)this->value);
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12511)
+@@ -44,9 +44,9 @@
+ /*FUNCTION BoolInput::DeepEcho{{{*/
+ void BoolInput::DeepEcho(void){
+ 
+-	printf("BoolInput:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %s\n",value?"true":"false");
++	_printLine_("BoolInput:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: " <<(value?"true":"false"));
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12511)
+@@ -55,9 +55,9 @@
+ /*FUNCTION TriaP1Input::DeepEcho{{{*/
+ void TriaP1Input::DeepEcho(void){
+ 
+-	printf("TriaP1Input:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   values: [%g %g %g]\n",this->values[0],this->values[1],this->values[2]);
++	_printLine_("TriaP1Input:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   values: [" << this->values[0] << " " << this->values[1] << " " << this->values[2] << "]");
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12511)
+@@ -65,12 +65,12 @@
+ 
+ 	int i;
+ 
+-	printf("TransientInput:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   numtimesteps: %i\n",this->numtimesteps);
+-	printf("---inputs: \n"); 
++	_printLine_("TransientInput:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   numtimesteps: " << this->numtimesteps);
++	_printLine_("---inputs: "); 
+ 	for(i=0;i<this->numtimesteps;i++){
+-		printf("   time: %g  \n",this->timesteps[i]);
++		_printLine_("   time: " << this->timesteps[i] << "  ");
+ 		((Input*)this->inputs->GetObjectByOffset(i))->Echo();
+ 	}
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12511)
+@@ -55,9 +55,9 @@
+ /*FUNCTION PentaP1Input::DeepEcho{{{*/
+ void PentaP1Input::DeepEcho(void){
+ 
+-	printf("PentaP1Input:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   values: [%g %g %g %g %g %g]\n",this->values[0],this->values[1],this->values[2],this->values[3],this->values[4],this->values[5]);
++	_printLine_("PentaP1Input:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   values: [" << this->values[0] << " " << this->values[1] << " " << this->values[2] << " " << this->values[3] << " " << this->values[4] << " " << this->values[5] << "]");
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12511)
+@@ -44,9 +44,9 @@
+ /*FUNCTION DoubleInput::DeepEcho{{{*/
+ void DoubleInput::DeepEcho(void){
+ 
+-	printf("DoubleInput:\n");
+-	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+-	printf("   value: %g\n",this->value);
++	_printLine_("DoubleInput:");
++	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
++	_printLine_("   value: " << this->value);
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::Id{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp	(revision 12511)
+@@ -50,10 +50,10 @@
+ /*Object virtual functions definitions:*/
+ /*FUNCTION ExponentialVariogram::Echo {{{*/
+ 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);
++	_printLine_("ExponentialVariogram");
++	_printLine_("   nugget: " << this->nugget);
++	_printLine_("   sill  : " << this->sill);
++	_printLine_("   range : " << this->range);
+ }
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12511)
+@@ -50,10 +50,10 @@
+ /*Object virtual functions definitions:*/
+ /*FUNCTION GaussianVariogram::Echo {{{*/
+ 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);
++	_printLine_("GaussianVariogram");
++	_printLine_("   nugget: " << this->nugget);
++	_printLine_("   sill  : " << this->sill);
++	_printLine_("   range : " << this->range);
+ }
+ /*}}}*/
+ 
+@@ -92,8 +92,8 @@
+ 	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);
++	//if(h2>1000*1000) _printLine_("gamma = " << gamma << " h= " << sqrt(h2));
++	_printLine_("h = " << sqrt(h2) << " gamma = " << gamma);
+ 	return gamma;
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp	(revision 12511)
+@@ -50,10 +50,10 @@
+ /*Object virtual functions definitions:*/
+ /*FUNCTION SphericalVariogram::Echo {{{*/
+ 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);
++	_printLine_("SphericalVariogram");
++	_printLine_("   nugget: " << this->nugget);
++	_printLine_("   sill  : " << this->sill);
++	_printLine_("   range : " << this->range);
+ }
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp	(revision 12511)
+@@ -51,10 +51,10 @@
+ /*Object virtual functions definitions:*/
+ /*FUNCTION PowerVariogram::Echo {{{*/
+ 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);
++	_printLine_("PowerVariogram");
++	_printLine_("   nugget: " << this->nugget);
++	_printLine_("   slope : " << this->slope);
++	_printLine_("   power : " << this->power);
+ }
+ /*}}}*/
+ 
+@@ -88,7 +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);
++	//if(h>1000) _printLine_("gamma = " << gamma << " h=" << h);
+ 	return gamma;
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12511)
+@@ -296,21 +296,21 @@
+ /*FUNCTION Quadtree::Echo{{{*/
+ void  Quadtree::Echo(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);
++	_printLine_("Quadtree:");
++	_printLine_("   MaxDepth      = " << this->MaxDepth);
++	_printLine_("   NbQuadtreeBox = " << this->NbQuadtreeBox);
++	_printLine_("   NbObs         = " << this->NbObs);
++	_printLine_("   root          = " << this->root);
+ 
+ }/*}}}*/
+ /*FUNCTION Quadtree::DeepEcho{{{*/
+ 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);
++	_printLine_("Quadtree:");
++	_printLine_("   MaxDepth      = " << this->MaxDepth);
++	_printLine_("   NbQuadtreeBox = " << this->NbQuadtreeBox);
++	_printLine_("   NbObs         = " << this->NbObs);
++	_printLine_("   root          = " << this->root);
+ 	boxcontainer->Echo();
+ 
+ }/*}}}*/
+@@ -511,11 +511,11 @@
+ /*FUNCTION QuadtreeBox::Echo{{{*/
+ 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);
++	_printLine_("QuadtreeBox:");
++	_printLine_("   nbitems = " << this->nbitems);
++	_printLine_("   xcenter = " << this->xcenter);
++	_printLine_("   ycenter = " << this->ycenter);
++	_printLine_("   length  = " << this->length);
+ 
+ }/*}}}*/
+ /*FUNCTION QuadtreeBox::IsWithinRange{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Observation.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Observation.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Kriging/Observation.cpp	(revision 12511)
+@@ -36,14 +36,14 @@
+ 
+ 	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");
+-	printf("   yi    : "); printbinary(this->yi); printf("\n");
+-	printf("   weight: %g\n",this->weight);
+-	printf("   value : %g\n",this->value);
++	_printLine_("Observation");
++	_printLine_("   index : " << this->index);
++	_printLine_("   x     : " << this->x);
++	_printLine_("   y     : " << this->y);
++	_printLine_("   xi    : "); printbinary(this->xi); _printLine_("");
++	_printLine_("   yi    : "); printbinary(this->yi); _printLine_("");
++	_printLine_("   weight: " << this->weight);
++	_printLine_("   value : " << this->value);
+ }
+ /*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12511)
+@@ -156,13 +156,13 @@
+ /*FUNCTION Node::Echo{{{*/
+ void Node::Echo(void){
+ 
+-	printf("Node:\n");
+-	printf("   id: %i\n",id);
+-	printf("   sid: %i\n",sid);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
++	_printLine_("Node:");
++	_printLine_("   id: " << id);
++	_printLine_("   sid: " << sid);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	indexing.Echo();
+-	printf("   hvertex:     not displayed\n");
+-	printf("   inputs:      %p\n",inputs);
++	_printLine_("   hvertex:     not displayed");
++	_printLine_("   inputs:      " << inputs);
+ 
+ 
+ }
+@@ -170,14 +170,14 @@
+ /*FUNCTION Node::DeepEcho{{{*/
+ void Node::DeepEcho(void){
+ 
+-	printf("Node:\n");
+-	printf("   id: %i\n",id);
+-	printf("   sid: %i\n",sid);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
++	_printLine_("Node:");
++	_printLine_("   id: " << id);
++	_printLine_("   sid: " << sid);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	indexing.DeepEcho();
+-	printf("Vertex:\n");
++	_printLine_("Vertex:");
+ 	hvertex->DeepEcho();
+-	printf("   inputs\n");
++	_printLine_("   inputs");
+ 
+ 
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp	(revision 12511)
+@@ -45,13 +45,13 @@
+ /*FUNCTION SpcDynamic::Echo {{{*/
+ void SpcDynamic::Echo(void){
+ 
+-	printf("SpcDynamic:\n");
+-	printf("   sid: %i\n",sid);
+-	printf("   nodeid: %i\n",nodeid);
+-	printf("   dof: %i\n",dof);
+-	printf("   value: %g\n",value);
+-	printf("   isset: %s\n",isset?"true":"false");
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
++	_printLine_("SpcDynamic:");
++	_printLine_("   sid: " << sid);
++	_printLine_("   nodeid: " << nodeid);
++	_printLine_("   dof: " << dof);
++	_printLine_("   value: " << value);
++	_printLine_("   isset: " <<(isset?"true":"false"));
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	return;
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp	(revision 12511)
+@@ -44,24 +44,24 @@
+ /*FUNCTION SpcStatic::Echo {{{*/
+ void SpcStatic::Echo(void){
+ 
+-	printf("SpcStatic:\n");
+-	printf("   sid: %i\n",sid);
+-	printf("   nodeid: %i\n",nodeid);
+-	printf("   dof: %i\n",dof);
+-	printf("   value: %g\n",value);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
++	_printLine_("SpcStatic:");
++	_printLine_("   sid: " << sid);
++	_printLine_("   nodeid: " << nodeid);
++	_printLine_("   dof: " << dof);
++	_printLine_("   value: " << value);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	return;
+ }
+ /*}}}*/
+ /*FUNCTION SpcStatic::DeepEcho {{{*/
+ void SpcStatic::DeepEcho(void){
+ 
+-	printf("SpcStatic:\n");
+-	printf("   sid: %i\n",sid);
+-	printf("   nodeid: %i\n",nodeid);
+-	printf("   dof: %i\n",dof);
+-	printf("   value: %g\n",value);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
++	_printLine_("SpcStatic:");
++	_printLine_("   sid: " << sid);
++	_printLine_("   nodeid: " << nodeid);
++	_printLine_("   dof: " << dof);
++	_printLine_("   value: " << value);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	return;
+ }		
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12511)
+@@ -59,15 +59,15 @@
+ void SpcTransient::Echo(void){
+ 
+ 	int i;
+-	printf("SpcTransient:\n");
+-	printf("   sid: %i\n",sid);
+-	printf("   nodeid: %i\n",nodeid);
+-	printf("   dof: %i\n",dof);
+-	printf("   nsteps: %i\n",nsteps);
+-	printf("   analysis_type: %s\n",EnumToStringx(analysis_type));
+-	printf("   steps|times|values\n");
++	_printLine_("SpcTransient:");
++	_printLine_("   sid: " << sid);
++	_printLine_("   nodeid: " << nodeid);
++	_printLine_("   dof: " << dof);
++	_printLine_("   nsteps: " << nsteps);
++	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
++	_printLine_("   steps|times|values");
+ 	for(i=0;i<nsteps;i++){
+-		printf("%i-%g:%g\n",i,times[i],values[i]);
++		_printLine_("" << i << "-" << times[i] << ":" << values[i]);
+ 	}
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12510)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12511)
+@@ -113,20 +113,20 @@
+ 		}
+ 		else{
+ 			if(record_enum!=MaximumNumberOfEnums){
+-				printf("\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");
++				_printLine_("");
++				_printLine_("=========================================================================");
++				_printLine_(" Enums in marshalled file are not compatible with compiled code          ");
++				_printLine_("                                                                         ");
++				_printLine_("   * If you are running ISSM on a remote cluster:                        ");
++				_printLine_("     make sure that you are using the same version of ISSM on your local ");
++				_printLine_("     machine and remote cluster (you might need to run svn update)       ");
++				_printLine_("   * If you are running ISSM on your local machine:                      ");
++				_printLine_("     make sure that all the code is compiled (modules and executables)   ");
++				_printLine_("   * If you are a developer and just added a new Enum:                   ");
++				_printLine_("     you might need to run ./Synchronize.sh in src/c/EnumDefinitions     ");
++				_printLine_("     and recompile                                                       ");
++				_printLine_("=========================================================================");
++				_printLine_("");
+ 				_error2_("Enums not consistent (See error message above)");
+ 			}
+ 		}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12511-12512.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12511-12512.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12511-12512.diff	(revision 12679)
@@ -0,0 +1,276 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12511)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12512)
+@@ -153,18 +153,25 @@
+ 	/*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);
++	_pprintLine_("");
++	_pprintLine_("   "<<setw(40)<<left<<"FemModel initialization elapsed time:"<<finish_init-start_init);
++	_pprintLine_("   "<<setw(40)<<left<<"Core solution elapsed time:"<<finish_core-start_core);
++	_pprintLine_("");
++	_pprintLine_("   Total elapsed time:"<<int((finish-start)/3600)<<" hrs "<<int(int(finish-start)%3600/60)<<" min "<<int(finish-start)%60<<" sec");
++	_pprintLine_("");
+ 	#else
+ 	finish=(IssmPDouble)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);
++	_pprintLine_("");
++	_pprintLine_("   "<<setw(40)<<left<<"FemModel initialization elapsed time:"<<(finish_init-start_init)/CLOCKS_PER_SEC);
++	_pprintLine_("   "<<setw(40)<<left<<"Core solution elapsed time:"<<(finish_core-start_core)/CLOCKS_PER_SEC);
++	_pprintLine_("");
++	_pprintLine_("   Total elapsed time:"
++				<<int((finish-start)/CLOCKS_PER_SEC/3600)<<" hrs "
++				<<int(int(finish-start)/CLOCKS_PER_SEC%3600/60)<<" min "
++				<<int(finish-start)/CLOCKS_PER_SEC%60<<" sec");
++	_pprintLine_("");
+ 	#endif
+ 	
+-		
+-	
+ 	#ifdef _HAVE_PETSC_
+ 	_printf_(true,"closing MPI and Petsc\n");
+ 	PetscFinalize(); 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12511)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12512)
+@@ -56,6 +56,20 @@
+ #define _printString_(StreamArgs)\
+    do{std::cout << StreamArgs;}while(0)
+ /*}}}*/
++/* _pprintLine_ {{{*/
++/* macro to print a line, adds std::endl */
++#define _pprintLine_(StreamArgs)\
++  do{std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
++	  aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \
++	  PrintfFunction(aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}while(0)
++/*}}}*/
++/* _pprintString_ {{{*/
++/* macro to print some string, adds std::ends */
++#define _pprintString_(StreamArgs)\
++  do{std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
++	  aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \
++	  PrintfFunction(aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}while(0)
++/*}}}*/
+ /* _assert_ {{{*/
+ /*Assertion macro: do nothing if macro _ISSM_DEBUG_ undefined*/
+ #ifdef _ISSM_DEBUG_ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12511)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12512)
+@@ -30,9 +30,9 @@
+ 	IssmDouble xmax,xmin,xbest;
+ 	IssmDouble x,x1,x2,xm;
+ 	IssmDouble tol1,tol2,seps;
+-	IssmDouble tolerance=1.e-4;
+-	int    maxiter,iter;
+-	bool   loop=true,goldenflag;
++	IssmDouble tolerance = 1.e-4;
++	int        maxiter ,iter;
++	bool       loop= true,goldenflag;
+ 
+ 	/*Recover parameters:*/
+ 	xmin=optpars->xmin;
+@@ -44,11 +44,14 @@
+ 	iter=0;
+ 	fxmin = (*f)(xmin,optargs);
+ 	if (isnan(fxmin)) _error2_("Function evaluation returned NaN");
+-	_printf_(VerboseControl(),"\n        Iteration         x           f(x)       Tolerance         Procedure\n\n");
+-	_printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",xmin,fxmin,"         N/A         boundary\n");
++	cout<<setprecision(5);
++	if(VerboseControl()) _pprintLine_("");
++	if(VerboseControl()) _pprintLine_("       Iteration         x           f(x)       Tolerance         Procedure");
++	if(VerboseControl()) _pprintLine_("");
++	if(VerboseControl()) _pprintLine_("           N/A    "<<setw(12)<<xmin<<"  "<<setw(12)<<fxmin<<"           N/A         boundary");
+ 	fxmax = (*f)(xmax,optargs);
+ 	if (isnan(fxmax)) _error2_("Function evaluation returned NaN");
+-	_printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",xmax,fxmax,"         N/A         boundary\n");
++	if(VerboseControl()) _pprintLine_("           N/A    "<<setw(12)<<xmax<<"  "<<setw(12)<<fxmax<<"           N/A         boundary");
+ 
+ 	/*test if jump option activated and xmin==0*/
+ 	if (!isnan(cm_jump) && (xmin==0) && (fxmax/fxmin)<cm_jump){
+@@ -84,7 +87,8 @@
+ 	tol2=2.0*tol1;
+ 
+ 	/*4: print result*/
+-	_printf_(VerboseControl(),"         %5i    %12.6g  %12.6g  %12.6g  %s\n",iter,xbest,fxbest,pow(pow(xbest-xm,2),0.5),"       initial");
++	if(VerboseControl())
++	 _pprintLine_("         "<<setw(5)<<iter<<"    "<<setw(12)<<xbest<<"  "<<setw(12)<<fxbest<<"  "<<setw(12)<<pow(pow(xbest-xm,2),0.5)<<"         initial");
+ 	if (!isnan(cm_jump) && (xmin==0) && ((fxbest/fxmin)<cm_jump)){
+ 		_printf_(VerboseControl(),"      optimization terminated: current x satisfies criteria 'cm_jump'=%g\n",cm_jump);
+ 		loop=false;
+@@ -179,7 +183,9 @@
+ 		xm = 0.5*(xmin+xmax);
+ 		tol1=seps*pow(pow(xbest,2),0.5)+tolerance/3.0;
+ 		tol2=2.0*tol1;
+-		_printf_(VerboseControl(),"         %5i    %12.6g  %12.6g  %12.6g  %s\n",iter,x,fx,pow(pow(xbest-xm,2),0.5),goldenflag?"       golden":"       parabolic");
++		if(VerboseControl())
++		 _pprintLine_("         "<<setw(5)<<iter<<"    "<<setw(12)<<x<<"  "<<setw(12)<<fx<<"  "<<setw(12)<<pow(pow(xbest-xm,2),0.5)<<
++					 "         "<<(goldenflag?"golden":"parabolic"));
+ 
+ 		/*Stop the optimization?*/
+ 		if (sqrt(pow(xbest-xm,2)) < (tol2-0.5*(xmax-xmin))){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp	(revision 12511)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp	(revision 12512)
+@@ -28,11 +28,7 @@
+ 
+ 		/* 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. */
+@@ -54,3 +50,9 @@
+ 	xDelete<char>(buffer);
+ 	return 1;
+ }
++int PrintfFunction(const string & message){
++	extern int  my_rank;
++	if(my_rank==0){
++		printf("%s\n",message.c_str());
++	}
++}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/io.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/io.h	(revision 12511)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/io.h	(revision 12512)
+@@ -14,5 +14,6 @@
+ 
+ /*printf: */
+ int PrintfFunction(const char* format,...);
++int PrintfFunction(const string & message);
+ 
+ #endif	/* _IO_H_ */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12511)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 12512)
+@@ -55,10 +55,10 @@
+ 
+ 		/*partition loop across threads: */
+ 		for(int idx=my_rank;idx<n_interp;idx+=num_procs){
+-			_printf_(true,"\r      interpolation progress: %5.2lf%%",double(idx)/double(n_interp)*100);
++			_pprintString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<double(idx)/double(n_interp)*100<<"%");
+ 			observations->InterpolationKriging(&predictions[idx],&error[idx],x_interp[idx],y_interp[idx],radius,mindata,maxdata,variogram);
+ 		}
+-		_printf_(true,"\r      interpolation progress: %5.2lf%%\n",100.);
++		_pprintLine_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%");
+ 
+ #ifdef _HAVE_MPI_
+ 		double *sumpredictions =xNew<double>(n_interp);
+@@ -73,10 +73,10 @@
+ 
+ 		/*partition loop across threads: */
+ 		for(int idx=my_rank;idx<n_interp;idx+=num_procs){
+-			_printf_(true,"\r      interpolation progress: %5.2lf%%",double(idx)/double(n_interp)*100);
++			_pprintString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<double(idx)/double(n_interp)*100<<"%");
+ 			observations->InterpolationNearestNeighbor(&predictions[idx],x_interp[idx],y_interp[idx],radius);
+ 		}
+-		_printf_(true,"\r      interpolation progress: %5.2lf%%\n",100.);
++		_pprintLine_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%");
+ 
+ #ifdef _HAVE_MPI_
+ 		double *sumpredictions =xNew<double>(n_interp);
+@@ -90,10 +90,10 @@
+ 
+ 		/*partition loop across threads: */
+ 		for(int idx=my_rank;idx<n_interp;idx+=num_procs){
+-			_printf_(true,"\r      interpolation progress: %5.2lf%%",double(idx)/double(n_interp)*100);
++			_pprintString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<double(idx)/double(n_interp)*100<<"%");
+ 			observations->InterpolationIDW(&predictions[idx],x_interp[idx],y_interp[idx],radius,mindata,maxdata,power);
+ 		}
+-		_printf_(true,"\r      interpolation progress: %5.2lf%%\n",100.);
++		_pprintLine_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%");
+ 
+ #ifdef _HAVE_MPI_
+ 		double *sumpredictions =xNew<double>(n_interp);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp	(revision 12511)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp	(revision 12512)
+@@ -43,21 +43,17 @@
+ /*FUNCTION KML_LatLonBox::Echo {{{*/
+ void  KML_LatLonBox::Echo(){
+ 
+-	bool  flag=true;
+ 
+-	_printf_(flag,"KML_LatLonBox:\n");
++	_printLine_("KML_LatLonBox:");
+ 	KML_Object::Echo();
+ 
+-	_printf_(flag,"         north: %0.16g\n"    ,north);
+-	_printf_(flag,"         south: %0.16g\n"    ,south);
+-	_printf_(flag,"          east: %0.16g\n"    ,east);
+-	_printf_(flag,"          west: %0.16g\n"    ,west);
+-	_printf_(flag,"      rotation: %0.16g\n"    ,rotation);
+-
+-	return;
++	_printLine_("         north: " << north);
++	_printLine_("         south: " << south);
++	_printLine_("          east: " << east);
++	_printLine_("          west: " << west);
++	_printLine_("      rotation: " << rotation);
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_LatLonBox::DeepEcho {{{*/
+ void  KML_LatLonBox::DeepEcho(){
+ 
+@@ -68,25 +64,21 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_LatLonBox::DeepEcho {{{*/
+ void  KML_LatLonBox::DeepEcho(const char* indent){
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_LatLonBox:\n",indent);
++	_printLine_(indent << "KML_LatLonBox:");
+ 	KML_Object::DeepEcho(indent);
+ 
+-	_printf_(flag,"%s         north: %0.16g\n"    ,indent,north);
+-	_printf_(flag,"%s         south: %0.16g\n"    ,indent,south);
+-	_printf_(flag,"%s          east: %0.16g\n"    ,indent,east);
+-	_printf_(flag,"%s          west: %0.16g\n"    ,indent,west);
+-	_printf_(flag,"%s      rotation: %0.16g\n"    ,indent,rotation);
+-
+-	return;
++	_printLine_("         north: " << north);
++	_printLine_("         south: " << south);
++	_printLine_("          east: " << east);
++	_printLine_("          west: " << west);
++	_printLine_("      rotation: " << rotation);
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_LatLonBox::Write {{{*/
+ void  KML_LatLonBox::Write(FILE* filout,const char* indent){
+ 
+@@ -108,7 +100,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_LatLonBox::Read {{{*/
+ void  KML_LatLonBox::Read(FILE* fid,char* kstr){
+ 
+@@ -171,4 +162,3 @@
+ 	return;
+ }
+ /*}}}*/
+-
Index: /issm/oecreview/Archive/12321-12677/ISSM-12512-12513.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12512-12513.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12512-12513.diff	(revision 12679)
@@ -0,0 +1,177 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12512)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12513)
+@@ -29,7 +29,7 @@
+ 	int        num_controls,solution_type;
+ 	int        nsteps,maxiter;
+ 	AppCtx     user;
+-	TaoSolver  tao;
++	TaoSolver  tao = 0;
+ 	IssmDouble    *dummy          = NULL;
+ 	int       *control_list   = NULL;
+ 	Vector    *X              = NULL;
+@@ -52,8 +52,8 @@
+ 	maxiter=nsteps*(int)dummy[0]; xDelete<IssmDouble>(dummy);
+ 
+ 	/*Initialize TAO*/
++	TaoCreate(PETSC_COMM_WORLD,&tao);
+ 	_printf_(VerboseControl(),"%s\n","   Initializing the Toolkit for Advanced Optimization (TAO)");
+-	TaoCreate(PETSC_COMM_WORLD,&tao);
+ 	TaoSetFromOptions(tao);
+ 	TaoSetType(tao,"tao_blmvm");
+ 	//TaoSetType(tao,"tao_cg");
+@@ -164,14 +164,14 @@
+ 	TaoGetSolutionStatus(tao, &its, &f, &gnorm, &cnorm, &xdiff, NULL);
+ 	if(its==0) _printf_(true,"Iter       Function      Residual  |  List of contributions\n");
+ 	if(its==0) _printf_(true,"-----------------------------------+-----------------------\n");
+-	_printf_(true,"%4i   %12.7g  %12.7g  | ",its,f,gnorm);
++	_pprintString_(setw(4)<<its<<"   "<<setw(12)<<setprecision(7)<<f<<"  "<<setw(12)<<setprecision(7)<<gnorm<<"  | ");
+ 
+ 	/*Retrieve objective functions independently*/
+ 	for(i=0;i<num_responses;i++){
+ 		Responsex(&f,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,EnumToStringx(responses[i]),false,i);
+-		_printf_(true," %12.7g ","",f);
++		_pprintString_(" "<<setw(12)<<setprecision(7)<<f);
+ 	}
+-	_printf_(true,"\n");
++	_pprintLine_("");
+ 
+ 	/*Clean-up and return*/
+ 	xDelete<int>(responses);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12512)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/macros.h	(revision 12513)
+@@ -68,7 +68,7 @@
+ #define _pprintString_(StreamArgs)\
+   do{std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
+ 	  aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \
+-	  PrintfFunction(aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}while(0)
++	  PrintfFunction2(aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}while(0)
+ /*}}}*/
+ /* _assert_ {{{*/
+ /*Assertion macro: do nothing if macro _ISSM_DEBUG_ undefined*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp	(revision 12512)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp	(revision 12513)
+@@ -41,8 +41,11 @@
+ 	//get the value of the function at the first boundary
+ 	fx1= (*f)(x1,optargs);
+ 	if (isnan(fx1)) _error2_("Function evaluation returned NaN");
+-	_printf_(VerboseControl(),"\n        Iteration         x           f(x)       Tolerance\n\n");
+-	_printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",x1,fx1,"         N/A\n");
++	cout<<setprecision(5);
++	if(VerboseControl()) _pprintLine_("");
++	if(VerboseControl()) _pprintLine_("       Iteration         x           f(x)       Tolerance");
++	if(VerboseControl()) _pprintLine_("");
++	if(VerboseControl()) _pprintLine_("           N/A    "<<setw(12)<<x1<<"  "<<setw(12)<<fx1<<"           N/A");
+ 
+ 	//update tolerances
+ 	seps=sqrt(DBL_EPSILON);
+@@ -54,7 +57,8 @@
+ 		iter++;
+ 		fx2 = (*f)(x2,optargs);
+ 		if (isnan(fx2)) _error2_("Function evaluation returned NaN");
+-		_printf_(VerboseControl(),"         %5i    %12.6g  %12.6g  %12.6g\n",iter,x2,fx2,fabs(x2-x1)>fabs(fx2-fx1)?fabs(fx2-fx1):fabs(x2-x1));
++		if(VerboseControl())
++		 _pprintLine_("         "<<setw(5)<<iter<<"    "<<setw(12)<<x2<<"  "<<setw(12)<<fx2<<"  "<<(fabs(x2-x1)>fabs(fx2-fx1)?fabs(fx2-fx1):fabs(x2-x1)));
+ 
+ 		//Stop the optimization?
+ 		if ((fabs(x2-x1)+seps)<tolerance || (fabs(fx2-fx1)+seps)<tolerance){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp	(revision 12512)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp	(revision 12513)
+@@ -56,3 +56,9 @@
+ 		printf("%s\n",message.c_str());
+ 	}
+ }
++int PrintfFunction2(const string & message){
++	extern int  my_rank;
++	if(my_rank==0){
++		printf("%s",message.c_str());
++	}
++}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/io.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/io.h	(revision 12512)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/io.h	(revision 12513)
+@@ -15,5 +15,6 @@
+ /*printf: */
+ int PrintfFunction(const char* format,...);
+ int PrintfFunction(const string & message);
++int PrintfFunction2(const string & message);
+ 
+ #endif	/* _IO_H_ */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp	(revision 12512)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp	(revision 12513)
+@@ -45,19 +45,14 @@
+ /*FUNCTION KML_GroundOverlay::Echo {{{*/
+ void  KML_GroundOverlay::Echo(){
+ 
+-	bool  flag=true;
+-
+-	_printf_(flag,"KML_GroundOverlay:\n");
++	_printLine_("KML_GroundOverlay:");
+ 	KML_Overlay::Echo();
+ 
+-	_printf_(flag,"      altitude: %0.16g\n"      ,altitude);
+-	_printf_(flag,"       altmode: \"%s\"\n"      ,altmode);
+-	_printf_(flag,"         llbox: %p\n"          ,llbox);
+-
+-	return;
++	_printLine_("         altitude: " << altitude);
++	_printLine_("          altmode: " << altmode);
++	_printLine_("            llbox: " << llbox);
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_GroundOverlay::DeepEcho {{{*/
+ void  KML_GroundOverlay::DeepEcho(){
+ 
+@@ -68,7 +63,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_GroundOverlay::DeepEcho {{{*/
+ void  KML_GroundOverlay::DeepEcho(const char* indent){
+ 
+@@ -91,7 +85,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_GroundOverlay::Write {{{*/
+ void  KML_GroundOverlay::Write(FILE* filout,const char* indent){
+ 
+@@ -118,7 +111,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_GroundOverlay::Read {{{*/
+ void  KML_GroundOverlay::Read(FILE* fid,char* kstr){
+ 
+@@ -173,4 +165,3 @@
+ 	return;
+ }
+ /*}}}*/
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp	(revision 12512)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LatLonBox.cpp	(revision 12513)
+@@ -67,8 +67,6 @@
+ /*FUNCTION KML_LatLonBox::DeepEcho {{{*/
+ void  KML_LatLonBox::DeepEcho(const char* indent){
+ 
+-	bool  flag=true;
+-
+ 	_printLine_(indent << "KML_LatLonBox:");
+ 	KML_Object::DeepEcho(indent);
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12513-12514.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12513-12514.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12513-12514.diff	(revision 12679)
@@ -0,0 +1,32 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp	(revision 12513)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_GroundOverlay.cpp	(revision 12514)
+@@ -67,22 +67,19 @@
+ void  KML_GroundOverlay::DeepEcho(const char* indent){
+ 
+ 	char  indent2[81];
+-	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_GroundOverlay:\n",indent);
++	_printLine_(indent << "KML_GroundOverlay:");
+ 	KML_Overlay::DeepEcho(indent);
+ 
+ 	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
+ 	strcat(indent2,"  ");
+ 
+-	_printf_(flag,"%s      altitude: %0.16g\n"      ,indent,altitude);
+-	_printf_(flag,"%s       altmode: \"%s\"\n"      ,indent,altmode);
++	_printLine_(indent<<"      altitude: " << altitude);
++	_printLine_(indent<<"       altmode: " << altmode);
+ 	if (llbox)
+-		llbox->DeepEcho(indent2);
++	 llbox->DeepEcho(indent2);
+ 	else
+-		_printf_(flag,"%s         llbox: %p\n"          ,indent,llbox);
+-
+-	return;
++	 _printLine_(indent<<"         llbox: " << llbox);
+ }
+ /*}}}*/
+ /*FUNCTION KML_GroundOverlay::Write {{{*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12514-12515.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12514-12515.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12514-12515.diff	(revision 12679)
@@ -0,0 +1,3111 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12515)
+@@ -54,7 +54,7 @@
+ 		nKUF=KUF->Norm(NORM_TWO);
+ 		nF=pf->Norm(NORM_TWO);
+ 		solver_residue=nKUF/nF;
+-		_printf_(true,"\n%s%g\n","   solver residue: norm(KU-F)/norm(F)=",solver_residue);
++		if(true) _pprintLine_("\n" << "   solver residue: norm(KU-F)/norm(F)=" << solver_residue);
+ 
+ 		//clean up
+ 		xdelete(&KU);
+@@ -70,7 +70,7 @@
+ 	nF=pf->Norm(NORM_TWO);
+ 	res=nKUoldF/nF;
+ 	if (isnan(res)){
+-		_printf_(true,"norm nf = %lf and norm kuold = %lf\n",nF,nKUoldF);
++		if(true) _pprintLine_("norm nf = " << nF << "f and norm kuold = " << nKUoldF << "f");
+ 		_error2_("mechanical equilibrium convergence criterion is NaN!");
+ 	}
+ 
+@@ -80,11 +80,11 @@
+ 
+ 	//print
+ 	if(res<eps_res){
+-		_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   mechanical equilibrium convergence criterion",res*100," < ",eps_res*100," %");
++		if(VerboseConvergence()) _pprintLine_("" << "   mechanical equilibrium convergence criterion" << "50s" << res*100 << " < " << eps_res*100 << " %");
+ 		converged=true;
+ 	}
+ 	else{ 
+-		_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   mechanical equilibrium convergence criterion",res*100," > ",eps_res*100," %");
++		if(VerboseConvergence()) _pprintLine_("" << "   mechanical equilibrium convergence criterion" << "50s" << res*100 << " > " << eps_res*100 << " %");
+ 		converged=false;
+ 	}
+ 
+@@ -103,14 +103,14 @@
+ 		//print
+ 		if (!isnan(eps_rel)){
+ 			if((ndu/nu)<eps_rel){
+-				_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," < ",eps_rel*100," %");
++				if(VerboseConvergence()) _pprintLine_("" << "   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " < " << eps_rel*100 << " %");
+ 			}
+ 			else{ 
+-				_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," > ",eps_rel*100," %");
++				if(VerboseConvergence()) _pprintLine_("" << "   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " > " << eps_rel*100 << " %");
+ 				converged=false;
+ 			}
+ 		}
+-		else _printf_(true,"%-50s%g%s\n","   Convergence criterion: norm(du)/norm(u)",ndu/nu*100," %");
++		else if(true) _pprintLine_("" << "   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " %");
+ 
+ 	}
+ 
+@@ -128,14 +128,14 @@
+ 		//print
+ 		if (!isnan(eps_abs)){
+ 			if ((nduinf*yts)<eps_abs){
+-				_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," < ",eps_abs," m/yr");
++				if(VerboseConvergence()) _pprintLine_("" << "   Convergence criterion: max(du)" << "50s" << nduinf*yts << " < " << eps_abs << " m/yr");
+ 			}
+ 			else{
+-				_printf_(VerboseConvergence(),"%-50s%g%s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," > ",eps_abs," m/yr");
++				if(VerboseConvergence()) _pprintLine_("" << "   Convergence criterion: max(du)" << "50s" << nduinf*yts << " > " << eps_abs << " m/yr");
+ 				converged=false;
+ 			}
+ 		}
+-		else  _printf_(true,"%-50s%g%s\n","   Convergence criterion: max(du)",nduinf*yts," m/yr");
++		else  if(true) _pprintLine_("" << "   Convergence criterion: max(du)" << "50s" << nduinf*yts << " m/yr");
+ 
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/prognostic_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/prognostic_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/prognostic_core.cpp	(revision 12515)
+@@ -25,15 +25,15 @@
+ 	femmodel->parameters->FindParam(&ispdd,SurfaceforcingsIspddEnum);
+ 
+ 	if(ispdd){
+-	  _printf_(VerboseSolution(),"   call positive degree day module\n");
++	  if(VerboseSolution()) _pprintLine_("   call positive degree day module");
+ 	  PositiveDegreeDayx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+ 	}	
+ 
+-	_printf_(VerboseSolution(),"   call computational core\n");
++	if(VerboseSolution()) _pprintLine_("   call computational core");
+ 	solver_linear(femmodel);
+ 	
+ 	if(save_results){
+-		_printf_(VerboseSolution(),"   saving results\n");
++		if(VerboseSolution()) _pprintLine_("   saving results");
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ThicknessEnum);
+ 	}
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlconvergence.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlconvergence.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlconvergence.cpp	(revision 12515)
+@@ -24,7 +24,7 @@
+ 	/*Has convergence been reached?*/
+ 	if (!isnan(tol_cm) && J<tol_cm){
+ 		converged=true;
+-		_printf_(VerboseConvergence(),"      Convergence criterion reached: J = %g < %g",J,tol_cm);
++		if(VerboseConvergence()) _pprintString_("      Convergence criterion reached: J = " << J << " < " << tol_cm);
+ 	}
+ 
+ 	return converged;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystate_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystate_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystate_core.cpp	(revision 12515)
+@@ -8,6 +8,7 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
++#include "../include/include.h"
+ #include "../toolkits/toolkits.h"
+ #include "../objects/objects.h"
+ #include "../shared/shared.h"
+@@ -15,7 +16,6 @@
+ #include "../EnumDefinitions/EnumDefinitions.h"
+ #include "./solutions.h"
+ #include "../modules/modules.h"
+-#include "../include/include.h"
+ #include "../solvers/solvers.h"
+ 
+ void steadystate_core(FemModel* femmodel){
+@@ -42,7 +42,7 @@
+ 
+ 	for(;;){
+ 	
+-		_printf_(VerboseSolution(),"%s%i\n","   computing temperature and velocity for step: ",step);
++		if(VerboseSolution()) _pprintLine_("   computing temperature and velocity for step: " << step);
+ 		#ifdef _HAVE_THERMAL_
+ 		if(isenthalpy==0){
+ 			thermal_core(femmodel);
+@@ -54,19 +54,19 @@
+ 		_error2_("ISSM was not compiled with thermal capabilities. Exiting");
+ 		#endif
+ 
+-		_printf_(VerboseSolution(),"%s\n","   computing new velocity");
++		if(VerboseSolution()) _pprintLine_("" << "   computing new velocity");
+ 		diagnostic_core(femmodel);
+ 
+ 		if (step>1){
+-			_printf_(VerboseSolution(),"%s\n","   checking velocity, temperature and pressure convergence");
++			if(VerboseSolution()) _pprintLine_("" << "   checking velocity, temperature and pressure convergence");
+ 			if(steadystateconvergence(femmodel)) break;
+ 		}
+ 		if(step>maxiter){
+-			_printf_(VerboseSolution(),"%s%i%s\n","   maximum number steadystate iterations ",maxiter," reached");
++			if(VerboseSolution()) _pprintLine_("" << "   maximum number steadystate iterations " << maxiter << " reached");
+ 			break;
+ 		}
+ 		
+-		_printf_(VerboseSolution(),"%s\n","   saving velocity, temperature and pressure to check for convergence at next step");
++		if(VerboseSolution()) _pprintLine_("" << "   saving velocity, temperature and pressure to check for convergence at next step");
+ 		InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum,VxPicardEnum);
+ 		InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum,VyPicardEnum);
+ 		InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VzEnum,VzPicardEnum);
+@@ -78,7 +78,7 @@
+ 	}
+ 	
+ 	if(save_results){
+-		_printf_(VerboseSolution(),"   saving results\n");
++		if(VerboseSolution()) _pprintLine_("   saving results");
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum);
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum);
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VzEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/surfaceslope_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/surfaceslope_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/surfaceslope_core.cpp	(revision 12515)
+@@ -18,7 +18,7 @@
+ 	/*Recover some parameters: */
+ 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
+ 
+-	_printf_(VerboseSolution(),"%s\n","computing slope...");
++	if(VerboseSolution()) _pprintLine_("" << "computing slope...");
+ 
+ 	/*Call on core computations: */
+ 	femmodel->SetCurrentConfiguration(SurfaceSlopeAnalysisEnum,SurfaceSlopeXAnalysisEnum);
+@@ -27,7 +27,7 @@
+ 	solver_linear(femmodel);
+ 	
+ 	if(save_results){
+-		_printf_(VerboseSolution(),"saving results:\n");
++		if(VerboseSolution()) _pprintLine_("saving results:");
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceSlopeXEnum);
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceSlopeYEnum);
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/thermal_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/thermal_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/thermal_core.cpp	(revision 12515)
+@@ -28,16 +28,16 @@
+ 		ResetConstraintsx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+ 	}
+ 
+-	_printf_(VerboseSolution(),"   computing temperatures\n");
++	if(VerboseSolution()) _pprintLine_("   computing temperatures");
+ 	femmodel->SetCurrentConfiguration(ThermalAnalysisEnum);
+ 	solver_thermal_nonlinear(femmodel);
+ 
+-	_printf_(VerboseSolution(),"   computing melting\n");
++	if(VerboseSolution()) _pprintLine_("   computing melting");
+ 	femmodel->SetCurrentConfiguration(MeltingAnalysisEnum);
+ 	solver_linear(femmodel);
+ 
+ 	if(save_results){
+-		_printf_(VerboseSolution(),"   saving results\n");
++		if(VerboseSolution()) _pprintLine_("   saving results");
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum);
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BasalforcingsMeltingRateEnum);
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp	(revision 12515)
+@@ -22,11 +22,11 @@
+ 	Vector*     old_gradient = NULL;
+ 
+ 	/*Compute gradient*/
+-	_printf_(VerboseControl(),"   compute cost function gradient\n");
++	if(VerboseControl()) _pprintLine_("   compute cost function gradient");
+ 	Gradjx(&gradient,&norm_list,femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters);
+ 
+ 	if (orthogonalize){
+-		_printf_(VerboseControl(),"   orthogonalization\n");
++		if(VerboseControl()) _pprintLine_("   orthogonalization");
+ 		ControlInputGetGradientx(&old_gradient,femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters);
+ 		Orthx(&new_gradient,gradient,old_gradient); xdelete(&old_gradient); xdelete(&gradient);
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/adjointdiagnostic_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/adjointdiagnostic_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/adjointdiagnostic_core.cpp	(revision 12515)
+@@ -24,7 +24,7 @@
+ 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
+ 
+ 	/*Compute velocities*/
+-	_printf_(VerboseSolution(),"%s\n","   computing velocities");
++	if(VerboseSolution()) _pprintLine_("" << "   computing velocities");
+ 	femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum);
+ 	solver_nonlinear(femmodel,conserve_loads); 
+ 
+@@ -32,13 +32,13 @@
+ 	SurfaceAreax(NULL,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+ 
+ 	/*Compute adjoint*/
+-	_printf_(VerboseSolution(),"%s\n","   computing adjoint");
++	if(VerboseSolution()) _pprintLine_("" << "   computing adjoint");
+ 	femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum,AdjointHorizAnalysisEnum);
+ 	solver_adjoint_linear(femmodel);
+ 	
+ 	/*Save results*/
+ 	if(save_results){
+-		_printf_(VerboseSolution(),"   saving results\n");
++		if(VerboseSolution()) _pprintLine_("   saving results");
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointxEnum);
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointyEnum);
+ 		if (isstokes){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/bedslope_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/bedslope_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/bedslope_core.cpp	(revision 12515)
+@@ -18,7 +18,7 @@
+ 	/*Recover some parameters: */
+ 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
+ 
+-	_printf_(VerboseSolution(),"%s\n","   computing slope");
++	if(VerboseSolution()) _pprintLine_("" << "   computing slope");
+ 
+ 	/*Call on core computations: */
+ 	femmodel->SetCurrentConfiguration(BedSlopeAnalysisEnum,BedSlopeXAnalysisEnum);
+@@ -27,7 +27,7 @@
+ 	solver_linear(femmodel);
+ 	
+ 	if(save_results){
+-		_printf_(VerboseSolution(),"   saving results\n");
++		if(VerboseSolution()) _pprintLine_("   saving results");
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedSlopeXEnum);
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedSlopeYEnum);
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/balancethickness_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/balancethickness_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/balancethickness_core.cpp	(revision 12515)
+@@ -23,11 +23,11 @@
+ 	/*recover parameters: */
+ 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
+ 
+-	_printf_(VerboseSolution(),"call computational core:\n");
++	if(VerboseSolution()) _pprintLine_("call computational core:");
+ 	solver_linear(femmodel);
+ 
+ 	if(save_results){
+-		_printf_(VerboseSolution(),"   saving results\n");
++		if(VerboseSolution()) _pprintLine_("   saving results");
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ThicknessEnum);
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12515)
+@@ -59,10 +59,10 @@
+ 	#endif
+ 
+ 	/*First process inputs*/
+-	_printf_(true,"\n");
+-	_printf_(true,"Ice Sheet System Model (%s) version %s\n",PACKAGE_NAME,PACKAGE_VERSION);
+-	_printf_(true,"(website: %s contact: %s)\n",PACKAGE_URL,PACKAGE_BUGREPORT);
+-	_printf_(true,"\n");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("Ice Sheet System Model (" << PACKAGE_NAME << ") version " << PACKAGE_VERSION);
++	if(true) _pprintLine_("(website: " << PACKAGE_URL << " contact: " << PACKAGE_BUGREPORT << ")");
++	if(true) _pprintLine_("");
+ 	ProcessArguments(&solution_type,&binfilename,&outbinfilename,&petscfilename,&lockfilename,argc,argv);
+ 
+ 	/*out of solution_type, figure out types of analyses needed in the femmodel: */
+@@ -99,7 +99,7 @@
+ 	finish_init=(IssmPDouble)clock();
+ 	#endif
+ 
+-	_printf_(true,"call computational core:\n");
++	if(true) _pprintLine_("call computational core:");
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
+ 	#else
+@@ -132,13 +132,13 @@
+ 	finish_core=(IssmPDouble)clock();
+ 	#endif
+ 	
+-	_printf_(true,"write results to disk:\n");
++	if(true) _pprintLine_("write results to disk:");
+ 	OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
+ 
+ 	/*Close output and petsc options file and write lock file if requested*/
+ 	pfclose(output_fid,lockfilename);
+ 	if (waitonlock>0){
+-		_printf_(true,"write lock file:\n");
++		if(true) _pprintLine_("write lock file:");
+ 		WriteLockFile(lockfilename);
+ 	}
+ 
+@@ -173,11 +173,11 @@
+ 	#endif
+ 	
+ 	#ifdef _HAVE_PETSC_
+-	_printf_(true,"closing MPI and Petsc\n");
++	if(true) _pprintLine_("closing MPI and Petsc");
+ 	PetscFinalize(); 
+ 	#else
+ 	#ifdef _HAVE_MPI_
+-	_printf_(true,"closing MPI and Petsc\n");
++	if(true) _pprintLine_("closing MPI and Petsc");
+ 	MPI_Finalize();
+ 	#endif
+ 	#endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp	(revision 12515)
+@@ -85,7 +85,7 @@
+ 		femmodel->parameters->SetParam(time,TimeEnum);
+ 		femmodel->parameters->SetParam(step,StepEnum);
+ 
+-		_printf_(VerboseSolution(),"iteration %i/%g  time [yr]: %-7.3g (time step: %.2g)\n",step,floor((finaltime-time)/dt)+step,time/yts,dt/yts);
++		if(VerboseSolution()) _pprintLine_("iteration " << step << "/" << floor((finaltime-time)/dt)+step << "  time [yr]: " << time/yts << "7.3g (time step: " << dt/yts << "2g)");
+ 		if(step%output_frequency==0 || time==finaltime)
+ 		 save_results=true;
+ 		else
+@@ -93,7 +93,7 @@
+ 		femmodel->parameters->SetParam(save_results,SaveResultsEnum);
+ 
+ 		if(isthermal && dim==3){
+-			_printf_(VerboseSolution(),"   computing temperatures\n");
++			if(VerboseSolution()) _pprintLine_("   computing temperatures");
+ 			#ifdef _HAVE_THERMAL_
+ 			if(isenthalpy==0){
+ 				thermal_core(femmodel);
+@@ -107,7 +107,7 @@
+ 		}
+ 
+ 		if(isdiagnostic){
+-			_printf_(VerboseSolution(),"   computing new velocity\n");
++			if(VerboseSolution()) _pprintLine_("   computing new velocity");
+ 			#ifdef _HAVE_DIAGNOSTIC_
+ 			diagnostic_core(femmodel);
+ 			#else
+@@ -116,14 +116,14 @@
+ 		}
+ 
+ 		if(isprognostic){
+-			_printf_(VerboseSolution(),"   computing new thickness\n");
++			if(VerboseSolution()) _pprintLine_("   computing new thickness");
+ 			prognostic_core(femmodel);
+-			_printf_(VerboseSolution(),"   updating vertices positions\n");
++			if(VerboseSolution()) _pprintLine_("   updating vertices positions");
+ 			UpdateVertexPositionsx(femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters); 
+ 		}
+ 
+ 		if(isgroundingline){
+-			_printf_(VerboseSolution(),"   computing new grounding line position\n");
++			if(VerboseSolution()) _pprintLine_("   computing new grounding line position");
+ 			#ifdef _HAVE_GROUNDINGLINE_
+ 			GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+ 			#else
+@@ -133,14 +133,14 @@
+ 
+ 		/*unload results*/
+ 		if(save_results){
+-			_printf_(VerboseSolution(),"   saving transient results\n");
++			if(VerboseSolution()) _pprintLine_("   saving transient results");
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceEnum);
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedEnum);
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceforcingsMassBalanceEnum);
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,MaskElementonfloatingiceEnum);
+ 			RequestedOutputsx(femmodel->results,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,requested_outputs,numoutputs);
+ 
+-			_printf_(VerboseSolution(),"   saving temporary results\n");
++			if(VerboseSolution()) _pprintLine_("   saving temporary results");
+ 			OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
+ 		}
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/ResetBoundaryConditions.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/ResetBoundaryConditions.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/ResetBoundaryConditions.cpp	(revision 12515)
+@@ -14,7 +14,7 @@
+ 	Nodes *nodes = NULL;
+ 	int    i;
+ 
+-	_printf_(VerboseSolution(),"%s\n","   updating boundary conditions...");
++	if(VerboseSolution()) _pprintLine_("" << "   updating boundary conditions...");
+ 			
+ 	/*set current analysis: */
+ 	femmodel->SetCurrentConfiguration(analysis_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/adjointbalancethickness_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/adjointbalancethickness_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/adjointbalancethickness_core.cpp	(revision 12515)
+@@ -21,7 +21,7 @@
+ 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
+ 
+ 	/*compute thickness */
+-	_printf_(VerboseSolution(),"%s\n","   computing thickness");
++	if(VerboseSolution()) _pprintLine_("" << "   computing thickness");
+ 	femmodel->SetCurrentConfiguration(BalancethicknessAnalysisEnum);
+ 	solver_linear(femmodel);
+ 
+@@ -29,13 +29,13 @@
+ 	SurfaceAreax(NULL,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+ 
+ 	/*compute adjoint*/
+-	_printf_(VerboseSolution(),"%s\n","   computing adjoint");
++	if(VerboseSolution()) _pprintLine_("" << "   computing adjoint");
+ 	femmodel->SetCurrentConfiguration(BalancethicknessAnalysisEnum,AdjointBalancethicknessAnalysisEnum);
+ 	solver_adjoint_linear(femmodel);
+ 	
+ 	/*Save results*/
+ 	if(save_results){
+-		_printf_(VerboseSolution(),"   saving results\n");
++		if(VerboseSolution()) _pprintLine_("   saving results");
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,AdjointEnum);
+ 	}
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/hydrology_core_step.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/hydrology_core_step.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/hydrology_core_step.cpp	(revision 12515)
+@@ -16,7 +16,7 @@
+ 	
+ 	bool modify_loads=true;
+ 
+-	_printf_(VerboseSolution(),"   computing water column\n");
++	if(VerboseSolution()) _pprintLine_("   computing water column");
+ 	femmodel->SetCurrentConfiguration(HydrologyAnalysisEnum);
+ 	solver_nonlinear(femmodel,modify_loads);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/control_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/control_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/control_core.cpp	(revision 12515)
+@@ -65,7 +65,7 @@
+ 	AdjointCorePointerFromSolutionEnum(&adjointcore,solution_type);
+ 
+ 	/*Launch once a complete solution to set up all inputs*/
+-	_printf_(VerboseControl(),"%s\n","   preparing initial solution");
++	if(VerboseControl()) _pprintLine_("" << "   preparing initial solution");
+ 	if(isstokes) solutioncore(femmodel);
+ 
+ 	/*Initialize responses: */
+@@ -80,14 +80,14 @@
+ 	for(n=0;n<nsteps;n++){
+ 
+ 		/*Display info*/
+-		_printf_(VerboseControl(),"\n%s%i%s%i\n","   control method step ",n+1,"/",nsteps);
++		if(VerboseControl()) _pprintLine_("\n" << "   control method step " << n+1 << "/" << nsteps);
+ 		for(i=0;i<num_responses;i++) step_responses[i]=(int)responses[n*num_responses+i];
+ 		femmodel->parameters->SetParam(step_responses,1,num_responses,StepResponsesEnum);
+ 		
+ 		/*In steady state inversion, compute new temperature field now*/
+ 		if(solution_type==SteadystateSolutionEnum) solutioncore(femmodel);
+ 
+-		_printf_(VerboseControl(),"%s\n","   compute adjoint state:");
++		if(VerboseControl()) _pprintLine_("" << "   compute adjoint state:");
+ 		adjointcore(femmodel);
+ 		gradient_core(femmodel,n,search_scalar==0);
+ 
+@@ -97,17 +97,17 @@
+ 			goto cleanup_and_return;
+ 		}
+ 
+-		_printf_(VerboseControl(),"%s\n","   optimizing along gradient direction");
++		if(VerboseControl()) _pprintLine_("" << "   optimizing along gradient direction");
+ 		optpars.maxiter=(int)maxiter[n]; optpars.cm_jump=cm_jump[n];
+ 		BrentSearch(&search_scalar,J+n,&optpars,&objectivefunction,&optargs);
+ 
+-		_printf_(VerboseControl(),"%s\n","   updating parameter using optimized search scalar"); //true means update save controls
++		if(VerboseControl()) _pprintLine_("" << "   updating parameter using optimized search scalar"); //true means update save controls
+ 		InputControlUpdatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,search_scalar,true);
+ 		
+ 		if(controlconvergence(J[n],tol_cm)) break;
+ 	}
+ 
+-	_printf_(VerboseControl(),"%s\n","   preparing final solution");
++	if(VerboseControl()) _pprintLine_("" << "   preparing final solution");
+ 	femmodel->parameters->SetParam(true,SaveResultsEnum);
+ 	solutioncore(femmodel);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/hydrology_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/hydrology_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/hydrology_core.cpp	(revision 12515)
+@@ -44,7 +44,7 @@
+ 	/*Loop through time: */
+ 	for(i=0;i<nsteps;i++){
+ 		
+-		if(nsteps)_printf_(VerboseSolution(),"time step:%i/%i\n",i+1,nsteps);
++		if(nsteps)if(VerboseSolution()) _pprintLine_("time step:" << i+1 << "/" << nsteps);
+ 		time+=dt;
+ 		femmodel->parameters->SetParam(time,TimeEnum);
+ 
+@@ -52,13 +52,13 @@
+ 		hydrology_core_step(femmodel,i,time);
+ 
+ 		if(save_results && ((i+1)%output_frequency==0 || (i+1)==nsteps)){
+-			_printf_(VerboseSolution(),"   saving results \n");
++			if(VerboseSolution()) _pprintLine_("   saving results ");
+ 			//InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WatercolumnEnum,i+1,time);
+ 			//InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,HydrologyWaterVxEnum,i+1,time);
+ 			//InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,HydrologyWaterVyEnum,i+1,time);
+ 			
+ 			/*unload results*/
+-			_printf_(VerboseSolution(),"   saving temporary results\n");
++			if(VerboseSolution()) _pprintLine_("   saving temporary results");
+ 			OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
+ 		}
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12515)
+@@ -53,10 +53,10 @@
+ #endif
+ 
+ 	/*First process inputs*/
+-	_printf_(true,"\n");
+-	_printf_(true,"Ice Sheet System Model (%s) version %s\n",PACKAGE_NAME,PACKAGE_VERSION);
+-	_printf_(true,"(website: %s contact: %s)\n",PACKAGE_URL,PACKAGE_BUGREPORT);
+-	_printf_(true,"\n");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("Ice Sheet System Model (" << PACKAGE_NAME << ") version " << PACKAGE_VERSION);
++	if(true) _pprintLine_("(website: " << PACKAGE_URL << " contact: " << PACKAGE_BUGREPORT << ")");
++	if(true) _pprintLine_("");
+ 	ProcessArguments2(&binfilename,&outbinfilename,&lockfilename,argc,argv);
+ 
+ 	/*Process input files*/
+@@ -64,10 +64,10 @@
+ 	ProcessInputfile(&x,&y,&data,&nobs,&x_interp,&y_interp,&ninterp,&options,input_fid);
+ 	pfclose(input_fid,binfilename);
+ 
+-	_printf_(true,"call computational core:\n");
++	if(true) _pprintLine_("call computational core:");
+ 	pKrigingx(&predictions,&error,x,y,data,nobs,x_interp,y_interp,ninterp,options);
+ 
+-	_printf_(true,"write results to disk:\n");
++	if(true) _pprintLine_("write results to disk:");
+ 	Results *results = new Results();
+ 	if(my_rank==0){
+ 		output_fid=pfopen(outbinfilename,"wb");
+@@ -81,7 +81,7 @@
+ 	}
+ 
+ 	/*Close output and petsc options file and write lock file if requested*/
+-	_printf_(true,"write lock file:\n");
++	if(true) _pprintLine_("write lock file:");
+ 	WriteLockFile(lockfilename);
+ 
+ 	/*Free ressources */
+@@ -99,11 +99,11 @@
+ 	delete results;
+ 
+ #ifdef _HAVE_PETSC_
+-	_printf_(true,"closing MPI and Petsc\n");
++	if(true) _pprintLine_("closing MPI and Petsc");
+ 	PetscFinalize(); 
+ #else
+ #ifdef _HAVE_MPI_
+-	_printf_(true,"closing MPI and Petsc\n");
++	if(true) _pprintLine_("closing MPI and Petsc");
+ 	MPI_Finalize();
+ #endif
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/diagnostic_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/diagnostic_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/diagnostic_core.cpp	(revision 12515)
+@@ -58,7 +58,7 @@
+ 
+ 	if(ishutter){
+ 			
+-		_printf_(VerboseSolution(),"%s\n","   computing hutter velocities");
++		if(VerboseSolution()) _pprintLine_("" << "   computing hutter velocities");
+ 
+ 		//Take the last velocity into account so that the velocity on the MacAyeal domain is not zero
+ 		if (ismacayealpattyn) ResetBoundaryConditions(femmodel,DiagnosticHutterAnalysisEnum);
+@@ -71,7 +71,7 @@
+ 
+ 	if (ismacayealpattyn ^ isstokes){ // ^ = xor
+ 		
+-		_printf_(VerboseSolution(),"%s\n","   computing velocities");
++		if(VerboseSolution()) _pprintLine_("" << "   computing velocities");
+ 		femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum);
+ 		if(isnewton)
+ 		 solver_newton(femmodel); 
+@@ -81,20 +81,20 @@
+ 
+ 	if (ismacayealpattyn && isstokes){
+ 
+-		_printf_(VerboseSolution(),"%s\n","   computing coupling macayealpattyn and stokes velocities and pressure ");
++		if(VerboseSolution()) _pprintLine_("" << "   computing coupling macayealpattyn and stokes velocities and pressure ");
+ 		solver_stokescoupling_nonlinear(femmodel,conserve_loads);
+ 	}
+ 
+ 	if (dim==3 & (ishutter || ismacayealpattyn)){
+ 
+-		_printf_(VerboseSolution(),"%s\n","   computing vertical velocities");
++		if(VerboseSolution()) _pprintLine_("" << "   computing vertical velocities");
+ 		femmodel->SetCurrentConfiguration(DiagnosticVertAnalysisEnum);
+ 		solver_linear(femmodel);
+ 	}
+ 
+ 
+ 	if(save_results){
+-		_printf_(VerboseSolution(),"   saving results\n");
++		if(VerboseSolution()) _pprintLine_("   saving results");
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum);
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum);
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VelEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12515)
+@@ -53,7 +53,7 @@
+ 
+ 	/*Initialize TAO*/
+ 	TaoCreate(PETSC_COMM_WORLD,&tao);
+-	_printf_(VerboseControl(),"%s\n","   Initializing the Toolkit for Advanced Optimization (TAO)");
++	if(VerboseControl()) _pprintLine_("" << "   Initializing the Toolkit for Advanced Optimization (TAO)");
+ 	TaoSetFromOptions(tao);
+ 	TaoSetType(tao,"tao_blmvm");
+ 	//TaoSetType(tao,"tao_cg");
+@@ -77,7 +77,7 @@
+ 	TaoSetObjectiveAndGradientRoutine(tao,FormFunctionGradient,(void*)&user); 
+ 
+ 	/*Solver optimization problem*/
+-	_printf_(VerboseControl(),"%s\n","   Starting optimization");
++	if(VerboseControl()) _pprintLine_("" << "   Starting optimization");
+ 	TaoSolve(tao);
+ 	TaoView(tao,PETSC_VIEWER_STDOUT_WORLD);
+ 	TaoGetSolutionVector(tao,&X->vector);
+@@ -87,7 +87,7 @@
+ 	}
+ 
+ 	/*Finalize*/
+-	_printf_(VerboseControl(),"%s\n","   preparing final solution");
++	if(VerboseControl()) _pprintLine_("" << "   preparing final solution");
+ 	femmodel->parameters->SetParam(true,SaveResultsEnum);
+ 	void (*solutioncore)(FemModel*)=NULL;
+ 	CorePointerFromSolutionEnum(&solutioncore,femmodel->parameters,solution_type);
+@@ -162,8 +162,8 @@
+ 	femmodel->parameters->FindParam(&responses,NULL,NULL,StepResponsesEnum);
+ 
+ 	TaoGetSolutionStatus(tao, &its, &f, &gnorm, &cnorm, &xdiff, NULL);
+-	if(its==0) _printf_(true,"Iter       Function      Residual  |  List of contributions\n");
+-	if(its==0) _printf_(true,"-----------------------------------+-----------------------\n");
++	if(its==0) if(true) _pprintLine_("Iter       Function      Residual  |  List of contributions");
++	if(its==0) if(true) _pprintLine_("-----------------------------------+-----------------------");
+ 	_pprintString_(setw(4)<<its<<"   "<<setw(12)<<setprecision(7)<<f<<"  "<<setw(12)<<setprecision(7)<<gnorm<<"  | ");
+ 
+ 	/*Retrieve objective functions independently*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/enthalpy_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/enthalpy_core.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/enthalpy_core.cpp	(revision 12515)
+@@ -20,7 +20,7 @@
+ 	//first recover parameters common to all solutions
+ 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
+ 
+-	_printf_(VerboseSolution(),"   computing enthalpy\n");
++	if(VerboseSolution()) _pprintLine_("   computing enthalpy");
+ 	femmodel->SetCurrentConfiguration(EnthalpyAnalysisEnum);
+ 	solver_nonlinear(femmodel,true);
+ 
+@@ -28,7 +28,7 @@
+ 	InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,EnthalpyEnum,EnthalpyPicardEnum);
+ 
+ 	if(save_results){
+-		_printf_(VerboseSolution(),"   saving results\n");
++		if(VerboseSolution()) _pprintLine_("   saving results");
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum);
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,EnthalpyEnum);
+ 		InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WaterfractionEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12515)
+@@ -175,7 +175,7 @@
+ 	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(true) _pprintLine_("  Converting value of option \"" << name << "\" from unrecognized class \"" << mxGetClassName(prhs[0]) << "\" to class \"" << "struct" << "\".");
+ 		if (!mexCallMATLAB(1,lhs,1,(mxArray**)prhs,"struct")) {
+ 			option=(Option*)OptionStructParse(name,(const mxArray**)lhs);
+ 			mxDestroyArray(lhs[0]);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12515)
+@@ -72,7 +72,7 @@
+ 	}
+ 
+ 	/*Initialize Quadtree*/
+-	_printf_(true,"Generating quadtree with a maximum box size %g (depth=%i)... ",minlength,maxdepth);
++	if(true) _pprintString_("Generating quadtree with a maximum box size " << minlength << " (depth=" << maxdepth << ")... ");
+ 	this->quadtree = new Quadtree(xmin,xmax,ymin,ymax,maxdepth);
+ 
+ 	/*Add observations one by one*/
+@@ -102,9 +102,9 @@
+ 			this->quadtree->AddAndAverage(x[i],y[i],observations_list[i]);
+ 		}
+ 	}
+-	_printf_(true,"done\n");
+-	_printf_(true,"Initial number of observations: %i\n",n);
+-	_printf_(true,"  Final number of observations: %i\n",this->quadtree->NbObs);
++	if(true) _pprintLine_("done");
++	if(true) _pprintLine_("Initial number of observations: " << n);
++	if(true) _pprintLine_("  Final number of observations: " << this->quadtree->NbObs);
+ }
+ /*}}}*/
+ /*FUNCTION Observations::~Observations(){{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12515)
+@@ -134,7 +134,7 @@
+ 
+ 	if(this==NULL)_error2_("trying to echo a NULL dataset");
+ 
+-	_printf_(true,"DataSet echo: %i objects\n",objects.size());
++	if(true) _pprintLine_("DataSet echo: " << objects.size() << " objects");
+ 
+ 	for ( object=objects.begin() ; object < objects.end(); object++ ){
+ 
+@@ -151,7 +151,7 @@
+ 
+ 	if(this==NULL)_error2_("trying to echo a NULL dataset");
+ 
+-	_printf_(true,"DataSet echo: %i objects\n",objects.size());
++	if(true) _pprintLine_("DataSet echo: " << objects.size() << " objects");
+ 
+ 	for ( object=objects.begin() ; object < objects.end(); object++ ){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12515)
+@@ -90,7 +90,7 @@
+ 	if(VerboseControl())
+ 	 _pprintLine_("         "<<setw(5)<<iter<<"    "<<setw(12)<<xbest<<"  "<<setw(12)<<fxbest<<"  "<<setw(12)<<pow(pow(xbest-xm,2),0.5)<<"         initial");
+ 	if (!isnan(cm_jump) && (xmin==0) && ((fxbest/fxmin)<cm_jump)){
+-		_printf_(VerboseControl(),"      optimization terminated: current x satisfies criteria 'cm_jump'=%g\n",cm_jump);
++		if(VerboseControl()) _pprintLine_("      optimization terminated: current x satisfies criteria 'cm_jump'=" << cm_jump);
+ 		loop=false;
+ 	}
+ 
+@@ -189,15 +189,15 @@
+ 
+ 		/*Stop the optimization?*/
+ 		if (sqrt(pow(xbest-xm,2)) < (tol2-0.5*(xmax-xmin))){
+-			_printf_(VerboseControl(),"      optimization terminated: current x satisfies criteria 'tolx'=%g\n",tolerance);
++			if(VerboseControl()) _pprintLine_("      optimization terminated: current x satisfies criteria 'tolx'=" << tolerance);
+ 			loop=false;
+ 		}
+ 		else if (iter>=maxiter){
+-			_printf_(VerboseControl(),"      exiting: Maximum number of iterations has been exceeded  ('maxiter'=%i)\n",maxiter);
++			if(VerboseControl()) _pprintLine_("      exiting: Maximum number of iterations has been exceeded  ('maxiter'=" << maxiter << ")");
+ 			loop=false;
+ 		}
+ 		else if (!isnan(cm_jump) && (xmin==0) && ((fxbest/fxmin)<cm_jump)){
+-			_printf_(VerboseControl(),"      optimization terminated: current x satisfies criteria 'cm_jump'=%g\n",cm_jump);
++			if(VerboseControl()) _pprintLine_("      optimization terminated: current x satisfies criteria 'cm_jump'=" << cm_jump);
+ 			loop=false;
+ 		}
+ 		else{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12515)
+@@ -50,7 +50,7 @@
+ 		sizeof(wgt3 )/sizeof(IssmPDouble),
+ 		sizeof(wgt4 )/sizeof(IssmPDouble)};
+ 
+-	//	_printf_(true,"Gauss-Legendre recurrence coefficients ngaus=%d\n",ngaus);
++	//	if(true) _pprintLine_("Gauss-Legendre recurrence coefficients ngaus=" << ngaus);
+ 	*pxgaus =xNew<IssmPDouble>(ngaus);
+ 	*pxwgt  =xNew<IssmPDouble>(ngaus);
+ 
+@@ -1138,7 +1138,7 @@
+ 		sizeof(wgt19)/sizeof(IssmPDouble),
+ 		sizeof(wgt20)/sizeof(IssmPDouble)};
+ 
+-	//	_printf_(true,"GaussLegendreTria: iord=%d\n",iord);
++	//	if(true) _pprintLine_("GaussLegendreTria: iord=" << iord);
+ 
+ 	/*  check to see if Gauss points need to be calculated  */
+ 	if (iord <= MAX_TRIA_SYM_ORD) {
+@@ -1198,7 +1198,7 @@
+ 		xDelete<IssmPDouble>(xgaus);
+ 	}
+ 
+-	//	_printf_(true,"GaussLegendreTria - ngaus=%d\n",*pngaus);
++	//	if(true) _pprintLine_("GaussLegendreTria - ngaus=" << *pngaus);
+ 	//	for (i=0; i<*pngaus; i++)
+ 	//		_printf_(true,"i=%d: l1gaus=%f,l2gaus=%f,l3gaus=%f,wgt=%f\n",
+ 	//				 i,(*pl1 )[i],(*pl2 )[i],(*pl3 )[i],(*pwgt)[i]);
+@@ -1397,7 +1397,7 @@
+ 		sizeof(wgt5 )/sizeof(IssmPDouble),
+ 		sizeof(wgt6 )/sizeof(IssmPDouble)};
+ 
+-	//	_printf_(true,"GaussLegendreTetra: iord=%d\n",iord);
++	//	if(true) _pprintLine_("GaussLegendreTetra: iord=" << iord);
+ 
+ 	/*  check to see if Gauss points need to be calculated  */
+ 	if (iord <= MAX_TETRA_SYM_ORD) {
+@@ -1520,7 +1520,7 @@
+ 		sizeof(wgt4 )/sizeof(IssmPDouble),
+ 		sizeof(wgt5 )/sizeof(IssmPDouble)};
+ 
+-	//	_printf_(true,"Gauss-Lobatto recurrence coefficients ngaus=%d\n",ngaus);
++	//	if(true) _pprintLine_("Gauss-Lobatto recurrence coefficients ngaus=" << ngaus);
+ 	*pxgaus =xNew<IssmPDouble>(ngaus);
+ 	*pxwgt  =xNew<IssmPDouble>(ngaus);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp	(revision 12515)
+@@ -62,11 +62,11 @@
+ 
+ 		//Stop the optimization?
+ 		if ((fabs(x2-x1)+seps)<tolerance || (fabs(fx2-fx1)+seps)<tolerance){
+-			_printf_(VerboseControl(),"      %s%g\n","optimization terminated: the current x satisfies the termination criteria using 'tolx' of " ,tolerance);
++			if(VerboseControl()) _pprintLine_("      " << "optimization terminated: the current x satisfies the termination criteria using 'tolx' of "  << tolerance);
+ 			loop=false;
+ 		}
+ 		else if (iter>=maxiter){
+-			_printf_(VerboseControl(),"      %s\n","exiting: Maximum number of iterations has been exceeded  - increase 'maxiter'\n");
++			if(VerboseControl()) _pprintLine_("      " << "exiting: Maximum number of iterations has been exceeded  - increase 'maxiter'");
+ 			loop=false;
+ 		}
+ 		else{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp	(revision 12515)
+@@ -123,12 +123,12 @@
+ 	if (sgn == 1) {
+ 		*pdelta= 45;
+ 		*pslat = 70;
+-		_printf_(flag,"Warning: expecting coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).\n");
++		if(flag) _pprintLine_("Warning: expecting coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).");
+ 	}
+ 	else if (sgn == -1) {
+ 		*pdelta= 0;
+ 		*pslat = 71;
+-		_printf_(flag,"Warning: expecting coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n");
++		if(flag) _pprintLine_("Warning: expecting coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).");
+ 	}
+ 	else _error2_("Sign should be either +1 or -1.\n");
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12515)
+@@ -19,7 +19,7 @@
+ 	Vector*      vec_old_floatingice              = NULL;
+ 	Element* element                          = NULL;
+ 	
+-	_printf_(VerboseModule(),"   Migrating grounding line\n");
++	if(VerboseModule()) _pprintLine_("   Migrating grounding line");
+ 	
+ 	/*retrieve parameters: */
+ 	parameters->FindParam(&migration_style,GroundinglineMigrationEnum);
+@@ -157,7 +157,7 @@
+ 		
+ 		#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);
++		if(VerboseConvergence()) _pprintLine_("   Additional number of vertices allowed to unground: " << nflipped);
+ 		#else
+ 		nflipped=local_nflipped;
+ 		#endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp	(revision 12515)
+@@ -52,7 +52,7 @@
+ 
+ 	/*synchronize all cpus, as CPU 0 is probably late (it is starting the entire dakota strategy!) : */
+ 	MPI_Barrier(MPI_COMM_WORLD);
+-	_printf_(VerboseQmu(),"qmu iteration: %i\n",counter);
++	if(VerboseQmu()) _pprintLine_("qmu iteration: " << counter);
+ 	
+ 	/*retrieve parameters: */
+ 	femmodel->parameters->FindParam(&responses_descriptors,&numresponsedescriptors,QmuResponsedescriptorsEnum);
+@@ -66,7 +66,7 @@
+ 	InputUpdateFromDakotax(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,d_variables,d_variables_descriptors,d_numvariables);
+ 
+ 	/*Determine solution sequence: */
+-	_printf_(VerboseQmu(),"%s%s%s\n","Starting ",EnumToStringx(solution_type)," core:");
++	if(VerboseQmu()) _pprintLine_("" << "Starting " << EnumToStringx(solution_type) << " core:");
+ 	CorePointerFromSolutionEnum(&solutioncore,femmodel->parameters,solution_type);
+ 	#ifdef _HAVE_CONTROL_
+ 	if(control_analysis)solutioncore=&control_core;
+@@ -78,7 +78,7 @@
+ 	solutioncore(femmodel);
+ 
+ 	/*compute responses: */
+-	_printf_(VerboseQmu(),"compute dakota responses:\n");
++	if(VerboseQmu()) _pprintLine_("compute dakota responses:");
+ 	DakotaResponsesx(d_responses,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,responses_descriptors,numresponsedescriptors,d_numresponses);
+ 	
+ 	/*Free ressources:*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp	(revision 12515)
+@@ -21,7 +21,7 @@
+ 	bool        fromlocalsize = true;
+ 	int         verbose;
+ 
+-	_printf_(VerboseModule(),"   Dirichlet lifting applied to load vector\n");
++	if(VerboseModule()) _pprintLine_("   Dirichlet lifting applied to load vector");
+ 
+ 	Kfs->GetSize(&global_m,&global_n);
+ 	if(pf && global_m*global_n){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp	(revision 12515)
+@@ -21,7 +21,7 @@
+ 	parameters->FindParam(&time,TimeEnum);
+ 
+ 	/*start module: */
+-	_printf_(VerboseModule(),"%s%g\n","   Updating constraints for time: ",time);
++	if(VerboseModule()) _pprintLine_("" << "   Updating constraints for time: " << time);
+ 	
+ 	/*First, update dof constraints in nodes, using constraints: */
+ 	SpcNodesx(nodes,constraints,parameters,analysis_type); 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp	(revision 12515)
+@@ -21,7 +21,7 @@
+ 	int analysis_type;
+ 
+ 	/*Display message*/
+-	_printf_(VerboseModule(),"   Resetting penalties\n");
++	if(VerboseModule()) _pprintLine_("   Resetting penalties");
+ 
+ 	/*recover parameters: */
+ 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp	(revision 12515)
+@@ -115,12 +115,12 @@
+ 	if (sgn ==  1) {
+ 		*pdelta= 45;
+ 		*pslat = 70;
+-		_printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).\n");
++		if(flag) _pprintLine_("Info: creating coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).");
+ 	}
+ 	else if (sgn == -1) {
+ 		*pdelta= 0;
+ 		*pslat = 71;
+-		_printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n");
++		if(flag) _pprintLine_("Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).");
+ 	}
+ 	else _error2_("Sign should be either +1 or -1.\n");
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12515)
+@@ -49,13 +49,13 @@
+ 
+ 	clock0=clock();
+ 	time0 =time(NULL);
+-	_printf_(true,"\nExp2Kmlx Module -- %s",ctime(&time0));
++	if(true) _pprintString_("\nExp2Kmlx Module -- " << ctime(&time0));
+ 
+ 	/*read exp file  */
+ 
+ 	if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp))
+ 		_error2_("Error reading exp file.");
+-	_printf_(true,"Exp2Kmlx -- Reading %d exp profiles from file \"%s\".\n",nprof,filexp);
++	if(true) _pprintLine_("Exp2Kmlx -- Reading " << nprof << " exp profiles from file \"" << filexp << "\".");
+ //	for (i=0; i<nprof; i++)
+ //		_printLine_("i=" << i << "; nvert=" << pnvert[i] << ", closed=" << closed[i]);
+ 
+@@ -120,7 +120,7 @@
+ /*  polygon with multiple holes  */
+ 
+ 	if (holes && nprof && (pnvert[0] <= 1 || pprofx[0][pnvert[0]-1] != pprofx[0][0] || pprofy[0][pnvert[0]-1] != pprofy[0][0])) {
+-		_printf_(true,"Warning -- Outer profile is not closed, so \"holes\" option will be ignored.\n");
++		if(true) _pprintLine_("Warning -- Outer profile is not closed, so \"holes\" option will be ignored.");
+ 		holes=false;
+ 	}
+ 
+@@ -152,7 +152,7 @@
+ 
+ 		for (i=1; i<nprof; i++) {
+ 			if (pnvert[i] <= 1 || pprofx[i][pnvert[i]-1] != pprofx[i][0] || pprofy[i][pnvert[i]-1] != pprofy[i][0]) {
+-				_printf_(true,"Warning -- Inner profile %d is not closed with \"holes\" specified, so it will be ignored.\n",i+1);
++				if(true) _pprintLine_("Warning -- Inner profile " << i+1 << " is not closed with \"holes\" specified, so it will be ignored.");
+ 				continue;
+ 			}
+ 
+@@ -274,7 +274,7 @@
+ 
+ /*  write kml file  */
+ 
+-	_printf_(true,"Exp2Kmlx -- Writing kml document to file \"%s\".\n",filkml);
++	if(true) _pprintLine_("Exp2Kmlx -- Writing kml document to file \"" << filkml << "\".");
+ 	fid=fopen(filkml,"w");
+ 	fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+ 	kfile->Write(fid,indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp	(revision 12515)
+@@ -37,7 +37,7 @@
+ 
+ 	clock0=clock();
+ 	time0 =time(NULL);
+-	_printf_(true,"\nKml2Expx Module -- %s",ctime(&time0));
++	if(true) _pprintString_("\nKml2Expx Module -- " << ctime(&time0));
+ 
+ /*  read kml file  */
+ 
+@@ -48,7 +48,7 @@
+ 
+ /*  open exp file  */
+ 
+-	_printf_(true,"Writing exp profiles to file.\n");
++	if(true) _pprintLine_("Writing exp profiles to file.");
+ 	fido=fopen(filexp,"w");
+ 
+ /*  write the polygons and linestrings  */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp	(revision 12515)
+@@ -27,7 +27,7 @@
+ 
+ 	clock0=clock();
+ 	time0 =time(NULL);
+-	_printf_(true,"\nKMLOverlayx Module -- %s",ctime(&time0));
++	if(true) _pprintString_("\nKMLOverlayx Module -- " << ctime(&time0));
+ 
+ /*  construct kml file  */
+ 
+@@ -81,7 +81,7 @@
+ 
+ /*  write kml file  */
+ 
+-	_printf_(true,"Writing kml document to file.\n");
++	if(true) _pprintLine_("Writing kml document to file.");
+ 	fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+ 	kfile->Write(fid,indent);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConfigureObjectsx/ConfigureObjectsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConfigureObjectsx/ConfigureObjectsx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConfigureObjectsx/ConfigureObjectsx.cpp	(revision 12515)
+@@ -24,19 +24,19 @@
+ 	/*Get analysis type: */
+ 	parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
+ 	
+-	_printf_(VerboseMProcessor(),"      Configuring elements...\n");
++	if(VerboseMProcessor()) _pprintLine_("      Configuring elements...");
+ 	for (i=0;i<elements->Size();i++){
+ 		element=(Element*)elements->GetObjectByOffset(i);
+ 		element->Configure(elements,loads,nodes,materials,parameters);
+ 	}
+-	_printf_(VerboseMProcessor(),"      Configuring loads...\n");
++	if(VerboseMProcessor()) _pprintLine_("      Configuring loads...");
+ 	for (i=0;i<loads->Size();i++){
+ 		load=(Load*)loads->GetObjectByOffset(i);
+ 		if (load->InAnalysis(configuration_type)){
+ 			load->Configure(elements,loads,nodes,vertices,materials,parameters);
+ 		}
+ 	}
+-	_printf_(VerboseMProcessor(),"      Configuring nodes...\n");
++	if(VerboseMProcessor()) _pprintLine_("      Configuring nodes...");
+ 	for (i=0;i<nodes->Size();i++){
+ 		node=(Node*)nodes->GetObjectByOffset(i);
+ 		if(node->InAnalysis(configuration_type)){
+@@ -44,7 +44,7 @@
+ 		}
+ 	}
+ 	
+-	_printf_(VerboseMProcessor(),"      Configuring materials...\n");
++	if(VerboseMProcessor()) _pprintLine_("      Configuring materials...");
+ 	for (i=0;i<materials->Size();i++){
+ 		material=(Material*)materials->GetObjectByOffset(i);
+ 		material->Configure(elements);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 12515)
+@@ -67,7 +67,7 @@
+ 		if(solution_type==SteadystateSolutionEnum && analysis_type==MeltingAnalysisEnum && isenthalpy==true) continue;
+ 		if(solution_type==SteadystateSolutionEnum && analysis_type==EnthalpyAnalysisEnum && isenthalpy==false) continue;
+ 	
+-		_printf_(VerboseMProcessor(),"   creating datasets for analysis %s\n",EnumToStringx(analysis_type));
++		if(VerboseMProcessor()) _pprintLine_("   creating datasets for analysis " << EnumToStringx(analysis_type));
+ 		CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints,&loads,&parameters,iomodel,solution_type,analysis_type,nummodels,i);
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp	(revision 12515)
+@@ -24,7 +24,7 @@
+ 	int analysis_type;
+ 
+ 	/*Display message*/
+-	_printf_(VerboseModule(),"   Constraining penalties\n");
++	if(VerboseModule()) _pprintLine_("   Constraining penalties");
+ 
+ 	/*recover parameters: */
+ 	parameters->FindParam(&min_mechanical_constraints,DiagnosticRiftPenaltyThresholdEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 12515)
+@@ -55,7 +55,7 @@
+ 		num_unstable_constraints=0;
+ 	}
+ 	else if(num_unstable_constraints<=min_mechanical_constraints){
+-		_printf_(VerboseModule(),"   freezing constraints\n");
++		if(VerboseModule()) _pprintLine_("   freezing constraints");
+ 		RiftFreezeConstraints(loads,configuration_type);
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12515)
+@@ -43,7 +43,7 @@
+ 	#endif
+ 
+ 	/*Display message*/
+-	_printf_(VerboseModule(),"   Solving\n");
++	if(VerboseModule()) _pprintLine_("   Solving");
+ 	#if _PETSC_MAJOR_ < 3 || (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 2)
+ 	if(VerboseSolver())PetscOptionsPrint(stdout);
+ 	#else
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 12515)
+@@ -27,7 +27,7 @@
+ 	IssmDouble kmax = 0;
+ 
+ 	/*Display message*/
+-	_printf_(VerboseModule(),"   Generating matrices\n");
++	if(VerboseModule()) _pprintLine_("   Generating matrices");
+ 
+ 	/*retrive parameters: */
+ 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12515)
+@@ -33,7 +33,7 @@
+ 	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);
++	if(VerboseConvergence()) _pprintLine_("      #elements above convergence criterion = " << num_notconverged);
+ 
+ 	/*Free ressources:*/
+ 	xDelete<IssmDouble>(eps);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp	(revision 12515)
+@@ -20,7 +20,7 @@
+ 
+ 	clock0=clock();
+ 	time0 =time(NULL);
+-	_printf_(true,"\nKMLFileReadx Module -- %s",ctime(&time0));
++	if(true) _pprintString_("\nKMLFileReadx Module -- " << ctime(&time0));
+ 
+ /*  read kml file  */
+ 
+@@ -42,17 +42,17 @@
+ //			kfil->DeepEcho();
+ 		}
+ 
+-//		_printf_(true,"%s\n",kstr);
++//		if(true) _pprintLine_("" << kstr);
+ 		xDelete<char>(kstr);
+ 	}
+ 
+ 	if (kxml) {
+-		_printf_(true,"XML declaration:\n");
++		if(true) _pprintLine_("XML declaration:");
+ 		kxml->DeepEcho("  ");
+ 		delete kxml;
+ 	}
+ 	if (kdtd) {
+-		_printf_(true,"DTD declaration (not yet implemented):\n");
++		if(true) _pprintLine_("DTD declaration (not yet implemented):");
+ 		kdtd->DeepEcho("  ");
+ 		delete kdtd;
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp	(revision 12515)
+@@ -16,7 +16,7 @@
+ 	int gsize,fsize,ssize;
+ 
+ 	/*Display message*/
+-	_printf_(VerboseModule(),"   Merging solution vector from fset to gset\n");
++	if(VerboseModule()) _pprintLine_("   Merging solution vector from fset to gset");
+ 
+ 	/*first, get gsize, fsize and ssize: */
+ 	parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12515)
+@@ -28,7 +28,7 @@
+ 
+ 	clock0=clock();
+ 	time0 =time(NULL);
+-	_printf_(true,"\nKMLMeshWritex Module -- %s",ctime(&time0));
++	if(true) _pprintString_("\nKMLMeshWritex Module -- " << ctime(&time0));
+ 
+ /*  construct kml document  */
+ 
+@@ -82,7 +82,7 @@
+ 	(kdoc->style     )->AddObject((Object*)kstyle);
+ 
+ 	if (cmap) {
+-		_printf_(true,"Writing %d Matlab colors as KML style templates.\n",mcmap);
++		if(true) _pprintLine_("Writing " << mcmap << " Matlab colors as KML style templates.");
+ 		ipt=0;
+ 		for (i=0; i<mcmap; i++) {
+ 			klsty=new KML_LineStyle();
+@@ -117,7 +117,7 @@
+ 	are consecutively numbered)  */
+ 
+ 	if (!nodecon) {
+-		_printf_(true,"Creating the node connectivity table.\n");
++		if(true) _pprintLine_("Creating the node connectivity table.");
+ 		nncon=mxepg+1;
+ 		nodecon=xNewZeroInit<int>(mncon*nncon);
+ 		ncfree=true;
+@@ -148,7 +148,7 @@
+ 			edata=data;
+ 
+ 		else if (mdata == mncon) {
+-			_printf_(true,"Averaging nodal data to element data.\n");
++			if(true) _pprintLine_("Averaging nodal data to element data.");
+ 			edata=xNewZeroInit<double>(melem*ndata);
+ 			edfree=true;
+ 
+@@ -192,7 +192,7 @@
+ 
+ /*  write kml file  */
+ 
+-	_printf_(true,"Writing kml document to file.\n");
++	if(true) _pprintLine_("Writing kml document to file.");
+ 	fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+ 	fprintf(fid,"<kml xmlns=\"http://www.opengis.net/kml/2.2\">\n");
+ 	kdoc->Write(fid,indent);
+@@ -202,7 +202,7 @@
+ 	_printf_(true,"  Wrote kml file -- %f CPU seconds; %f elapsed seconds.\n\n",
+ 			 ((double)(clock0b-clock0a))/CLOCKS_PER_SEC,difftime(time0b,time0a));
+ 
+-	_printf_(true,"Deleting kml document.\n");
++	if(true) _pprintLine_("Deleting kml document.");
+ 	delete kdoc;
+ 	clock0c=clock();
+ 	time0c =time(NULL);
+@@ -303,7 +303,7 @@
+ 
+ /*  write each element as a polygon placemark  */
+ 
+-	_printf_(true,"Writing %d tria elements as KML polygons.\n",melem);
++	if(true) _pprintLine_("Writing " << melem << " tria elements as KML polygons.");
+ 
+ 	for (i=0; i<melem; i++) {
+ 		kplace=new KML_Placemark();
+@@ -355,9 +355,9 @@
+ 		(kfold ->feature )->AddObject((Object*)kplace);
+ 
+ //		if (!(int)fmod((double)(i+1),1000))
+-//			_printf_(true,"  %d tria elements written.\n",(i+1));
++//			if(true) _pprintLine_("  " << (i+1) << " tria elements written.");
+ 	}
+-	_printf_(true,"  %d tria elements written.\n",melem);
++	if(true) _pprintLine_("  " << melem << " tria elements written.");
+ 
+ 	return(kfold);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp	(revision 12515)
+@@ -67,7 +67,7 @@
+ 
+ 	clock0=clock();
+ 	time0 =time(NULL);
+-	_printf_(true,"\nShp2Kmlx Module -- %s",ctime(&time0));
++	if(true) _pprintString_("\nShp2Kmlx Module -- " << ctime(&time0));
+ 
+ /*  note that much of the following code is taken from shpdump.c in shapelib.  */
+ 
+@@ -572,7 +572,7 @@
+ 
+ /*  write kml file  */
+ 
+-	_printf_(true,"Writing kml document to file.\n");
++	if(true) _pprintLine_("Writing kml document to file.");
+ 	fid=fopen(filkml,"w");
+ 	fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+ 	kfile->Write(fid,indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp	(revision 12515)
+@@ -44,8 +44,8 @@
+ 
+ 	KML_SubStyle::Echo();
+ 
+-	_printf_(flag,"         color: %s\n"          ,color);
+-	_printf_(flag,"     colormode: %s\n"          ,colormode);
++	if(flag) _pprintLine_("         color: " << color);
++	if(flag) _pprintLine_("     colormode: " << colormode);
+ 
+ 	return;
+ }
+@@ -67,10 +67,8 @@
+ 
+ 	KML_SubStyle::DeepEcho(indent);
+ 
+-	_printf_(flag,"%s         color: %s\n"          ,indent,color);
+-	_printf_(flag,"%s     colormode: %s\n"          ,indent,colormode);
+-
+-	return;
++	if(flag) _pprintLine_("" << indent << "         color: " << color);
++	if(flag) _pprintLine_("" << indent << "     colormode: " << colormode);
+ }
+ /*}}}*/
+ /*FUNCTION KML_ColorStyle::Write {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.cpp	(revision 12515)
+@@ -44,10 +44,10 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_Placemark:\n");
++	if(flag) _pprintLine_("KML_Placemark:");
+ 	KML_Feature::Echo();
+ 
+-	_printf_(flag,"      geometry: (size=%d)\n" ,geometry->Size());
++	if(flag) _pprintLine_("      geometry: (size=" << geometry->Size() << ")");
+ 
+ 	return;
+ }
+@@ -69,7 +69,7 @@
+ 	char  indent2[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_Placemark:\n",indent);
++	if(flag) _pprintLine_("" << indent << "KML_Placemark:");
+ 	KML_Feature::DeepEcho(indent);
+ 
+ /*  loop over the geometry elements for the placemark  */
+@@ -79,12 +79,12 @@
+ 
+ 	if (geometry->Size())
+ 		for (i=0; i<geometry->Size(); i++) {
+-			_printf_(flag,"%s      geometry: -------- begin [%d] --------\n" ,indent,i);
++			if(flag) _pprintLine_("" << indent << "      geometry: -------- begin [" << i << "] --------");
+ 			((KML_Geometry *)geometry->GetObjectByOffset(i))->DeepEcho(indent2);
+-			_printf_(flag,"%s      geometry: --------  end  [%d] --------\n" ,indent,i);
++			if(flag) _pprintLine_("" << indent << "      geometry: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		_printf_(flag,"%s      geometry: [empty]\n"    ,indent);
++		if(flag) _pprintLine_("" << indent << "      geometry: [empty]");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp	(revision 12515)
+@@ -43,13 +43,13 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_Unknown %s:\n",name);
++	if(flag) _pprintLine_("KML_Unknown " << name << ":");
+ 	KML_Object::Echo();
+ 
+ 	if (value     )
+-		_printf_(flag,"         value: \"%s\"\n"     ,value);
++		if(flag) _pprintLine_("         value: \"" << value << "\"");
+     else
+-        _printf_(flag,"         value: [none]\n"     );
++        if(flag) _pprintLine_("         value: [none]");
+ 
+ 	return;
+ }
+@@ -72,7 +72,7 @@
+ 	char         nl[]={'\n','\0'};
+ 	bool         flag=true;
+ 
+-	_printf_(flag,"%sKML_Unknown %s:\n",indent,name);
++	if(flag) _pprintLine_("" << indent << "KML_Unknown " << name << ":");
+ 	KML_Object::DeepEcho(indent);
+ 
+ 	if (value     ) {
+@@ -80,16 +80,16 @@
+ 		memcpy(valuei,value,(strlen(value)+1)*sizeof(char)); 
+         
+ 		vtoken=strtok(valuei,nl);
+-		_printf_(flag,"%s         value: \"%s"     ,indent,vtoken);
++		if(flag) _pprintString_("" << indent << "         value: \"" << vtoken);
+     
+ 		while (vtoken=strtok(NULL,nl))
+-			_printf_(flag,"\n%s                 %s"     ,indent,vtoken);
+-		_printf_(flag,"\"\n");
++			if(flag) _pprintString_("\n" << indent << "                 " << vtoken);
++		if(flag) _pprintLine_("\"");
+ 
+ 		xfree((void**)&valuei);
+ 	}
+     else
+-        _printf_(flag,"%s         value: [none]\n"     ,indent);
++        if(flag) _pprintLine_("" << indent << "         value: [none]");
+ 
+ 	return;
+ }
+@@ -138,7 +138,7 @@
+ 
+ 	name=KMLFileTagName(NULL,
+ 						kstr);
+-//	_printf_(true,"KML_Unknown::Read -- opening name=%s.\n",name);
++//	if(true) _pprintLine_("KML_Unknown::Read -- opening name=" << name << ".");
+ 
+ /*  get object attributes and check for solo tag  */
+ 
+@@ -150,10 +150,10 @@
+ 
+ 	while (kstri=KMLFileToken(fid,
+ 							  &ncom,&pcom)) {
+-//		_printf_(true,"KML_Unknown::Read -- kstri=%s.\n",kstri);
++//		if(true) _pprintLine_("KML_Unknown::Read -- kstri=" << kstri << ".");
+ 		if      (!strncmp(&kstri[0],"</", 2) &&
+ 				 !strncmp(&kstri[2],name,strlen(name))) {
+-//			_printf_(true,"KML_Unknown::Read -- closing name=%s.\n",name);
++//			if(true) _pprintLine_("KML_Unknown::Read -- closing name=" << name << ".");
+ 			xfree((void**)&kstri);
+ 			break;
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.cpp	(revision 12515)
+@@ -73,20 +73,19 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_Style:\n");
++	if(flag) _pprintLine_("KML_Style:");
+ 	KML_StyleSelector::Echo();
+ 
+-	_printf_(flag,"          icon: %p\n"          ,icon);
+-	_printf_(flag,"         label: %p\n"          ,label);
+-	_printf_(flag,"          line: %p\n"          ,line);
+-	_printf_(flag,"          poly: %p\n"          ,poly);
+-	_printf_(flag,"       balloon: %p\n"          ,balloon);
+-	_printf_(flag,"          list: %p\n"          ,list);
++	if(flag) _pprintLine_("          icon: " << icon);
++	if(flag) _pprintLine_("         label: " << label);
++	if(flag) _pprintLine_("          line: " << line);
++	if(flag) _pprintLine_("          poly: " << poly);
++	if(flag) _pprintLine_("       balloon: " << balloon);
++	if(flag) _pprintLine_("          list: " << list);
+ 
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Style::DeepEcho {{{*/
+ void  KML_Style::DeepEcho(){
+ 
+@@ -97,14 +96,13 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Style::DeepEcho {{{*/
+ void  KML_Style::DeepEcho(const char* indent){
+ 
+ 	char  indent2[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_Style:\n",indent);
++	if(flag) _pprintLine_("" << indent << "KML_Style:");
+ 	KML_StyleSelector::DeepEcho(indent);
+ 
+ 	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
+@@ -113,32 +111,31 @@
+ //	if (icon)
+ //		icon->DeepEcho(indent2);
+ //	else
+-		_printf_(flag,"%s          icon: %p\n"          ,indent,icon);
++		if(flag) _pprintLine_("" << indent << "          icon: " << icon);
+ //	if (label)
+ //		label->DeepEcho(indent2);
+ //	else
+-		_printf_(flag,"%s         label: %p\n"          ,indent,label);
++		if(flag) _pprintLine_("" << indent << "         label: " << label);
+ 	if (line)
+ 		line->DeepEcho(indent2);
+ 	else
+-		_printf_(flag,"%s          line: %p\n"          ,indent,line);
++		if(flag) _pprintLine_("" << indent << "          line: " << line);
+ 	if (poly)
+ 		poly->DeepEcho(indent2);
+ 	else
+-		_printf_(flag,"%s          poly: %p\n"          ,indent,poly);
++		if(flag) _pprintLine_("" << indent << "          poly: " << poly);
+ //	if (balloon)
+ //		balloon->DeepEcho(indent2);
+ //	else
+-		_printf_(flag,"%s       balloon: %p\n"          ,indent,balloon);
++		if(flag) _pprintLine_("" << indent << "       balloon: " << balloon);
+ //	if (list)
+ //		list->DeepEcho(indent2);
+ //	else
+-		_printf_(flag,"%s          list: %p\n"          ,indent,list);
++		if(flag) _pprintLine_("" << indent << "          list: " << list);
+ 
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Style::Write {{{*/
+ void  KML_Style::Write(FILE* filout,const char* indent){
+ 
+@@ -173,7 +170,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Style::Read {{{*/
+ void  KML_Style::Read(FILE* fid,char* kstr){
+ 
+@@ -245,4 +241,3 @@
+ 	return;
+ }
+ /*}}}*/
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.cpp	(revision 12515)
+@@ -41,8 +41,8 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"    ");
+-	_printf_(flag,"%s\n",value);
++	if(flag) _pprintString_("    ");
++	if(flag) _pprintLine_("" << value);
+ 
+ 	return;
+ }
+@@ -62,8 +62,8 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%s    ",indent);
+-	_printf_(flag,"%s\n",value);
++	if(flag) _pprintString_("" << indent << "    ");
++	if(flag) _pprintLine_("" << value);
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp	(revision 12515)
+@@ -44,15 +44,14 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_Multigeometry:\n");
++	if(flag) _pprintLine_("KML_Multigeometry:");
+ 	KML_Geometry::Echo();
+ 
+-	_printf_(flag,"      geometry: (size=%d)\n" ,geometry->Size());
++	if(flag) _pprintLine_("      geometry: (size=" << geometry->Size() << ")");
+ 
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_MultiGeometry::DeepEcho {{{*/
+ void  KML_MultiGeometry::DeepEcho(){
+ 
+@@ -63,7 +62,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_MultiGeometry::DeepEcho {{{*/
+ void  KML_MultiGeometry::DeepEcho(const char* indent){
+ 
+@@ -71,7 +69,7 @@
+ 	char  indent2[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_Multigeometry:\n",indent);
++	if(flag) _pprintLine_("" << indent << "KML_Multigeometry:");
+ 	KML_Geometry::DeepEcho(indent);
+ 
+ /*  loop over the geometry elements for the multigeometry  */
+@@ -81,17 +79,16 @@
+ 
+ 	if (geometry->Size())
+ 		for (i=0; i<geometry->Size(); i++) {
+-			_printf_(flag,"%s      geometry: -------- begin [%d] --------\n" ,indent,i);
++			if(flag) _pprintLine_("" << indent << "      geometry: -------- begin [" << i << "] --------");
+ 			((KML_Geometry *)geometry->GetObjectByOffset(i))->DeepEcho(indent2);
+-			_printf_(flag,"%s      geometry: --------  end  [%d] --------\n" ,indent,i);
++			if(flag) _pprintLine_("" << indent << "      geometry: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		_printf_(flag,"%s      geometry: [empty]\n"    ,indent);
++		if(flag) _pprintLine_("" << indent << "      geometry: [empty]");
+ 
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_MultiGeometry::Write {{{*/
+ void  KML_MultiGeometry::Write(FILE* filout,const char* indent){
+ 
+@@ -119,7 +116,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_MultiGeometry::Read {{{*/
+ void  KML_MultiGeometry::Read(FILE* fid,char* kstr){
+ 
+@@ -192,7 +188,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_MultiGeometry::WriteExp {{{*/
+ void  KML_MultiGeometry::WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp){
+ 
+@@ -206,4 +201,3 @@
+ 	return;
+ }
+ /*}}}*/
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp	(revision 12515)
+@@ -41,10 +41,10 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_LineStyle:\n");
++	if(flag) _pprintLine_("KML_LineStyle:");
+ 	KML_ColorStyle::Echo();
+ 
+-	_printf_(flag,"         width: %g\n"          ,width);
++	if(flag) _pprintLine_("         width: " << width);
+ 
+ 	return;
+ }
+@@ -65,10 +65,10 @@
+ 	int   i;
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_LineStyle:\n",indent);
++	if(flag) _pprintLine_("" << indent << "KML_LineStyle:");
+ 	KML_ColorStyle::DeepEcho(indent);
+ 
+-	_printf_(flag,"%s         width: %g\n"          ,indent,width);
++	if(flag) _pprintLine_("" << indent << "         width: " << width);
+ 
+ 	return;
+ }
+@@ -136,4 +136,3 @@
+ 	return;
+ }
+ /*}}}*/
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.cpp	(revision 12515)
+@@ -41,7 +41,7 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_Folder:\n");
++	if(flag) _pprintLine_("KML_Folder:");
+ 	KML_Container::Echo();
+ 
+ 	return;
+@@ -64,7 +64,7 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_Folder:\n",indent);
++	if(flag) _pprintLine_("" << indent << "KML_Folder:");
+ 	KML_Container::DeepEcho(indent);
+ 
+ 	return;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.cpp	(revision 12515)
+@@ -41,7 +41,7 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_Document:\n");
++	if(flag) _pprintLine_("KML_Document:");
+ 	KML_Container::Echo();
+ 
+ 	return;
+@@ -64,7 +64,7 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_Document:\n",indent);
++	if(flag) _pprintLine_("" << indent << "KML_Document:");
+ 	KML_Container::DeepEcho(indent);
+ 
+ 	return;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.cpp	(revision 12515)
+@@ -41,7 +41,7 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_File:\n");
++	if(flag) _pprintLine_("KML_File:");
+ 	KML_Object::Echo();
+ 
+ 	return;
+@@ -62,7 +62,7 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_File:\n",indent);
++	if(flag) _pprintLine_("" << indent << "KML_File:");
+ 	KML_Object::DeepEcho(indent);
+ 
+ 	return;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.cpp	(revision 12515)
+@@ -48,22 +48,21 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_Icon:\n");
++	if(flag) _pprintLine_("KML_Icon:");
+ 	KML_Object::Echo();
+ 
+-	_printf_(flag,"          href: \"%s\"\n"    ,href);
+-	_printf_(flag,"       refmode: \"%s\"\n"    ,refmode);
+-	_printf_(flag,"        refint: %g\n"        ,refint);
+-	_printf_(flag,"      vrefmode: \"%s\"\n"    ,vrefmode);
+-	_printf_(flag,"      vreftime: %g\n"        ,vreftime);
+-	_printf_(flag,"      vboundsc: %g\n"        ,vboundsc);
+-	_printf_(flag,"       vformat: \"%s\"\n"    ,vformat);
+-	_printf_(flag,"        hquery: \"%s\"\n"    ,hquery);
++	if(flag) _pprintLine_("          href: \"" << href << "\"");
++	if(flag) _pprintLine_("       refmode: \"" << refmode << "\"");
++	if(flag) _pprintLine_("        refint: " << refint);
++	if(flag) _pprintLine_("      vrefmode: \"" << vrefmode << "\"");
++	if(flag) _pprintLine_("      vreftime: " << vreftime);
++	if(flag) _pprintLine_("      vboundsc: " << vboundsc);
++	if(flag) _pprintLine_("       vformat: \"" << vformat << "\"");
++	if(flag) _pprintLine_("        hquery: \"" << hquery << "\"");
+ 
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Icon::DeepEcho {{{*/
+ void  KML_Icon::DeepEcho(){
+ 
+@@ -74,28 +73,26 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Icon::DeepEcho {{{*/
+ void  KML_Icon::DeepEcho(const char* indent){
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_Icon:\n",indent);
++	if(flag) _pprintLine_("" << indent << "KML_Icon:");
+ 	KML_Object::DeepEcho(indent);
+ 
+-	_printf_(flag,"%s          href: \"%s\"\n"    ,indent,href);
+-	_printf_(flag,"%s       refmode: \"%s\"\n"    ,indent,refmode);
+-	_printf_(flag,"%s        refint: %g\n"        ,indent,refint);
+-	_printf_(flag,"%s      vrefmode: \"%s\"\n"    ,indent,vrefmode);
+-	_printf_(flag,"%s      vreftime: %g\n"        ,indent,vreftime);
+-	_printf_(flag,"%s      vboundsc: %g\n"        ,indent,vboundsc);
+-	_printf_(flag,"%s       vformat: \"%s\"\n"    ,indent,vformat);
+-	_printf_(flag,"%s        hquery: \"%s\"\n"    ,indent,hquery);
++	if(flag) _pprintLine_("" << indent << "          href: \"" << href << "\"");
++	if(flag) _pprintLine_("" << indent << "       refmode: \"" << refmode << "\"");
++	if(flag) _pprintLine_("" << indent << "        refint: " << refint);
++	if(flag) _pprintLine_("" << indent << "      vrefmode: \"" << vrefmode << "\"");
++	if(flag) _pprintLine_("" << indent << "      vreftime: " << vreftime);
++	if(flag) _pprintLine_("" << indent << "      vboundsc: " << vboundsc);
++	if(flag) _pprintLine_("" << indent << "       vformat: \"" << vformat << "\"");
++	if(flag) _pprintLine_("" << indent << "        hquery: \"" << hquery << "\"");
+ 
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Icon::Write {{{*/
+ void  KML_Icon::Write(FILE* filout,const char* indent){
+ 
+@@ -125,7 +122,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Icon::Read {{{*/
+ void  KML_Icon::Read(FILE* fid,char* kstr){
+ 
+@@ -184,4 +180,3 @@
+ 	return;
+ }
+ /*}}}*/
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.cpp	(revision 12515)
+@@ -47,12 +47,12 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_Point:\n");
++	if(flag) _pprintLine_("KML_Point:");
+ 	KML_Geometry::Echo();
+ 
+-	_printf_(flag,"       extrude: %s\n"         ,(extrude ? "true" : "false"));
+-	_printf_(flag,"       altmode: \"%s\"\n"     ,altmode);
+-	_printf_(flag,"        coords: (%g,%g,%g)\n" ,coords[0],coords[1],coords[2]);
++	if(flag) _pprintLine_("       extrude: " << (extrude ? "true" : "false"));
++	if(flag) _pprintLine_("       altmode: \"" << altmode << "\"");
++	if(flag) _pprintLine_("        coords: (" << coords[0] << "," << coords[1] << "," << coords[2] << ")");
+ 
+ 	return;
+ }
+@@ -72,12 +72,12 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_Point:\n",indent);
++	if(flag) _pprintLine_("" << indent << "KML_Point:");
+ 	KML_Geometry::DeepEcho(indent);
+ 
+-	_printf_(flag,"%s       extrude: %s\n"         ,indent,(extrude ? "true" : "false"));
+-	_printf_(flag,"%s       altmode: \"%s\"\n"     ,indent,altmode);
+-	_printf_(flag,"%s        coords: (%g,%g,%g)\n" ,indent,coords[0],coords[1],coords[2]);
++	if(flag) _pprintLine_("" << indent << "       extrude: " << (extrude ? "true" : "false"));
++	if(flag) _pprintLine_("" << indent << "       altmode: \"" << altmode << "\"");
++	if(flag) _pprintLine_("" << indent << "        coords: (" << coords[0] << "," << coords[1] << "," << coords[2] << ")");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp	(revision 12515)
+@@ -50,13 +50,13 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_LinearRing:\n");
++	if(flag) _pprintLine_("KML_LinearRing:");
+ 	KML_Geometry::Echo();
+ 
+-	_printf_(flag,"       extrude: %s\n"          ,(extrude ? "true" : "false"));
+-	_printf_(flag,"    tessellate: %s\n"          ,(tessellate ? "true" : "false"));
+-	_printf_(flag,"       altmode: \"%s\"\n"      ,altmode);
+-	_printf_(flag,"        coords: (ncoord=%d)\n" ,ncoord);
++	if(flag) _pprintLine_("       extrude: " << (extrude ? "true" : "false"));
++	if(flag) _pprintLine_("    tessellate: " << (tessellate ? "true" : "false"));
++	if(flag) _pprintLine_("       altmode: \"" << altmode << "\"");
++	if(flag) _pprintLine_("        coords: (ncoord=" << ncoord << ")");
+ 
+ 	return;
+ }
+@@ -77,15 +77,15 @@
+ 	int   i;
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_LinearRing:\n",indent);
++	if(flag) _pprintLine_("" << indent << "KML_LinearRing:");
+ 	KML_Geometry::DeepEcho(indent);
+ 
+-	_printf_(flag,"%s       extrude: %s\n"          ,indent,(extrude ? "true" : "false"));
+-	_printf_(flag,"%s    tessellate: %s\n"          ,indent,(tessellate ? "true" : "false"));
+-	_printf_(flag,"%s       altmode: \"%s\"\n"      ,indent,altmode);
+-	_printf_(flag,"%s        coords: (ncoord=%d)\n" ,indent,ncoord);
++	if(flag) _pprintLine_("" << indent << "       extrude: " << (extrude ? "true" : "false"));
++	if(flag) _pprintLine_("" << indent << "    tessellate: " << (tessellate ? "true" : "false"));
++	if(flag) _pprintLine_("" << indent << "       altmode: \"" << altmode << "\"");
++	if(flag) _pprintLine_("" << indent << "        coords: (ncoord=" << ncoord << ")");
+ 	for (i=0; i<ncoord; i++)
+-		_printf_(flag,"%s                (%g,%g,%g)\n" ,indent,
++		_printf_(flag,"%s                (%g,%g,%g)\n",indent,
+ 				coords[3*i+0],coords[3*i+1],coords[3*i+2]);
+ 
+ 	return;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.cpp	(revision 12515)
+@@ -53,18 +53,17 @@
+ 
+ 	KML_Object::Echo();
+ 
+-	_printf_(flag,"          name: \"%s\"\n"    ,name);
+-	_printf_(flag,"    visibility: %s\n"        ,(visibility ? "true" : "false"));
+-	_printf_(flag,"          open: %s\n"        ,(open ? "true" : "false"));
+-	_printf_(flag,"       snippet: \"%s\"\n"    ,snippet);
+-	_printf_(flag,"      descript: \"%s\"\n"    ,descript);
+-	_printf_(flag,"      styleurl: \"%s\"\n"    ,styleurl);
+-	_printf_(flag,"         style: (size=%d)\n" ,style->Size());
++	if(flag) _pprintLine_("          name: \"" << name << "\"");
++	if(flag) _pprintLine_("    visibility: " << (visibility ? "true" : "false"));
++	if(flag) _pprintLine_("          open: " << (open ? "true" : "false"));
++	if(flag) _pprintLine_("       snippet: \"" << snippet << "\"");
++	if(flag) _pprintLine_("      descript: \"" << descript << "\"");
++	if(flag) _pprintLine_("      styleurl: \"" << styleurl << "\"");
++	if(flag) _pprintLine_("         style: (size=" << style->Size() << ")");
+ 
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Feature::DeepEcho {{{*/
+ void  KML_Feature::DeepEcho(){
+ 
+@@ -75,7 +74,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Feature::DeepEcho {{{*/
+ void  KML_Feature::DeepEcho(const char* indent){
+ 
+@@ -85,12 +83,12 @@
+ 
+ 	KML_Object::DeepEcho(indent);
+ 
+-	_printf_(flag,"%s          name: \"%s\"\n"      ,indent,name);
+-	_printf_(flag,"%s    visibility: %s\n"          ,indent,(visibility ? "true" : "false"));
+-	_printf_(flag,"%s          open: %s\n"          ,indent,(open ? "true" : "false"));
+-	_printf_(flag,"%s       snippet: \"%s\"\n"      ,indent,snippet);
+-	_printf_(flag,"%s      descript: \"%s\"\n"      ,indent,descript);
+-	_printf_(flag,"%s      styleurl: \"%s\"\n"      ,indent,styleurl);
++	if(flag) _pprintLine_("" << indent << "          name: \"" << name << "\"");
++	if(flag) _pprintLine_("" << indent << "    visibility: " << (visibility ? "true" : "false"));
++	if(flag) _pprintLine_("" << indent << "          open: " << (open ? "true" : "false"));
++	if(flag) _pprintLine_("" << indent << "       snippet: \"" << snippet << "\"");
++	if(flag) _pprintLine_("" << indent << "      descript: \"" << descript << "\"");
++	if(flag) _pprintLine_("" << indent << "      styleurl: \"" << styleurl << "\"");
+ 
+ /*  loop over any styles for the feature  */
+ 
+@@ -99,17 +97,16 @@
+ 
+ 	if (style->Size())
+ 		for (i=0; i<style->Size(); i++) {
+-			_printf_(flag,"%s         style: -------- begin [%d] --------\n" ,indent,i);
++			if(flag) _pprintLine_("" << indent << "         style: -------- begin [" << i << "] --------");
+ 			((KML_Style *)style->GetObjectByOffset(i))->DeepEcho(indent2);
+-			_printf_(flag,"%s         style: --------  end  [%d] --------\n" ,indent,i);
++			if(flag) _pprintLine_("" << indent << "         style: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		_printf_(flag,"%s         style: [empty]\n"    ,indent);
++		if(flag) _pprintLine_("" << indent << "         style: [empty]");
+ 
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Feature::Write {{{*/
+ void  KML_Feature::Write(FILE* filout,const char* indent){
+ 
+@@ -141,7 +138,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Feature::Read {{{*/
+ void  KML_Feature::Read(FILE* fid,char* kstr){
+ 
+@@ -181,4 +177,3 @@
+ 	return;
+ }
+ /*}}}*/
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 12515)
+@@ -126,10 +126,10 @@
+ 		}
+ 
+ //	if      (itag)
+-//		_printf_(true,"tag buffer (length=%d):\n",ibuf);
++//		if(true) _pprintLine_("tag buffer (length=" << ibuf << "):");
+ //	else if (ifield)
+-//		_printf_(true,"field buffer (length=%d):\n",ibuf);
+-//	_printf_(true,"%s\n",buffer);
++//		if(true) _pprintLine_("field buffer (length=" << ibuf << "):");
++//	if(true) _pprintLine_("" << buffer);
+ 
+ 	if (!ibuf)
+ 		xfree((void**)&buffer);
+@@ -192,8 +192,8 @@
+ 			break;
+ 		}
+ 
+-//	_printf_(true,"comment buffer (length=%d):\n",ibuf);
+-//	_printf_(true,"%s\n",buffer);
++//	if(true) _pprintLine_("comment buffer (length=" << ibuf << "):");
++//	if(true) _pprintLine_("" << buffer);
+ 
+ 	if (!ibuf)
+ 		xfree((void**)&buffer);
+@@ -253,7 +253,7 @@
+ /*  skip opening delimeter and find subsequent blank or closing delimiter  */
+ 
+ 	ktokn=strtok(ktagi,"< >");
+-//	_printf_(true,"KMLFileTagName -- initial token=\"%s\".\n",ktokn);
++//	if(true) _pprintLine_("KMLFileTagName -- initial token=\"" << ktokn << "\".");
+ 
+ 	if (!pname) {
+ 		if (maxlen)
+@@ -263,8 +263,8 @@
+ 	}
+ 
+ 	if (maxlen && (maxlen < strlen(ktokn))) {
+-		_printf_(true,"KMLFileTagName -- string field too short for %s.\n",ktag);
+-		_printf_(true,"KMLFileTagName -- \"%s\" truncated to %d characters.\n",ktokn,maxlen);
++		if(true) _pprintLine_("KMLFileTagName -- string field too short for " << ktag << ".");
++		if(true) _pprintLine_("KMLFileTagName -- \"" << ktokn << "\" truncated to " << maxlen << " characters.");
+ 		strncpy(pname,ktokn,maxlen);
+ 	}
+ 	else
+@@ -299,14 +299,14 @@
+ 
+ 	/*  return first non blank and move past subsequent blank  */
+ 	ktokn=strtok(ktagi," ");
+-//	_printf_(true,"KMLFileTagAttrib -- initial token=\"%s\".\n",ktokn);
++//	if(true) _pprintLine_("KMLFileTagAttrib -- initial token=\"" << ktokn << "\".");
+ 
+ 	/*  return next non " =?/>" and move past subsequent " =?/>"  */
+ 	while (ktokn=strtok(NULL," =?/>")) {
+ 
+ 		/*  return next non quote and move past subsequent quote  */
+ 		ktokv=strtok(NULL,quote);
+-//		_printf_(true,"KMLFileTagAttrib -- attribute %s=\"%s\".\n",ktokn,ktokv);
++//		if(true) _pprintLine_("KMLFileTagAttrib -- attribute " << ktokn << "=\"" << ktokv << "\".");
+ 
+ /*  add the attribute to the dataset  */
+ 
+@@ -322,7 +322,7 @@
+ 		(!strncmp(&ktag[0],"<!DOCTYPE",9) && !strncmp(&ktag[strlen(ktag)-1], ">",1)) ||
+ 		(!strncmp(&ktag[0],"<"        ,1) && !strncmp(&ktag[strlen(ktag)-2],"/>",2)))
+ 		isolo=1;
+-//	_printf_(true,"KMLFileTagAttrib -- isolo=%d.\n",isolo);
++//	if(true) _pprintLine_("KMLFileTagAttrib -- isolo=" << isolo << ".");
+ 
+ 	return(isolo);
+ }
+@@ -356,7 +356,7 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	_printf_(true,"KMLFileTokenParse -- %s=%d.\n",ktag,*pival);
++//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pival << ".");
+ 
+ 	return(0);
+ }
+@@ -390,7 +390,7 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	_printf_(true,"KMLFileTokenParse -- %s=%s.\n",ktag,(*pbval ? "true" : "false"));
++//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << (*pbval ? "true" : "false") << ".");
+ 
+ 	return(0);
+ }
+@@ -427,8 +427,8 @@
+ 	}
+ 
+ 	if (maxlen && (maxlen < strlen(kstr))) {
+-		_printf_(true,"KMLFileTokenParse -- string field too short for %s.\n",ktag);
+-		_printf_(true,"KMLFileTokenParse -- \"%s\" truncated to %d characters.\n",kstr,maxlen);
++		if(true) _pprintLine_("KMLFileTokenParse -- string field too short for " << ktag << ".");
++		if(true) _pprintLine_("KMLFileTokenParse -- \"" << kstr << "\" truncated to " << maxlen << " characters.");
+ 		strncpy(pstr,kstr,maxlen);
+ 	}
+ 	else
+@@ -451,7 +451,7 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	_printf_(true,"KMLFileTokenParse -- %s=\"%s\".\n",ktag,pstr);
++//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=\"" << pstr << "\".");
+ 
+ 	return(pstr);
+ }
+@@ -485,7 +485,7 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	_printf_(true,"KMLFileTokenParse -- %s=%g.\n",ktag,*pfval);
++//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pfval << ".");
+ 
+ 	return(0);
+ }
+@@ -519,7 +519,7 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	_printf_(true,"KMLFileTokenParse -- %s=%g.\n",ktag,*pdval);
++//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pdval << ".");
+ 
+ 	return(0);
+ }
+@@ -577,9 +577,9 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	_printf_(true,"KMLFileTokenParse -- %s=...\n",ktag);
++//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=...");
+ //	for (j=0; j<=i; j++)
+-//		_printf_(true,"   [%d]: %lg\n",j,(*pdval)[j]);
++//		if(true) _pprintLine_("   [" << j << "]: " << (*pdval)[j] << "g");
+ 
+ 	return(0);
+ }
+@@ -630,7 +630,7 @@
+ 		*m=i+1;
+ 
+ 	if (j != 2)
+-		_printf_(true,"KMLFileTokenParse -- Double [m x 3] field for %s does not have multiple of 3 values.\n",ktag);
++		if(true) _pprintLine_("KMLFileTokenParse -- Double [m x 3] field for " << ktag << " does not have multiple of 3 values.");
+ 
+ /*  get additional token and compare to closing tag  */
+ 
+@@ -644,9 +644,9 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	_printf_(true,"KMLFileTokenParse -- %s=...\n",ktag);
++//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=...");
+ //	for (j=0; j<=i; j++)
+-//		_printf_(true,"   [%d][0-2]: %lg,%lg,%lg\n",j,(*pdval3)[j][0],(*pdval3)[j][1],(*pdval3)[j][2]);
++//		if(true) _pprintLine_("   [" << j << "][0-2]: " << (*pdval3)[j][0] << "g," << (*pdval3)[j][1] << "g," << (*pdval3)[j][2] << "g");
+ 
+ 	return(0);
+ }
+@@ -660,7 +660,7 @@
+ /*  note that tags of the same type can be nested inside each other, so for each
+ 	opening tag, must find corresponding closing tag  */
+ 
+-	_printf_(true,"KMLFileTagSkip -- input tag %s.\n",ktag);
++	if(true) _pprintLine_("KMLFileTagSkip -- input tag " << ktag << ".");
+ 
+ /*  if next token is a closing tag, compare to input  */
+ 
+@@ -669,7 +669,7 @@
+ 		if      ((kstr[0] == '<') &&
+ 				 (kstr[1] == '/') &&
+ 				 (!strncmp(&(kstr[2]),&(ktag[1]),(strcspn(ktag," >")-1)/sizeof(char)))) {
+-			_printf_(true,"KMLFileTagSkip -- closing tag %s.\n",kstr);
++			if(true) _pprintLine_("KMLFileTagSkip -- closing tag " << kstr << ".");
+ 			xfree((void**)&kstr);
+ 			return(0);
+ 		}
+@@ -678,7 +678,7 @@
+ 
+ 		else if ((kstr[0] == '<') &&
+ 				 (kstr[1] != '/')) {
+-			_printf_(true,"KMLFileTagSkip -- opening tag %s.\n",kstr);
++			if(true) _pprintLine_("KMLFileTagSkip -- opening tag " << kstr << ".");
+ 			KMLFileTagSkip(kstr,
+ 						   fid);
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.cpp	(revision 12515)
+@@ -44,10 +44,10 @@
+ 	int   i;
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"    ");
++	if(flag) _pprintString_("    ");
+ 	for (i=0;i<10-strlen(name);i++)
+-		_printf_(flag," ");
+-	_printf_(flag,"%s: \"%s\"\n",name,value);
++		if(flag) _pprintString_(" ");
++	if(flag) _pprintLine_("" << name << ": \"" << value << "\"");
+ 
+ 	return;
+ }
+@@ -68,10 +68,10 @@
+ 	int   i;
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%s    ",indent);
++	if(flag) _pprintString_("" << indent << "    ");
+ 	for (i=0;i<10-strlen(name);i++)
+-		_printf_(flag," ");
+-	_printf_(flag,"%s: \"%s\"\n",name,value);
++		if(flag) _pprintString_(" ");
++	if(flag) _pprintLine_("" << name << ": \"" << value << "\"");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp	(revision 12515)
+@@ -42,16 +42,15 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_PolyStyle:\n");
++	if(flag) _pprintLine_("KML_PolyStyle:");
+ 	KML_ColorStyle::Echo();
+ 
+-	_printf_(flag,"          fill: %d\n"          ,fill);
+-	_printf_(flag,"       outline: %d\n"          ,outline);
++	if(flag) _pprintLine_("          fill: " << fill);
++	if(flag) _pprintLine_("       outline: " << outline);
+ 
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_PolyStyle::DeepEcho {{{*/
+ void  KML_PolyStyle::DeepEcho(){
+ 
+@@ -62,23 +61,21 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_PolyStyle::DeepEcho {{{*/
+ void  KML_PolyStyle::DeepEcho(const char* indent){
+ 
+ 	int   i;
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_PolyStyle:\n",indent);
++	if(flag) _pprintLine_("" << indent << "KML_PolyStyle:");
+ 	KML_ColorStyle::DeepEcho(indent);
+ 
+-	_printf_(flag,"%s          fill: %d\n"          ,indent,fill);
+-	_printf_(flag,"%s       outline: %d\n"          ,indent,outline);
++	if(flag) _pprintLine_("" << indent << "          fill: " << fill);
++	if(flag) _pprintLine_("" << indent << "       outline: " << outline);
+ 
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_PolyStyle::Write {{{*/
+ void  KML_PolyStyle::Write(FILE* filout,const char* indent){
+ 
+@@ -97,7 +94,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_PolyStyle::Read {{{*/
+ void  KML_PolyStyle::Read(FILE* fid,char* kstr){
+ 
+@@ -148,4 +144,3 @@
+ 	return;
+ }
+ /*}}}*/
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp	(revision 12515)
+@@ -54,9 +54,9 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"        attrib: (size=%d)\n" ,attrib->Size());
+-	_printf_(flag,"        commnt: (size=%d)\n" ,commnt->Size());
+-	_printf_(flag,"        kmlobj: (size=%d)\n" ,kmlobj->Size());
++	if(flag) _pprintLine_("        attrib: (size=" << attrib->Size() << ")");
++	if(flag) _pprintLine_("        commnt: (size=" << commnt->Size() << ")");
++	if(flag) _pprintLine_("        kmlobj: (size=" << kmlobj->Size() << ")");
+ 
+ 	return;
+ }
+@@ -85,7 +85,7 @@
+ 			((KML_Attribute *)attrib->GetObjectByOffset(i))->DeepEcho(indent);
+ 		}
+ 	else
+-		_printf_(flag,"%s        attrib: [empty]\n"    ,indent);
++		if(flag) _pprintLine_("" << indent << "        attrib: [empty]");
+ 
+ /*  loop over the comments for the object  */
+ 
+@@ -94,7 +94,7 @@
+ 			((KML_Comment *)commnt->GetObjectByOffset(i))->DeepEcho(indent);
+ 		}
+ 	else
+-		_printf_(flag,"%s        commnt: [empty]\n"    ,indent);
++		if(flag) _pprintLine_("" << indent << "        commnt: [empty]");
+ 
+ /*  loop over the unknown objects for the object  */
+ 
+@@ -103,12 +103,12 @@
+ 
+ 	if (kmlobj->Size())
+ 		for (i=0; i<kmlobj->Size(); i++) {
+-            _printf_(flag,"%s        kmlobj: -------- begin [%d] --------\n" ,indent,i);
++            if(flag) _pprintLine_("" << indent << "        kmlobj: -------- begin [" << i << "] --------");
+ 			((KML_Unknown *)kmlobj->GetObjectByOffset(i))->DeepEcho(indent2);
+-            _printf_(flag,"%s        kmlobj: --------  end  [%d] --------\n" ,indent,i);
++            if(flag) _pprintLine_("" << indent << "        kmlobj: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		_printf_(flag,"%s        kmlobj: [empty]\n"    ,indent);
++		if(flag) _pprintLine_("" << indent << "        kmlobj: [empty]");
+ 
+ 	return;
+ }
+@@ -252,7 +252,7 @@
+ //	}
+ 
+ 	else if (!strncmp(kstr,"<",1)) {
+-		_printf_(true,"KML_Object::Read -- Unrecognized opening tag %s.\n",kstr);
++		if(true) _pprintLine_("KML_Object::Read -- Unrecognized opening tag " << kstr << ".");
+ //		KMLFileTagSkip(kstr,
+ //					   fid);
+ 		kobj=(KML_Object*)new KML_Unknown();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp	(revision 12515)
+@@ -50,13 +50,13 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_LineString:\n");
++	if(flag) _pprintLine_("KML_LineString:");
+ 	KML_Geometry::Echo();
+ 
+-	_printf_(flag,"       extrude: %s\n"          ,(extrude ? "true" : "false"));
+-	_printf_(flag,"    tessellate: %s\n"          ,(tessellate ? "true" : "false"));
+-	_printf_(flag,"       altmode: \"%s\"\n"      ,altmode);
+-	_printf_(flag,"        coords: (ncoord=%d)\n" ,ncoord);
++	if(flag) _pprintLine_("       extrude: " << (extrude ? "true" : "false"));
++	if(flag) _pprintLine_("    tessellate: " << (tessellate ? "true" : "false"));
++	if(flag) _pprintLine_("       altmode: \"" << altmode << "\"");
++	if(flag) _pprintLine_("        coords: (ncoord=" << ncoord << ")");
+ 
+ 	return;
+ }
+@@ -77,15 +77,15 @@
+ 	int   i;
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_LineString:\n",indent);
++	if(flag) _pprintLine_("" << indent << "KML_LineString:");
+ 	KML_Geometry::DeepEcho(indent);
+ 
+-	_printf_(flag,"%s       extrude: %s\n"          ,indent,(extrude ? "true" : "false"));
+-	_printf_(flag,"%s    tessellate: %s\n"          ,indent,(tessellate ? "true" : "false"));
+-	_printf_(flag,"%s       altmode: \"%s\"\n"      ,indent,altmode);
+-	_printf_(flag,"%s        coords: (ncoord=%d)\n" ,indent,ncoord);
++	if(flag) _pprintLine_("" << indent << "       extrude: " << (extrude ? "true" : "false"));
++	if(flag) _pprintLine_("" << indent << "    tessellate: " << (tessellate ? "true" : "false"));
++	if(flag) _pprintLine_("" << indent << "       altmode: \"" << altmode << "\"");
++	if(flag) _pprintLine_("" << indent << "        coords: (ncoord=" << ncoord << ")");
+ 	for (i=0; i<ncoord; i++)
+-		_printf_(flag,"%s                (%g,%g,%g)\n" ,indent,coords[3*i+0],coords[3*i+1],coords[3*i+2]);
++		if(flag) _pprintLine_("" << indent << "                (" << coords[3*i+0] << "," << coords[3*i+1] << "," << coords[3*i+2] << ")");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.cpp	(revision 12515)
+@@ -46,18 +46,12 @@
+ /*FUNCTION KML_Overlay::Echo {{{*/
+ void  KML_Overlay::Echo(){
+ 
+-	bool  flag=true;
+-
+ 	KML_Feature::Echo();
+-
+-	_printf_(flag,"         color: \"%s\"\n" ,color);
+-	_printf_(flag,"       draword: %d\n"     ,draword);
+-	_printf_(flag,"          icon: %p\n"     ,icon);
+-
+-	return;
++	_pprintLine_("         color: \"" << color << "\"");
++	_pprintLine_("       draword: " << draword);
++	_pprintLine_("          icon: " << icon);
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Overlay::DeepEcho {{{*/
+ void  KML_Overlay::DeepEcho(){
+ 
+@@ -68,29 +62,23 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Overlay::DeepEcho {{{*/
+ void  KML_Overlay::DeepEcho(const char* indent){
+ 
+ 	char  indent2[81];
+-	bool  flag=true;
+-
+ 	KML_Feature::DeepEcho(indent);
+ 
+ 	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
+ 	strcat(indent2,"  ");
+ 
+-	_printf_(flag,"%s         color: %s\n"          ,indent,color);
+-	_printf_(flag,"%s       draword: %d\n"          ,indent,draword);
++	_pprintLine_("" << indent << "         color: " << color);
++	_pprintLine_("" << indent << "       draword: " << draword);
+ 	if (icon)
+ 		icon->DeepEcho(indent2);
+ 	else
+-		_printf_(flag,"%s          icon: %p\n"          ,indent,icon);
+-
+-	return;
++		_pprintLine_("" << indent << "          icon: " << icon);
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Overlay::Write {{{*/
+ void  KML_Overlay::Write(FILE* filout,const char* indent){
+ 
+@@ -111,7 +99,6 @@
+ 	return;
+ }
+ /*}}}*/
+-
+ /*FUNCTION KML_Overlay::Read {{{*/
+ void  KML_Overlay::Read(FILE* fid,char* kstr){
+ 
+@@ -146,4 +133,3 @@
+ 	return;
+ }
+ /*}}}*/
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.cpp	(revision 12515)
+@@ -46,7 +46,7 @@
+ 
+ 	KML_Feature::Echo();
+ 
+-	_printf_(flag,"       feature: (size=%d)\n" ,feature->Size());
++	if(flag) _pprintLine_("       feature: (size=" << feature->Size() << ")");
+ 
+ 	return;
+ }
+@@ -77,12 +77,12 @@
+ 
+ 	if (feature->Size())
+ 		for (i=0; i<feature->Size(); i++) {
+-			_printf_(flag,"%s       feature: -------- begin [%d] --------\n" ,indent,i);
++			if(flag) _pprintLine_("" << indent << "       feature: -------- begin [" << i << "] --------");
+ 			((KML_Feature *)feature->GetObjectByOffset(i))->DeepEcho(indent2);
+-			_printf_(flag,"%s       feature: --------  end  [%d] --------\n" ,indent,i);
++			if(flag) _pprintLine_("" << indent << "       feature: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		_printf_(flag,"%s       feature: [empty]\n"    ,indent);
++		if(flag) _pprintLine_("" << indent << "       feature: [empty]");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.cpp	(revision 12515)
+@@ -54,14 +54,14 @@
+ 
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"KML_Polygon:\n");
++	if(flag) _pprintLine_("KML_Polygon:");
+ 	KML_Geometry::Echo();
+ 
+-	_printf_(flag,"       extrude: %s\n"          ,(extrude ? "true" : "false"));
+-	_printf_(flag,"    tessellate: %s\n"          ,(tessellate ? "true" : "false"));
+-	_printf_(flag,"       altmode: \"%s\"\n"      ,altmode);
+-	_printf_(flag,"         outer: (size=%d)\n"   ,outer->Size());
+-	_printf_(flag,"         inner: (size=%d)\n"   ,inner->Size());
++	if(flag) _pprintLine_("       extrude: " << (extrude ? "true" : "false"));
++	if(flag) _pprintLine_("    tessellate: " << (tessellate ? "true" : "false"));
++	if(flag) _pprintLine_("       altmode: \"" << altmode << "\"");
++	if(flag) _pprintLine_("         outer: (size=" << outer->Size() << ")");
++	if(flag) _pprintLine_("         inner: (size=" << inner->Size() << ")");
+ 
+ 	return;
+ }
+@@ -83,33 +83,33 @@
+ 	char  indent2[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sKML_Polygon:\n",indent);
++	if(flag) _pprintLine_("" << indent << "KML_Polygon:");
+ 	KML_Geometry::DeepEcho(indent);
+ 
+-	_printf_(flag,"%s       extrude: %s\n"          ,indent,(extrude ? "true" : "false"));
+-	_printf_(flag,"%s    tessellate: %s\n"          ,indent,(tessellate ? "true" : "false"));
+-	_printf_(flag,"%s       altmode: \"%s\"\n"      ,indent,altmode);
++	if(flag) _pprintLine_("" << indent << "       extrude: " << (extrude ? "true" : "false"));
++	if(flag) _pprintLine_("" << indent << "    tessellate: " << (tessellate ? "true" : "false"));
++	if(flag) _pprintLine_("" << indent << "       altmode: \"" << altmode << "\"");
+ 
+ 	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
+ 	strcat(indent2,"  ");
+ 
+ 	if (outer->Size())
+ 		for (i=0; i<outer->Size(); i++) {
+-			_printf_(flag,"%s         outer: -------- begin [%d] --------\n" ,indent,i);
++			if(flag) _pprintLine_("" << indent << "         outer: -------- begin [" << i << "] --------");
+ 			((KML_LinearRing *)outer->GetObjectByOffset(i))->DeepEcho(indent2);
+-			_printf_(flag,"%s         outer: --------  end  [%d] --------\n" ,indent,i);
++			if(flag) _pprintLine_("" << indent << "         outer: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		_printf_(flag,"%s         outer: [empty]\n"    ,indent);
++		if(flag) _pprintLine_("" << indent << "         outer: [empty]");
+ 
+ 	if (inner->Size())
+ 		for (i=0; i<inner->Size(); i++) {
+-			_printf_(flag,"%s         inner: -------- begin [%d] --------\n" ,indent,i);
++			if(flag) _pprintLine_("" << indent << "         inner: -------- begin [" << i << "] --------");
+ 			((KML_LinearRing *)inner->GetObjectByOffset(i))->DeepEcho(indent2);
+-			_printf_(flag,"%s         inner: --------  end  [%d] --------\n" ,indent,i);
++			if(flag) _pprintLine_("" << indent << "         inner: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		_printf_(flag,"%s         inner: [empty]\n"    ,indent);
++		if(flag) _pprintLine_("" << indent << "         inner: [empty]");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12515)
+@@ -42,17 +42,17 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"OptionDouble Echo:\n");
++	if(flag) _pprintLine_("OptionDouble Echo:");
+ 	Option::Echo();
+ 
+ 	if (values && size) {
+-		if(numel == 1) _printf_(flag,"        values: %g\n" ,values[0]);
++		if(numel == 1) if(flag) _pprintLine_("        values: " << values[0]);
+ 		else {
+ 			StringFromSize(cstr,size,ndims);
+-			_printf_(flag,"        values: %s %s\n" ,cstr,"IssmPDouble");
++			if(flag) _pprintLine_("        values: " << cstr << " " << "IssmPDouble");
+ 		}
+ 	}
+-	else _printf_(flag,"        values: [empty]\n" );
++	else if(flag) _pprintLine_("        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionDouble::DeepEcho() {{{*/
+@@ -74,7 +74,7 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sOptionDouble DeepEcho:\n",indent);
++	if(flag) _pprintLine_("" << indent << "OptionDouble DeepEcho:");
+ 	Option::DeepEcho(indent);
+ 
+ 	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+@@ -82,17 +82,17 @@
+ 
+ 	if (values) {
+ 		dims=xNew<int>(ndims);
+-		if(numel==1) _printf_(flag,"%s        values: %g\n" ,indent,values[0]);
++		if(numel==1) if(flag) _pprintLine_("" << indent << "        values: " << values[0]);
+ 		else{
+ 			for (i=0; i<numel; i++) {
+ 				RowWiseDimsFromIndex(dims,i,size,ndims);
+ 				StringFromDims(cstr,dims,ndims);
+-				_printf_(flag,"%s        values%s: %g\n" ,indent,cstr,values[i]);
++				if(flag) _pprintLine_("" << indent << "        values" << cstr << ": " << values[i]);
+ 			}
+ 		}
+ 		xDelete<int>(dims);
+ 	}
+-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
++	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionDouble::Name {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12515)
+@@ -42,17 +42,17 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"OptionLogical Echo:\n");
++	if(flag) _pprintLine_("OptionLogical Echo:");
+ 	Option::Echo();
+ 
+ 	if (values && size) {
+-		if(numel == 1) _printf_(flag,"        values: %s\n" ,(values[0] ? "true" : "false"));
++		if(numel == 1) if(flag) _pprintLine_("        values: " << (values[0] ? "true" : "false"));
+ 		else{
+ 			StringFromSize(cstr,size,ndims);
+-			_printf_(flag,"        values: %s %s\n" ,cstr,"logical");
++			if(flag) _pprintLine_("        values: " << cstr << " " << "logical");
+ 		}
+ 	}
+-	else _printf_(flag,"        values: [empty]\n" );
++	else if(flag) _pprintLine_("        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionLogical::DeepEcho() {{{*/
+@@ -74,25 +74,25 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sOptionLogical DeepEcho:\n",indent);
++	if(flag) _pprintLine_("" << indent << "OptionLogical DeepEcho:");
+ 	Option::DeepEcho(indent);
+ 
+ 	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+ 	strcat(indent2,"  ");
+ 
+ 	if (values) {
+-		if(numel==1) _printf_(flag,"%s        values: %s\n" ,indent,(values[0] ? "true" : "false"));
++		if(numel==1) if(flag) _pprintLine_("" << indent << "        values: " << (values[0] ? "true" : "false"));
+ 		else{
+ 			dims=xNew<int>(ndims);
+ 			for (i=0; i<numel; i++) {
+ 				RowWiseDimsFromIndex(dims,i,size,ndims);
+ 				StringFromDims(cstr,dims,ndims);
+-				_printf_(flag,"%s        values%s: %s\n" ,indent,cstr,(values[i] ? "true" : "false"));
++				if(flag) _pprintLine_("" << indent << "        values" << cstr << ": " << (values[i] ? "true" : "false"));
+ 			}
+ 			xDelete<int>(dims);
+ 		}
+ 	}
+-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
++	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionLogical::Name {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12515)
+@@ -42,21 +42,21 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"OptionChar Echo:\n");
++	if(flag) _pprintLine_("OptionChar Echo:");
+ 	Option::Echo();
+ 
+ 	if (values && size) {
+ //		if (numel == 1) {
+ 		if (1) {
+-//			_printf_(flag,"        values: \"%s\"\n" ,values[0]);
+-			_printf_(flag,"        values: \"%s\"\n" ,values);
++//			if(flag) _pprintLine_("        values: \"" << values[0] << "\"");
++			if(flag) _pprintLine_("        values: \"" << values << "\"");
+ 		}
+ 		else {
+ 			StringFromSize(cstr,size,ndims);
+-			_printf_(flag,"        values: %s %s\n" ,cstr,"char");
++			if(flag) _pprintLine_("        values: " << cstr << " " << "char");
+ 		}
+ 	}
+-	else _printf_(flag,"        values: [empty]\n" );
++	else if(flag) _pprintLine_("        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionChar::DeepEcho() {{{*/
+@@ -78,7 +78,7 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sOptionChar DeepEcho:\n",indent);
++	if(flag) _pprintLine_("" << indent << "OptionChar DeepEcho:");
+ 	Option::DeepEcho(indent);
+ 
+ 	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+@@ -86,7 +86,7 @@
+ 
+ 	if (values) {
+ 		if (ndims == 2 && size[0] == 1) {
+-			_printf_(flag,"%s        values: \"%s\"\n" ,indent,values);
++			if(flag) _pprintLine_("" << indent << "        values: \"" << values << "\"");
+ 		}
+ 		else {
+ 			nstr=size[0];
+@@ -96,13 +96,13 @@
+ 			for (i=0; i<nstr; i++) {
+ 				RowWiseDimsFromIndex(dims,ipt,size,ndims);
+ 				StringFromDims(cstr,dims,ndims);
+-				_printf_(flag,"%s        values%s: \"%.*s\"\n" ,indent,cstr,size[1],&(values[ipt]));
++				if(flag) _pprintLine_("" << indent << "        values" << cstr << ": \"" << size[1] << "*s\"");
+ 				ipt+=size[1];
+ 			}
+ 			xDelete<int>(dims);
+ 		}
+ 	}
+-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
++	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionChar::Name {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.cpp	(revision 12515)
+@@ -46,14 +46,14 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"          name: \"%s\"\n" ,name);
+-	_printf_(flag,"         numel: %d\n"     ,numel);
+-	_printf_(flag,"         ndims: %d\n"     ,ndims);
++	if(flag) _pprintLine_("          name: \"" << name << "\"");
++	if(flag) _pprintLine_("         numel: " << numel);
++	if(flag) _pprintLine_("         ndims: " << ndims);
+ 	if(size){
+ 		StringFromSize(cstr,size,ndims);
+-		_printf_(flag,"          size: %s\n" ,cstr);
++		if(flag) _pprintLine_("          size: " << cstr);
+ 	}
+-	else _printf_(flag,"          size: [empty]\n" );
++	else if(flag) _pprintLine_("          size: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION Option::DeepEcho() {{{*/
+@@ -72,14 +72,14 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%s          name: \"%s\"\n" ,indent,name);
+-	_printf_(flag,"%s         numel: %d\n"     ,indent,numel);
+-	_printf_(flag,"%s         ndims: %d\n"     ,indent,ndims);
++	if(flag) _pprintLine_("" << indent << "          name: \"" << name << "\"");
++	if(flag) _pprintLine_("" << indent << "         numel: " << numel);
++	if(flag) _pprintLine_("" << indent << "         ndims: " << ndims);
+ 	if(size){
+ 		StringFromSize(cstr,size,ndims);
+-		_printf_(flag,"%s          size: %s\n" ,indent,cstr);
++		if(flag) _pprintLine_("" << indent << "          size: " << cstr);
+ 	}
+-	else _printf_(flag,"%s          size: [empty]\n" ,indent);
++	else if(flag) _pprintLine_("" << indent << "          size: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION Option::Name {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12515)
+@@ -45,14 +45,14 @@
+ 	char cstr[81];
+ 	bool flag     = true;
+ 
+-	_printf_(flag,"OptionCell Echo:\n");
++	if(flag) _pprintLine_("OptionCell Echo:");
+ 	Option::Echo();
+ 
+ 	if (values && size) {
+ 		StringFromSize(cstr,size,ndims);
+-		_printf_(flag,"        values: %s %s\n" ,cstr,"cell");
++		if(flag) _pprintLine_("        values: " << cstr << " " << "cell");
+ 	}
+-	else _printf_(flag,"        values: [empty]\n" );
++	else if(flag) _pprintLine_("        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionCell::DeepEcho() {{{*/
+@@ -74,7 +74,7 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sOptionCell DeepEcho:\n",indent);
++	if(flag) _pprintLine_("" << indent << "OptionCell DeepEcho:");
+ 	Option::DeepEcho(indent);
+ 
+ 	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+@@ -85,13 +85,13 @@
+ 		for (i=0; i<values->Size(); i++) {
+ 			ColumnWiseDimsFromIndex(dims,i,size,ndims);
+ 			StringFromDims(cstr,dims,ndims);
+-			_printf_(flag,"%s        values: -------- begin %s --------\n" ,indent,cstr);
++			if(flag) _pprintLine_("" << indent << "        values: -------- begin " << cstr << " --------");
+ 			((Option *)values->GetObjectByOffset(i))->DeepEcho(indent2);
+-			_printf_(flag,"%s        values: --------  end  %s --------\n" ,indent,cstr);
++			if(flag) _pprintLine_("" << indent << "        values: --------  end  " << cstr << " --------");
+ 		}
+ 		xDelete<int>(dims);
+ 	}
+-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
++	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionCell::Name {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12515)
+@@ -50,14 +50,14 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"OptionStruct Echo:\n");
++	if(flag) _pprintLine_("OptionStruct Echo:");
+ 	Option::Echo();
+ 
+ 	if (values && size) {
+ 		StringFromSize(cstr,size,ndims);
+-		_printf_(flag,"        values: %s %s\n" ,cstr,"struct");
++		if(flag) _pprintLine_("        values: " << cstr << " " << "struct");
+ 	}
+-	else _printf_(flag,"        values: [empty]\n" );
++	else if(flag) _pprintLine_("        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionStruct::DeepEcho() {{{*/
+@@ -79,7 +79,7 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	_printf_(flag,"%sOptionStruct DeepEcho:\n",indent);
++	if(flag) _pprintLine_("" << indent << "OptionStruct DeepEcho:");
+ 	Option::DeepEcho(indent);
+ 
+ 	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+@@ -91,15 +91,15 @@
+ 			ColumnWiseDimsFromIndex(dims,i,size,ndims);
+ 			StringFromDims(cstr,dims,ndims);
+ 			if (values[i]->Size()){
+-				_printf_(flag,"%s        values: -------- begin %s --------\n" ,indent,cstr);
++				if(flag) _pprintLine_("" << indent << "        values: -------- begin " << cstr << " --------");
+ 				for (j=0; j<values[i]->Size(); j++) ((Option *)values[i]->GetObjectByOffset(j))->DeepEcho(indent2);
+-				_printf_(flag,"%s        values: --------  end  %s --------\n" ,indent,cstr);
++				if(flag) _pprintLine_("" << indent << "        values: --------  end  " << cstr << " --------");
+ 			}
+-			else _printf_(flag,"%s        values: %s [empty]\n" ,indent,cstr);
++			else if(flag) _pprintLine_("" << indent << "        values: " << cstr << " [empty]");
+ 		}
+ 		xDelete<int>(dims);
+ 	}
+-	else _printf_(flag,"%s        values: [empty]\n" ,indent);
++	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionStruct::Name {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/FemModel.cpp	(revision 12515)
+@@ -49,22 +49,22 @@
+ 	/*do the post-processing of the datasets to get an FemModel that can actually run analyses: */
+ 	for(i=0;i<nummodels;i++){
+ 
+-		_printf_(VerboseMProcessor(),"   Processing finite element model of analysis %s:\n",EnumToStringx(analysis_type_list[i]));
++		if(VerboseMProcessor()) _pprintLine_("   Processing finite element model of analysis " << EnumToStringx(analysis_type_list[i]) << ":");
+ 		analysis_type=analysis_type_list[i];
+ 		this->SetCurrentConfiguration(analysis_type);
+ 	
+ 		if(i==0){
+-			_printf_(VerboseMProcessor(),"      creating vertex degrees of freedom\n");
++			if(VerboseMProcessor()) _pprintLine_("      creating vertex degrees of freedom");
+ 			VerticesDofx(vertices,parameters); //only call once, we only have one set of vertices
+ 		}
+ 
+-		_printf_(VerboseMProcessor(),"      resolving node constraints\n");
++		if(VerboseMProcessor()) _pprintLine_("      resolving node constraints");
+ 		SpcNodesx(nodes,constraints,parameters,analysis_type); 
+ 
+-		_printf_(VerboseMProcessor(),"      creating nodal degrees of freedom\n");
++		if(VerboseMProcessor()) _pprintLine_("      creating nodal degrees of freedom");
+ 		NodesDofx(nodes,parameters,analysis_type);
+ 	
+-		_printf_(VerboseMProcessor(),"      configuring element and loads\n");
++		if(VerboseMProcessor()) _pprintLine_("      configuring element and loads");
+ 		ConfigureObjectsx(elements, loads, nodes, vertices, materials,parameters);
+ 	}
+ 	
+@@ -144,7 +144,7 @@
+ 	/*take care of petsc options, that depend on this analysis type (present only after model processor)*/
+ 	if(this->parameters->Exist(PetscOptionsStringsEnum)){
+ 		PetscOptionsFromAnalysis(this->parameters,analysis_type);
+-		_printf_(VerboseSolver(),"      petsc Options set for analysis type: %s\n",EnumToStringx(analysis_type));
++		if(VerboseSolver()) _pprintLine_("      petsc Options set for analysis type: " << EnumToStringx(analysis_type));
+ 	}
+ 	#endif
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12515)
+@@ -77,7 +77,7 @@
+ 	if(this->data){
+ 		for(int i=0;i<MaximumNumberOfEnums;i++){
+ 			if(this->data[i]){
+-				_printf_("Info: previous pointer of %s has not been freed (DeleteData has not been called)",EnumToStringx(i));
++				if(true) _pprintLine_("Info: previous pointer of " << EnumToStringx(i) << " has not been freed (DeleteData has not been called)");
+ 			}
+ 		}
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_nonlinear.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_nonlinear.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_nonlinear.cpp	(revision 12515)
+@@ -72,7 +72,7 @@
+ 		InputUpdateFromSolutionx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,ug);
+ 
+ 		ConstraintsStatex(&constraints_converged, &num_unstable_constraints, femmodel->elements,femmodel->nodes,femmodel->vertices,loads,femmodel->materials,femmodel->parameters);
+-		_printf_(VerboseConvergence(),"   number of unstable constraints: %i\n",num_unstable_constraints);
++		if(VerboseConvergence()) _pprintLine_("   number of unstable constraints: " << num_unstable_constraints);
+ 
+ 		//rift convergence
+ 		if (!constraints_converged) {
+@@ -92,7 +92,7 @@
+ 			break;
+ 		}
+ 		if(count>=max_nonlinear_iterations){
+-			_printf_(true,"   maximum number of nonlinear iterations (%i) exceeded\n",max_nonlinear_iterations); 
++			if(true) _pprintLine_("   maximum number of nonlinear iterations (" << max_nonlinear_iterations << ") exceeded"); 
+ 			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);		
+@@ -104,7 +104,7 @@
+ 		}
+ 	}
+ 
+-	_printf_(VerboseConvergence(),"\n   total number of iterations: %i\n",count-1);
++	if(VerboseConvergence()) _pprintLine_("\n   total number of iterations: " << count-1);
+ 
+ 	/*clean-up*/
+ 	if(conserve_loads) delete loads;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_newton.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_newton.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_newton.cpp	(revision 12515)
+@@ -74,7 +74,7 @@
+ 			break;
+ 		}
+ 		if(count>=max_nonlinear_iterations){
+-			_printf_(true,"   maximum number of Newton iterations (%i) exceeded\n",max_nonlinear_iterations); 
++			if(true) _pprintLine_("   maximum number of Newton iterations (" << max_nonlinear_iterations << ") exceeded"); 
+ 			bool max_iteration_state=true;
+ 			int tempStep=1;
+ 			IssmDouble tempTime=1.0;
+@@ -99,7 +99,7 @@
+ 		count++;
+ 	}
+ 
+-	_printf_(VerboseConvergence(),"\n   total number of iterations: %i\n",count-1);
++	if(VerboseConvergence()) _pprintLine_("\n   total number of iterations: " << count-1);
+ 
+ 	/*clean-up*/
+ 	xdelete(&uf);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp	(revision 12515)
+@@ -90,7 +90,7 @@
+ 		count++;
+ 		if(converged==true)break;
+ 		if(count>=max_nonlinear_iterations){
+-			_printf_(true,"   maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations); 
++			if(true) _pprintLine_("   maximum number of iterations (" << max_nonlinear_iterations << ") exceeded"); 
+ 			break;
+ 		}
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp	(revision 12514)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp	(revision 12515)
+@@ -46,7 +46,7 @@
+ 	count=1;
+ 	converged=false;
+ 
+-	_printf_(VerboseSolution(),"%s\n","starting direct shooting method");
++	if(VerboseSolution()) _pprintLine_("" << "starting direct shooting method");
+ 	InputUpdateFromConstantx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,true,ResetPenaltiesEnum);
+ 	InputUpdateFromConstantx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,false,ConvergedEnum);
+ 	UpdateConstraintsx(femmodel->nodes,femmodel->constraints,femmodel->parameters);
+@@ -65,11 +65,11 @@
+ 		ConstraintsStatex(&constraints_converged, &num_unstable_constraints, femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+ 
+ 		if (!converged){
+-			_printf_(VerboseConvergence(),"%s%i\n","   #unstable constraints = ",num_unstable_constraints);
++			if(VerboseConvergence()) _pprintLine_("" << "   #unstable constraints = " << num_unstable_constraints);
+ 			if (num_unstable_constraints <= thermal_penalty_threshold)converged=true;
+ 			if (count>=thermal_maxiter){
+ 				converged=true;
+-				_printf_(true,"   maximum number of iterations (%i) exceeded\n",thermal_maxiter); 
++				if(true) _pprintLine_("   maximum number of iterations (" << thermal_maxiter << ") exceeded"); 
+ 			}
+ 		}
+ 		count++;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12515-12516.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12515-12516.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12515-12516.diff	(revision 12679)
@@ -0,0 +1,851 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp	(revision 12516)
+@@ -36,7 +36,7 @@
+ }
+ 
+ void NodeConnectivityUsage(void) {
+-	_printf_(true,"\n");
+-	_printf_(true,"   usage: connectivity = %s(elements, numnodes);\n",__FUNCT__);
+-	_printf_(true,"\n");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   usage: connectivity = " << __FUNCT__ << "(elements, numnodes);");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12516)
+@@ -76,11 +76,11 @@
+ 
+ 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");
++	if(true) _pprintString_("BAMGCONVERTMESH - convert [x y index] to a bamg geom and mesh geom");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("      [bamggeom bamgmesh]=BamgConvertMesh(index,x,y);");
++	if(true) _pprintLine_("      index: index of the mesh");
++	if(true) _pprintLine_("      x,y: coordinates of the nodes");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12516)
+@@ -112,23 +112,23 @@
+ }
+ 
+ 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");
++	if(true) _pprintLine_("KMLOverlay - KML file overlay module:");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   This module reads a list of image files and writes a KML or KMZ overlay file.");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("      ierror=KMLOverlay(kmlfile,'param name',param,...);");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      kmlfile     KML or KMZ file name (string)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      lataxis     latitude axis (double vector [south north], required)");
++	if(true) _pprintLine_("      longaxis    longitude axis (double vector [west east], required)");
++	if(true) _pprintLine_("      images      relative or http image file names (string or array of strings or cell array of strings, required)");
++	if(true) _pprintLine_("      zip         flag to zip the doc.kml and image files into kmzfile (double, non-zero for kmz)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      ierror     error flag (double, non-zero for error)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Example:");
++	if(true) _pprintLine_("      KMLOverlay(kmlfile,'lataxis',[south north],'longaxis',[west east],'images',{'file1.png','http://issm/file2.png'},'zip',1);");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 12516)
+@@ -97,23 +97,23 @@
+ 
+ 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");
++	if(true) _pprintLine_("INTERPFROMMESHTOMESH3D - interpolation from a 3d hexahedron mesh onto a list of point");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
++	if(true) _pprintLine_("   defined on a triangular mesh onto a list of point");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("      data_prime=InterpFromMeshToMesh3d(index,x,y,z,data,x_prime,y_prime,z_prime,default_value);");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      index: index of the mesh where data is defined");
++	if(true) _pprintLine_("      x,y,z: coordinates of the nodes where data is defined");
++	if(true) _pprintLine_("      data: matrix holding the data to be interpolated onto the mesh.");
++	if(true) _pprintLine_("      x_prime,y_prime,z_prime: coordinates of the points onto which we interpolate.");
++	if(true) _pprintLine_("      default_value: default value if no data is found (holes).");
++	if(true) _pprintLine_("      data_prime: vector of mesh interpolated data.");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Example:");
++	if(true) _pprintLine_("      load('temperature.mat');");
++	if(true) _pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh3d(index,x,y,z,temperature,md.mesh.x,md.mesh.y,md.mesh.z,253);");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 12516)
+@@ -73,26 +73,26 @@
+ }
+ 
+ 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");
++	if(true) _pprintLine_("Ll2xy - lat/long to x/y coordinate transformation module:");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   This module transforms lat/long to x/y coordinates.");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("      [x,y]=Ll2xy(lat,lon,sgn,'param name',param,...);");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      lat         latitude coordinates (double vector)");
++	if(true) _pprintLine_("      lon         longitude coordinates (double vector)");
++	if(true) _pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
++	if(true) _pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      x           x coordinates (double vector)");
++	if(true) _pprintLine_("      y           y coordinates (double vector)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Examples:");
++	if(true) _pprintLine_("      [x,y]=Ll2xy(lat,lon, 1);");
++	if(true) _pprintLine_("      [x,y]=Ll2xy(lat,lon, 1,'central_meridian',45,'standard_parallel',70);");
++	if(true) _pprintLine_("      [x,y]=Ll2xy(lat,lon,-1,'central_meridian', 0,'standard_parallel',71);");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12516)
+@@ -50,7 +50,7 @@
+ }
+ 
+ void BamgMesherUsage(void){
+-	_printf_(true,"\n");
+-	_printf_(true,"   usage: [bamgmesh,bamggeom]=%s(bamgmesh,bamggeom,bamgoptions);\n",__FUNCT__);
+-	_printf_(true,"\n");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   usage: [bamgmesh,bamggeom]=" << __FUNCT__ << "(bamgmesh,bamggeom,bamgoptions);");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 12516)
+@@ -74,22 +74,22 @@
+ 
+ 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");
++	if(true) _pprintLine_("INTERPFROMGRIDTOMESH - interpolation from a grid onto a list of points");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
++	if(true) _pprintLine_("   defined on a grid onto a list of points");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("      data_mesh=InterpFromGridToMesh(x,y,data,x_mesh,y_mesh,default_value);");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      data: matrix holding the data to be interpolated onto the mesh.");
++	if(true) _pprintLine_("      x,y: coordinates of matrix data. (x and y must be in increasing order)");
++	if(true) _pprintLine_("      x_mesh,y_mesh: coordinates of the points onto which we interpolate.");
++	if(true) _pprintLine_("      default_value: default value if no data is found (holes).");
++	if(true) _pprintLine_("      data_mesh: vector of mesh interpolated data.");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Example:");
++	if(true) _pprintLine_("      load('velocities.mat');");
++	if(true) _pprintLine_("      md.inversion.vx_obs=InterpFromGridToMesh(x_n,y_m,vx,md.mesh.x,md.mesh.y,0);");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp	(revision 12516)
+@@ -63,17 +63,17 @@
+ 
+ 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");
++	if(true) _pprintLine_("INTERPFROMMESHTOGRID - interpolation of a data defined on a mesh onto a grid");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
++	if(true) _pprintLine_("   defined on a triangular mesh onto a regular grid");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("      [x_m,y_m,griddata]=InterpFromMeshToGrid(index,x,y,data,xmin,ymax,xposting,yposting,nlines,ncols,default_value)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      index,x,y: delaunay triangulation defining the mesh.");
++	if(true) _pprintLine_("      meshdata: vertex values of data to be interpolated.");
++	if(true) _pprintLine_("      xmin,ymax,posting,nlines,ncols: parameters that define the grid");
++	if(true) _pprintLine_("      default_value: value of points located out of the mesh.");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 12516)
+@@ -106,24 +106,24 @@
+ }
+ 
+ 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");
++	if(true) _pprintLine_("KMLFileRead - KML file reader module:");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   This module reads a KML file.");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("      [ierror]=KMLFileRead(kmlfile,'param name',param,...);");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      kmlfile      file name of kml file to be read (char)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      echo         echo command (char, optional, 'off'/'on')");
++	if(true) _pprintLine_("      deepecho     deep echo command (char, optional, 'off'/'on')");
++	if(true) _pprintLine_("      write        write command (char, optional, 'off'/'stdout'/kmlfile)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      ierror       return code (non-zero for error)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Examples:");
++	if(true) _pprintLine_("      [ierror]=KMLFileRead('file.kml','deepecho','on');");
++	if(true) _pprintLine_("      [ierror]=KMLFileRead('filin.kml','echo','on','write','filout.kml');");
++	if(true) _pprintLine_("");
+ }
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12516)
+@@ -76,25 +76,25 @@
+ }
+ 
+ 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");
++	if(true) _pprintLine_("Shp2Kml - shp to kml file conversion module:");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   This module converts a file from shp to kml format.");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("      [ret]=Shp2Kml(filshp,filkml,sgn,'param name',param,...);");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      filshp      file name of shp file to be read (char, extension optional)");
++	if(true) _pprintLine_("      filkml      file name of kml file to be written (char)");
++	if(true) _pprintLine_("      sgn         sign for hemisphere (double, +1 (north); -1 (south); or 0 (no translation))");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
++	if(true) _pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      ret         return code (non-zero for warning)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Examples:");
++	if(true) _pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml', 0);");
++	if(true) _pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml', 1,'central_meridian',45,'standard_parallel',70);");
++	if(true) _pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml',-1,'central_meridian', 0,'standard_parallel',71);");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 12516)
+@@ -72,27 +72,27 @@
+ }
+ 
+ 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");
++	if(true) _pprintLine_("Exp2Kml - exp to kml file conversion module:");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   This module converts a file from exp to kml format.");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("      [ret]=Exp2Kml(filexp,filkml,sgn,'param name',param,...);");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      filexp      file name of exp file to be read (char)");
++	if(true) _pprintLine_("      filkml      file name of kml file to be written (char)");
++	if(true) _pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
++	if(true) _pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
++	if(true) _pprintLine_("      holes       flag for treatment of multiple profiles (char, optional, 'yes' for holes))");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      ret         return code (non-zero for warning)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Examples:");
++	if(true) _pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml', 1);");
++	if(true) _pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml', 1,'central_meridian',45,'standard_parallel',70,'holes','yes');");
++	if(true) _pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml',-1,'central_meridian', 0,'standard_parallel',71,'holes','yes');");
++	if(true) _pprintLine_("");
+ }
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 12516)
+@@ -65,26 +65,26 @@
+ }
+ 
+ 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");
++	if(true) _pprintLine_("Kml2Exp - kml to exp file conversion module:");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   This module converts a file from kml to exp format.");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("      [ret]=Kml2Exp(filexp,filkml,sgn,'param name',param,...);");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      filkml      file name of kml file to be read (char)");
++	if(true) _pprintLine_("      filexp      file name of exp file to be written (char)");
++	if(true) _pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
++	if(true) _pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      ret         return code (non-zero for warning)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Examples:");
++	if(true) _pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp', 1);");
++	if(true) _pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp', 1,'central_meridian',45,'standard_parallel',70);");
++	if(true) _pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp',-1,'central_meridian', 0,'standard_parallel',71);");
++	if(true) _pprintLine_("");
+ }
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp	(revision 12516)
+@@ -55,12 +55,12 @@
+ 
+ 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");
++	if(true) _pprintLine_("TriaSearch- find triangle holding a point (x0,y0) in a mesh");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("         tria=TriaSearch(index,x,y,x0,y0);");
++	if(true) _pprintLine_("      index,x,y: mesh triangulatrion");
++	if(true) _pprintLine_("      x0,y0: coordinates of the point for which we are trying to find a triangle");
++	if(true) _pprintLine_("      x0,y0 can be an array of points");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InternalFront/InternalFront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 12516)
+@@ -93,7 +93,7 @@
+ }
+ 
+ void InternalFrontUsage(void) {
+-	_printf_(true,"\n");
+-	_printf_(true,"   usage: icefront = %s(md);\n",__FUNCT__);
+-	_printf_(true,"\n");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   usage: icefront = " << __FUNCT__ << "(md);");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12516)
+@@ -153,17 +153,17 @@
+ 
+ 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");
++	if(true) _pprintLine_("   usage:");
++	if(true) _pprintLine_("         data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime);\n");
++	if(true) _pprintLine_("      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value);\n");
++	if(true) _pprintLine_("      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value,contourname);\n");
++	if(true) _pprintLine_("   where:");
++	if(true) _pprintLine_("      x,y: coordinates of the nodes where data is defined");
++	if(true) _pprintLine_("      index: index of the mesh where data is defined");
++	if(true) _pprintLine_("      data - vector holding the data to be interpolated onto the points.");
++	if(true) _pprintLine_("      x_prime,y_prime: coordinates of the mesh vertices onto which we interpolate.");
++	if(true) _pprintLine_("      default_value: a scalar or vector of size length(x_prime).");
++	if(true) _pprintLine_("      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.");
++	if(true) _pprintLine_("      data_prime:  vector of prime interpolated data.");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp	(revision 12516)
+@@ -36,7 +36,7 @@
+ }
+ 
+ void ElementConnectivityUsage(void) {
+-	_printf_(true,"\n");
+-	_printf_(true,"   usage: elementconnectivity = %s(elements, nodeconnectivity);\n",__FUNCT__);
+-	_printf_(true,"\n");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   usage: elementconnectivity = " << __FUNCT__ << "(elements, nodeconnectivity);");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kriging/Kriging.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12516)
+@@ -53,21 +53,21 @@
+ }
+ 
+ void KrigingUsage(void){
+-	_printf_(true,"\n");
+-	_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");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   usage: predictions=" << __FUNCT__ << "(x,y,observations,x_interp,y_interp,'options');");
++	if(true) _pprintLine_("   available options:");
++	if(true) _pprintLine_("      -'model': Available variogram models 'gaussian' (default),'spherical','power','exponential'");
++	if(true) _pprintLine_("         -'nugget': nugget effect (default 0.2)");
++	if(true) _pprintLine_("         -'range':  for gaussian, spherical and exponential models (default sqrt(3))");
++	if(true) _pprintLine_("         -'sill':   for gaussian, spherical and exponential models (default 1)");
++	if(true) _pprintLine_("         -'slope':  for power model (default 1)");
++	if(true) _pprintLine_("         -'power':  for power model (default 1)");
++	if(true) _pprintLine_("      -'searchradius': search radius for each prediction (default is observations span)");
++	if(true) _pprintLine_("      -'boxlength':    minimum length of quadtree boxes (useful to decrease the number of observations)");
++	if(true) _pprintLine_("      -'maxdata':      minimum number of observations for a prediction (default is 50)");
++	if(true) _pprintLine_("      -'mindata':      maximum number of observations for a prediction (default is 1)");
++	if(true) _pprintLine_("      -'maxtrimming':  maximum trimming value (default is -1.e+21)");
++	if(true) _pprintLine_("      -'mintrimming':  minimum trimming value (default is +1.e+21)");
++	if(true) _pprintLine_("      -'minspacing':   minimum distance between observation (default is 0.01)");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/EnumToString/EnumToString.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 12516)
+@@ -26,7 +26,7 @@
+ 
+ void EnumToStringUsage(void)
+ {
+-	_printf_(true,"\n");
+-	_printf_(true,"   usage: %sstring = EnumToString(enum);\n",__FUNCT__);
+-	_printf_(true,"\n");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   usage: " << __FUNCT__ << "string = EnumToString(enum);");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 12516)
+@@ -26,7 +26,7 @@
+ 
+ void StringToEnumUsage(void)
+ {
+-	_printf_(true,"\n");
+-	_printf_(true,"   usage: %senum = StringToEnum(string);\n",__FUNCT__);
+-	_printf_(true,"\n");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   usage: " << __FUNCT__ << "enum = StringToEnum(string);");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 12516)
+@@ -48,11 +48,11 @@
+ 
+ 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");
++	if(true) _pprintString_("BAMGTRIANGULATE - Delaunay Triangulation of a list of points");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("      index=BamgTriangulate(x,y);");
++	if(true) _pprintLine_("      index: index of the triangulation");
++	if(true) _pprintLine_("      x,y: coordinates of the nodes");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12516)
+@@ -92,28 +92,28 @@
+ void InterpFromMeshToMesh2dUsage(void)//{{{1
+ 
+ {
+-	_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");
++	if(true) _pprintLine_("INTERFROMMESHTOMESH2D - interpolation from a 2d triangular mesh onto a list of point");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
++	if(true) _pprintLine_("   defined on a triangular mesh onto a list of point");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("         data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp);");
++	if(true) _pprintLine_("      or data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp,default_value,contourname);");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      index: index of the mesh where data is defined");
++	if(true) _pprintLine_("      x,y: coordinates of the nodes where data is defined");
++	if(true) _pprintLine_("      data: matrix holding the data to be interpolated onto the mesh. (one column per field)");
++	if(true) _pprintLine_("      x_interp,y_interp: coordinates of the points onto which we interpolate.");
++	if(true) _pprintLine_("      if default_value and contourname not specified: linear interpolation will happen on all x_interp,y_interp.");
++	if(true) _pprintLine_("      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.");
++	if(true) _pprintLine_("      note that default_value is either a scalar, or a vector of size  length(x_interp)");
++	if(true) _pprintLine_("      data_interp: vector of mesh interpolated data.");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Example:");
++	if(true) _pprintLine_("      load('temperature.mat');");
++	if(true) _pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y);");
++	if(true) _pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y,253,'Contour.exp');");
++	if(true) _pprintLine_("");
+ }
+ //}}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 12516)
+@@ -72,27 +72,27 @@
+ }
+ 
+ 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");
++	if(true) _pprintLine_("Xy2ll - x/y to lat/long coordinate transformation module:");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   This module transforms x/y to lat/long coordinates.");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("      [lat,lon]=Xy2ll(x,y,sgn,'param name',param,...);");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      x           x coordinates (double vector)");
++	if(true) _pprintLine_("      y           y coordinates (double vector)");
++	if(true) _pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
++	if(true) _pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      lat         latitude coordinates (double vector)");
++	if(true) _pprintLine_("      lon         longitude coordinates (double vector)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Examples:");
++	if(true) _pprintLine_("      [lat,lon]=Xy2ll(x,y, 1);");
++	if(true) _pprintLine_("      [lat,lon]=Xy2ll(x,y, 1,'central_meridian',45,'standard_parallel',70);");
++	if(true) _pprintLine_("      [lat,lon]=Xy2ll(x,y,-1,'central_meridian', 0,'standard_parallel',71);");
++	if(true) _pprintLine_("");
+ }
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12516)
+@@ -117,27 +117,27 @@
+ }
+ 
+ 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");
++	if(true) _pprintLine_("KMLMeshWrite - KML mesh writer module:");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   This module writes the mesh of a model as KML polygons into the specified KML file.");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Usage:");
++	if(true) _pprintLine_("      ierror=KMLMeshWrite(name,notes,elem,nodecon,lat,long,part,data,cmap,kmlfile);");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      name       model name (string, may be empty)");
++	if(true) _pprintLine_("      notes      model notes (string or cell array of strings, may be empty)");
++	if(true) _pprintLine_("      elem       elements (double array)");
++	if(true) _pprintLine_("      nodecon    nodal connectivity array (double array, may be empty)");
++	if(true) _pprintLine_("      lat        nodal latititudes (double vector)");
++	if(true) _pprintLine_("      long       nodal longitudes (double vector)");
++	if(true) _pprintLine_("      part       nodal partitions (double vector, may be empty)");
++	if(true) _pprintLine_("      data       nodal or element data (double vector, may be empty)");
++	if(true) _pprintLine_("      cmap       color map (double nx3 array, may be empty)");
++	if(true) _pprintLine_("      kmlfile    KML file name (string)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("      ierror     error flag (double, non-zero for error)");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("   Example:");
++	if(true) _pprintLine_("      KMLMeshWrite(md.name,md.notes,md.elements,md.nodeconnectivity,md.lat,md.long,md.part,md.fm_criterion,options.cmap,filekml);");
++	if(true) _pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12515)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12516)
+@@ -131,7 +131,7 @@
+ }
+ 
+ void ChacoUsage(void){
+-	_printf_(true,"\n");
+-	_printf_(true,"Usage: [assgn] = Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal);\n");
+-	_printf_(true,"\n");
++	if(true) _pprintLine_("");
++	if(true) _pprintLine_("Usage: [assgn] = Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal);");
++	if(true) _pprintLine_("");
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12516-12517.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12516-12517.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12516-12517.diff	(revision 12679)
@@ -0,0 +1,585 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12517)
+@@ -36,7 +36,7 @@
+ 	bamgmesh=new BamgMesh();
+ 
+ 	/*Input datasets: */
+-	if (verbose) printf("Fetching inputs\n");
++	if (verbose) _printLine_("Fetching inputs");
+ 	FetchData(&index,&nels,&index_rows,INDEXHANDLE);
+ 	FetchData(&x,&nods,&x_cols,XHANDLE);
+ 	FetchData(&y,&y_rows,&y_cols,YHANDLE);
+@@ -59,7 +59,7 @@
+ 	}
+ 
+ 	/* Run core computations: */
+-	if (verbose) printf("Call core\n");
++	if (verbose) _printLine_("Call core");
+ 	BamgConvertMeshx(bamgmesh,bamggeom,index,x,y,nods,nels);
+ 
+ 	/*Generate output Matlab Structures*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12517)
+@@ -41,13 +41,13 @@
+ 	FetchData(&options,NRHS,nrhs,prhs);
+ 
+ 	options->Get(&lataxis ,&nlat ,"lataxis" );
+-	if (verbose && lataxis) for (i=0; i<nlat; i++) printf("  lataxis [%d]=%g\n",i,lataxis[i]);
++	if (verbose && lataxis) for (i=0; i<nlat; i++) _printLine_("  lataxis [" << 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]);
++	if (verbose && longaxis) for (i=0; i<nlong; i++) _printLine_("  longaxis[" << i << "]=" << longaxis[i]);
+ 	options->Get(&pimages,&nimages,"images");
+-	if (verbose && pimages) for (i=0; i<nimages; i++) printf("  pimages[%d]=\"%s\"\n",i,pimages[i]);
++	if (verbose && pimages) for (i=0; i<nimages; i++) _printLine_("  pimages[" << i << "]=\"" << pimages[i] << "\"");
+ 	options->Get(&dzip,"zip",0.);
+-	if (verbose) printf("  dzip=%g\n",dzip);
++	if (verbose) _printLine_("  dzip=" << dzip);
+ 
+ 	/*some checks*/
+ 	if (nlat !=2) _error2_("Latitudinal axes \"lataxis\" require two double values, not " << nlat << ".");
+@@ -62,14 +62,14 @@
+ 
+ 	if(!strlen(filkml)) strcpy(filkml,"stdout");
+ 
+-	if(verbose) printf("Opening kml overlay file \"%s\".\n",filkml);
++	if(verbose) _printLine_("Opening kml overlay file \"" << filkml << "\".");
+ 	fid=fopen(filkml,"w");
+ 
+ 	/* Run core computations: */
+-	if (verbose) printf("Calling core:\n");
++	if (verbose) _printLine_("Calling core:");
+ 	KMLOverlayx(&ierror,lataxis,longaxis,nimages,pimages,fid);
+ 
+-	if (verbose) printf("Closing file \"%s\".\n",filkml);
++	if (verbose) _printLine_("Closing file \"" << filkml << "\".");
+ 	fclose(fid);
+ 
+ 	/* Create kmz file, if specified: */
+@@ -86,8 +86,8 @@
+ 				strcat(czip," ");
+ 				strcat(czip,pimages[i]);
+ 			}
+-		if (verbose) printf("Zipping file \"%s\".\n",filkmz);
+-		if (verbose) printf("%s\n",czip);
++		if (verbose) _printLine_("Zipping file \"" << filkmz << "\".");
++		if (verbose) _printLine_("" << czip);
+ 
+ 		if (mexEvalString(czip)) _error2_("Error zipping file \"" << filkmz << "\".");
+ 		xfree((void**)&czip);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp	(revision 12517)
+@@ -81,11 +81,11 @@
+ 
+ 	/* Debugging of contours :{{{1*/
+ 	/*for(i=0;i<numcontours;i++){
+-		printf("\nContour echo: contour number  %i / %i\n",i+1,numcontours);
++		_printLine_("\nContour echo: contour number  " << i+1 << " / " << numcontours);
+ 		contouri=*(contours+i);
+-		printf("   Number of nodes %i\n",contouri->nods);
++		_printLine_("   Number of nodes " << contouri->nods);
+ 		for (j=0;j<contouri->nods;j++){
+-			printf("   %lf %lf\n",*(contouri->x+j),*(contouri->y+j));
++			_printLine_("   " << *(contouri->x+j) << "f " << *(contouri->y+j) << "f");
+ 		}
+ 	}*/
+ 	/*}}}*/
+@@ -102,13 +102,13 @@
+ }
+ 
+ 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");
++	_printLine_("   usage:");
++	_printLine_("   [flags]=ContourToNodes(x,y,contourname,edgevalue);\n");
++	_printLine_("   where:");
++	_printLine_("      x,y: list of nodes.");
++	_printLine_("      contourname: name of .exp file containing the contours, or resulting structure from call to expread.");
++	_printLine_("      interptype: string definining type of interpolation ('element', or 'node').");
++	_printLine_("      edgevalue: integer (0, 1 or 2) defining the value associated to the nodes on the edges of the polygons.");
++	_printLine_("      flags: vector of flags (0 or 1), of size nods.");
++	_printLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/HoleFiller/HoleFiller.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/HoleFiller/HoleFiller.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/HoleFiller/HoleFiller.cpp	(revision 12517)
+@@ -59,11 +59,11 @@
+ 
+ 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");
++	_printLine_("   HoleFiller usage:");
++	_printLine_("   [image_out]=HoleFiller(image_in,smooth);\n");
++	_printLine_("   where:");
++	_printLine_("      image_in in double format");
++	_printLine_("      smooth: 1 to smooth with a box filer, 0 to leave data raw");
++	_printLine_("      image_out in double format");
++	_printLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 12517)
+@@ -80,11 +80,11 @@
+ 
+ 	/* Debugging of contours :{{{1*/
+ 	/*for(i=0;i<numcontours;i++){
+-		printf("\nContour echo: contour number  %i / %i\n",i+1,numcontours);
++		_printLine_("\nContour echo: contour number  " << i+1 << " / " << numcontours);
+ 		contouri=*(contours+i);
+-		printf("   Number of vertices %i\n",contouri->nods);
++		_printLine_("   Number of vertices " << contouri->nods);
+ 		for (j=0;j<contouri->nods;j++){
+-			printf("   %lf %lf\n",*(contouri->x+j),*(contouri->y+j));
++			_printLine_("   " << *(contouri->x+j) << "f " << *(contouri->y+j) << "f");
+ 		}
+ 	}*/
+ 	/*}}}*/
+@@ -101,14 +101,14 @@
+ }
+ 
+ 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");
++	_printLine_("   usage:");
++	_printLine_("   [segments]=MeshProfileIntersection(index,x,y,filename);");
++	_printLine_("   where:");
++	_printLine_("   input:");
++	_printLine_("        index,x,y is a triangulation");
++	_printLine_("        filename: name of Argus style .exp file containing the segments (can be groups of disconnected segments)");
++	_printLine_("   output:");
++	_printLine_("        segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremitis for a segment ");
++	_printLine_("        belonging to the elemnt_id element. there are as many lines in segments as there are segments intersecting the ");
++	_printLine_("        mesh.");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 12517)
+@@ -39,13 +39,13 @@
+ 	/*  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);
++		if (verbose) _printLine_("  cm=" << cm);
+ 		options->Get(&sp,"standard_parallel");
+-		if (verbose) printf("  sp=%g\n",sp);
++		if (verbose) _printLine_("  sp=" << sp);
+ 	}
+ 
+ 	/*some checks*/
+-	if (verbose) printf("Checking inputs:\n");
++	if (verbose) _printLine_("Checking inputs:");
+ 	if (nlat != nlon){_error2_("Must have same number of lat[" << nlat << "] and lon[" << nlon << "] coordinates.");}
+ 	else                ncoord=nlat;
+ 	if (sgn != +1 && sgn != -1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 12517)
+@@ -62,14 +62,14 @@
+ 	/*some checks*/
+ 	if (!strlen(filnam)) strcpy(filnam,"stdout");
+ 
+-	if (verbose) printf("Opening file \"%s\".\n",filnam);
++	if (verbose) _printLine_("Opening file \"" << filnam << "\".");
+ 	fidi=fopen(filnam,"r");
+ 
+ 	/* Run core computations: */
+-	if (verbose) printf("Calling core:\n");
++	if (verbose) _printLine_("Calling core:");
+ 	kobj=KMLFileReadx(fidi);
+ 
+-	if (verbose) printf("Closing file \"%s\".\n",filnam);
++	if (verbose) _printLine_("Closing file \"" << filnam << "\".");
+ 	fclose(fidi);
+ 
+ 	if (kobj){
+@@ -82,10 +82,10 @@
+ 				kobj->Write(stdout,"");
+ 			}
+ 			else {
+-				if (verbose) printf("Opening file \"%s\".\n",write);
++				if (verbose) _printLine_("Opening file \"" << write << "\".");
+ 				fido=fopen(write,"w");
+ 				kobj->Write(fido,"");
+-				if (verbose) printf("Closing file \"%s\".\n",write);
++				if (verbose) _printLine_("Closing file \"" << write << "\".");
+ 				ierror=fclose(fido);
+ 			}
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12517)
+@@ -47,9 +47,9 @@
+ 	/*  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);
++		if (verbose) _printLine_("  cm=" << cm);
+ 		options->Get(&sp,"standard_parallel");
+-		if (verbose) printf("  sp=%g\n",sp);
++		if (verbose) _printLine_("  sp=" << sp);
+ 	}
+ 
+ 	/*some checks*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/AverageFilter/AverageFilter.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/AverageFilter/AverageFilter.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/AverageFilter/AverageFilter.cpp	(revision 12517)
+@@ -52,11 +52,11 @@
+ 
+ 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");
++	_printLine_("   AverageFilter usage:");
++	_printLine_("   [image_out]=AverageFilter(image_in,pixels);\n");
++	_printLine_("   where:");
++	_printLine_("      image_in in double format");
++	_printLine_("      pixels: characteristic size of smoothing");
++	_printLine_("      image_out in double format");
++	_printLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 12517)
+@@ -296,8 +296,8 @@
+ 
+ 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");
++	_printLine_("");
++	_printLine_("   usage: [index2,x2,y2,segments2,segmentmarkers2,rifts2]=TriMeshProcessrifts(index1,x1,y1,segments1,segmentmarkers1) ");
++	_printLine_("      where: (index1,x1,y1,segments1,segmentmarkers1) is an initial triangulation.");
++	_printLine_("      index2,x2,y2,segments2,segmentmarkers2,rifts2 is the resulting triangulation where rifts have been processed.");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 12517)
+@@ -42,9 +42,9 @@
+ 	/*  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);
++		if (verbose) _printLine_("  cm=" << cm);
+ 		options->Get(&sp,"standard_parallel");
+-		if (verbose) printf("  sp=%g\n",sp);
++		if (verbose) _printLine_("  sp=" << sp);
+ 	}
+ 
+ 	/*some checks*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 12517)
+@@ -36,9 +36,9 @@
+ 	/*  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);
++		if (verbose) _printLine_("  cm=" << cm);
+ 		options->Get(&sp,"standard_parallel");
+-		if (verbose) printf("  sp=%g\n",sp);
++		if (verbose) _printLine_("  sp=" << sp);
+ 	}
+ 
+ 	/*some checks*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.cpp	(revision 12517)
+@@ -41,12 +41,12 @@
+ }
+ 
+ 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");
++	_printLine_("   usage:");
++	_printLine_("   [flags]=PointCloudFindNeighbors(x,y,mindistance,multithread);\n");
++	_printLine_("   where:");
++	_printLine_("      x,y: list of points.");
++	_printLine_("      mindistance: minimum distance that should exist between points in the cloud.");
++	_printLine_("      multithread: run multithreaded or not. with multithreads, flags can get 1 and 2 values in duplicates.");
++	_printLine_("      flags: array of flags (flag==1 means point is within mindistance of another point)");
++	_printLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp	(revision 12517)
+@@ -41,7 +41,7 @@
+ }
+ 
+ void PropagateFlagsFromConnectivityUsage(void) {
+-	printf("\n");
+-	printf("   usage: [pool] = %s(connectivity,pool,index,flags);\n",__FUNCT__);
+-	printf("\n");
++	_printLine_("");
++	_printLine_("   usage: [pool] = " << __FUNCT__ << "(connectivity,pool,index,flags);");;
++	_printLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp	(revision 12517)
+@@ -37,7 +37,7 @@
+ 	FetchData(&y0,&numberofnodes,Y0HANDLE);
+ 
+ 	/* Echo: {{{1*/
+-	//printf("(x0,y0)=(%g,%g)\n",x0,y0);
++	//_printLine_("(x0,y0)=(" << x0 << "," << y0 << ")");
+ 	/*}}}*/
+ 
+ 	/* Run core computations: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp	(revision 12517)
+@@ -95,10 +95,10 @@
+ }
+ 
+ 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");
++	_printLine_("   usage:");
++	_printString_("   [element_partitioning,node_partitioning]=MeshPartition(md.mesh,numpartitions)");
++	_printLine_("   where:");
++	_printLine_("      element_partitioning is a vector of partitioning area numbers, for every element.");
++	_printLine_("      node_partitioning is a vector of partitioning area numbers, for every node.");
++	_printLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12517)
+@@ -113,11 +113,11 @@
+ 
+ 		/* Debugging of contours :{{{1*/
+ 		/*for(i=0;i<numcontours;i++){
+-		  printf("\nContour echo: contour number  %i / %i\n",i+1,numcontours);
++		  _printLine_("\nContour echo: contour number  " << i+1 << " / " << numcontours);
+ 		  contouri=*(contours+i);
+-		  printf("   Number of vertices %i\n",contouri->nods);
++		  _printLine_("   Number of vertices " << contouri->nods);
+ 		  for (j=0;j<contouri->nods;j++){
+-		  printf("   %lf %lf\n",*(contouri->x+j),*(contouri->y+j));
++		  _printLine_("   " << *(contouri->x+j) << "f " << *(contouri->y+j) << "f");
+ 		  }
+ 		  }*/
+ 		/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 12517)
+@@ -26,7 +26,7 @@
+ 	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&BamgTriangulateUsage);
+ 
+ 	/*Input datasets: */
+-	if (verbose) printf("Fetching inputs\n");
++	if (verbose) _printLine_("Fetching inputs");
+ 	FetchData(&x,&nods,&x_cols,XHANDLE);
+ 	FetchData(&y,&y_rows,&y_cols,YHANDLE);
+ 
+@@ -36,7 +36,7 @@
+ 	if(nods<3)               _error2_("At least 3 points are required");
+ 
+ 	/* Run core computations: */
+-	if (verbose) printf("Call core\n");
++	if (verbose) _printLine_("Call core");
+ 	BamgTriangulatex(&index,&nels,x,y,nods);
+ 
+ 	/*Write output*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12517)
+@@ -90,24 +90,24 @@
+ 
+ void ContourToMeshUsage(void)//{{{1
+ {
+-	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");
++	_printLine_("CONTOURTOMESH - Flag the elements or nodes inside a contour");
++	_printLine_("");
++	_printLine_("      Usage: ");
++	_printLine_("         [in_nod,in_elem]=ContourToMesh(index,x,y,contourname,interptype,edgevalue)\n");
++	_printLine_("");
++	_printLine_("         index,x,y: mesh triangulation.");
++	_printLine_("         contourname: name of .exp file containing the contours.");
++	_printLine_("         interptype: string definining type of interpolation ('element', or 'node').");
++	_printLine_("         edgevalue: integer (0, 1 or 2) defining the value associated to the nodes on the edges of the polygons.");
++	_printLine_("         in_nod: vector of flags (0 or 1), of size nods if interptype is set to 'node' or 'element and node', ");
++	_printLine_("            or of size 0 otherwise.");
++	_printLine_("         in_elem: vector of flags (0 or 1), of size nel if interptype is set to 'element' or 'element and node', ");
++	_printLine_("            or of size 0 otherwise.");
++	_printLine_("");
++	_printLine_("      Example: ");
++	_printLine_("         in_nod=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','node',1)");
++	_printLine_("         in_elements=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','element',0)");
++	_printLine_("         [in_nodes,in_elements]=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','element and node',0)");
++	_printLine_("");
+ }
+ //}}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 12517)
+@@ -38,9 +38,9 @@
+ 	/*  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);
++		if (verbose) _printLine_("  cm=" << cm);
+ 		options->Get(&sp,"standard_parallel");
+-		if (verbose) printf("  sp=%g\n",sp);
++		if (verbose) _printLine_("  sp=" << sp);
+ 	}
+ 
+ 	/*some checks*/
+@@ -54,7 +54,7 @@
+ 	lon=(double*)mxMalloc(ncoord*sizeof(double));
+ 
+ 	/* Run core computations: */
+-	if (verbose) printf("Calling core:\n");
++	if (verbose) _printLine_("Calling core:");
+ 	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
+ 		iret=Xy2llx(lat,lon,x,y,ncoord,sgn,cm,sp);
+ 	else
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriMesh/TriMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriMesh/TriMesh.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriMesh/TriMesh.cpp	(revision 12517)
+@@ -62,12 +62,12 @@
+ 
+ void TriMeshUsage(void) //{{{1
+ {
+-	printf("\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("\n");
++	_printLine_("");
++	_printLine_("   usage: [index,x,y,segments,segmentmarkers]=TriMesh(domainoutlinefilename,rifts,area) ");
++	_printLine_("      where: index,x,y defines a triangulation, segments is an array made ");
++	_printLine_("      of exterior segments to the mesh domain outline, segmentmarkers is an array flagging each segment, ");
++	_printLine_("      outlinefilename an Argus domain outline file, ");
++	_printLine_("      area is the maximum area desired for any element of the resulting mesh, ");
++	_printLine_("");
+ }
+ //}}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12516)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12517)
+@@ -81,24 +81,24 @@
+ 	
+ 	/*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);
++	_printLine_("nvtxs: " << nvtxs);
++	_printString_("options: [");
++	for(i=0;i<10;i++)_printString_("" << options[i] << "|");
++	_printLine_("]");
++	_printLine_("start: ");
++	for (i=0; i<nvtxs+1;i++)_printString_("" << start[i] << " ");
++	_printLine_("");
++	_printLine_("adjacency: ");
++	for (i=0; i<mxGetNzmax(A_IN);i++)_printString_("" <<adjacency[i]<< " ");i++)
++	_printLine_("");
++	_printLine_("nedges: " << nedges << " " << ewgts);
++	if(ewgts) for (i = 0; i < nedges; i++)_printString_("" << ewgts[i] << " ");
++	_printLine_("");
++	_printLine_("vwgts:");
++	for (i = 0; i < nvtxs; i++)_printString_("" << vwgts[i] << " ");
++	_printLine_("");
++	_printLine_("nparts: " << nparts[0]);
++	_printLine_("goal: " << goal);
+ 	#endif
+ 	/*}}}*/
+ 	
Index: /issm/oecreview/Archive/12321-12677/ISSM-12517-12518.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12517-12518.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12517-12518.diff	(revision 12679)
@@ -0,0 +1,851 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp	(revision 12518)
+@@ -36,7 +36,7 @@
+ }
+ 
+ void NodeConnectivityUsage(void) {
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   usage: connectivity = " << __FUNCT__ << "(elements, numnodes);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("");
++	_pprintLine_("   usage: connectivity = " << __FUNCT__ << "(elements, numnodes);");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12518)
+@@ -76,11 +76,11 @@
+ 
+ void BamgConvertMeshUsage(void)
+ {
+-	if(true) _pprintString_("BAMGCONVERTMESH - convert [x y index] to a bamg geom and mesh geom");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("      [bamggeom bamgmesh]=BamgConvertMesh(index,x,y);");
+-	if(true) _pprintLine_("      index: index of the mesh");
+-	if(true) _pprintLine_("      x,y: coordinates of the nodes");
+-	if(true) _pprintLine_("");
++	_pprintString_("BAMGCONVERTMESH - convert [x y index] to a bamg geom and mesh geom");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("      [bamggeom bamgmesh]=BamgConvertMesh(index,x,y);");
++	_pprintLine_("      index: index of the mesh");
++	_pprintLine_("      x,y: coordinates of the nodes");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12518)
+@@ -112,23 +112,23 @@
+ }
+ 
+ void KMLOverlayUsage(void){
+-	if(true) _pprintLine_("KMLOverlay - KML file overlay module:");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   This module reads a list of image files and writes a KML or KMZ overlay file.");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("      ierror=KMLOverlay(kmlfile,'param name',param,...);");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      kmlfile     KML or KMZ file name (string)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      lataxis     latitude axis (double vector [south north], required)");
+-	if(true) _pprintLine_("      longaxis    longitude axis (double vector [west east], required)");
+-	if(true) _pprintLine_("      images      relative or http image file names (string or array of strings or cell array of strings, required)");
+-	if(true) _pprintLine_("      zip         flag to zip the doc.kml and image files into kmzfile (double, non-zero for kmz)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      ierror     error flag (double, non-zero for error)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Example:");
+-	if(true) _pprintLine_("      KMLOverlay(kmlfile,'lataxis',[south north],'longaxis',[west east],'images',{'file1.png','http://issm/file2.png'},'zip',1);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("KMLOverlay - KML file overlay module:");
++	_pprintLine_("");
++	_pprintLine_("   This module reads a list of image files and writes a KML or KMZ overlay file.");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("      ierror=KMLOverlay(kmlfile,'param name',param,...);");
++	_pprintLine_("");
++	_pprintLine_("      kmlfile     KML or KMZ file name (string)");
++	_pprintLine_("");
++	_pprintLine_("      lataxis     latitude axis (double vector [south north], required)");
++	_pprintLine_("      longaxis    longitude axis (double vector [west east], required)");
++	_pprintLine_("      images      relative or http image file names (string or array of strings or cell array of strings, required)");
++	_pprintLine_("      zip         flag to zip the doc.kml and image files into kmzfile (double, non-zero for kmz)");
++	_pprintLine_("");
++	_pprintLine_("      ierror     error flag (double, non-zero for error)");
++	_pprintLine_("");
++	_pprintLine_("   Example:");
++	_pprintLine_("      KMLOverlay(kmlfile,'lataxis',[south north],'longaxis',[west east],'images',{'file1.png','http://issm/file2.png'},'zip',1);");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 12518)
+@@ -97,23 +97,23 @@
+ 
+ void InterpFromMeshToMesh3dUsage(void)
+ {
+-	if(true) _pprintLine_("INTERPFROMMESHTOMESH3D - interpolation from a 3d hexahedron mesh onto a list of point");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
+-	if(true) _pprintLine_("   defined on a triangular mesh onto a list of point");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("      data_prime=InterpFromMeshToMesh3d(index,x,y,z,data,x_prime,y_prime,z_prime,default_value);");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      index: index of the mesh where data is defined");
+-	if(true) _pprintLine_("      x,y,z: coordinates of the nodes where data is defined");
+-	if(true) _pprintLine_("      data: matrix holding the data to be interpolated onto the mesh.");
+-	if(true) _pprintLine_("      x_prime,y_prime,z_prime: coordinates of the points onto which we interpolate.");
+-	if(true) _pprintLine_("      default_value: default value if no data is found (holes).");
+-	if(true) _pprintLine_("      data_prime: vector of mesh interpolated data.");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Example:");
+-	if(true) _pprintLine_("      load('temperature.mat');");
+-	if(true) _pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh3d(index,x,y,z,temperature,md.mesh.x,md.mesh.y,md.mesh.z,253);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("INTERPFROMMESHTOMESH3D - interpolation from a 3d hexahedron mesh onto a list of point");
++	_pprintLine_("");
++	_pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
++	_pprintLine_("   defined on a triangular mesh onto a list of point");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("      data_prime=InterpFromMeshToMesh3d(index,x,y,z,data,x_prime,y_prime,z_prime,default_value);");
++	_pprintLine_("");
++	_pprintLine_("      index: index of the mesh where data is defined");
++	_pprintLine_("      x,y,z: coordinates of the nodes where data is defined");
++	_pprintLine_("      data: matrix holding the data to be interpolated onto the mesh.");
++	_pprintLine_("      x_prime,y_prime,z_prime: coordinates of the points onto which we interpolate.");
++	_pprintLine_("      default_value: default value if no data is found (holes).");
++	_pprintLine_("      data_prime: vector of mesh interpolated data.");
++	_pprintLine_("");
++	_pprintLine_("   Example:");
++	_pprintLine_("      load('temperature.mat');");
++	_pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh3d(index,x,y,z,temperature,md.mesh.x,md.mesh.y,md.mesh.z,253);");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 12518)
+@@ -73,26 +73,26 @@
+ }
+ 
+ void Ll2xyUsage(void){
+-	if(true) _pprintLine_("Ll2xy - lat/long to x/y coordinate transformation module:");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   This module transforms lat/long to x/y coordinates.");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("      [x,y]=Ll2xy(lat,lon,sgn,'param name',param,...);");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      lat         latitude coordinates (double vector)");
+-	if(true) _pprintLine_("      lon         longitude coordinates (double vector)");
+-	if(true) _pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
+-	if(true) _pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      x           x coordinates (double vector)");
+-	if(true) _pprintLine_("      y           y coordinates (double vector)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Examples:");
+-	if(true) _pprintLine_("      [x,y]=Ll2xy(lat,lon, 1);");
+-	if(true) _pprintLine_("      [x,y]=Ll2xy(lat,lon, 1,'central_meridian',45,'standard_parallel',70);");
+-	if(true) _pprintLine_("      [x,y]=Ll2xy(lat,lon,-1,'central_meridian', 0,'standard_parallel',71);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("Ll2xy - lat/long to x/y coordinate transformation module:");
++	_pprintLine_("");
++	_pprintLine_("   This module transforms lat/long to x/y coordinates.");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("      [x,y]=Ll2xy(lat,lon,sgn,'param name',param,...);");
++	_pprintLine_("");
++	_pprintLine_("      lat         latitude coordinates (double vector)");
++	_pprintLine_("      lon         longitude coordinates (double vector)");
++	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
++	_pprintLine_("");
++	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
++	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
++	_pprintLine_("");
++	_pprintLine_("      x           x coordinates (double vector)");
++	_pprintLine_("      y           y coordinates (double vector)");
++	_pprintLine_("");
++	_pprintLine_("   Examples:");
++	_pprintLine_("      [x,y]=Ll2xy(lat,lon, 1);");
++	_pprintLine_("      [x,y]=Ll2xy(lat,lon, 1,'central_meridian',45,'standard_parallel',70);");
++	_pprintLine_("      [x,y]=Ll2xy(lat,lon,-1,'central_meridian', 0,'standard_parallel',71);");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12518)
+@@ -50,7 +50,7 @@
+ }
+ 
+ void BamgMesherUsage(void){
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   usage: [bamgmesh,bamggeom]=" << __FUNCT__ << "(bamgmesh,bamggeom,bamgoptions);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("");
++	_pprintLine_("   usage: [bamgmesh,bamggeom]=" << __FUNCT__ << "(bamgmesh,bamggeom,bamgoptions);");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 12518)
+@@ -74,22 +74,22 @@
+ 
+ void InterpFromGridToMeshUsage(void)
+ {
+-	if(true) _pprintLine_("INTERPFROMGRIDTOMESH - interpolation from a grid onto a list of points");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
+-	if(true) _pprintLine_("   defined on a grid onto a list of points");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("      data_mesh=InterpFromGridToMesh(x,y,data,x_mesh,y_mesh,default_value);");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      data: matrix holding the data to be interpolated onto the mesh.");
+-	if(true) _pprintLine_("      x,y: coordinates of matrix data. (x and y must be in increasing order)");
+-	if(true) _pprintLine_("      x_mesh,y_mesh: coordinates of the points onto which we interpolate.");
+-	if(true) _pprintLine_("      default_value: default value if no data is found (holes).");
+-	if(true) _pprintLine_("      data_mesh: vector of mesh interpolated data.");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Example:");
+-	if(true) _pprintLine_("      load('velocities.mat');");
+-	if(true) _pprintLine_("      md.inversion.vx_obs=InterpFromGridToMesh(x_n,y_m,vx,md.mesh.x,md.mesh.y,0);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("INTERPFROMGRIDTOMESH - interpolation from a grid onto a list of points");
++	_pprintLine_("");
++	_pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
++	_pprintLine_("   defined on a grid onto a list of points");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("      data_mesh=InterpFromGridToMesh(x,y,data,x_mesh,y_mesh,default_value);");
++	_pprintLine_("");
++	_pprintLine_("      data: matrix holding the data to be interpolated onto the mesh.");
++	_pprintLine_("      x,y: coordinates of matrix data. (x and y must be in increasing order)");
++	_pprintLine_("      x_mesh,y_mesh: coordinates of the points onto which we interpolate.");
++	_pprintLine_("      default_value: default value if no data is found (holes).");
++	_pprintLine_("      data_mesh: vector of mesh interpolated data.");
++	_pprintLine_("");
++	_pprintLine_("   Example:");
++	_pprintLine_("      load('velocities.mat');");
++	_pprintLine_("      md.inversion.vx_obs=InterpFromGridToMesh(x_n,y_m,vx,md.mesh.x,md.mesh.y,0);");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp	(revision 12518)
+@@ -63,17 +63,17 @@
+ 
+ void InterpFromMeshToGridUsage(void)
+ {
+-	if(true) _pprintLine_("INTERPFROMMESHTOGRID - interpolation of a data defined on a mesh onto a grid");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
+-	if(true) _pprintLine_("   defined on a triangular mesh onto a regular grid");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("      [x_m,y_m,griddata]=InterpFromMeshToGrid(index,x,y,data,xmin,ymax,xposting,yposting,nlines,ncols,default_value)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      index,x,y: delaunay triangulation defining the mesh.");
+-	if(true) _pprintLine_("      meshdata: vertex values of data to be interpolated.");
+-	if(true) _pprintLine_("      xmin,ymax,posting,nlines,ncols: parameters that define the grid");
+-	if(true) _pprintLine_("      default_value: value of points located out of the mesh.");
+-	if(true) _pprintLine_("");
++	_pprintLine_("INTERPFROMMESHTOGRID - interpolation of a data defined on a mesh onto a grid");
++	_pprintLine_("");
++	_pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
++	_pprintLine_("   defined on a triangular mesh onto a regular grid");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("      [x_m,y_m,griddata]=InterpFromMeshToGrid(index,x,y,data,xmin,ymax,xposting,yposting,nlines,ncols,default_value)");
++	_pprintLine_("");
++	_pprintLine_("      index,x,y: delaunay triangulation defining the mesh.");
++	_pprintLine_("      meshdata: vertex values of data to be interpolated.");
++	_pprintLine_("      xmin,ymax,posting,nlines,ncols: parameters that define the grid");
++	_pprintLine_("      default_value: value of points located out of the mesh.");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 12518)
+@@ -106,24 +106,24 @@
+ }
+ 
+ void KMLFileReadUsage(void){
+-	if(true) _pprintLine_("KMLFileRead - KML file reader module:");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   This module reads a KML file.");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("      [ierror]=KMLFileRead(kmlfile,'param name',param,...);");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      kmlfile      file name of kml file to be read (char)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      echo         echo command (char, optional, 'off'/'on')");
+-	if(true) _pprintLine_("      deepecho     deep echo command (char, optional, 'off'/'on')");
+-	if(true) _pprintLine_("      write        write command (char, optional, 'off'/'stdout'/kmlfile)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      ierror       return code (non-zero for error)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Examples:");
+-	if(true) _pprintLine_("      [ierror]=KMLFileRead('file.kml','deepecho','on');");
+-	if(true) _pprintLine_("      [ierror]=KMLFileRead('filin.kml','echo','on','write','filout.kml');");
+-	if(true) _pprintLine_("");
++	_pprintLine_("KMLFileRead - KML file reader module:");
++	_pprintLine_("");
++	_pprintLine_("   This module reads a KML file.");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("      [ierror]=KMLFileRead(kmlfile,'param name',param,...);");
++	_pprintLine_("");
++	_pprintLine_("      kmlfile      file name of kml file to be read (char)");
++	_pprintLine_("");
++	_pprintLine_("      echo         echo command (char, optional, 'off'/'on')");
++	_pprintLine_("      deepecho     deep echo command (char, optional, 'off'/'on')");
++	_pprintLine_("      write        write command (char, optional, 'off'/'stdout'/kmlfile)");
++	_pprintLine_("");
++	_pprintLine_("      ierror       return code (non-zero for error)");
++	_pprintLine_("");
++	_pprintLine_("   Examples:");
++	_pprintLine_("      [ierror]=KMLFileRead('file.kml','deepecho','on');");
++	_pprintLine_("      [ierror]=KMLFileRead('filin.kml','echo','on','write','filout.kml');");
++	_pprintLine_("");
+ }
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12518)
+@@ -76,25 +76,25 @@
+ }
+ 
+ void Shp2KmlUsage(void){
+-	if(true) _pprintLine_("Shp2Kml - shp to kml file conversion module:");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   This module converts a file from shp to kml format.");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("      [ret]=Shp2Kml(filshp,filkml,sgn,'param name',param,...);");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      filshp      file name of shp file to be read (char, extension optional)");
+-	if(true) _pprintLine_("      filkml      file name of kml file to be written (char)");
+-	if(true) _pprintLine_("      sgn         sign for hemisphere (double, +1 (north); -1 (south); or 0 (no translation))");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
+-	if(true) _pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      ret         return code (non-zero for warning)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Examples:");
+-	if(true) _pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml', 0);");
+-	if(true) _pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml', 1,'central_meridian',45,'standard_parallel',70);");
+-	if(true) _pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml',-1,'central_meridian', 0,'standard_parallel',71);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("Shp2Kml - shp to kml file conversion module:");
++	_pprintLine_("");
++	_pprintLine_("   This module converts a file from shp to kml format.");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("      [ret]=Shp2Kml(filshp,filkml,sgn,'param name',param,...);");
++	_pprintLine_("");
++	_pprintLine_("      filshp      file name of shp file to be read (char, extension optional)");
++	_pprintLine_("      filkml      file name of kml file to be written (char)");
++	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north); -1 (south); or 0 (no translation))");
++	_pprintLine_("");
++	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
++	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
++	_pprintLine_("");
++	_pprintLine_("      ret         return code (non-zero for warning)");
++	_pprintLine_("");
++	_pprintLine_("   Examples:");
++	_pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml', 0);");
++	_pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml', 1,'central_meridian',45,'standard_parallel',70);");
++	_pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml',-1,'central_meridian', 0,'standard_parallel',71);");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 12518)
+@@ -72,27 +72,27 @@
+ }
+ 
+ void Exp2KmlUsage(void){
+-	if(true) _pprintLine_("Exp2Kml - exp to kml file conversion module:");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   This module converts a file from exp to kml format.");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("      [ret]=Exp2Kml(filexp,filkml,sgn,'param name',param,...);");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      filexp      file name of exp file to be read (char)");
+-	if(true) _pprintLine_("      filkml      file name of kml file to be written (char)");
+-	if(true) _pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
+-	if(true) _pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
+-	if(true) _pprintLine_("      holes       flag for treatment of multiple profiles (char, optional, 'yes' for holes))");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      ret         return code (non-zero for warning)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Examples:");
+-	if(true) _pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml', 1);");
+-	if(true) _pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml', 1,'central_meridian',45,'standard_parallel',70,'holes','yes');");
+-	if(true) _pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml',-1,'central_meridian', 0,'standard_parallel',71,'holes','yes');");
+-	if(true) _pprintLine_("");
++	_pprintLine_("Exp2Kml - exp to kml file conversion module:");
++	_pprintLine_("");
++	_pprintLine_("   This module converts a file from exp to kml format.");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("      [ret]=Exp2Kml(filexp,filkml,sgn,'param name',param,...);");
++	_pprintLine_("");
++	_pprintLine_("      filexp      file name of exp file to be read (char)");
++	_pprintLine_("      filkml      file name of kml file to be written (char)");
++	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
++	_pprintLine_("");
++	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
++	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
++	_pprintLine_("      holes       flag for treatment of multiple profiles (char, optional, 'yes' for holes))");
++	_pprintLine_("");
++	_pprintLine_("      ret         return code (non-zero for warning)");
++	_pprintLine_("");
++	_pprintLine_("   Examples:");
++	_pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml', 1);");
++	_pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml', 1,'central_meridian',45,'standard_parallel',70,'holes','yes');");
++	_pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml',-1,'central_meridian', 0,'standard_parallel',71,'holes','yes');");
++	_pprintLine_("");
+ }
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 12518)
+@@ -65,26 +65,26 @@
+ }
+ 
+ void Kml2ExpUsage(void){
+-	if(true) _pprintLine_("Kml2Exp - kml to exp file conversion module:");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   This module converts a file from kml to exp format.");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("      [ret]=Kml2Exp(filexp,filkml,sgn,'param name',param,...);");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      filkml      file name of kml file to be read (char)");
+-	if(true) _pprintLine_("      filexp      file name of exp file to be written (char)");
+-	if(true) _pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
+-	if(true) _pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      ret         return code (non-zero for warning)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Examples:");
+-	if(true) _pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp', 1);");
+-	if(true) _pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp', 1,'central_meridian',45,'standard_parallel',70);");
+-	if(true) _pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp',-1,'central_meridian', 0,'standard_parallel',71);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("Kml2Exp - kml to exp file conversion module:");
++	_pprintLine_("");
++	_pprintLine_("   This module converts a file from kml to exp format.");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("      [ret]=Kml2Exp(filexp,filkml,sgn,'param name',param,...);");
++	_pprintLine_("");
++	_pprintLine_("      filkml      file name of kml file to be read (char)");
++	_pprintLine_("      filexp      file name of exp file to be written (char)");
++	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
++	_pprintLine_("");
++	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
++	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
++	_pprintLine_("");
++	_pprintLine_("      ret         return code (non-zero for warning)");
++	_pprintLine_("");
++	_pprintLine_("   Examples:");
++	_pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp', 1);");
++	_pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp', 1,'central_meridian',45,'standard_parallel',70);");
++	_pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp',-1,'central_meridian', 0,'standard_parallel',71);");
++	_pprintLine_("");
+ }
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp	(revision 12518)
+@@ -55,12 +55,12 @@
+ 
+ void TriaSearchUsage(void)
+ {
+-	if(true) _pprintLine_("TriaSearch- find triangle holding a point (x0,y0) in a mesh");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("         tria=TriaSearch(index,x,y,x0,y0);");
+-	if(true) _pprintLine_("      index,x,y: mesh triangulatrion");
+-	if(true) _pprintLine_("      x0,y0: coordinates of the point for which we are trying to find a triangle");
+-	if(true) _pprintLine_("      x0,y0 can be an array of points");
+-	if(true) _pprintLine_("");
++	_pprintLine_("TriaSearch- find triangle holding a point (x0,y0) in a mesh");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("         tria=TriaSearch(index,x,y,x0,y0);");
++	_pprintLine_("      index,x,y: mesh triangulatrion");
++	_pprintLine_("      x0,y0: coordinates of the point for which we are trying to find a triangle");
++	_pprintLine_("      x0,y0 can be an array of points");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InternalFront/InternalFront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 12518)
+@@ -93,7 +93,7 @@
+ }
+ 
+ void InternalFrontUsage(void) {
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   usage: icefront = " << __FUNCT__ << "(md);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("");
++	_pprintLine_("   usage: icefront = " << __FUNCT__ << "(md);");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12518)
+@@ -153,17 +153,17 @@
+ 
+ void InterpFromMesh2dUsage(void)
+ {
+-	if(true) _pprintLine_("   usage:");
+-	if(true) _pprintLine_("         data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime);\n");
+-	if(true) _pprintLine_("      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value);\n");
+-	if(true) _pprintLine_("      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value,contourname);\n");
+-	if(true) _pprintLine_("   where:");
+-	if(true) _pprintLine_("      x,y: coordinates of the nodes where data is defined");
+-	if(true) _pprintLine_("      index: index of the mesh where data is defined");
+-	if(true) _pprintLine_("      data - vector holding the data to be interpolated onto the points.");
+-	if(true) _pprintLine_("      x_prime,y_prime: coordinates of the mesh vertices onto which we interpolate.");
+-	if(true) _pprintLine_("      default_value: a scalar or vector of size length(x_prime).");
+-	if(true) _pprintLine_("      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.");
+-	if(true) _pprintLine_("      data_prime:  vector of prime interpolated data.");
+-	if(true) _pprintLine_("");
++	_pprintLine_("   usage:");
++	_pprintLine_("         data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime);\n");
++	_pprintLine_("      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value);\n");
++	_pprintLine_("      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value,contourname);\n");
++	_pprintLine_("   where:");
++	_pprintLine_("      x,y: coordinates of the nodes where data is defined");
++	_pprintLine_("      index: index of the mesh where data is defined");
++	_pprintLine_("      data - vector holding the data to be interpolated onto the points.");
++	_pprintLine_("      x_prime,y_prime: coordinates of the mesh vertices onto which we interpolate.");
++	_pprintLine_("      default_value: a scalar or vector of size length(x_prime).");
++	_pprintLine_("      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.");
++	_pprintLine_("      data_prime:  vector of prime interpolated data.");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp	(revision 12518)
+@@ -36,7 +36,7 @@
+ }
+ 
+ void ElementConnectivityUsage(void) {
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   usage: elementconnectivity = " << __FUNCT__ << "(elements, nodeconnectivity);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("");
++	_pprintLine_("   usage: elementconnectivity = " << __FUNCT__ << "(elements, nodeconnectivity);");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kriging/Kriging.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12518)
+@@ -53,21 +53,21 @@
+ }
+ 
+ void KrigingUsage(void){
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   usage: predictions=" << __FUNCT__ << "(x,y,observations,x_interp,y_interp,'options');");
+-	if(true) _pprintLine_("   available options:");
+-	if(true) _pprintLine_("      -'model': Available variogram models 'gaussian' (default),'spherical','power','exponential'");
+-	if(true) _pprintLine_("         -'nugget': nugget effect (default 0.2)");
+-	if(true) _pprintLine_("         -'range':  for gaussian, spherical and exponential models (default sqrt(3))");
+-	if(true) _pprintLine_("         -'sill':   for gaussian, spherical and exponential models (default 1)");
+-	if(true) _pprintLine_("         -'slope':  for power model (default 1)");
+-	if(true) _pprintLine_("         -'power':  for power model (default 1)");
+-	if(true) _pprintLine_("      -'searchradius': search radius for each prediction (default is observations span)");
+-	if(true) _pprintLine_("      -'boxlength':    minimum length of quadtree boxes (useful to decrease the number of observations)");
+-	if(true) _pprintLine_("      -'maxdata':      minimum number of observations for a prediction (default is 50)");
+-	if(true) _pprintLine_("      -'mindata':      maximum number of observations for a prediction (default is 1)");
+-	if(true) _pprintLine_("      -'maxtrimming':  maximum trimming value (default is -1.e+21)");
+-	if(true) _pprintLine_("      -'mintrimming':  minimum trimming value (default is +1.e+21)");
+-	if(true) _pprintLine_("      -'minspacing':   minimum distance between observation (default is 0.01)");
+-	if(true) _pprintLine_("");
++	_pprintLine_("");
++	_pprintLine_("   usage: predictions=" << __FUNCT__ << "(x,y,observations,x_interp,y_interp,'options');");
++	_pprintLine_("   available options:");
++	_pprintLine_("      -'model': Available variogram models 'gaussian' (default),'spherical','power','exponential'");
++	_pprintLine_("         -'nugget': nugget effect (default 0.2)");
++	_pprintLine_("         -'range':  for gaussian, spherical and exponential models (default sqrt(3))");
++	_pprintLine_("         -'sill':   for gaussian, spherical and exponential models (default 1)");
++	_pprintLine_("         -'slope':  for power model (default 1)");
++	_pprintLine_("         -'power':  for power model (default 1)");
++	_pprintLine_("      -'searchradius': search radius for each prediction (default is observations span)");
++	_pprintLine_("      -'boxlength':    minimum length of quadtree boxes (useful to decrease the number of observations)");
++	_pprintLine_("      -'maxdata':      minimum number of observations for a prediction (default is 50)");
++	_pprintLine_("      -'mindata':      maximum number of observations for a prediction (default is 1)");
++	_pprintLine_("      -'maxtrimming':  maximum trimming value (default is -1.e+21)");
++	_pprintLine_("      -'mintrimming':  minimum trimming value (default is +1.e+21)");
++	_pprintLine_("      -'minspacing':   minimum distance between observation (default is 0.01)");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/EnumToString/EnumToString.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 12518)
+@@ -26,7 +26,7 @@
+ 
+ void EnumToStringUsage(void)
+ {
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   usage: " << __FUNCT__ << "string = EnumToString(enum);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("");
++	_pprintLine_("   usage: " << __FUNCT__ << "string = EnumToString(enum);");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 12518)
+@@ -26,7 +26,7 @@
+ 
+ void StringToEnumUsage(void)
+ {
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   usage: " << __FUNCT__ << "enum = StringToEnum(string);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("");
++	_pprintLine_("   usage: " << __FUNCT__ << "enum = StringToEnum(string);");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 12518)
+@@ -48,11 +48,11 @@
+ 
+ void BamgTriangulateUsage(void)
+ {
+-	if(true) _pprintString_("BAMGTRIANGULATE - Delaunay Triangulation of a list of points");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("      index=BamgTriangulate(x,y);");
+-	if(true) _pprintLine_("      index: index of the triangulation");
+-	if(true) _pprintLine_("      x,y: coordinates of the nodes");
+-	if(true) _pprintLine_("");
++	_pprintString_("BAMGTRIANGULATE - Delaunay Triangulation of a list of points");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("      index=BamgTriangulate(x,y);");
++	_pprintLine_("      index: index of the triangulation");
++	_pprintLine_("      x,y: coordinates of the nodes");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12518)
+@@ -92,28 +92,28 @@
+ void InterpFromMeshToMesh2dUsage(void)//{{{1
+ 
+ {
+-	if(true) _pprintLine_("INTERFROMMESHTOMESH2D - interpolation from a 2d triangular mesh onto a list of point");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
+-	if(true) _pprintLine_("   defined on a triangular mesh onto a list of point");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("         data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp);");
+-	if(true) _pprintLine_("      or data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp,default_value,contourname);");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      index: index of the mesh where data is defined");
+-	if(true) _pprintLine_("      x,y: coordinates of the nodes where data is defined");
+-	if(true) _pprintLine_("      data: matrix holding the data to be interpolated onto the mesh. (one column per field)");
+-	if(true) _pprintLine_("      x_interp,y_interp: coordinates of the points onto which we interpolate.");
+-	if(true) _pprintLine_("      if default_value and contourname not specified: linear interpolation will happen on all x_interp,y_interp.");
+-	if(true) _pprintLine_("      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.");
+-	if(true) _pprintLine_("      note that default_value is either a scalar, or a vector of size  length(x_interp)");
+-	if(true) _pprintLine_("      data_interp: vector of mesh interpolated data.");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Example:");
+-	if(true) _pprintLine_("      load('temperature.mat');");
+-	if(true) _pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y);");
+-	if(true) _pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y,253,'Contour.exp');");
+-	if(true) _pprintLine_("");
++	_pprintLine_("INTERFROMMESHTOMESH2D - interpolation from a 2d triangular mesh onto a list of point");
++	_pprintLine_("");
++	_pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
++	_pprintLine_("   defined on a triangular mesh onto a list of point");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("         data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp);");
++	_pprintLine_("      or data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp,default_value,contourname);");
++	_pprintLine_("");
++	_pprintLine_("      index: index of the mesh where data is defined");
++	_pprintLine_("      x,y: coordinates of the nodes where data is defined");
++	_pprintLine_("      data: matrix holding the data to be interpolated onto the mesh. (one column per field)");
++	_pprintLine_("      x_interp,y_interp: coordinates of the points onto which we interpolate.");
++	_pprintLine_("      if default_value and contourname not specified: linear interpolation will happen on all x_interp,y_interp.");
++	_pprintLine_("      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.");
++	_pprintLine_("      note that default_value is either a scalar, or a vector of size  length(x_interp)");
++	_pprintLine_("      data_interp: vector of mesh interpolated data.");
++	_pprintLine_("");
++	_pprintLine_("   Example:");
++	_pprintLine_("      load('temperature.mat');");
++	_pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y);");
++	_pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y,253,'Contour.exp');");
++	_pprintLine_("");
+ }
+ //}}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 12518)
+@@ -72,27 +72,27 @@
+ }
+ 
+ void Xy2llUsage(void){
+-	if(true) _pprintLine_("Xy2ll - x/y to lat/long coordinate transformation module:");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   This module transforms x/y to lat/long coordinates.");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("      [lat,lon]=Xy2ll(x,y,sgn,'param name',param,...);");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      x           x coordinates (double vector)");
+-	if(true) _pprintLine_("      y           y coordinates (double vector)");
+-	if(true) _pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
+-	if(true) _pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      lat         latitude coordinates (double vector)");
+-	if(true) _pprintLine_("      lon         longitude coordinates (double vector)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Examples:");
+-	if(true) _pprintLine_("      [lat,lon]=Xy2ll(x,y, 1);");
+-	if(true) _pprintLine_("      [lat,lon]=Xy2ll(x,y, 1,'central_meridian',45,'standard_parallel',70);");
+-	if(true) _pprintLine_("      [lat,lon]=Xy2ll(x,y,-1,'central_meridian', 0,'standard_parallel',71);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("Xy2ll - x/y to lat/long coordinate transformation module:");
++	_pprintLine_("");
++	_pprintLine_("   This module transforms x/y to lat/long coordinates.");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("      [lat,lon]=Xy2ll(x,y,sgn,'param name',param,...);");
++	_pprintLine_("");
++	_pprintLine_("      x           x coordinates (double vector)");
++	_pprintLine_("      y           y coordinates (double vector)");
++	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
++	_pprintLine_("");
++	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
++	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
++	_pprintLine_("");
++	_pprintLine_("      lat         latitude coordinates (double vector)");
++	_pprintLine_("      lon         longitude coordinates (double vector)");
++	_pprintLine_("");
++	_pprintLine_("   Examples:");
++	_pprintLine_("      [lat,lon]=Xy2ll(x,y, 1);");
++	_pprintLine_("      [lat,lon]=Xy2ll(x,y, 1,'central_meridian',45,'standard_parallel',70);");
++	_pprintLine_("      [lat,lon]=Xy2ll(x,y,-1,'central_meridian', 0,'standard_parallel',71);");
++	_pprintLine_("");
+ }
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12518)
+@@ -117,27 +117,27 @@
+ }
+ 
+ void KMLMeshWriteUsage(void){
+-	if(true) _pprintLine_("KMLMeshWrite - KML mesh writer module:");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   This module writes the mesh of a model as KML polygons into the specified KML file.");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Usage:");
+-	if(true) _pprintLine_("      ierror=KMLMeshWrite(name,notes,elem,nodecon,lat,long,part,data,cmap,kmlfile);");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      name       model name (string, may be empty)");
+-	if(true) _pprintLine_("      notes      model notes (string or cell array of strings, may be empty)");
+-	if(true) _pprintLine_("      elem       elements (double array)");
+-	if(true) _pprintLine_("      nodecon    nodal connectivity array (double array, may be empty)");
+-	if(true) _pprintLine_("      lat        nodal latititudes (double vector)");
+-	if(true) _pprintLine_("      long       nodal longitudes (double vector)");
+-	if(true) _pprintLine_("      part       nodal partitions (double vector, may be empty)");
+-	if(true) _pprintLine_("      data       nodal or element data (double vector, may be empty)");
+-	if(true) _pprintLine_("      cmap       color map (double nx3 array, may be empty)");
+-	if(true) _pprintLine_("      kmlfile    KML file name (string)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("      ierror     error flag (double, non-zero for error)");
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("   Example:");
+-	if(true) _pprintLine_("      KMLMeshWrite(md.name,md.notes,md.elements,md.nodeconnectivity,md.lat,md.long,md.part,md.fm_criterion,options.cmap,filekml);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("KMLMeshWrite - KML mesh writer module:");
++	_pprintLine_("");
++	_pprintLine_("   This module writes the mesh of a model as KML polygons into the specified KML file.");
++	_pprintLine_("");
++	_pprintLine_("   Usage:");
++	_pprintLine_("      ierror=KMLMeshWrite(name,notes,elem,nodecon,lat,long,part,data,cmap,kmlfile);");
++	_pprintLine_("");
++	_pprintLine_("      name       model name (string, may be empty)");
++	_pprintLine_("      notes      model notes (string or cell array of strings, may be empty)");
++	_pprintLine_("      elem       elements (double array)");
++	_pprintLine_("      nodecon    nodal connectivity array (double array, may be empty)");
++	_pprintLine_("      lat        nodal latititudes (double vector)");
++	_pprintLine_("      long       nodal longitudes (double vector)");
++	_pprintLine_("      part       nodal partitions (double vector, may be empty)");
++	_pprintLine_("      data       nodal or element data (double vector, may be empty)");
++	_pprintLine_("      cmap       color map (double nx3 array, may be empty)");
++	_pprintLine_("      kmlfile    KML file name (string)");
++	_pprintLine_("");
++	_pprintLine_("      ierror     error flag (double, non-zero for error)");
++	_pprintLine_("");
++	_pprintLine_("   Example:");
++	_pprintLine_("      KMLMeshWrite(md.name,md.notes,md.elements,md.nodeconnectivity,md.lat,md.long,md.part,md.fm_criterion,options.cmap,filekml);");
++	_pprintLine_("");
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12517)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12518)
+@@ -131,7 +131,7 @@
+ }
+ 
+ void ChacoUsage(void){
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("Usage: [assgn] = Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal);");
+-	if(true) _pprintLine_("");
++	_pprintLine_("");
++	_pprintLine_("Usage: [assgn] = Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal);");
++	_pprintLine_("");
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12518-12519.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12518-12519.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12518-12519.diff	(revision 12679)
@@ -0,0 +1,799 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12519)
+@@ -54,7 +54,7 @@
+ 		nKUF=KUF->Norm(NORM_TWO);
+ 		nF=pf->Norm(NORM_TWO);
+ 		solver_residue=nKUF/nF;
+-		if(true) _pprintLine_("\n" << "   solver residue: norm(KU-F)/norm(F)=" << solver_residue);
++		_pprintLine_("\n" << "   solver residue: norm(KU-F)/norm(F)=" << solver_residue);
+ 
+ 		//clean up
+ 		xdelete(&KU);
+@@ -70,7 +70,7 @@
+ 	nF=pf->Norm(NORM_TWO);
+ 	res=nKUoldF/nF;
+ 	if (isnan(res)){
+-		if(true) _pprintLine_("norm nf = " << nF << "f and norm kuold = " << nKUoldF << "f");
++		_pprintLine_("norm nf = " << nF << "f and norm kuold = " << nKUoldF << "f");
+ 		_error2_("mechanical equilibrium convergence criterion is NaN!");
+ 	}
+ 
+@@ -110,7 +110,7 @@
+ 				converged=false;
+ 			}
+ 		}
+-		else if(true) _pprintLine_("" << "   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " %");
++		else _pprintLine_("" << "   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " %");
+ 
+ 	}
+ 
+@@ -135,7 +135,7 @@
+ 				converged=false;
+ 			}
+ 		}
+-		else  if(true) _pprintLine_("" << "   Convergence criterion: max(du)" << "50s" << nduinf*yts << " m/yr");
++		else  _pprintLine_("" << "   Convergence criterion: max(du)" << "50s" << nduinf*yts << " m/yr");
+ 
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12519)
+@@ -59,10 +59,10 @@
+ 	#endif
+ 
+ 	/*First process inputs*/
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("Ice Sheet System Model (" << PACKAGE_NAME << ") version " << PACKAGE_VERSION);
+-	if(true) _pprintLine_("(website: " << PACKAGE_URL << " contact: " << PACKAGE_BUGREPORT << ")");
+-	if(true) _pprintLine_("");
++	_pprintLine_("");
++	_pprintLine_("Ice Sheet System Model (" << PACKAGE_NAME << ") version " << PACKAGE_VERSION);
++	_pprintLine_("(website: " << PACKAGE_URL << " contact: " << PACKAGE_BUGREPORT << ")");
++	_pprintLine_("");
+ 	ProcessArguments(&solution_type,&binfilename,&outbinfilename,&petscfilename,&lockfilename,argc,argv);
+ 
+ 	/*out of solution_type, figure out types of analyses needed in the femmodel: */
+@@ -99,7 +99,7 @@
+ 	finish_init=(IssmPDouble)clock();
+ 	#endif
+ 
+-	if(true) _pprintLine_("call computational core:");
++	_pprintLine_("call computational core:");
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
+ 	#else
+@@ -132,13 +132,13 @@
+ 	finish_core=(IssmPDouble)clock();
+ 	#endif
+ 	
+-	if(true) _pprintLine_("write results to disk:");
++	_pprintLine_("write results to disk:");
+ 	OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
+ 
+ 	/*Close output and petsc options file and write lock file if requested*/
+ 	pfclose(output_fid,lockfilename);
+ 	if (waitonlock>0){
+-		if(true) _pprintLine_("write lock file:");
++		_pprintLine_("write lock file:");
+ 		WriteLockFile(lockfilename);
+ 	}
+ 
+@@ -173,11 +173,11 @@
+ 	#endif
+ 	
+ 	#ifdef _HAVE_PETSC_
+-	if(true) _pprintLine_("closing MPI and Petsc");
++	_pprintLine_("closing MPI and Petsc");
+ 	PetscFinalize(); 
+ 	#else
+ 	#ifdef _HAVE_MPI_
+-	if(true) _pprintLine_("closing MPI and Petsc");
++	_pprintLine_("closing MPI and Petsc");
+ 	MPI_Finalize();
+ 	#endif
+ 	#endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/kriging.cpp	(revision 12519)
+@@ -53,10 +53,10 @@
+ #endif
+ 
+ 	/*First process inputs*/
+-	if(true) _pprintLine_("");
+-	if(true) _pprintLine_("Ice Sheet System Model (" << PACKAGE_NAME << ") version " << PACKAGE_VERSION);
+-	if(true) _pprintLine_("(website: " << PACKAGE_URL << " contact: " << PACKAGE_BUGREPORT << ")");
+-	if(true) _pprintLine_("");
++	_pprintLine_("");
++	_pprintLine_("Ice Sheet System Model (" << PACKAGE_NAME << ") version " << PACKAGE_VERSION);
++	_pprintLine_("(website: " << PACKAGE_URL << " contact: " << PACKAGE_BUGREPORT << ")");
++	_pprintLine_("");
+ 	ProcessArguments2(&binfilename,&outbinfilename,&lockfilename,argc,argv);
+ 
+ 	/*Process input files*/
+@@ -64,10 +64,10 @@
+ 	ProcessInputfile(&x,&y,&data,&nobs,&x_interp,&y_interp,&ninterp,&options,input_fid);
+ 	pfclose(input_fid,binfilename);
+ 
+-	if(true) _pprintLine_("call computational core:");
++	_pprintLine_("call computational core:");
+ 	pKrigingx(&predictions,&error,x,y,data,nobs,x_interp,y_interp,ninterp,options);
+ 
+-	if(true) _pprintLine_("write results to disk:");
++	_pprintLine_("write results to disk:");
+ 	Results *results = new Results();
+ 	if(my_rank==0){
+ 		output_fid=pfopen(outbinfilename,"wb");
+@@ -81,7 +81,7 @@
+ 	}
+ 
+ 	/*Close output and petsc options file and write lock file if requested*/
+-	if(true) _pprintLine_("write lock file:");
++	_pprintLine_("write lock file:");
+ 	WriteLockFile(lockfilename);
+ 
+ 	/*Free ressources */
+@@ -99,11 +99,11 @@
+ 	delete results;
+ 
+ #ifdef _HAVE_PETSC_
+-	if(true) _pprintLine_("closing MPI and Petsc");
++	_pprintLine_("closing MPI and Petsc");
+ 	PetscFinalize(); 
+ #else
+ #ifdef _HAVE_MPI_
+-	if(true) _pprintLine_("closing MPI and Petsc");
++	_pprintLine_("closing MPI and Petsc");
+ 	MPI_Finalize();
+ #endif
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12519)
+@@ -162,8 +162,8 @@
+ 	femmodel->parameters->FindParam(&responses,NULL,NULL,StepResponsesEnum);
+ 
+ 	TaoGetSolutionStatus(tao, &its, &f, &gnorm, &cnorm, &xdiff, NULL);
+-	if(its==0) if(true) _pprintLine_("Iter       Function      Residual  |  List of contributions");
+-	if(its==0) if(true) _pprintLine_("-----------------------------------+-----------------------");
++	if(its==0) _pprintLine_("Iter       Function      Residual  |  List of contributions");
++	if(its==0) _pprintLine_("-----------------------------------+-----------------------");
+ 	_pprintString_(setw(4)<<its<<"   "<<setw(12)<<setprecision(7)<<f<<"  "<<setw(12)<<setprecision(7)<<gnorm<<"  | ");
+ 
+ 	/*Retrieve objective functions independently*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12519)
+@@ -175,7 +175,7 @@
+ 	else if(mxIsClass(prhs[0],"struct"))  option=(Option*)OptionStructParse(name,prhs);
+ 	else if(mxIsClass(prhs[0],"cell"))    option=(Option*)OptionCellParse(name,prhs);
+ 	else {
+-		if(true) _pprintLine_("  Converting value of option \"" << name << "\" from unrecognized class \"" << mxGetClassName(prhs[0]) << "\" to class \"" << "struct" << "\".");
++		_pprintLine_("  Converting value of option \"" << name << "\" from unrecognized class \"" << mxGetClassName(prhs[0]) << "\" to class \"" << "struct" << "\".");
+ 		if (!mexCallMATLAB(1,lhs,1,(mxArray**)prhs,"struct")) {
+ 			option=(Option*)OptionStructParse(name,(const mxArray**)lhs);
+ 			mxDestroyArray(lhs[0]);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/Observations.cpp	(revision 12519)
+@@ -72,7 +72,7 @@
+ 	}
+ 
+ 	/*Initialize Quadtree*/
+-	if(true) _pprintString_("Generating quadtree with a maximum box size " << minlength << " (depth=" << maxdepth << ")... ");
++	_pprintString_("Generating quadtree with a maximum box size " << minlength << " (depth=" << maxdepth << ")... ");
+ 	this->quadtree = new Quadtree(xmin,xmax,ymin,ymax,maxdepth);
+ 
+ 	/*Add observations one by one*/
+@@ -102,9 +102,9 @@
+ 			this->quadtree->AddAndAverage(x[i],y[i],observations_list[i]);
+ 		}
+ 	}
+-	if(true) _pprintLine_("done");
+-	if(true) _pprintLine_("Initial number of observations: " << n);
+-	if(true) _pprintLine_("  Final number of observations: " << this->quadtree->NbObs);
++	_pprintLine_("done");
++	_pprintLine_("Initial number of observations: " << n);
++	_pprintLine_("  Final number of observations: " << this->quadtree->NbObs);
+ }
+ /*}}}*/
+ /*FUNCTION Observations::~Observations(){{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Container/DataSet.cpp	(revision 12519)
+@@ -134,7 +134,7 @@
+ 
+ 	if(this==NULL)_error2_("trying to echo a NULL dataset");
+ 
+-	if(true) _pprintLine_("DataSet echo: " << objects.size() << " objects");
++	_pprintLine_("DataSet echo: " << objects.size() << " objects");
+ 
+ 	for ( object=objects.begin() ; object < objects.end(); object++ ){
+ 
+@@ -151,7 +151,7 @@
+ 
+ 	if(this==NULL)_error2_("trying to echo a NULL dataset");
+ 
+-	if(true) _pprintLine_("DataSet echo: " << objects.size() << " objects");
++	_pprintLine_("DataSet echo: " << objects.size() << " objects");
+ 
+ 	for ( object=objects.begin() ; object < objects.end(); object++ ){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp	(revision 12519)
+@@ -50,7 +50,7 @@
+ 		sizeof(wgt3 )/sizeof(IssmPDouble),
+ 		sizeof(wgt4 )/sizeof(IssmPDouble)};
+ 
+-	//	if(true) _pprintLine_("Gauss-Legendre recurrence coefficients ngaus=" << ngaus);
++	//	_pprintLine_("Gauss-Legendre recurrence coefficients ngaus=" << ngaus);
+ 	*pxgaus =xNew<IssmPDouble>(ngaus);
+ 	*pxwgt  =xNew<IssmPDouble>(ngaus);
+ 
+@@ -1138,7 +1138,7 @@
+ 		sizeof(wgt19)/sizeof(IssmPDouble),
+ 		sizeof(wgt20)/sizeof(IssmPDouble)};
+ 
+-	//	if(true) _pprintLine_("GaussLegendreTria: iord=" << iord);
++	//	_pprintLine_("GaussLegendreTria: iord=" << iord);
+ 
+ 	/*  check to see if Gauss points need to be calculated  */
+ 	if (iord <= MAX_TRIA_SYM_ORD) {
+@@ -1198,7 +1198,7 @@
+ 		xDelete<IssmPDouble>(xgaus);
+ 	}
+ 
+-	//	if(true) _pprintLine_("GaussLegendreTria - ngaus=" << *pngaus);
++	//	_pprintLine_("GaussLegendreTria - ngaus=" << *pngaus);
+ 	//	for (i=0; i<*pngaus; i++)
+ 	//		_printf_(true,"i=%d: l1gaus=%f,l2gaus=%f,l3gaus=%f,wgt=%f\n",
+ 	//				 i,(*pl1 )[i],(*pl2 )[i],(*pl3 )[i],(*pwgt)[i]);
+@@ -1397,7 +1397,7 @@
+ 		sizeof(wgt5 )/sizeof(IssmPDouble),
+ 		sizeof(wgt6 )/sizeof(IssmPDouble)};
+ 
+-	//	if(true) _pprintLine_("GaussLegendreTetra: iord=" << iord);
++	//	_pprintLine_("GaussLegendreTetra: iord=" << iord);
+ 
+ 	/*  check to see if Gauss points need to be calculated  */
+ 	if (iord <= MAX_TETRA_SYM_ORD) {
+@@ -1520,7 +1520,7 @@
+ 		sizeof(wgt4 )/sizeof(IssmPDouble),
+ 		sizeof(wgt5 )/sizeof(IssmPDouble)};
+ 
+-	//	if(true) _pprintLine_("Gauss-Lobatto recurrence coefficients ngaus=" << ngaus);
++	//	_pprintLine_("Gauss-Lobatto recurrence coefficients ngaus=" << ngaus);
+ 	*pxgaus =xNew<IssmPDouble>(ngaus);
+ 	*pxwgt  =xNew<IssmPDouble>(ngaus);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12519)
+@@ -49,13 +49,13 @@
+ 
+ 	clock0=clock();
+ 	time0 =time(NULL);
+-	if(true) _pprintString_("\nExp2Kmlx Module -- " << ctime(&time0));
++	_pprintString_("\nExp2Kmlx Module -- " << ctime(&time0));
+ 
+ 	/*read exp file  */
+ 
+ 	if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp))
+ 		_error2_("Error reading exp file.");
+-	if(true) _pprintLine_("Exp2Kmlx -- Reading " << nprof << " exp profiles from file \"" << filexp << "\".");
++	_pprintLine_("Exp2Kmlx -- Reading " << nprof << " exp profiles from file \"" << filexp << "\".");
+ //	for (i=0; i<nprof; i++)
+ //		_printLine_("i=" << i << "; nvert=" << pnvert[i] << ", closed=" << closed[i]);
+ 
+@@ -120,7 +120,7 @@
+ /*  polygon with multiple holes  */
+ 
+ 	if (holes && nprof && (pnvert[0] <= 1 || pprofx[0][pnvert[0]-1] != pprofx[0][0] || pprofy[0][pnvert[0]-1] != pprofy[0][0])) {
+-		if(true) _pprintLine_("Warning -- Outer profile is not closed, so \"holes\" option will be ignored.");
++		_pprintLine_("Warning -- Outer profile is not closed, so \"holes\" option will be ignored.");
+ 		holes=false;
+ 	}
+ 
+@@ -152,7 +152,7 @@
+ 
+ 		for (i=1; i<nprof; i++) {
+ 			if (pnvert[i] <= 1 || pprofx[i][pnvert[i]-1] != pprofx[i][0] || pprofy[i][pnvert[i]-1] != pprofy[i][0]) {
+-				if(true) _pprintLine_("Warning -- Inner profile " << i+1 << " is not closed with \"holes\" specified, so it will be ignored.");
++				_pprintLine_("Warning -- Inner profile " << i+1 << " is not closed with \"holes\" specified, so it will be ignored.");
+ 				continue;
+ 			}
+ 
+@@ -274,7 +274,7 @@
+ 
+ /*  write kml file  */
+ 
+-	if(true) _pprintLine_("Exp2Kmlx -- Writing kml document to file \"" << filkml << "\".");
++	_pprintLine_("Exp2Kmlx -- Writing kml document to file \"" << filkml << "\".");
+ 	fid=fopen(filkml,"w");
+ 	fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+ 	kfile->Write(fid,indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp	(revision 12519)
+@@ -37,7 +37,7 @@
+ 
+ 	clock0=clock();
+ 	time0 =time(NULL);
+-	if(true) _pprintString_("\nKml2Expx Module -- " << ctime(&time0));
++	_pprintString_("\nKml2Expx Module -- " << ctime(&time0));
+ 
+ /*  read kml file  */
+ 
+@@ -48,7 +48,7 @@
+ 
+ /*  open exp file  */
+ 
+-	if(true) _pprintLine_("Writing exp profiles to file.");
++	_pprintLine_("Writing exp profiles to file.");
+ 	fido=fopen(filexp,"w");
+ 
+ /*  write the polygons and linestrings  */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp	(revision 12519)
+@@ -27,7 +27,7 @@
+ 
+ 	clock0=clock();
+ 	time0 =time(NULL);
+-	if(true) _pprintString_("\nKMLOverlayx Module -- " << ctime(&time0));
++	_pprintString_("\nKMLOverlayx Module -- " << ctime(&time0));
+ 
+ /*  construct kml file  */
+ 
+@@ -81,7 +81,7 @@
+ 
+ /*  write kml file  */
+ 
+-	if(true) _pprintLine_("Writing kml document to file.");
++	_pprintLine_("Writing kml document to file.");
+ 	fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+ 	kfile->Write(fid,indent);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp	(revision 12519)
+@@ -20,7 +20,7 @@
+ 
+ 	clock0=clock();
+ 	time0 =time(NULL);
+-	if(true) _pprintString_("\nKMLFileReadx Module -- " << ctime(&time0));
++	_pprintString_("\nKMLFileReadx Module -- " << ctime(&time0));
+ 
+ /*  read kml file  */
+ 
+@@ -42,17 +42,17 @@
+ //			kfil->DeepEcho();
+ 		}
+ 
+-//		if(true) _pprintLine_("" << kstr);
++//		_pprintLine_("" << kstr);
+ 		xDelete<char>(kstr);
+ 	}
+ 
+ 	if (kxml) {
+-		if(true) _pprintLine_("XML declaration:");
++		_pprintLine_("XML declaration:");
+ 		kxml->DeepEcho("  ");
+ 		delete kxml;
+ 	}
+ 	if (kdtd) {
+-		if(true) _pprintLine_("DTD declaration (not yet implemented):");
++		_pprintLine_("DTD declaration (not yet implemented):");
+ 		kdtd->DeepEcho("  ");
+ 		delete kdtd;
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp	(revision 12519)
+@@ -28,7 +28,7 @@
+ 
+ 	clock0=clock();
+ 	time0 =time(NULL);
+-	if(true) _pprintString_("\nKMLMeshWritex Module -- " << ctime(&time0));
++	_pprintString_("\nKMLMeshWritex Module -- " << ctime(&time0));
+ 
+ /*  construct kml document  */
+ 
+@@ -82,7 +82,7 @@
+ 	(kdoc->style     )->AddObject((Object*)kstyle);
+ 
+ 	if (cmap) {
+-		if(true) _pprintLine_("Writing " << mcmap << " Matlab colors as KML style templates.");
++		_pprintLine_("Writing " << mcmap << " Matlab colors as KML style templates.");
+ 		ipt=0;
+ 		for (i=0; i<mcmap; i++) {
+ 			klsty=new KML_LineStyle();
+@@ -117,7 +117,7 @@
+ 	are consecutively numbered)  */
+ 
+ 	if (!nodecon) {
+-		if(true) _pprintLine_("Creating the node connectivity table.");
++		_pprintLine_("Creating the node connectivity table.");
+ 		nncon=mxepg+1;
+ 		nodecon=xNewZeroInit<int>(mncon*nncon);
+ 		ncfree=true;
+@@ -148,7 +148,7 @@
+ 			edata=data;
+ 
+ 		else if (mdata == mncon) {
+-			if(true) _pprintLine_("Averaging nodal data to element data.");
++			_pprintLine_("Averaging nodal data to element data.");
+ 			edata=xNewZeroInit<double>(melem*ndata);
+ 			edfree=true;
+ 
+@@ -192,7 +192,7 @@
+ 
+ /*  write kml file  */
+ 
+-	if(true) _pprintLine_("Writing kml document to file.");
++	_pprintLine_("Writing kml document to file.");
+ 	fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+ 	fprintf(fid,"<kml xmlns=\"http://www.opengis.net/kml/2.2\">\n");
+ 	kdoc->Write(fid,indent);
+@@ -202,7 +202,7 @@
+ 	_printf_(true,"  Wrote kml file -- %f CPU seconds; %f elapsed seconds.\n\n",
+ 			 ((double)(clock0b-clock0a))/CLOCKS_PER_SEC,difftime(time0b,time0a));
+ 
+-	if(true) _pprintLine_("Deleting kml document.");
++	_pprintLine_("Deleting kml document.");
+ 	delete kdoc;
+ 	clock0c=clock();
+ 	time0c =time(NULL);
+@@ -303,7 +303,7 @@
+ 
+ /*  write each element as a polygon placemark  */
+ 
+-	if(true) _pprintLine_("Writing " << melem << " tria elements as KML polygons.");
++	_pprintLine_("Writing " << melem << " tria elements as KML polygons.");
+ 
+ 	for (i=0; i<melem; i++) {
+ 		kplace=new KML_Placemark();
+@@ -355,9 +355,9 @@
+ 		(kfold ->feature )->AddObject((Object*)kplace);
+ 
+ //		if (!(int)fmod((double)(i+1),1000))
+-//			if(true) _pprintLine_("  " << (i+1) << " tria elements written.");
++//			_pprintLine_("  " << (i+1) << " tria elements written.");
+ 	}
+-	if(true) _pprintLine_("  " << melem << " tria elements written.");
++	_pprintLine_("  " << melem << " tria elements written.");
+ 
+ 	return(kfold);
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp	(revision 12519)
+@@ -67,7 +67,7 @@
+ 
+ 	clock0=clock();
+ 	time0 =time(NULL);
+-	if(true) _pprintString_("\nShp2Kmlx Module -- " << ctime(&time0));
++	_pprintString_("\nShp2Kmlx Module -- " << ctime(&time0));
+ 
+ /*  note that much of the following code is taken from shpdump.c in shapelib.  */
+ 
+@@ -572,7 +572,7 @@
+ 
+ /*  write kml file  */
+ 
+-	if(true) _pprintLine_("Writing kml document to file.");
++	_pprintLine_("Writing kml document to file.");
+ 	fid=fopen(filkml,"w");
+ 	fprintf(fid,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+ 	kfile->Write(fid,indent);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp	(revision 12519)
+@@ -138,7 +138,7 @@
+ 
+ 	name=KMLFileTagName(NULL,
+ 						kstr);
+-//	if(true) _pprintLine_("KML_Unknown::Read -- opening name=" << name << ".");
++//	_pprintLine_("KML_Unknown::Read -- opening name=" << name << ".");
+ 
+ /*  get object attributes and check for solo tag  */
+ 
+@@ -150,10 +150,10 @@
+ 
+ 	while (kstri=KMLFileToken(fid,
+ 							  &ncom,&pcom)) {
+-//		if(true) _pprintLine_("KML_Unknown::Read -- kstri=" << kstri << ".");
++//		_pprintLine_("KML_Unknown::Read -- kstri=" << kstri << ".");
+ 		if      (!strncmp(&kstri[0],"</", 2) &&
+ 				 !strncmp(&kstri[2],name,strlen(name))) {
+-//			if(true) _pprintLine_("KML_Unknown::Read -- closing name=" << name << ".");
++//			_pprintLine_("KML_Unknown::Read -- closing name=" << name << ".");
+ 			xfree((void**)&kstri);
+ 			break;
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 12519)
+@@ -126,10 +126,10 @@
+ 		}
+ 
+ //	if      (itag)
+-//		if(true) _pprintLine_("tag buffer (length=" << ibuf << "):");
++//		_pprintLine_("tag buffer (length=" << ibuf << "):");
+ //	else if (ifield)
+-//		if(true) _pprintLine_("field buffer (length=" << ibuf << "):");
+-//	if(true) _pprintLine_("" << buffer);
++//		_pprintLine_("field buffer (length=" << ibuf << "):");
++//	_pprintLine_("" << buffer);
+ 
+ 	if (!ibuf)
+ 		xfree((void**)&buffer);
+@@ -192,8 +192,8 @@
+ 			break;
+ 		}
+ 
+-//	if(true) _pprintLine_("comment buffer (length=" << ibuf << "):");
+-//	if(true) _pprintLine_("" << buffer);
++//	_pprintLine_("comment buffer (length=" << ibuf << "):");
++//	_pprintLine_("" << buffer);
+ 
+ 	if (!ibuf)
+ 		xfree((void**)&buffer);
+@@ -253,7 +253,7 @@
+ /*  skip opening delimeter and find subsequent blank or closing delimiter  */
+ 
+ 	ktokn=strtok(ktagi,"< >");
+-//	if(true) _pprintLine_("KMLFileTagName -- initial token=\"" << ktokn << "\".");
++//	_pprintLine_("KMLFileTagName -- initial token=\"" << ktokn << "\".");
+ 
+ 	if (!pname) {
+ 		if (maxlen)
+@@ -263,8 +263,8 @@
+ 	}
+ 
+ 	if (maxlen && (maxlen < strlen(ktokn))) {
+-		if(true) _pprintLine_("KMLFileTagName -- string field too short for " << ktag << ".");
+-		if(true) _pprintLine_("KMLFileTagName -- \"" << ktokn << "\" truncated to " << maxlen << " characters.");
++		_pprintLine_("KMLFileTagName -- string field too short for " << ktag << ".");
++		_pprintLine_("KMLFileTagName -- \"" << ktokn << "\" truncated to " << maxlen << " characters.");
+ 		strncpy(pname,ktokn,maxlen);
+ 	}
+ 	else
+@@ -299,14 +299,14 @@
+ 
+ 	/*  return first non blank and move past subsequent blank  */
+ 	ktokn=strtok(ktagi," ");
+-//	if(true) _pprintLine_("KMLFileTagAttrib -- initial token=\"" << ktokn << "\".");
++//	_pprintLine_("KMLFileTagAttrib -- initial token=\"" << ktokn << "\".");
+ 
+ 	/*  return next non " =?/>" and move past subsequent " =?/>"  */
+ 	while (ktokn=strtok(NULL," =?/>")) {
+ 
+ 		/*  return next non quote and move past subsequent quote  */
+ 		ktokv=strtok(NULL,quote);
+-//		if(true) _pprintLine_("KMLFileTagAttrib -- attribute " << ktokn << "=\"" << ktokv << "\".");
++//		_pprintLine_("KMLFileTagAttrib -- attribute " << ktokn << "=\"" << ktokv << "\".");
+ 
+ /*  add the attribute to the dataset  */
+ 
+@@ -322,7 +322,7 @@
+ 		(!strncmp(&ktag[0],"<!DOCTYPE",9) && !strncmp(&ktag[strlen(ktag)-1], ">",1)) ||
+ 		(!strncmp(&ktag[0],"<"        ,1) && !strncmp(&ktag[strlen(ktag)-2],"/>",2)))
+ 		isolo=1;
+-//	if(true) _pprintLine_("KMLFileTagAttrib -- isolo=" << isolo << ".");
++//	_pprintLine_("KMLFileTagAttrib -- isolo=" << isolo << ".");
+ 
+ 	return(isolo);
+ }
+@@ -356,7 +356,7 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pival << ".");
++//	_pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pival << ".");
+ 
+ 	return(0);
+ }
+@@ -390,7 +390,7 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << (*pbval ? "true" : "false") << ".");
++//	_pprintLine_("KMLFileTokenParse -- " << ktag << "=" << (*pbval ? "true" : "false") << ".");
+ 
+ 	return(0);
+ }
+@@ -427,8 +427,8 @@
+ 	}
+ 
+ 	if (maxlen && (maxlen < strlen(kstr))) {
+-		if(true) _pprintLine_("KMLFileTokenParse -- string field too short for " << ktag << ".");
+-		if(true) _pprintLine_("KMLFileTokenParse -- \"" << kstr << "\" truncated to " << maxlen << " characters.");
++		_pprintLine_("KMLFileTokenParse -- string field too short for " << ktag << ".");
++		_pprintLine_("KMLFileTokenParse -- \"" << kstr << "\" truncated to " << maxlen << " characters.");
+ 		strncpy(pstr,kstr,maxlen);
+ 	}
+ 	else
+@@ -451,7 +451,7 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=\"" << pstr << "\".");
++//	_pprintLine_("KMLFileTokenParse -- " << ktag << "=\"" << pstr << "\".");
+ 
+ 	return(pstr);
+ }
+@@ -485,7 +485,7 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pfval << ".");
++//	_pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pfval << ".");
+ 
+ 	return(0);
+ }
+@@ -519,7 +519,7 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pdval << ".");
++//	_pprintLine_("KMLFileTokenParse -- " << ktag << "=" << *pdval << ".");
+ 
+ 	return(0);
+ }
+@@ -577,9 +577,9 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=...");
++//	_pprintLine_("KMLFileTokenParse -- " << ktag << "=...");
+ //	for (j=0; j<=i; j++)
+-//		if(true) _pprintLine_("   [" << j << "]: " << (*pdval)[j] << "g");
++//		_pprintLine_("   [" << j << "]: " << (*pdval)[j] << "g");
+ 
+ 	return(0);
+ }
+@@ -630,7 +630,7 @@
+ 		*m=i+1;
+ 
+ 	if (j != 2)
+-		if(true) _pprintLine_("KMLFileTokenParse -- Double [m x 3] field for " << ktag << " does not have multiple of 3 values.");
++		_pprintLine_("KMLFileTokenParse -- Double [m x 3] field for " << ktag << " does not have multiple of 3 values.");
+ 
+ /*  get additional token and compare to closing tag  */
+ 
+@@ -644,9 +644,9 @@
+ 		else
+ 			xfree((void**)&kstr);
+ 
+-//	if(true) _pprintLine_("KMLFileTokenParse -- " << ktag << "=...");
++//	_pprintLine_("KMLFileTokenParse -- " << ktag << "=...");
+ //	for (j=0; j<=i; j++)
+-//		if(true) _pprintLine_("   [" << j << "][0-2]: " << (*pdval3)[j][0] << "g," << (*pdval3)[j][1] << "g," << (*pdval3)[j][2] << "g");
++//		_pprintLine_("   [" << j << "][0-2]: " << (*pdval3)[j][0] << "g," << (*pdval3)[j][1] << "g," << (*pdval3)[j][2] << "g");
+ 
+ 	return(0);
+ }
+@@ -660,7 +660,7 @@
+ /*  note that tags of the same type can be nested inside each other, so for each
+ 	opening tag, must find corresponding closing tag  */
+ 
+-	if(true) _pprintLine_("KMLFileTagSkip -- input tag " << ktag << ".");
++	_pprintLine_("KMLFileTagSkip -- input tag " << ktag << ".");
+ 
+ /*  if next token is a closing tag, compare to input  */
+ 
+@@ -669,7 +669,7 @@
+ 		if      ((kstr[0] == '<') &&
+ 				 (kstr[1] == '/') &&
+ 				 (!strncmp(&(kstr[2]),&(ktag[1]),(strcspn(ktag," >")-1)/sizeof(char)))) {
+-			if(true) _pprintLine_("KMLFileTagSkip -- closing tag " << kstr << ".");
++			_pprintLine_("KMLFileTagSkip -- closing tag " << kstr << ".");
+ 			xfree((void**)&kstr);
+ 			return(0);
+ 		}
+@@ -678,7 +678,7 @@
+ 
+ 		else if ((kstr[0] == '<') &&
+ 				 (kstr[1] != '/')) {
+-			if(true) _pprintLine_("KMLFileTagSkip -- opening tag " << kstr << ".");
++			_pprintLine_("KMLFileTagSkip -- opening tag " << kstr << ".");
+ 			KMLFileTagSkip(kstr,
+ 						   fid);
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp	(revision 12519)
+@@ -252,7 +252,7 @@
+ //	}
+ 
+ 	else if (!strncmp(kstr,"<",1)) {
+-		if(true) _pprintLine_("KML_Object::Read -- Unrecognized opening tag " << kstr << ".");
++		_pprintLine_("KML_Object::Read -- Unrecognized opening tag " << kstr << ".");
+ //		KMLFileTagSkip(kstr,
+ //					   fid);
+ 		kobj=(KML_Object*)new KML_Unknown();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12519)
+@@ -77,7 +77,7 @@
+ 	if(this->data){
+ 		for(int i=0;i<MaximumNumberOfEnums;i++){
+ 			if(this->data[i]){
+-				if(true) _pprintLine_("Info: previous pointer of " << EnumToStringx(i) << " has not been freed (DeleteData has not been called)");
++				_pprintLine_("Info: previous pointer of " << EnumToStringx(i) << " has not been freed (DeleteData has not been called)");
+ 			}
+ 		}
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_nonlinear.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_nonlinear.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_nonlinear.cpp	(revision 12519)
+@@ -92,7 +92,7 @@
+ 			break;
+ 		}
+ 		if(count>=max_nonlinear_iterations){
+-			if(true) _pprintLine_("   maximum number of nonlinear iterations (" << max_nonlinear_iterations << ") exceeded"); 
++			_pprintLine_("   maximum number of nonlinear iterations (" << max_nonlinear_iterations << ") exceeded"); 
+ 			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);		
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_newton.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_newton.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_newton.cpp	(revision 12519)
+@@ -74,7 +74,7 @@
+ 			break;
+ 		}
+ 		if(count>=max_nonlinear_iterations){
+-			if(true) _pprintLine_("   maximum number of Newton iterations (" << max_nonlinear_iterations << ") exceeded"); 
++			_pprintLine_("   maximum number of Newton iterations (" << max_nonlinear_iterations << ") exceeded"); 
+ 			bool max_iteration_state=true;
+ 			int tempStep=1;
+ 			IssmDouble tempTime=1.0;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp	(revision 12519)
+@@ -90,7 +90,7 @@
+ 		count++;
+ 		if(converged==true)break;
+ 		if(count>=max_nonlinear_iterations){
+-			if(true) _pprintLine_("   maximum number of iterations (" << max_nonlinear_iterations << ") exceeded"); 
++			_pprintLine_("   maximum number of iterations (" << max_nonlinear_iterations << ") exceeded"); 
+ 			break;
+ 		}
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp	(revision 12518)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp	(revision 12519)
+@@ -69,7 +69,7 @@
+ 			if (num_unstable_constraints <= thermal_penalty_threshold)converged=true;
+ 			if (count>=thermal_maxiter){
+ 				converged=true;
+-				if(true) _pprintLine_("   maximum number of iterations (" << thermal_maxiter << ") exceeded"); 
++				_pprintLine_("   maximum number of iterations (" << thermal_maxiter << ") exceeded"); 
+ 			}
+ 		}
+ 		count++;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12519-12520.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12519-12520.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12519-12520.diff	(revision 12679)
@@ -0,0 +1,1361 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12520)
+@@ -80,11 +80,11 @@
+ 
+ 	//print
+ 	if(res<eps_res){
+-		if(VerboseConvergence()) _pprintLine_("" << "   mechanical equilibrium convergence criterion" << "50s" << res*100 << " < " << eps_res*100 << " %");
++		if(VerboseConvergence()) _pprintLine_("   mechanical equilibrium convergence criterion" << "50s" << res*100 << " < " << eps_res*100 << " %");
+ 		converged=true;
+ 	}
+ 	else{ 
+-		if(VerboseConvergence()) _pprintLine_("" << "   mechanical equilibrium convergence criterion" << "50s" << res*100 << " > " << eps_res*100 << " %");
++		if(VerboseConvergence()) _pprintLine_("   mechanical equilibrium convergence criterion" << "50s" << res*100 << " > " << eps_res*100 << " %");
+ 		converged=false;
+ 	}
+ 
+@@ -103,14 +103,14 @@
+ 		//print
+ 		if (!isnan(eps_rel)){
+ 			if((ndu/nu)<eps_rel){
+-				if(VerboseConvergence()) _pprintLine_("" << "   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " < " << eps_rel*100 << " %");
++				if(VerboseConvergence()) _pprintLine_("   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " < " << eps_rel*100 << " %");
+ 			}
+ 			else{ 
+-				if(VerboseConvergence()) _pprintLine_("" << "   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " > " << eps_rel*100 << " %");
++				if(VerboseConvergence()) _pprintLine_("   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " > " << eps_rel*100 << " %");
+ 				converged=false;
+ 			}
+ 		}
+-		else _pprintLine_("" << "   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " %");
++		else _pprintLine_("   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " %");
+ 
+ 	}
+ 
+@@ -128,14 +128,14 @@
+ 		//print
+ 		if (!isnan(eps_abs)){
+ 			if ((nduinf*yts)<eps_abs){
+-				if(VerboseConvergence()) _pprintLine_("" << "   Convergence criterion: max(du)" << "50s" << nduinf*yts << " < " << eps_abs << " m/yr");
++				if(VerboseConvergence()) _pprintLine_("   Convergence criterion: max(du)" << "50s" << nduinf*yts << " < " << eps_abs << " m/yr");
+ 			}
+ 			else{
+-				if(VerboseConvergence()) _pprintLine_("" << "   Convergence criterion: max(du)" << "50s" << nduinf*yts << " > " << eps_abs << " m/yr");
++				if(VerboseConvergence()) _pprintLine_("   Convergence criterion: max(du)" << "50s" << nduinf*yts << " > " << eps_abs << " m/yr");
+ 				converged=false;
+ 			}
+ 		}
+-		else  _pprintLine_("" << "   Convergence criterion: max(du)" << "50s" << nduinf*yts << " m/yr");
++		else  _pprintLine_("   Convergence criterion: max(du)" << "50s" << nduinf*yts << " m/yr");
+ 
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystate_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystate_core.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/steadystate_core.cpp	(revision 12520)
+@@ -54,19 +54,19 @@
+ 		_error2_("ISSM was not compiled with thermal capabilities. Exiting");
+ 		#endif
+ 
+-		if(VerboseSolution()) _pprintLine_("" << "   computing new velocity");
++		if(VerboseSolution()) _pprintLine_("   computing new velocity");
+ 		diagnostic_core(femmodel);
+ 
+ 		if (step>1){
+-			if(VerboseSolution()) _pprintLine_("" << "   checking velocity, temperature and pressure convergence");
++			if(VerboseSolution()) _pprintLine_("   checking velocity, temperature and pressure convergence");
+ 			if(steadystateconvergence(femmodel)) break;
+ 		}
+ 		if(step>maxiter){
+-			if(VerboseSolution()) _pprintLine_("" << "   maximum number steadystate iterations " << maxiter << " reached");
++			if(VerboseSolution()) _pprintLine_("   maximum number steadystate iterations " << maxiter << " reached");
+ 			break;
+ 		}
+ 		
+-		if(VerboseSolution()) _pprintLine_("" << "   saving velocity, temperature and pressure to check for convergence at next step");
++		if(VerboseSolution()) _pprintLine_("   saving velocity, temperature and pressure to check for convergence at next step");
+ 		InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VxEnum,VxPicardEnum);
+ 		InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VyEnum,VyPicardEnum);
+ 		InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,VzEnum,VzPicardEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/surfaceslope_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/surfaceslope_core.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/surfaceslope_core.cpp	(revision 12520)
+@@ -18,7 +18,7 @@
+ 	/*Recover some parameters: */
+ 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
+ 
+-	if(VerboseSolution()) _pprintLine_("" << "computing slope...");
++	if(VerboseSolution()) _pprintLine_("computing slope...");
+ 
+ 	/*Call on core computations: */
+ 	femmodel->SetCurrentConfiguration(SurfaceSlopeAnalysisEnum,SurfaceSlopeXAnalysisEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/adjointdiagnostic_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/adjointdiagnostic_core.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/adjointdiagnostic_core.cpp	(revision 12520)
+@@ -24,7 +24,7 @@
+ 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
+ 
+ 	/*Compute velocities*/
+-	if(VerboseSolution()) _pprintLine_("" << "   computing velocities");
++	if(VerboseSolution()) _pprintLine_("   computing velocities");
+ 	femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum);
+ 	solver_nonlinear(femmodel,conserve_loads); 
+ 
+@@ -32,7 +32,7 @@
+ 	SurfaceAreax(NULL,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+ 
+ 	/*Compute adjoint*/
+-	if(VerboseSolution()) _pprintLine_("" << "   computing adjoint");
++	if(VerboseSolution()) _pprintLine_("   computing adjoint");
+ 	femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum,AdjointHorizAnalysisEnum);
+ 	solver_adjoint_linear(femmodel);
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/bedslope_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/bedslope_core.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/bedslope_core.cpp	(revision 12520)
+@@ -18,7 +18,7 @@
+ 	/*Recover some parameters: */
+ 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
+ 
+-	if(VerboseSolution()) _pprintLine_("" << "   computing slope");
++	if(VerboseSolution()) _pprintLine_("   computing slope");
+ 
+ 	/*Call on core computations: */
+ 	femmodel->SetCurrentConfiguration(BedSlopeAnalysisEnum,BedSlopeXAnalysisEnum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/ResetBoundaryConditions.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/ResetBoundaryConditions.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/ResetBoundaryConditions.cpp	(revision 12520)
+@@ -14,7 +14,7 @@
+ 	Nodes *nodes = NULL;
+ 	int    i;
+ 
+-	if(VerboseSolution()) _pprintLine_("" << "   updating boundary conditions...");
++	if(VerboseSolution()) _pprintLine_("   updating boundary conditions...");
+ 			
+ 	/*set current analysis: */
+ 	femmodel->SetCurrentConfiguration(analysis_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/adjointbalancethickness_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/adjointbalancethickness_core.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/adjointbalancethickness_core.cpp	(revision 12520)
+@@ -21,7 +21,7 @@
+ 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
+ 
+ 	/*compute thickness */
+-	if(VerboseSolution()) _pprintLine_("" << "   computing thickness");
++	if(VerboseSolution()) _pprintLine_("   computing thickness");
+ 	femmodel->SetCurrentConfiguration(BalancethicknessAnalysisEnum);
+ 	solver_linear(femmodel);
+ 
+@@ -29,7 +29,7 @@
+ 	SurfaceAreax(NULL,femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+ 
+ 	/*compute adjoint*/
+-	if(VerboseSolution()) _pprintLine_("" << "   computing adjoint");
++	if(VerboseSolution()) _pprintLine_("   computing adjoint");
+ 	femmodel->SetCurrentConfiguration(BalancethicknessAnalysisEnum,AdjointBalancethicknessAnalysisEnum);
+ 	solver_adjoint_linear(femmodel);
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/control_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/control_core.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/control_core.cpp	(revision 12520)
+@@ -65,7 +65,7 @@
+ 	AdjointCorePointerFromSolutionEnum(&adjointcore,solution_type);
+ 
+ 	/*Launch once a complete solution to set up all inputs*/
+-	if(VerboseControl()) _pprintLine_("" << "   preparing initial solution");
++	if(VerboseControl()) _pprintLine_("   preparing initial solution");
+ 	if(isstokes) solutioncore(femmodel);
+ 
+ 	/*Initialize responses: */
+@@ -87,7 +87,7 @@
+ 		/*In steady state inversion, compute new temperature field now*/
+ 		if(solution_type==SteadystateSolutionEnum) solutioncore(femmodel);
+ 
+-		if(VerboseControl()) _pprintLine_("" << "   compute adjoint state:");
++		if(VerboseControl()) _pprintLine_("   compute adjoint state:");
+ 		adjointcore(femmodel);
+ 		gradient_core(femmodel,n,search_scalar==0);
+ 
+@@ -97,17 +97,17 @@
+ 			goto cleanup_and_return;
+ 		}
+ 
+-		if(VerboseControl()) _pprintLine_("" << "   optimizing along gradient direction");
++		if(VerboseControl()) _pprintLine_("   optimizing along gradient direction");
+ 		optpars.maxiter=(int)maxiter[n]; optpars.cm_jump=cm_jump[n];
+ 		BrentSearch(&search_scalar,J+n,&optpars,&objectivefunction,&optargs);
+ 
+-		if(VerboseControl()) _pprintLine_("" << "   updating parameter using optimized search scalar"); //true means update save controls
++		if(VerboseControl()) _pprintLine_("   updating parameter using optimized search scalar"); //true means update save controls
+ 		InputControlUpdatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,search_scalar,true);
+ 		
+ 		if(controlconvergence(J[n],tol_cm)) break;
+ 	}
+ 
+-	if(VerboseControl()) _pprintLine_("" << "   preparing final solution");
++	if(VerboseControl()) _pprintLine_("   preparing final solution");
+ 	femmodel->parameters->SetParam(true,SaveResultsEnum);
+ 	solutioncore(femmodel);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/diagnostic_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/diagnostic_core.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/diagnostic_core.cpp	(revision 12520)
+@@ -58,7 +58,7 @@
+ 
+ 	if(ishutter){
+ 			
+-		if(VerboseSolution()) _pprintLine_("" << "   computing hutter velocities");
++		if(VerboseSolution()) _pprintLine_("   computing hutter velocities");
+ 
+ 		//Take the last velocity into account so that the velocity on the MacAyeal domain is not zero
+ 		if (ismacayealpattyn) ResetBoundaryConditions(femmodel,DiagnosticHutterAnalysisEnum);
+@@ -71,7 +71,7 @@
+ 
+ 	if (ismacayealpattyn ^ isstokes){ // ^ = xor
+ 		
+-		if(VerboseSolution()) _pprintLine_("" << "   computing velocities");
++		if(VerboseSolution()) _pprintLine_("   computing velocities");
+ 		femmodel->SetCurrentConfiguration(DiagnosticHorizAnalysisEnum);
+ 		if(isnewton)
+ 		 solver_newton(femmodel); 
+@@ -81,13 +81,13 @@
+ 
+ 	if (ismacayealpattyn && isstokes){
+ 
+-		if(VerboseSolution()) _pprintLine_("" << "   computing coupling macayealpattyn and stokes velocities and pressure ");
++		if(VerboseSolution()) _pprintLine_("   computing coupling macayealpattyn and stokes velocities and pressure ");
+ 		solver_stokescoupling_nonlinear(femmodel,conserve_loads);
+ 	}
+ 
+ 	if (dim==3 & (ishutter || ismacayealpattyn)){
+ 
+-		if(VerboseSolution()) _pprintLine_("" << "   computing vertical velocities");
++		if(VerboseSolution()) _pprintLine_("   computing vertical velocities");
+ 		femmodel->SetCurrentConfiguration(DiagnosticVertAnalysisEnum);
+ 		solver_linear(femmodel);
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 12520)
+@@ -53,7 +53,7 @@
+ 
+ 	/*Initialize TAO*/
+ 	TaoCreate(PETSC_COMM_WORLD,&tao);
+-	if(VerboseControl()) _pprintLine_("" << "   Initializing the Toolkit for Advanced Optimization (TAO)");
++	if(VerboseControl()) _pprintLine_("   Initializing the Toolkit for Advanced Optimization (TAO)");
+ 	TaoSetFromOptions(tao);
+ 	TaoSetType(tao,"tao_blmvm");
+ 	//TaoSetType(tao,"tao_cg");
+@@ -77,7 +77,7 @@
+ 	TaoSetObjectiveAndGradientRoutine(tao,FormFunctionGradient,(void*)&user); 
+ 
+ 	/*Solver optimization problem*/
+-	if(VerboseControl()) _pprintLine_("" << "   Starting optimization");
++	if(VerboseControl()) _pprintLine_("   Starting optimization");
+ 	TaoSolve(tao);
+ 	TaoView(tao,PETSC_VIEWER_STDOUT_WORLD);
+ 	TaoGetSolutionVector(tao,&X->vector);
+@@ -87,7 +87,7 @@
+ 	}
+ 
+ 	/*Finalize*/
+-	if(VerboseControl()) _pprintLine_("" << "   preparing final solution");
++	if(VerboseControl()) _pprintLine_("   preparing final solution");
+ 	femmodel->parameters->SetParam(true,SaveResultsEnum);
+ 	void (*solutioncore)(FemModel*)=NULL;
+ 	CorePointerFromSolutionEnum(&solutioncore,femmodel->parameters,solution_type);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp	(revision 12520)
+@@ -43,12 +43,12 @@
+ 	extern int num_procs;
+ 
+ 	if (function_name=="" || file_line==0){ //WINDOWS
+-		_printString_("" << "Error message: " << what());
++		_printString_("Error message: " << what());
+ 	}
+ 	else{
+ 		if(num_procs==1){
+ 			_printLine_("\n??? Error using ==> " << file_name.c_str() << ":" << file_line);
+-			_printLine_("" << function_name.c_str() << " error message: " << what() << "\n");
++			_printLine_(function_name.c_str() << " error message: " << what() << "\n");
+ 		}
+ 		else{
+ 			_printLine_("\n[" << my_rank << "] ??? Error using ==> " << file_name.c_str() << ":" << file_line);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp	(revision 12520)
+@@ -66,7 +66,7 @@
+ 	InputUpdateFromDakotax(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,d_variables,d_variables_descriptors,d_numvariables);
+ 
+ 	/*Determine solution sequence: */
+-	if(VerboseQmu()) _pprintLine_("" << "Starting " << EnumToStringx(solution_type) << " core:");
++	if(VerboseQmu()) _pprintLine_("Starting " << EnumToStringx(solution_type) << " core:");
+ 	CorePointerFromSolutionEnum(&solutioncore,femmodel->parameters,solution_type);
+ 	#ifdef _HAVE_CONTROL_
+ 	if(control_analysis)solutioncore=&control_core;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp	(revision 12520)
+@@ -21,7 +21,7 @@
+ 	parameters->FindParam(&time,TimeEnum);
+ 
+ 	/*start module: */
+-	if(VerboseModule()) _pprintLine_("" << "   Updating constraints for time: " << time);
++	if(VerboseModule()) _pprintLine_("   Updating constraints for time: " << time);
+ 	
+ 	/*First, update dof constraints in nodes, using constraints: */
+ 	SpcNodesx(nodes,constraints,parameters,analysis_type); 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp	(revision 12520)
+@@ -276,7 +276,7 @@
+ 			//if ( temp <     0 ) temp =     0;
+ 			
+ 			#ifdef _DEBUG2_
+-				//_printLine_("" << temp << " " << elev << " " << range << " ");
++				//_printLine_(temp << " " << elev << " " << range << " ");
+ 			#endif
+ 
+ 			*(image3+samps*i+j) = temp ;			
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp	(revision 12520)
+@@ -42,7 +42,7 @@
+ //			kfil->DeepEcho();
+ 		}
+ 
+-//		_pprintLine_("" << kstr);
++//		_pprintLine_(kstr);
+ 		xDelete<char>(kstr);
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12520)
+@@ -110,8 +110,8 @@
+ 	/*Synthesize echo: {{{*/
+ 	if(my_rank==0){
+ 		_printString_("   responses: " << d_numresponses << ": ");
+-		for(i=0;i<d_numresponses-1;i++)_printString_("" << d_responses[i] << "|");
+-		_printString_("" << d_responses[d_numresponses-1]);
++		for(i=0;i<d_numresponses-1;i++)_printString_(d_responses[i] << "|");
++		_printString_(d_responses[d_numresponses-1]);
+ 		_printLine_("");
+ 	}
+ 	/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12520)
+@@ -60,7 +60,7 @@
+ 	int i;
+ 	_printLine_("SeqVec size " << this->M);
+ 	for(i=0;i<M;i++){
+-		_printString_("" << vector[i] << "\n ");
++		_printString_(vector[i] << "\n ");
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12520)
+@@ -85,7 +85,7 @@
+ 	_printLine_("SeqMat size " << this->M << "-" << this->N);
+ 	for(i=0;i<M;i++){
+ 		for(j=0;j<N;j++){
+-			_printString_("" << this->matrix[N*i+j] << " ");
++			_printString_(this->matrix[N*i+j] << " ");
+ 		}
+ 		_printLine_("");
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12520)
+@@ -77,7 +77,7 @@
+ 	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
+ 	_printLine_("   vector size: " << this->M);
+ 	for(i=0;i<this->M;i++){
+-		_printLine_("" << i << " " << this->values[i]);
++		_printLine_(i << " " << this->values[i]);
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12520)
+@@ -61,7 +61,7 @@
+ 	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
+ 	_printLine_("   vector size: " << this->M);
+ 	for(i=0;i<this->M;i++){
+-		_printLine_("" << i << " " << this->values[i]);
++		_printLine_(i << " " << this->values[i]);
+ 	}
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12520)
+@@ -111,7 +111,7 @@
+ 
+ 		for(j=0;j<m;j++){
+ 			_printString_("   ");
+-			for(k=0;k<n;k++)_printString_("" << *(matrix+n*j+k) << " ");
++			for(k=0;k<n;k++)_printString_(*(matrix+n*j+k) << " ");
+ 			_printLine_("");
+ 		}
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12520)
+@@ -63,7 +63,7 @@
+ 	_printLine_("   matrix size: " << this->M << "x" << this->N);
+ 	for(i=0;i<this->M;i++){
+ 		for(i=0;i<this->N;i++){
+-			_printLine_("" << i << " " << j << " " << *(this->value+N*i+j));
++			_printLine_(i << " " << j << " " << *(this->value+N*i+j));
+ 		}
+ 	}
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_ColorStyle.cpp	(revision 12520)
+@@ -67,8 +67,8 @@
+ 
+ 	KML_SubStyle::DeepEcho(indent);
+ 
+-	if(flag) _pprintLine_("" << indent << "         color: " << color);
+-	if(flag) _pprintLine_("" << indent << "     colormode: " << colormode);
++	if(flag) _pprintLine_(indent << "         color: " << color);
++	if(flag) _pprintLine_(indent << "     colormode: " << colormode);
+ }
+ /*}}}*/
+ /*FUNCTION KML_ColorStyle::Write {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Placemark.cpp	(revision 12520)
+@@ -69,7 +69,7 @@
+ 	char  indent2[81];
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_Placemark:");
++	if(flag) _pprintLine_(indent << "KML_Placemark:");
+ 	KML_Feature::DeepEcho(indent);
+ 
+ /*  loop over the geometry elements for the placemark  */
+@@ -79,12 +79,12 @@
+ 
+ 	if (geometry->Size())
+ 		for (i=0; i<geometry->Size(); i++) {
+-			if(flag) _pprintLine_("" << indent << "      geometry: -------- begin [" << i << "] --------");
++			if(flag) _pprintLine_(indent << "      geometry: -------- begin [" << i << "] --------");
+ 			((KML_Geometry *)geometry->GetObjectByOffset(i))->DeepEcho(indent2);
+-			if(flag) _pprintLine_("" << indent << "      geometry: --------  end  [" << i << "] --------");
++			if(flag) _pprintLine_(indent << "      geometry: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		if(flag) _pprintLine_("" << indent << "      geometry: [empty]");
++		if(flag) _pprintLine_(indent << "      geometry: [empty]");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Unknown.cpp	(revision 12520)
+@@ -72,7 +72,7 @@
+ 	char         nl[]={'\n','\0'};
+ 	bool         flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_Unknown " << name << ":");
++	if(flag) _pprintLine_(indent << "KML_Unknown " << name << ":");
+ 	KML_Object::DeepEcho(indent);
+ 
+ 	if (value     ) {
+@@ -80,7 +80,7 @@
+ 		memcpy(valuei,value,(strlen(value)+1)*sizeof(char)); 
+         
+ 		vtoken=strtok(valuei,nl);
+-		if(flag) _pprintString_("" << indent << "         value: \"" << vtoken);
++		if(flag) _pprintString_(indent << "         value: \"" << vtoken);
+     
+ 		while (vtoken=strtok(NULL,nl))
+ 			if(flag) _pprintString_("\n" << indent << "                 " << vtoken);
+@@ -89,7 +89,7 @@
+ 		xfree((void**)&valuei);
+ 	}
+     else
+-        if(flag) _pprintLine_("" << indent << "         value: [none]");
++        if(flag) _pprintLine_(indent << "         value: [none]");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Style.cpp	(revision 12520)
+@@ -102,7 +102,7 @@
+ 	char  indent2[81];
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_Style:");
++	if(flag) _pprintLine_(indent << "KML_Style:");
+ 	KML_StyleSelector::DeepEcho(indent);
+ 
+ 	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
+@@ -111,27 +111,27 @@
+ //	if (icon)
+ //		icon->DeepEcho(indent2);
+ //	else
+-		if(flag) _pprintLine_("" << indent << "          icon: " << icon);
++		if(flag) _pprintLine_(indent << "          icon: " << icon);
+ //	if (label)
+ //		label->DeepEcho(indent2);
+ //	else
+-		if(flag) _pprintLine_("" << indent << "         label: " << label);
++		if(flag) _pprintLine_(indent << "         label: " << label);
+ 	if (line)
+ 		line->DeepEcho(indent2);
+ 	else
+-		if(flag) _pprintLine_("" << indent << "          line: " << line);
++		if(flag) _pprintLine_(indent << "          line: " << line);
+ 	if (poly)
+ 		poly->DeepEcho(indent2);
+ 	else
+-		if(flag) _pprintLine_("" << indent << "          poly: " << poly);
++		if(flag) _pprintLine_(indent << "          poly: " << poly);
+ //	if (balloon)
+ //		balloon->DeepEcho(indent2);
+ //	else
+-		if(flag) _pprintLine_("" << indent << "       balloon: " << balloon);
++		if(flag) _pprintLine_(indent << "       balloon: " << balloon);
+ //	if (list)
+ //		list->DeepEcho(indent2);
+ //	else
+-		if(flag) _pprintLine_("" << indent << "          list: " << list);
++		if(flag) _pprintLine_(indent << "          list: " << list);
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Comment.cpp	(revision 12520)
+@@ -42,7 +42,7 @@
+ 	bool  flag=true;
+ 
+ 	if(flag) _pprintString_("    ");
+-	if(flag) _pprintLine_("" << value);
++	if(flag) _pprintLine_(value);
+ 
+ 	return;
+ }
+@@ -62,8 +62,8 @@
+ 
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintString_("" << indent << "    ");
+-	if(flag) _pprintLine_("" << value);
++	if(flag) _pprintString_(indent << "    ");
++	if(flag) _pprintLine_(value);
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_MultiGeometry.cpp	(revision 12520)
+@@ -69,7 +69,7 @@
+ 	char  indent2[81];
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_Multigeometry:");
++	if(flag) _pprintLine_(indent << "KML_Multigeometry:");
+ 	KML_Geometry::DeepEcho(indent);
+ 
+ /*  loop over the geometry elements for the multigeometry  */
+@@ -79,12 +79,12 @@
+ 
+ 	if (geometry->Size())
+ 		for (i=0; i<geometry->Size(); i++) {
+-			if(flag) _pprintLine_("" << indent << "      geometry: -------- begin [" << i << "] --------");
++			if(flag) _pprintLine_(indent << "      geometry: -------- begin [" << i << "] --------");
+ 			((KML_Geometry *)geometry->GetObjectByOffset(i))->DeepEcho(indent2);
+-			if(flag) _pprintLine_("" << indent << "      geometry: --------  end  [" << i << "] --------");
++			if(flag) _pprintLine_(indent << "      geometry: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		if(flag) _pprintLine_("" << indent << "      geometry: [empty]");
++		if(flag) _pprintLine_(indent << "      geometry: [empty]");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineStyle.cpp	(revision 12520)
+@@ -65,10 +65,10 @@
+ 	int   i;
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_LineStyle:");
++	if(flag) _pprintLine_(indent << "KML_LineStyle:");
+ 	KML_ColorStyle::DeepEcho(indent);
+ 
+-	if(flag) _pprintLine_("" << indent << "         width: " << width);
++	if(flag) _pprintLine_(indent << "         width: " << width);
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Folder.cpp	(revision 12520)
+@@ -64,7 +64,7 @@
+ 
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_Folder:");
++	if(flag) _pprintLine_(indent << "KML_Folder:");
+ 	KML_Container::DeepEcho(indent);
+ 
+ 	return;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Document.cpp	(revision 12520)
+@@ -64,7 +64,7 @@
+ 
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_Document:");
++	if(flag) _pprintLine_(indent << "KML_Document:");
+ 	KML_Container::DeepEcho(indent);
+ 
+ 	return;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_File.cpp	(revision 12520)
+@@ -62,7 +62,7 @@
+ 
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_File:");
++	if(flag) _pprintLine_(indent << "KML_File:");
+ 	KML_Object::DeepEcho(indent);
+ 
+ 	return;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Icon.cpp	(revision 12520)
+@@ -78,17 +78,17 @@
+ 
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_Icon:");
++	if(flag) _pprintLine_(indent << "KML_Icon:");
+ 	KML_Object::DeepEcho(indent);
+ 
+-	if(flag) _pprintLine_("" << indent << "          href: \"" << href << "\"");
+-	if(flag) _pprintLine_("" << indent << "       refmode: \"" << refmode << "\"");
+-	if(flag) _pprintLine_("" << indent << "        refint: " << refint);
+-	if(flag) _pprintLine_("" << indent << "      vrefmode: \"" << vrefmode << "\"");
+-	if(flag) _pprintLine_("" << indent << "      vreftime: " << vreftime);
+-	if(flag) _pprintLine_("" << indent << "      vboundsc: " << vboundsc);
+-	if(flag) _pprintLine_("" << indent << "       vformat: \"" << vformat << "\"");
+-	if(flag) _pprintLine_("" << indent << "        hquery: \"" << hquery << "\"");
++	if(flag) _pprintLine_(indent << "          href: \"" << href << "\"");
++	if(flag) _pprintLine_(indent << "       refmode: \"" << refmode << "\"");
++	if(flag) _pprintLine_(indent << "        refint: " << refint);
++	if(flag) _pprintLine_(indent << "      vrefmode: \"" << vrefmode << "\"");
++	if(flag) _pprintLine_(indent << "      vreftime: " << vreftime);
++	if(flag) _pprintLine_(indent << "      vboundsc: " << vboundsc);
++	if(flag) _pprintLine_(indent << "       vformat: \"" << vformat << "\"");
++	if(flag) _pprintLine_(indent << "        hquery: \"" << hquery << "\"");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Point.cpp	(revision 12520)
+@@ -72,12 +72,12 @@
+ 
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_Point:");
++	if(flag) _pprintLine_(indent << "KML_Point:");
+ 	KML_Geometry::DeepEcho(indent);
+ 
+-	if(flag) _pprintLine_("" << indent << "       extrude: " << (extrude ? "true" : "false"));
+-	if(flag) _pprintLine_("" << indent << "       altmode: \"" << altmode << "\"");
+-	if(flag) _pprintLine_("" << indent << "        coords: (" << coords[0] << "," << coords[1] << "," << coords[2] << ")");
++	if(flag) _pprintLine_(indent << "       extrude: " << (extrude ? "true" : "false"));
++	if(flag) _pprintLine_(indent << "       altmode: \"" << altmode << "\"");
++	if(flag) _pprintLine_(indent << "        coords: (" << coords[0] << "," << coords[1] << "," << coords[2] << ")");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LinearRing.cpp	(revision 12520)
+@@ -77,13 +77,13 @@
+ 	int   i;
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_LinearRing:");
++	if(flag) _pprintLine_(indent << "KML_LinearRing:");
+ 	KML_Geometry::DeepEcho(indent);
+ 
+-	if(flag) _pprintLine_("" << indent << "       extrude: " << (extrude ? "true" : "false"));
+-	if(flag) _pprintLine_("" << indent << "    tessellate: " << (tessellate ? "true" : "false"));
+-	if(flag) _pprintLine_("" << indent << "       altmode: \"" << altmode << "\"");
+-	if(flag) _pprintLine_("" << indent << "        coords: (ncoord=" << ncoord << ")");
++	if(flag) _pprintLine_(indent << "       extrude: " << (extrude ? "true" : "false"));
++	if(flag) _pprintLine_(indent << "    tessellate: " << (tessellate ? "true" : "false"));
++	if(flag) _pprintLine_(indent << "       altmode: \"" << altmode << "\"");
++	if(flag) _pprintLine_(indent << "        coords: (ncoord=" << ncoord << ")");
+ 	for (i=0; i<ncoord; i++)
+ 		_printf_(flag,"%s                (%g,%g,%g)\n",indent,
+ 				coords[3*i+0],coords[3*i+1],coords[3*i+2]);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Feature.cpp	(revision 12520)
+@@ -83,12 +83,12 @@
+ 
+ 	KML_Object::DeepEcho(indent);
+ 
+-	if(flag) _pprintLine_("" << indent << "          name: \"" << name << "\"");
+-	if(flag) _pprintLine_("" << indent << "    visibility: " << (visibility ? "true" : "false"));
+-	if(flag) _pprintLine_("" << indent << "          open: " << (open ? "true" : "false"));
+-	if(flag) _pprintLine_("" << indent << "       snippet: \"" << snippet << "\"");
+-	if(flag) _pprintLine_("" << indent << "      descript: \"" << descript << "\"");
+-	if(flag) _pprintLine_("" << indent << "      styleurl: \"" << styleurl << "\"");
++	if(flag) _pprintLine_(indent << "          name: \"" << name << "\"");
++	if(flag) _pprintLine_(indent << "    visibility: " << (visibility ? "true" : "false"));
++	if(flag) _pprintLine_(indent << "          open: " << (open ? "true" : "false"));
++	if(flag) _pprintLine_(indent << "       snippet: \"" << snippet << "\"");
++	if(flag) _pprintLine_(indent << "      descript: \"" << descript << "\"");
++	if(flag) _pprintLine_(indent << "      styleurl: \"" << styleurl << "\"");
+ 
+ /*  loop over any styles for the feature  */
+ 
+@@ -97,12 +97,12 @@
+ 
+ 	if (style->Size())
+ 		for (i=0; i<style->Size(); i++) {
+-			if(flag) _pprintLine_("" << indent << "         style: -------- begin [" << i << "] --------");
++			if(flag) _pprintLine_(indent << "         style: -------- begin [" << i << "] --------");
+ 			((KML_Style *)style->GetObjectByOffset(i))->DeepEcho(indent2);
+-			if(flag) _pprintLine_("" << indent << "         style: --------  end  [" << i << "] --------");
++			if(flag) _pprintLine_(indent << "         style: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		if(flag) _pprintLine_("" << indent << "         style: [empty]");
++		if(flag) _pprintLine_(indent << "         style: [empty]");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp	(revision 12520)
+@@ -129,7 +129,7 @@
+ //		_pprintLine_("tag buffer (length=" << ibuf << "):");
+ //	else if (ifield)
+ //		_pprintLine_("field buffer (length=" << ibuf << "):");
+-//	_pprintLine_("" << buffer);
++//	_pprintLine_(buffer);
+ 
+ 	if (!ibuf)
+ 		xfree((void**)&buffer);
+@@ -193,7 +193,7 @@
+ 		}
+ 
+ //	_pprintLine_("comment buffer (length=" << ibuf << "):");
+-//	_pprintLine_("" << buffer);
++//	_pprintLine_(buffer);
+ 
+ 	if (!ibuf)
+ 		xfree((void**)&buffer);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Attribute.cpp	(revision 12520)
+@@ -47,7 +47,7 @@
+ 	if(flag) _pprintString_("    ");
+ 	for (i=0;i<10-strlen(name);i++)
+ 		if(flag) _pprintString_(" ");
+-	if(flag) _pprintLine_("" << name << ": \"" << value << "\"");
++	if(flag) _pprintLine_(name << ": \"" << value << "\"");
+ 
+ 	return;
+ }
+@@ -68,10 +68,10 @@
+ 	int   i;
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintString_("" << indent << "    ");
++	if(flag) _pprintString_(indent << "    ");
+ 	for (i=0;i<10-strlen(name);i++)
+ 		if(flag) _pprintString_(" ");
+-	if(flag) _pprintLine_("" << name << ": \"" << value << "\"");
++	if(flag) _pprintLine_(name << ": \"" << value << "\"");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_PolyStyle.cpp	(revision 12520)
+@@ -67,11 +67,11 @@
+ 	int   i;
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_PolyStyle:");
++	if(flag) _pprintLine_(indent << "KML_PolyStyle:");
+ 	KML_ColorStyle::DeepEcho(indent);
+ 
+-	if(flag) _pprintLine_("" << indent << "          fill: " << fill);
+-	if(flag) _pprintLine_("" << indent << "       outline: " << outline);
++	if(flag) _pprintLine_(indent << "          fill: " << fill);
++	if(flag) _pprintLine_(indent << "       outline: " << outline);
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Object.cpp	(revision 12520)
+@@ -85,7 +85,7 @@
+ 			((KML_Attribute *)attrib->GetObjectByOffset(i))->DeepEcho(indent);
+ 		}
+ 	else
+-		if(flag) _pprintLine_("" << indent << "        attrib: [empty]");
++		if(flag) _pprintLine_(indent << "        attrib: [empty]");
+ 
+ /*  loop over the comments for the object  */
+ 
+@@ -94,7 +94,7 @@
+ 			((KML_Comment *)commnt->GetObjectByOffset(i))->DeepEcho(indent);
+ 		}
+ 	else
+-		if(flag) _pprintLine_("" << indent << "        commnt: [empty]");
++		if(flag) _pprintLine_(indent << "        commnt: [empty]");
+ 
+ /*  loop over the unknown objects for the object  */
+ 
+@@ -103,12 +103,12 @@
+ 
+ 	if (kmlobj->Size())
+ 		for (i=0; i<kmlobj->Size(); i++) {
+-            if(flag) _pprintLine_("" << indent << "        kmlobj: -------- begin [" << i << "] --------");
++            if(flag) _pprintLine_(indent << "        kmlobj: -------- begin [" << i << "] --------");
+ 			((KML_Unknown *)kmlobj->GetObjectByOffset(i))->DeepEcho(indent2);
+-            if(flag) _pprintLine_("" << indent << "        kmlobj: --------  end  [" << i << "] --------");
++            if(flag) _pprintLine_(indent << "        kmlobj: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		if(flag) _pprintLine_("" << indent << "        kmlobj: [empty]");
++		if(flag) _pprintLine_(indent << "        kmlobj: [empty]");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_LineString.cpp	(revision 12520)
+@@ -77,15 +77,15 @@
+ 	int   i;
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_LineString:");
++	if(flag) _pprintLine_(indent << "KML_LineString:");
+ 	KML_Geometry::DeepEcho(indent);
+ 
+-	if(flag) _pprintLine_("" << indent << "       extrude: " << (extrude ? "true" : "false"));
+-	if(flag) _pprintLine_("" << indent << "    tessellate: " << (tessellate ? "true" : "false"));
+-	if(flag) _pprintLine_("" << indent << "       altmode: \"" << altmode << "\"");
+-	if(flag) _pprintLine_("" << indent << "        coords: (ncoord=" << ncoord << ")");
++	if(flag) _pprintLine_(indent << "       extrude: " << (extrude ? "true" : "false"));
++	if(flag) _pprintLine_(indent << "    tessellate: " << (tessellate ? "true" : "false"));
++	if(flag) _pprintLine_(indent << "       altmode: \"" << altmode << "\"");
++	if(flag) _pprintLine_(indent << "        coords: (ncoord=" << ncoord << ")");
+ 	for (i=0; i<ncoord; i++)
+-		if(flag) _pprintLine_("" << indent << "                (" << coords[3*i+0] << "," << coords[3*i+1] << "," << coords[3*i+2] << ")");
++		if(flag) _pprintLine_(indent << "                (" << coords[3*i+0] << "," << coords[3*i+1] << "," << coords[3*i+2] << ")");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Overlay.cpp	(revision 12520)
+@@ -71,12 +71,12 @@
+ 	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
+ 	strcat(indent2,"  ");
+ 
+-	_pprintLine_("" << indent << "         color: " << color);
+-	_pprintLine_("" << indent << "       draword: " << draword);
++	_pprintLine_(indent << "         color: " << color);
++	_pprintLine_(indent << "       draword: " << draword);
+ 	if (icon)
+ 		icon->DeepEcho(indent2);
+ 	else
+-		_pprintLine_("" << indent << "          icon: " << icon);
++		_pprintLine_(indent << "          icon: " << icon);
+ }
+ /*}}}*/
+ /*FUNCTION KML_Overlay::Write {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Container.cpp	(revision 12520)
+@@ -77,12 +77,12 @@
+ 
+ 	if (feature->Size())
+ 		for (i=0; i<feature->Size(); i++) {
+-			if(flag) _pprintLine_("" << indent << "       feature: -------- begin [" << i << "] --------");
++			if(flag) _pprintLine_(indent << "       feature: -------- begin [" << i << "] --------");
+ 			((KML_Feature *)feature->GetObjectByOffset(i))->DeepEcho(indent2);
+-			if(flag) _pprintLine_("" << indent << "       feature: --------  end  [" << i << "] --------");
++			if(flag) _pprintLine_(indent << "       feature: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		if(flag) _pprintLine_("" << indent << "       feature: [empty]");
++		if(flag) _pprintLine_(indent << "       feature: [empty]");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/KML/KML_Polygon.cpp	(revision 12520)
+@@ -83,33 +83,33 @@
+ 	char  indent2[81];
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "KML_Polygon:");
++	if(flag) _pprintLine_(indent << "KML_Polygon:");
+ 	KML_Geometry::DeepEcho(indent);
+ 
+-	if(flag) _pprintLine_("" << indent << "       extrude: " << (extrude ? "true" : "false"));
+-	if(flag) _pprintLine_("" << indent << "    tessellate: " << (tessellate ? "true" : "false"));
+-	if(flag) _pprintLine_("" << indent << "       altmode: \"" << altmode << "\"");
++	if(flag) _pprintLine_(indent << "       extrude: " << (extrude ? "true" : "false"));
++	if(flag) _pprintLine_(indent << "    tessellate: " << (tessellate ? "true" : "false"));
++	if(flag) _pprintLine_(indent << "       altmode: \"" << altmode << "\"");
+ 
+ 	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
+ 	strcat(indent2,"  ");
+ 
+ 	if (outer->Size())
+ 		for (i=0; i<outer->Size(); i++) {
+-			if(flag) _pprintLine_("" << indent << "         outer: -------- begin [" << i << "] --------");
++			if(flag) _pprintLine_(indent << "         outer: -------- begin [" << i << "] --------");
+ 			((KML_LinearRing *)outer->GetObjectByOffset(i))->DeepEcho(indent2);
+-			if(flag) _pprintLine_("" << indent << "         outer: --------  end  [" << i << "] --------");
++			if(flag) _pprintLine_(indent << "         outer: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		if(flag) _pprintLine_("" << indent << "         outer: [empty]");
++		if(flag) _pprintLine_(indent << "         outer: [empty]");
+ 
+ 	if (inner->Size())
+ 		for (i=0; i<inner->Size(); i++) {
+-			if(flag) _pprintLine_("" << indent << "         inner: -------- begin [" << i << "] --------");
++			if(flag) _pprintLine_(indent << "         inner: -------- begin [" << i << "] --------");
+ 			((KML_LinearRing *)inner->GetObjectByOffset(i))->DeepEcho(indent2);
+-			if(flag) _pprintLine_("" << indent << "         inner: --------  end  [" << i << "] --------");
++			if(flag) _pprintLine_(indent << "         inner: --------  end  [" << i << "] --------");
+ 		}
+ 	else
+-		if(flag) _pprintLine_("" << indent << "         inner: [empty]");
++		if(flag) _pprintLine_(indent << "         inner: [empty]");
+ 
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12520)
+@@ -132,7 +132,7 @@
+ 	_printString_("ADOLC Matrix equivalent:" );
+ 	for(i=0;i<M;i++){
+ 		for(j=0;j<N;j++){
+-			_printString_("" << *(amatrix+N*i+j) << " ");
++			_printString_(*(amatrix+N*i+j) << " ");
+ 		}
+ 		_printLine_("");
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12520)
+@@ -74,7 +74,7 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "OptionDouble DeepEcho:");
++	if(flag) _pprintLine_(indent << "OptionDouble DeepEcho:");
+ 	Option::DeepEcho(indent);
+ 
+ 	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+@@ -82,17 +82,17 @@
+ 
+ 	if (values) {
+ 		dims=xNew<int>(ndims);
+-		if(numel==1) if(flag) _pprintLine_("" << indent << "        values: " << values[0]);
++		if(numel==1) if(flag) _pprintLine_(indent << "        values: " << values[0]);
+ 		else{
+ 			for (i=0; i<numel; i++) {
+ 				RowWiseDimsFromIndex(dims,i,size,ndims);
+ 				StringFromDims(cstr,dims,ndims);
+-				if(flag) _pprintLine_("" << indent << "        values" << cstr << ": " << values[i]);
++				if(flag) _pprintLine_(indent << "        values" << cstr << ": " << values[i]);
+ 			}
+ 		}
+ 		xDelete<int>(dims);
+ 	}
+-	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
++	else if(flag) _pprintLine_(indent << "        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionDouble::Name {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12520)
+@@ -74,25 +74,25 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "OptionLogical DeepEcho:");
++	if(flag) _pprintLine_(indent << "OptionLogical DeepEcho:");
+ 	Option::DeepEcho(indent);
+ 
+ 	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+ 	strcat(indent2,"  ");
+ 
+ 	if (values) {
+-		if(numel==1) if(flag) _pprintLine_("" << indent << "        values: " << (values[0] ? "true" : "false"));
++		if(numel==1) if(flag) _pprintLine_(indent << "        values: " << (values[0] ? "true" : "false"));
+ 		else{
+ 			dims=xNew<int>(ndims);
+ 			for (i=0; i<numel; i++) {
+ 				RowWiseDimsFromIndex(dims,i,size,ndims);
+ 				StringFromDims(cstr,dims,ndims);
+-				if(flag) _pprintLine_("" << indent << "        values" << cstr << ": " << (values[i] ? "true" : "false"));
++				if(flag) _pprintLine_(indent << "        values" << cstr << ": " << (values[i] ? "true" : "false"));
+ 			}
+ 			xDelete<int>(dims);
+ 		}
+ 	}
+-	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
++	else if(flag) _pprintLine_(indent << "        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionLogical::Name {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12520)
+@@ -78,7 +78,7 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "OptionChar DeepEcho:");
++	if(flag) _pprintLine_(indent << "OptionChar DeepEcho:");
+ 	Option::DeepEcho(indent);
+ 
+ 	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+@@ -86,7 +86,7 @@
+ 
+ 	if (values) {
+ 		if (ndims == 2 && size[0] == 1) {
+-			if(flag) _pprintLine_("" << indent << "        values: \"" << values << "\"");
++			if(flag) _pprintLine_(indent << "        values: \"" << values << "\"");
+ 		}
+ 		else {
+ 			nstr=size[0];
+@@ -96,13 +96,13 @@
+ 			for (i=0; i<nstr; i++) {
+ 				RowWiseDimsFromIndex(dims,ipt,size,ndims);
+ 				StringFromDims(cstr,dims,ndims);
+-				if(flag) _pprintLine_("" << indent << "        values" << cstr << ": \"" << size[1] << "*s\"");
++				if(flag) _pprintLine_(indent << "        values" << cstr << ": \"" << size[1] << "*s\"");
+ 				ipt+=size[1];
+ 			}
+ 			xDelete<int>(dims);
+ 		}
+ 	}
+-	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
++	else if(flag) _pprintLine_(indent << "        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionChar::Name {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.cpp	(revision 12520)
+@@ -72,14 +72,14 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "          name: \"" << name << "\"");
+-	if(flag) _pprintLine_("" << indent << "         numel: " << numel);
+-	if(flag) _pprintLine_("" << indent << "         ndims: " << ndims);
++	if(flag) _pprintLine_(indent << "          name: \"" << name << "\"");
++	if(flag) _pprintLine_(indent << "         numel: " << numel);
++	if(flag) _pprintLine_(indent << "         ndims: " << ndims);
+ 	if(size){
+ 		StringFromSize(cstr,size,ndims);
+-		if(flag) _pprintLine_("" << indent << "          size: " << cstr);
++		if(flag) _pprintLine_(indent << "          size: " << cstr);
+ 	}
+-	else if(flag) _pprintLine_("" << indent << "          size: [empty]");
++	else if(flag) _pprintLine_(indent << "          size: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION Option::Name {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12520)
+@@ -74,7 +74,7 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "OptionCell DeepEcho:");
++	if(flag) _pprintLine_(indent << "OptionCell DeepEcho:");
+ 	Option::DeepEcho(indent);
+ 
+ 	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+@@ -85,13 +85,13 @@
+ 		for (i=0; i<values->Size(); i++) {
+ 			ColumnWiseDimsFromIndex(dims,i,size,ndims);
+ 			StringFromDims(cstr,dims,ndims);
+-			if(flag) _pprintLine_("" << indent << "        values: -------- begin " << cstr << " --------");
++			if(flag) _pprintLine_(indent << "        values: -------- begin " << cstr << " --------");
+ 			((Option *)values->GetObjectByOffset(i))->DeepEcho(indent2);
+-			if(flag) _pprintLine_("" << indent << "        values: --------  end  " << cstr << " --------");
++			if(flag) _pprintLine_(indent << "        values: --------  end  " << cstr << " --------");
+ 		}
+ 		xDelete<int>(dims);
+ 	}
+-	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
++	else if(flag) _pprintLine_(indent << "        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionCell::Name {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12520)
+@@ -79,7 +79,7 @@
+ 	char  cstr[81];
+ 	bool  flag=true;
+ 
+-	if(flag) _pprintLine_("" << indent << "OptionStruct DeepEcho:");
++	if(flag) _pprintLine_(indent << "OptionStruct DeepEcho:");
+ 	Option::DeepEcho(indent);
+ 
+ 	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
+@@ -91,15 +91,15 @@
+ 			ColumnWiseDimsFromIndex(dims,i,size,ndims);
+ 			StringFromDims(cstr,dims,ndims);
+ 			if (values[i]->Size()){
+-				if(flag) _pprintLine_("" << indent << "        values: -------- begin " << cstr << " --------");
++				if(flag) _pprintLine_(indent << "        values: -------- begin " << cstr << " --------");
+ 				for (j=0; j<values[i]->Size(); j++) ((Option *)values[i]->GetObjectByOffset(j))->DeepEcho(indent2);
+-				if(flag) _pprintLine_("" << indent << "        values: --------  end  " << cstr << " --------");
++				if(flag) _pprintLine_(indent << "        values: --------  end  " << cstr << " --------");
+ 			}
+-			else if(flag) _pprintLine_("" << indent << "        values: " << cstr << " [empty]");
++			else if(flag) _pprintLine_(indent << "        values: " << cstr << " [empty]");
+ 		}
+ 		xDelete<int>(dims);
+ 	}
+-	else if(flag) _pprintLine_("" << indent << "        values: [empty]");
++	else if(flag) _pprintLine_(indent << "        values: [empty]");
+ }
+ /*}}}*/
+ /*FUNCTION OptionStruct::Name {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12520)
+@@ -71,7 +71,7 @@
+ 	_printLine_("   enum: " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")");
+ 	_printLine_("   vector size: " << this->M);
+ 	for(i=0;i<this->M;i++){
+-		_printLine_("" << i << " " << this->values[i]);
++		_printLine_(i << " " << this->values[i]);
+ 	}
+ 	_printLine_("   step: " << this->step);
+ 	_printLine_("   time: " << this->time);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12520)
+@@ -2373,7 +2373,7 @@
+ 						break;
+ 					}
+ 				}
+-				//_printLine_("" << element_renu[GetId(ta.t)] << " -> " << GetId((*ta.t)[0])+1 << " " << GetId((*ta.t)[1])+1 << " " << GetId((*ta.t)[2])+1 << ", edge [" << i1 << "->" << j1 << " " << i2 << "->" << j2 << "]");
++				//_printLine_(element_renu[GetId(ta.t)] << " -> " << GetId((*ta.t)[0])+1 << " " << GetId((*ta.t)[1])+1 << " " << GetId((*ta.t)[2])+1 << ", edge [" << i1 << "->" << j1 << " " << i2 << "->" << j2 << "]");
+ 				ta = Next(ta).Adj(); 
+ 				if (count++>50) _error2_("Maximum number of iteration exceeded");
+ 			}while ((tbegin != ta)); 
+@@ -4381,7 +4381,7 @@
+ 						if (t.link && ( (aa=Area2( A.r    , t[1].r , t[2].r )) < 0.0 
+ 										||   (bb=Area2( t[0].r , A.r    , t[2].r )) < 0.0  
+ 										||   (cc=Area2( t[0].r , t[1].r , A.r    )) < 0.0)){
+-							_printLine_("" << ke + nbvold << " not in triangle " << i << " In= " << !!t.link << " " << aa << " " << bb << " " << cc << " " << dd);
++							_printLine_(ke + nbvold << " not in triangle " << i << " In= " << !!t.link << " " << aa << " " << bb << " " << cc << " " << dd);
+ 							_error2_("Number of triangles with P2 interpolation Problem");
+ 						}
+ 					}
+@@ -4389,7 +4389,7 @@
+ 						if (tt.link && ( (aa=Area2( A.r     , tt[1].r , tt[2].r )) < 0 
+ 										||   (bb=Area2( tt[0].r , A.r     , tt[2].r )) < 0 
+ 										||   (cc=Area2( tt[0].r , tt[1].r , A.r     )) < 0)){
+-							_printLine_("" << ke + nbvold << " not in triangle " << ii << " In= " << !!tt.link << " " << aa << " " << bb << " " << cc << " " << dd);
++							_printLine_(ke + nbvold << " not in triangle " << ii << " In= " << !!tt.link << " " << aa << " " << bb << " " << cc << " " << dd);
+ 							_error2_("Number of triangles with P2 interpolation Problem");
+ 						}
+ 					} 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Hook.cpp	(revision 12520)
+@@ -78,10 +78,10 @@
+ 		_printLine_("   Hook: ");
+ 		_printLine_("      num=" << this->num);
+ 		_printString_("      ids: ");
+-		for (i=0;i<this->num;i++) _printString_("" << this->ids[i] << " ");
++		for (i=0;i<this->num;i++) _printString_(this->ids[i] << " ");
+ 		_printLine_("");
+ 		_printString_("      offsets: ");
+-		for (i=0;i<this->num;i++) _printString_("" << this->offsets[i] << " ");
++		for (i=0;i<this->num;i++) _printString_(this->offsets[i] << " ");
+ 		_printLine_("");
+ 	}
+ 	else{
+@@ -97,10 +97,10 @@
+ 		_printLine_("   Hook: ");
+ 		_printLine_("      num=" << this->num);
+ 		_printString_("      ids: ");
+-		for (i=0;i<this->num;i++) _printString_("" << this->ids[i] << " ");
++		for (i=0;i<this->num;i++) _printString_(this->ids[i] << " ");
+ 		_printLine_("");
+ 		_printString_("      offsets: ");
+-		for (i=0;i<this->num;i++) _printString_("" << this->offsets[i] << " ");
++		for (i=0;i<this->num;i++) _printString_(this->offsets[i] << " ");
+ 		_printLine_("");
+ 		if (!objects) _printLine_("      warning: object not hooked yet");
+ 		else{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12520)
+@@ -67,7 +67,7 @@
+ 	_printLine_("   analysis_type: " << EnumToStringx(analysis_type));
+ 	_printLine_("   steps|times|values");
+ 	for(i=0;i<nsteps;i++){
+-		_printLine_("" << i << "-" << times[i] << ":" << values[i]);
++		_printLine_(i << "-" << times[i] << ":" << values[i]);
+ 	}
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solvers/solver_thermal_nonlinear.cpp	(revision 12520)
+@@ -46,7 +46,7 @@
+ 	count=1;
+ 	converged=false;
+ 
+-	if(VerboseSolution()) _pprintLine_("" << "starting direct shooting method");
++	if(VerboseSolution()) _pprintLine_("starting direct shooting method");
+ 	InputUpdateFromConstantx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,true,ResetPenaltiesEnum);
+ 	InputUpdateFromConstantx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,false,ConvergedEnum);
+ 	UpdateConstraintsx(femmodel->nodes,femmodel->constraints,femmodel->parameters);
+@@ -65,7 +65,7 @@
+ 		ConstraintsStatex(&constraints_converged, &num_unstable_constraints, femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+ 
+ 		if (!converged){
+-			if(VerboseConvergence()) _pprintLine_("" << "   #unstable constraints = " << num_unstable_constraints);
++			if(VerboseConvergence()) _pprintLine_("   #unstable constraints = " << num_unstable_constraints);
+ 			if (num_unstable_constraints <= thermal_penalty_threshold)converged=true;
+ 			if (count>=thermal_maxiter){
+ 				converged=true;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12520)
+@@ -87,7 +87,7 @@
+ 				strcat(czip,pimages[i]);
+ 			}
+ 		if (verbose) _printLine_("Zipping file \"" << filkmz << "\".");
+-		if (verbose) _printLine_("" << czip);
++		if (verbose) _printLine_(czip);
+ 
+ 		if (mexEvalString(czip)) _error2_("Error zipping file \"" << filkmz << "\".");
+ 		xfree((void**)&czip);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12519)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12520)
+@@ -83,19 +83,19 @@
+ 	#ifdef _DEBUG_
+ 	_printLine_("nvtxs: " << nvtxs);
+ 	_printString_("options: [");
+-	for(i=0;i<10;i++)_printString_("" << options[i] << "|");
++	for(i=0;i<10;i++)_printString_(options[i] << "|");
+ 	_printLine_("]");
+ 	_printLine_("start: ");
+-	for (i=0; i<nvtxs+1;i++)_printString_("" << start[i] << " ");
++	for (i=0; i<nvtxs+1;i++)_printString_(start[i] << " ");
+ 	_printLine_("");
+ 	_printLine_("adjacency: ");
+ 	for (i=0; i<mxGetNzmax(A_IN);i++)_printString_("" <<adjacency[i]<< " ");i++)
+ 	_printLine_("");
+ 	_printLine_("nedges: " << nedges << " " << ewgts);
+-	if(ewgts) for (i = 0; i < nedges; i++)_printString_("" << ewgts[i] << " ");
++	if(ewgts) for (i = 0; i < nedges; i++)_printString_(ewgts[i] << " ");
+ 	_printLine_("");
+ 	_printLine_("vwgts:");
+-	for (i = 0; i < nvtxs; i++)_printString_("" << vwgts[i] << " ");
++	for (i = 0; i < nvtxs; i++)_printString_(vwgts[i] << " ");
+ 	_printLine_("");
+ 	_printLine_("nparts: " << nparts[0]);
+ 	_printLine_("goal: " << goal);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12520-12521.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12520-12521.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12520-12521.diff	(revision 12679)
@@ -0,0 +1,73 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/install.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/install.sh	(revision 12521)
+@@ -0,0 +1,62 @@
++#!/bin/bash
++
++#0: cleanup
++#1:  install aspell
++#2:  install en dictionary
++step=0
++
++
++#Some cleanup
++if  [[ $step  == "0" ]]; then
++	rm -rf src install dicts
++	rm -rf aspell-0.50.5
++	rm -rf aspell5-en-6.0.0
++fi
++
++#install aspell
++if  [[ $step  == "1" ]]; then
++
++	mkdir src install dicts
++
++	#Download from ISSM server
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/aspell-0.50.5.tar.gz' 'aspell-0.50.5.tar.gz'
++
++	#Untar 
++	tar -zxvf  aspell-0.50.5.tar.gz
++
++	#Move aspell into src directory
++	mv aspell-0.50.5/* src
++	rm -rf aspell-0.50.5
++
++	#Configure aspell
++	cd src
++	./configure \
++		--prefix="$ISSM_DIR/externalpackages/aspell/install" \
++
++	#Compile and install aspell
++	if [ -z $1 ]; then
++		make
++	else
++		make -j $1
++	fi
++	make install
++fi
++
++#languages
++if  [[ $step  == "2" ]]; then
++
++	#Download from ISSM server
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/aspell5-en-6.0.0.tar.gz' 'aspell5-en-6.0.0.tar.gz'
++
++	#Untar 
++	tar -zxvf  aspell5-en-6.0.0.tar.gz
++
++	#Move aspell into src directory
++	mv aspell5-en-6.0.0 dicts
++	rm -rf aspell5-en-6.0.0
++
++	#install
++	cd dicts
++	./configure
++	make install
++fi
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/install.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12521-12522.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12521-12522.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12521-12522.diff	(revision 12679)
@@ -0,0 +1,42 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/install.sh	(revision 12521)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/install.sh	(revision 12522)
+@@ -3,7 +3,7 @@
+ #0: cleanup
+ #1:  install aspell
+ #2:  install en dictionary
+-step=0
++step=2
+ 
+ 
+ #Some cleanup
+@@ -48,12 +48,13 @@
+ 	#Download from ISSM server
+ 	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/aspell5-en-6.0.0.tar.gz' 'aspell5-en-6.0.0.tar.gz'
+ 
++	exit
++
+ 	#Untar 
+ 	tar -zxvf  aspell5-en-6.0.0.tar.gz
+ 
+ 	#Move aspell into src directory
+ 	mv aspell5-en-6.0.0 dicts
+-	rm -rf aspell5-en-6.0.0
+ 
+ 	#install
+ 	cd dicts
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/aspell5-en-6.0-0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/aspell5-en-6.0-0.tar.gz
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/aspell5-en-6.0-0.tar.gz	(revision 12521)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/aspell5-en-6.0-0.tar.gz	(revision 12522)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/aspell5-en-6.0-0.tar.gz
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
Index: /issm/oecreview/Archive/12321-12677/ISSM-12522-12523.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12522-12523.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12522-12523.diff	(revision 12679)
@@ -0,0 +1,34 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/aspell5-en-6.0-0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/install.sh	(revision 12522)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/install.sh	(revision 12523)
+@@ -46,10 +46,8 @@
+ if  [[ $step  == "2" ]]; then
+ 
+ 	#Download from ISSM server
+-	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/aspell5-en-6.0.0.tar.gz' 'aspell5-en-6.0.0.tar.gz'
++	#$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/aspell5-en-6.0.0.tar.gz' 'aspell5-en-6.0.0.tar.gz'
+ 
+-	exit
+-
+ 	#Untar 
+ 	tar -zxvf  aspell5-en-6.0.0.tar.gz
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/aspell5-en-6.0.0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/aspell5-en-6.0.0.tar.gz
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/aspell5-en-6.0.0.tar.gz	(revision 12522)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/aspell5-en-6.0.0.tar.gz	(revision 12523)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/aspell5-en-6.0.0.tar.gz
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
Index: /issm/oecreview/Archive/12321-12677/ISSM-12523-12524.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12523-12524.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12523-12524.diff	(revision 12679)
@@ -0,0 +1,4 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/aspell5-en-6.0.0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
Index: /issm/oecreview/Archive/12321-12677/ISSM-12524-12525.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12524-12525.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12524-12525.diff	(revision 12679)
@@ -0,0 +1,35 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/aspell5-en-6.0.0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/install.sh	(revision 12524)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/aspell/install.sh	(revision 12525)
+@@ -3,7 +3,7 @@
+ #0: cleanup
+ #1:  install aspell
+ #2:  install en dictionary
+-step=2
++step=0
+ 
+ 
+ #Some cleanup
+@@ -46,7 +46,7 @@
+ if  [[ $step  == "2" ]]; then
+ 
+ 	#Download from ISSM server
+-	#$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/aspell5-en-6.0.0.tar.gz' 'aspell5-en-6.0.0.tar.gz'
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/aspell5-en-6.0.0.tar.gz' 'aspell5-en-6.0.0.tar.gz'
+ 
+ 	#Untar 
+ 	tar -zxvf  aspell5-en-6.0.0.tar.gz
+@@ -55,7 +55,7 @@
+ 	mv aspell5-en-6.0.0 dicts
+ 
+ 	#install
+-	cd dicts
++	cd dicts/aspell5-en-6.0.0
+ 	./configure
+ 	make install
+ fi
Index: /issm/oecreview/Archive/12321-12677/ISSM-12525-12526.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12525-12526.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12525-12526.diff	(revision 12679)
@@ -0,0 +1,21 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12525)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12526)
+@@ -86,6 +86,7 @@
+ 
+ 	/*launch the thread manager with InterpFromGridToMeshxt as a core: */
+ 	LaunchThread(InterpFromGridToMeshxt,(void*)&gate,num);
++	_printLine_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%");
+ 
+ 	/*Assign output pointers:*/
+ 	*pdata_mesh=data_mesh;
+@@ -138,7 +139,7 @@
+ 	for (i=i0;i<i1;i++) {
+ 
+ 		if(debug && my_thread==0)
+-		 _printLine_("\r      interpolation progress: "<<setw(5)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%%");
++		 _pprintString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%");
+ 		x_grid=*(x_mesh+i);
+ 		y_grid=*(y_mesh+i);
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12526-12527.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12526-12527.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12526-12527.diff	(revision 12679)
@@ -0,0 +1,39 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.cpp	(revision 12526)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.cpp	(revision 12527)
+@@ -1,9 +1,8 @@
+ /*This routine only used by Intel compler: */
+ #ifdef _INTEL_WIN_
+ 
+-int isnan(IssmDouble x){
+-	if (x!=x)return 1;
+-	else return 0;
++int isnan(IssmPDouble x){
++	return (x!=x)?1:0;
+ }
+ #endif
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h	(revision 12526)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h	(revision 12527)
+@@ -6,8 +6,17 @@
+ #define _ISNAN_INTEL_H_
+ 
+ #ifdef _INTEL_WIN_
+-int isnan(IssmDouble X);
++int isnan(IssmPDouble X);
+ #endif
+ 
++template <class T> int xIsNan(const T& X) {
++    return isnan(X);
++}
++
++#ifdef _HAVE_ADOLC_
++template <> int xIsNan<adouble> (const adouble& X) {
++  return isnan(X.getValue());
++}
+ #endif
++#endif
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12527-12528.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12527-12528.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12527-12528.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12527)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12528)
+@@ -148,7 +148,7 @@
+ 		if(!found)_error2_("could not find time segment for constraint");
+ 
+ 		/*Apply or relax constraint: */
+-		if(isnan(value)){
++		if(xIsNan<IssmDouble>(value)){
+ 			node->RelaxConstraint(dof);
+ 		}
+ 		else node->ApplyConstraint(dof,value);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12528-12529.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12528-12529.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12528-12529.diff	(revision 12679)
@@ -0,0 +1,1052 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12529)
+@@ -69,7 +69,7 @@
+ 	nKUoldF=KUoldF->Norm(NORM_TWO);
+ 	nF=pf->Norm(NORM_TWO);
+ 	res=nKUoldF/nF;
+-	if (isnan(res)){
++	if (xIsNan<IssmDouble>(res)){
+ 		_pprintLine_("norm nf = " << nF << "f and norm kuold = " << nKUoldF << "f");
+ 		_error2_("mechanical equilibrium convergence criterion is NaN!");
+ 	}
+@@ -89,19 +89,19 @@
+ 	}
+ 
+ 	/*Relative criterion (optional)*/
+-	if (!isnan(eps_rel) || (VerboseConvergence())){
++	if (!xIsNan<IssmDouble>(eps_rel) || (VerboseConvergence())){
+ 
+ 		//compute norm(du)/norm(u)
+ 		duf=old_uf->Duplicate(); old_uf->Copy(duf); duf->AYPX(uf,-1.0);
+ 		ndu=duf->Norm(NORM_TWO); nu=old_uf->Norm(NORM_TWO);
+ 
+-		if (isnan(ndu) || isnan(nu)) _error2_("convergence criterion is NaN!");
++		if (xIsNan<IssmDouble>(ndu) || xIsNan<IssmDouble>(nu)) _error2_("convergence criterion is NaN!");
+ 
+ 		//clean up
+ 		xdelete(&duf);
+ 
+ 		//print
+-		if (!isnan(eps_rel)){
++		if (!xIsNan<IssmDouble>(eps_rel)){
+ 			if((ndu/nu)<eps_rel){
+ 				if(VerboseConvergence()) _pprintLine_("   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " < " << eps_rel*100 << " %");
+ 			}
+@@ -115,18 +115,18 @@
+ 	}
+ 
+ 	/*Absolute criterion (Optional) = max(du)*/
+-	if (!isnan(eps_abs) || (VerboseConvergence())){
++	if (!xIsNan<IssmDouble>(eps_abs) || (VerboseConvergence())){
+ 
+ 		//compute max(du)
+ 		duf=old_uf->Duplicate(); old_uf->Copy(duf); duf->AYPX(uf,-1.0);
+ 		ndu=duf->Norm(NORM_TWO); nduinf=duf->Norm(NORM_INF);
+-		if (isnan(ndu) || isnan(nu)) _error2_("convergence criterion is NaN!");
++		if (xIsNan<IssmDouble>(ndu) || xIsNan<IssmDouble>(nu)) _error2_("convergence criterion is NaN!");
+ 
+ 		//clean up
+ 		xdelete(&duf);
+ 
+ 		//print
+-		if (!isnan(eps_abs)){
++		if (!xIsNan<IssmDouble>(eps_abs)){
+ 			if ((nduinf*yts)<eps_abs){
+ 				if(VerboseConvergence()) _pprintLine_("   Convergence criterion: max(du)" << "50s" << nduinf*yts << " < " << eps_abs << " m/yr");
+ 			}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlconvergence.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlconvergence.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/controlconvergence.cpp	(revision 12529)
+@@ -22,7 +22,7 @@
+ 	bool converged=false;
+ 
+ 	/*Has convergence been reached?*/
+-	if (!isnan(tol_cm) && J<tol_cm){
++	if (!xIsNan<IssmDouble>(tol_cm) && J<tol_cm){
+ 		converged=true;
+ 		if(VerboseConvergence()) _pprintString_("      Convergence criterion reached: J = " << J << " < " << tol_cm);
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/gradient_core.cpp	(revision 12529)
+@@ -37,7 +37,7 @@
+ 	/*Check that gradient is clean*/
+ 	norm_inf=new_gradient->Norm(NORM_INF);
+ 	if(norm_inf<=0)    _error2_("||∂J/∂α||∞ = 0    gradient norm is zero");
+-	if(isnan(norm_inf))_error2_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
++	if(xIsNan<IssmDouble>(norm_inf))_error2_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
+ 
+ 	/*plug back into inputs: */
+ 	ControlInputSetGradientx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,new_gradient);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp	(revision 12529)
+@@ -43,18 +43,18 @@
+ 	/*initialize counter and get response at the boundaries*/
+ 	iter=0;
+ 	fxmin = (*f)(xmin,optargs);
+-	if (isnan(fxmin)) _error2_("Function evaluation returned NaN");
++	if (xIsNan<IssmDouble>(fxmin)) _error2_("Function evaluation returned NaN");
+ 	cout<<setprecision(5);
+ 	if(VerboseControl()) _pprintLine_("");
+ 	if(VerboseControl()) _pprintLine_("       Iteration         x           f(x)       Tolerance         Procedure");
+ 	if(VerboseControl()) _pprintLine_("");
+ 	if(VerboseControl()) _pprintLine_("           N/A    "<<setw(12)<<xmin<<"  "<<setw(12)<<fxmin<<"           N/A         boundary");
+ 	fxmax = (*f)(xmax,optargs);
+-	if (isnan(fxmax)) _error2_("Function evaluation returned NaN");
++	if (xIsNan<IssmDouble>(fxmax)) _error2_("Function evaluation returned NaN");
+ 	if(VerboseControl()) _pprintLine_("           N/A    "<<setw(12)<<xmax<<"  "<<setw(12)<<fxmax<<"           N/A         boundary");
+ 
+ 	/*test if jump option activated and xmin==0*/
+-	if (!isnan(cm_jump) && (xmin==0) && (fxmax/fxmin)<cm_jump){
++	if (!xIsNan<IssmDouble>(cm_jump) && (xmin==0) && (fxmax/fxmin)<cm_jump){
+ 		*psearch_scalar=xmax;
+ 		*pJ=fxmax;
+ 		return;
+@@ -74,7 +74,7 @@
+ 
+ 	/*2: call the function to be evaluated*/
+ 	fxbest = (*f)(x,optargs);
+-	if(isnan(fxbest)) _error2_("Function evaluation returned NaN");
++	if(xIsNan<IssmDouble>(fxbest)) _error2_("Function evaluation returned NaN");
+ 	iter=iter+1;
+ 
+ 	/*3: update the other variables*/
+@@ -89,7 +89,7 @@
+ 	/*4: print result*/
+ 	if(VerboseControl())
+ 	 _pprintLine_("         "<<setw(5)<<iter<<"    "<<setw(12)<<xbest<<"  "<<setw(12)<<fxbest<<"  "<<setw(12)<<pow(pow(xbest-xm,2),0.5)<<"         initial");
+-	if (!isnan(cm_jump) && (xmin==0) && ((fxbest/fxmin)<cm_jump)){
++	if (!xIsNan<IssmDouble>(cm_jump) && (xmin==0) && ((fxbest/fxmin)<cm_jump)){
+ 		if(VerboseControl()) _pprintLine_("      optimization terminated: current x satisfies criteria 'cm_jump'=" << cm_jump);
+ 		loop=false;
+ 	}
+@@ -158,7 +158,7 @@
+ 
+ 		//evaluate function on x
+ 		fx = (*f)(x,optargs);
+-		if(isnan(fx)) _error2_("Function evaluation returned NaN");
++		if(xIsNan<IssmDouble>(fx)) _error2_("Function evaluation returned NaN");
+ 		iter=iter+1;
+ 
+ 		// Update a, b, xm, x1, x2, tol1, tol2
+@@ -196,7 +196,7 @@
+ 			if(VerboseControl()) _pprintLine_("      exiting: Maximum number of iterations has been exceeded  ('maxiter'=" << maxiter << ")");
+ 			loop=false;
+ 		}
+-		else if (!isnan(cm_jump) && (xmin==0) && ((fxbest/fxmin)<cm_jump)){
++		else if (!xIsNan<IssmDouble>(cm_jump) && (xmin==0) && ((fxbest/fxmin)<cm_jump)){
+ 			if(VerboseControl()) _pprintLine_("      optimization terminated: current x satisfies criteria 'cm_jump'=" << cm_jump);
+ 			loop=false;
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.cpp	(revision 12529)
+@@ -1,7 +1,7 @@
+ /*This routine only used by Intel compler: */
+ #ifdef _INTEL_WIN_
+ 
+-int isnan(IssmPDouble x){
++int xIsNan<IssmDouble>(IssmPDouble x){
+ 	return (x!=x)?1:0;
+ }
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp	(revision 12529)
+@@ -11,7 +11,7 @@
+ 	IssmDouble	x_norm, y_norm, z_norm;
+ 
+ 	for(i=0;i<6;i++){
+-		if(isnan(xzvectors[i])){
++		if(xIsNan<IssmDouble>(xzvectors[i])){
+ 			/*At least one NaN found: default to Id*/
+ 			T[0*3+0] = 1.0;	T[0*3+1] = 0.0;	T[0*3+2] = 0.0;
+ 			T[1*3+0] = 0.0;	T[1*3+1] = 1.0;	T[1*3+2] = 0.0;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp	(revision 12529)
+@@ -40,7 +40,7 @@
+ 	
+ 	//get the value of the function at the first boundary
+ 	fx1= (*f)(x1,optargs);
+-	if (isnan(fx1)) _error2_("Function evaluation returned NaN");
++	if (xIsNan<IssmDouble>(fx1)) _error2_("Function evaluation returned NaN");
+ 	cout<<setprecision(5);
+ 	if(VerboseControl()) _pprintLine_("");
+ 	if(VerboseControl()) _pprintLine_("       Iteration         x           f(x)       Tolerance");
+@@ -56,7 +56,7 @@
+ 		/*get f(x2)*/
+ 		iter++;
+ 		fx2 = (*f)(x2,optargs);
+-		if (isnan(fx2)) _error2_("Function evaluation returned NaN");
++		if (xIsNan<IssmDouble>(fx2)) _error2_("Function evaluation returned NaN");
+ 		if(VerboseControl())
+ 		 _pprintLine_("         "<<setw(5)<<iter<<"    "<<setw(12)<<x2<<"  "<<setw(12)<<fx2<<"  "<<(fabs(x2-x1)>fabs(fx2-fx1)?fabs(fx2-fx1):fabs(x2-x1)));
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp	(revision 12529)
+@@ -112,7 +112,7 @@
+ 						/*element interpolation*/
+ 						data_value=data[i];
+ 					}
+-					if (isnan(data_value)){
++					if (xIsNan<IssmDouble>(data_value)){
+ 						if(num_default_values==1) data_value=default_values[0];
+ 						else data_value=default_values[j];
+ 					}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp	(revision 12529)
+@@ -159,7 +159,7 @@
+ 						/*element interpolation*/
+ 						data_value=data_mesh[n];
+ 					}
+-					if (isnan(data_value)) data_value=default_value;
++					if (xIsNan<IssmDouble>(data_value)) data_value=default_value;
+ 
+ 					/*insert value and go to the next point*/
+ 					griddata[i*ncols+j]=data_value;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp	(revision 12529)
+@@ -59,12 +59,12 @@
+ 				count++;
+ 			}
+ 			else{
+-				if (!isnan(iomodel->Data(DiagnosticSpcvxEnum)[i])){
++				if (!xIsNan<IssmDouble>(iomodel->Data(DiagnosticSpcvxEnum)[i])){
+ 					constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,iomodel->Data(DiagnosticSpcvxEnum)[i]/yts,DiagnosticHutterAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 					count++;
+ 				}
+ 
+-				if (!isnan(iomodel->Data(DiagnosticSpcvyEnum)[i])){
++				if (!xIsNan<IssmDouble>(iomodel->Data(DiagnosticSpcvyEnum)[i])){
+ 					constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,iomodel->Data(DiagnosticSpcvyEnum)[i]/yts,DiagnosticHutterAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy
+ 					count++;
+ 				}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12529)
+@@ -124,7 +124,7 @@
+ 		 * 3) and if this element is not in the same partition:
+ 		 * we must clone the nodes on this partition so that the loads (Numericalflux)
+ 		 * will have access to their properties (dofs,...)*/
+-		if(my_elements[(int)e1] && !isnan(e2) && !my_elements[(int)e2]){ 
++		if(my_elements[(int)e1] && !xIsNan<IssmDouble>(e2) && !my_elements[(int)e2]){ 
+ 
+ 			/*1: Get vertices ids*/
+ 			i1=(int)edges[4*i+0];
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp	(revision 12529)
+@@ -54,7 +54,7 @@
+ 		/*keep only this partition's nodes:*/
+ 		if((iomodel->my_vertices[i])){
+ 
+-			if (!isnan(spctemperature[i])){
++			if (!xIsNan<IssmDouble>(spctemperature[i])){
+ 
+ 				constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,heatcapacity*(spctemperature[i]-referencetemperature),EnthalpyAnalysisEnum));
+ 				count++;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp	(revision 12529)
+@@ -55,7 +55,7 @@
+ 				constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticVertAnalysisEnum)); //spc to zero as vertical velocity is done in Horiz for Stokes
+ 				count++;
+ 			}
+-			else if (!isnan(iomodel->Data(DiagnosticSpcvzEnum)[i])){
++			else if (!xIsNan<IssmDouble>(iomodel->Data(DiagnosticSpcvzEnum)[i])){
+ 				constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,
+ 								iomodel->Data(DiagnosticSpcvzEnum)[i]/yts,DiagnosticVertAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 				count++;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 12529)
+@@ -42,7 +42,7 @@
+ 	
+ 		/*keep only this partition's nodes:*/
+ 		if((iomodel->my_vertices[i]==1)){
+-			if (isnan(iomodel->Data(ThermalSpctemperatureEnum)[i])){ //No penalty applied on spc nodes!
++			if (xIsNan<IssmDouble>(iomodel->Data(ThermalSpctemperatureEnum)[i])){ //No penalty applied on spc nodes!
+ 				loads->AddObject(new Pengrid(iomodel->loadcounter+i+1,i,iomodel,ThermalAnalysisEnum));
+ 			}
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp	(revision 12529)
+@@ -119,11 +119,11 @@
+ 						count++;
+ 						constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 						count++;
+-						if (!isnan(spcvx[i])){
++						if (!xIsNan<IssmDouble>(spcvx[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,spcvx[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+-						if (!isnan(spcvy[i])){
++						if (!xIsNan<IssmDouble>(spcvy[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,4,spcvy[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+@@ -134,11 +134,11 @@
+ 						count++;
+ 						constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,4,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 						count++;
+-						if (!isnan(spcvx[i])){
++						if (!xIsNan<IssmDouble>(spcvx[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,spcvx[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+-						if (!isnan(spcvy[i])){
++						if (!xIsNan<IssmDouble>(spcvy[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,spcvy[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+@@ -156,11 +156,11 @@
+ 						count++;
+ 						constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,5,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 						count++;
+-						if (!isnan(spcvx[i])){
++						if (!xIsNan<IssmDouble>(spcvx[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,spcvx[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+-						if (!isnan(spcvy[i])){
++						if (!xIsNan<IssmDouble>(spcvy[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,spcvy[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+@@ -171,15 +171,15 @@
+ 						count++;
+ 						constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 						count++;
+-						if (!isnan(spcvx[i])){
++						if (!xIsNan<IssmDouble>(spcvx[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,spcvx[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+-						if (!isnan(spcvy[i])){
++						if (!xIsNan<IssmDouble>(spcvy[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,4,spcvy[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+-						if (!isnan(spcvz[i])){
++						if (!xIsNan<IssmDouble>(spcvz[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,5,spcvz[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+@@ -196,11 +196,11 @@
+ 						count++;
+ 						constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,5,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 						count++;
+-						if (!isnan(spcvx[i])){
++						if (!xIsNan<IssmDouble>(spcvx[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,spcvx[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+-						if (!isnan(spcvy[i])){
++						if (!xIsNan<IssmDouble>(spcvy[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,spcvy[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+@@ -211,15 +211,15 @@
+ 						count++;
+ 						constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 						count++;
+-						if (!isnan(spcvx[i])){
++						if (!xIsNan<IssmDouble>(spcvx[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,spcvx[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+-						if (!isnan(spcvy[i])){
++						if (!xIsNan<IssmDouble>(spcvy[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,4,spcvy[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+-						if (!isnan(spcvz[i])){
++						if (!xIsNan<IssmDouble>(spcvz[i])){
+ 							constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,5,spcvz[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 							count++;
+ 						}
+@@ -228,7 +228,7 @@
+ 			}
+ 			/*Now add the regular spcs*/
+ 			else{
+-				if (Mx==numberofvertices && !isnan(spcvx[i])){
++				if (Mx==numberofvertices && !xIsNan<IssmDouble>(spcvx[i])){
+ 					constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,spcvx[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
+ 					count++;
+ 				}
+@@ -238,7 +238,7 @@
+ 					spcpresent=false;
+ 					for(j=0;j<Nx;j++){
+ 						values[j]=spcvx[i*Nx+j]/yts;
+-						if(!isnan(values[j]))spcpresent=true; //NaN means no spc by default
++						if(!xIsNan<IssmDouble>(values[j]))spcpresent=true; //NaN means no spc by default
+ 					}
+ 
+ 					if(spcpresent){
+@@ -252,7 +252,7 @@
+ 					count++;
+ 				}
+ 
+-				if (My==numberofvertices && !isnan(spcvy[i])){
++				if (My==numberofvertices && !xIsNan<IssmDouble>(spcvy[i])){
+ 					constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,spcvy[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vy.
+ 					count++;
+ 				}
+@@ -262,7 +262,7 @@
+ 					spcpresent=false;
+ 					for(j=0;j<Ny;j++){
+ 						values[j]=spcvy[i*Ny+j]/yts;
+-						if(!isnan(values[j]))spcpresent=true; //NaN means no spc by default
++						if(!xIsNan<IssmDouble>(values[j]))spcpresent=true; //NaN means no spc by default
+ 					}
+ 					if(spcpresent){
+ 						constraints->AddObject(new SpcTransient(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,2,Ny,timesy,values,DiagnosticHorizAnalysisEnum));
+@@ -276,7 +276,7 @@
+ 				}
+ 
+ 				if ((int)vertices_type[i]==StokesApproximationEnum ||  ((int)vertices_type[i]==NoneApproximationEnum)){
+-					if (Mz==numberofvertices && !isnan(spcvz[i])){
++					if (Mz==numberofvertices && !xIsNan<IssmDouble>(spcvz[i])){
+ 						constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,spcvz[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy
+ 						count++;
+ 					}
+@@ -286,7 +286,7 @@
+ 						spcpresent=false;
+ 						for(j=0;j<Nz;j++){
+ 							values[j]=spcvz[i*Nz+j]/yts;
+-							if(!isnan(values[j]))spcpresent=true; //NaN means no spc by default
++							if(!xIsNan<IssmDouble>(values[j]))spcpresent=true; //NaN means no spc by default
+ 						}
+ 						if(spcpresent){
+ 							constraints->AddObject(new SpcTransient(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,Nz,timesz,values,DiagnosticHorizAnalysisEnum));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp	(revision 12529)
+@@ -123,7 +123,7 @@
+ 						/*element interpolation*/
+ 						data_value=data[i];
+ 					}
+-					if (isnan(data_value)) data_value=default_value;
++					if (xIsNan<IssmDouble>(data_value)) data_value=default_value;
+ 
+ 					/*insert value and go to the next point*/
+ 					data_prime->SetValue(j,data_value,INS_VAL);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12529)
+@@ -12,6 +12,7 @@
+ #include "./InterpFromGridToMeshx.h"
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
++#include "../../io/io.h"
+ /*}}}*/
+ 
+ /*InterpFromGridToMeshx{{{*/
+@@ -139,7 +140,7 @@
+ 	for (i=i0;i<i1;i++) {
+ 
+ 		if(debug && my_thread==0)
+-		 _pprintString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%");
++		 _printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%");
+ 		x_grid=*(x_mesh+i);
+ 		y_grid=*(y_mesh+i);
+ 
+@@ -178,7 +179,7 @@
+ 					_printLine_("Interpolation " << EnumToStringx(interpenum) << " not supported yet");
+ 					return NULL; /*WARNING: no error because it would blow up the multithreading!*/
+ 			}
+-			if(isnan(data_value)) data_value=default_value;
++			if(xIsNan<IssmDouble>(data_value)) data_value=default_value;
+ 		}
+ 		else{
+ 			data_value=default_value;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp	(revision 12529)
+@@ -54,7 +54,7 @@
+ 	/*Check that gradient is clean*/
+ 	norm_inf=gradient->Norm(NORM_INF);
+ 	if(norm_inf<=0)    _error2_("||∂J/∂α||∞ = 0    gradient norm is zero");
+-	if(isnan(norm_inf))_error2_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
++	if(xIsNan<IssmDouble>(norm_inf))_error2_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
+ 
+ 	/*Clean-up and assign output pointer*/
+ 	if(pnorm_list){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp	(revision 12529)
+@@ -118,7 +118,7 @@
+ 		if(bamgopts->hVertices && bamgopts->hVerticesSize[0]==BTh.nbv){
+ 			if (verbosity>1) _printLine_("   Merging Metric with hVertices...");
+ 			for (i=0;i<BTh.nbv;i++){
+-				if (!isnan(bamgopts->hVertices[i])){
++				if (!xIsNan<IssmDouble>(bamgopts->hVertices[i])){
+ 					BTh[i].m=Metric((float)bamgopts->hVertices[i]);
+ 				}
+ 			}
+@@ -128,7 +128,7 @@
+ 		if (bamgopts->hminVertices){
+ 			if (verbosity>1) _printLine_("   Merging Metric with hminVertices...");
+ 			for (i=0;i<BTh.nbv;i++){
+-				if (!isnan(bamgopts->hminVertices[i])){
++				if (!xIsNan<IssmDouble>(bamgopts->hminVertices[i])){
+ 					Metric M=BTh.vertices[i].m;
+ 					EigenMetric Vp(M/coef);
+ 					Vp.Minh(bamgopts->hminVertices[i]);
+@@ -141,7 +141,7 @@
+ 		if (bamgopts->hmaxVertices){
+ 			if (verbosity>1) _printLine_("   Merging Metric with hmaxVertices...");
+ 			for (i=0;i<BTh.nbv;i++){
+-				if (!isnan(bamgopts->hmaxVertices[i])){
++				if (!xIsNan<IssmDouble>(bamgopts->hmaxVertices[i])){
+ 					Metric M=BTh.vertices[i].m;
+ 					EigenMetric Vp(M/coef);
+ 					Vp.Maxh(bamgopts->hmaxVertices[i]);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12529)
+@@ -54,7 +54,7 @@
+ 			/*keep only this partition's nodes:*/
+ 			if((iomodel->my_vertices[i])){
+ 
+-				if (!isnan(IssmDoublevector[i])){
++				if (!xIsNan<IssmDouble>(IssmDoublevector[i])){
+ 
+ 					constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,IssmDoublevector[i],analysis_type));
+ 					count++;
+@@ -86,7 +86,7 @@
+ 				spcpresent=false;
+ 				for(j=0;j<N;j++){
+ 					values[j]=IssmDoublevector[i*N+j];
+-					if(!isnan(values[j]))spcpresent=true; //NaN means no spc by default
++					if(!xIsNan<IssmDouble>(values[j]))spcpresent=true; //NaN means no spc by default
+ 				}
+ 
+ 				if(spcpresent){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp	(revision 12529)
+@@ -342,7 +342,7 @@
+ 	#ifdef _ISSM_DEBUG_ 
+ 	for (int i=0;i<this->nrows;i++){
+ 		for(int j=0;j<this->ncols;j++){
+-			if (isnan(this->values[i*this->ncols+j])) _error2_("NaN found in Element Matrix");
++			if (xIsNan<IssmDouble>(this->values[i*this->ncols+j])) _error2_("NaN found in Element Matrix");
+ 			if (fabs(this->values[i*this->ncols+j])>1.e+50) _error2_("Element Matrix values exceeds 1.e+50");
+ 		}
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12529)
+@@ -209,7 +209,7 @@
+ 	/*Check element matrix values, only in debugging mode*/
+ #ifdef _ISSM_DEBUG_ 
+ 	for (int i=0;i<this->nrows;i++){
+-		if (isnan(this->values[i])) _error2_("NaN found in Element Vector");
++		if (xIsNan<IssmDouble>(this->values[i])) _error2_("NaN found in Element Vector");
+ 		if (fabs( this->values[i])>1.e+50) _error2_("Element Vector values exceeds 1.e+50");
+ 	}
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12529)
+@@ -59,7 +59,7 @@
+ 	numericalflux_mparid=numberofelements+1; //matlab indexing
+ 
+ 	/*First, see wether this is an internal or boundary edge (if e2=NaN)*/
+-	if (isnan((IssmDouble)iomodel->Data(MeshEdgesEnum)[4*i+3])){ //edges are [node1 node2 elem1 elem2]
++	if (xIsNan<IssmDouble>((IssmDouble)iomodel->Data(MeshEdgesEnum)[4*i+3])){ //edges are [node1 node2 elem1 elem2]
+ 		/* Boundary edge, only one element */
+ 		e1=(int)iomodel->Data(MeshEdgesEnum)[4*i+2];
+ 		e2=(int)UNDEF;
+@@ -750,7 +750,7 @@
+ 		vxaverage_input->GetInputValue(&vx,gauss);
+ 		vyaverage_input->GetInputValue(&vy,gauss);
+ 		spcthickness_input->GetInputValue(&thickness,gauss);
+-		if(isnan(thickness)) _error2_("Cannot weakly apply constraint because NaN was provided");
++		if(xIsNan<IssmDouble>(thickness)) _error2_("Cannot weakly apply constraint because NaN was provided");
+ 
+ 		UdotN=vx*normal[0]+vy*normal[1];
+ 		tria->GetSegmentJacobianDeterminant(&Jdet,&xyz_list[0][0],gauss);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Friction.cpp	(revision 12529)
+@@ -112,7 +112,7 @@
+         if(vmag==0 && (s-1)<0) _error2_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
+ 
+ 	alpha2=pow(drag_coefficient,2)*pow(Neff,r)*pow(vmag,(s-1));
+-	_assert_(!isnan(alpha2));
++	_assert_(!xIsNan<IssmDouble>(alpha2));
+ 
+ 	/*Assign output pointers:*/
+ 	*palpha2=alpha2;
+@@ -176,7 +176,7 @@
+ 	if(vmag==0 && (s-1)<0) _error2_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
+ 
+ 	alpha2=pow(drag_coefficient,2)*pow(Neff,r)*pow(vmag,(s-1));
+-	_assert_(!isnan(alpha2));
++	_assert_(!xIsNan<IssmDouble>(alpha2));
+ 
+ 	/*Assign output pointers:*/
+ 	*palpha2=alpha2;
+@@ -242,7 +242,7 @@
+ 	/*Checks that s-1>0 if v=0*/
+ 	if(vmag==0 && (s-1)<0) _error2_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
+ 
+-	alpha_complement=pow(Neff,r)*pow(vmag,(s-1));            _assert_(!isnan(alpha_complement));
++	alpha_complement=pow(Neff,r)*pow(vmag,(s-1));            _assert_(!xIsNan<IssmDouble>(alpha_complement));
+ 
+ 	/*Assign output pointers:*/
+ 	*palpha_complement=alpha_complement;
+@@ -308,7 +308,7 @@
+ 	/*Checks that s-1>0 if v=0*/
+ 	if(vmag==0 && (s-1)<0) _error2_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
+ 
+-	alpha_complement=pow(Neff,r)*pow(vmag,(s-1));            _assert_(!isnan(alpha_complement));
++	alpha_complement=pow(Neff,r)*pow(vmag,(s-1));            _assert_(!xIsNan<IssmDouble>(alpha_complement));
+ 
+ 	/*Assign output pointers:*/
+ 	*palpha_complement=alpha_complement;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Geometry.cpp	(revision 12529)
+@@ -182,7 +182,7 @@
+ 		if(bamgopts->hVertices && bamgopts->hVerticesSize[0]==nbv){
+ 			if(verbose>5) _printLine_("      processing hVertices");
+ 			for (i=0;i< nbv;i++){
+-				if (!isnan(bamgopts->hVertices[i])){
++				if (!xIsNan<IssmDouble>(bamgopts->hVertices[i])){
+ 					vertices[i].m=Metric((double)bamgopts->hVertices[i]);
+ 				}
+ 			}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12529)
+@@ -1522,7 +1522,7 @@
+ 	/*Use the dof list to index into the solution vector: */
+ 	for(int i=0;i<numdof;i++){
+ 		values[i]=solution[doflist[i]];
+-		if(isnan(values[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(values[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Add input to the element: */
+@@ -1555,7 +1555,7 @@
+ 	this->parameters->FindParam(&minthickness,PrognosticMinThicknessEnum);
+ 	for(i=0;i<numdof;i++){
+ 		newthickness[i]=solution[doflist[i]];
+-		if(isnan(newthickness[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(newthickness[i])) _error2_("NaN found in solution vector");
+ 		/*Constrain thickness to be at least 1m*/
+ 		if(newthickness[i]<minthickness) newthickness[i]=minthickness;
+ 	}
+@@ -3324,8 +3324,8 @@
+ 		vy[i]=values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i])) _error2_("NaN found in solution vector");
+-		if(isnan(vy[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vx[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vy[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get Vz and compute vel*/
+@@ -3384,8 +3384,8 @@
+ 		vy[i]=values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i])) _error2_("NaN found in solution vector");
+-		if(isnan(vy[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vx[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vy[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Now Compute vel*/
+@@ -3730,7 +3730,7 @@
+ 		
+ 		/*Add gradje_g_gaussian vector to gradje_g: */
+ 		for(i=0;i<NUMVERTICES;i++){
+-			_assert_(!isnan(grade_g[i]));
++			_assert_(!xIsNan<IssmDouble>(grade_g[i]));
+ 			grade_g[i]+=grade_g_gaussian[i];
+ 		}
+ 	}
+@@ -3791,7 +3791,7 @@
+ 		/*Build gradje_g_gaussian vector (actually -dJ/ddrag): */
+ 		for (i=0;i<NUMVERTICES;i++){
+ 			grade_g[i]+=-weight*Jdet*gauss->weight*(dbasis[0][i]*dk[0]+dbasis[1][i]*dk[1]);
+-			_assert_(!isnan(grade_g[i]));
++			_assert_(!xIsNan<IssmDouble>(grade_g[i]));
+ 		}
+ 	}
+ 	gradient->SetValues(NUMVERTICES,doflist1,grade_g,ADD_VAL);
+@@ -4946,8 +4946,8 @@
+ 		lambday[i]=values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(lambdax[i])) _error2_("NaN found in solution vector");
+-		if(isnan(lambday[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(lambdax[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(lambday[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Add vx and vy as inputs to the tria element: */
+@@ -4977,7 +4977,7 @@
+ 	/*Ok, we have vx and vy in values, fill in vx and vy arrays: */
+ 	for(i=0;i<numdof;i++){
+ 		lambda[i]=values[i];
+-		if(isnan(lambda[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(lambda[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Add vx and vy as inputs to the tria element: */
+@@ -5313,7 +5313,7 @@
+ 	/*Use the dof list to index into the solution vector: */
+ 	for(i=0;i<numdof;i++){
+ 		values[i]=solution[doflist[i]];
+-		if(isnan(values[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(values[i])) _error2_("NaN found in solution vector");
+ 		if (values[i]<pow((IssmDouble)10,(IssmDouble)-10))values[i]=pow((IssmDouble)10,(IssmDouble)-10); //correcting the water column to positive values
+  
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12529)
+@@ -65,9 +65,9 @@
+ 	this->sid=penta_sid;
+ 
+ 	/*Build neighbors list*/
+-	if (isnan(iomodel->Data(MeshUpperelementsEnum)[index])) penta_elements_ids[1]=this->id; //upper penta is the same penta
++	if (xIsNan<IssmDouble>(iomodel->Data(MeshUpperelementsEnum)[index])) penta_elements_ids[1]=this->id; //upper penta is the same penta
+ 	else                                    penta_elements_ids[1]=(int)(iomodel->Data(MeshUpperelementsEnum)[index]);
+-	if (isnan(iomodel->Data(MeshLowerelementsEnum)[index])) penta_elements_ids[0]=this->id; //lower penta is the same penta
++	if (xIsNan<IssmDouble>(iomodel->Data(MeshLowerelementsEnum)[index])) penta_elements_ids[0]=this->id; //lower penta is the same penta
+ 	else                                    penta_elements_ids[0]=(int)(iomodel->Data(MeshLowerelementsEnum)[index]);
+ 	this->InitHookNeighbors(penta_elements_ids);
+ 
+@@ -1741,7 +1741,7 @@
+ 	this->parameters->FindParam(&minthickness,PrognosticMinThicknessEnum);
+ 	for(i=0;i<numdof2d;i++){
+ 		newthickness[i]=solution[doflist[i]];
+-		if(isnan(newthickness[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(newthickness[i])) _error2_("NaN found in solution vector");
+ 		/*Constrain thickness to be at least 1m*/
+ 		if(newthickness[i]<minthickness) newthickness[i]=minthickness;
+ 		newthickness[i+numdof2d]=newthickness[i];
+@@ -1811,7 +1811,7 @@
+ 	/*Use the dof list to index into the solution vector: */
+ 	for(int i=0;i<numdof;i++){
+ 		values[i]=solution[doflist[i]];
+-		if(isnan(values[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(values[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Add input to the element: */
+@@ -1841,7 +1841,7 @@
+ 	for(int i=0;i<numdof2d;i++){
+ 		values[i]         =solution[doflist[i]];
+ 		values[i+numdof2d]=values[i];
+-		if(isnan(values[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(values[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Start looping over all elements above current element and update all inputs*/
+@@ -4327,7 +4327,7 @@
+ 		//if(values[i]<matpar->TMeltingPoint(pressure[i])-50) values[i]=matpar->TMeltingPoint(pressure[i])-50;
+ 
+ 		/*Check solution*/
+-		if(isnan(values[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(values[i])) _error2_("NaN found in solution vector");
+ 		//if(values[i]<0)      _printLine_("temperature < 0°K found in solution vector");
+ 		//if(values[i]>275)    _printLine_("temperature > 275°K found in solution vector (Paterson's rheology associated is negative)");
+ 	}
+@@ -4397,7 +4397,7 @@
+ 		values[i]=solution[doflist[i]];
+ 
+ 		/*Check solution*/
+-		if(isnan(values[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(values[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get all inputs and parameters*/
+@@ -4942,7 +4942,7 @@
+ 
+ 		/*Add gradje_g_gaussian vector to gradje_g: */
+ 		for(i=0;i<NUMVERTICES;i++){
+-			_assert_(!isnan(grade_g[i]));
++			_assert_(!xIsNan<IssmDouble>(grade_g[i]));
+ 			grade_g[i]+=grade_g_gaussian[i];
+ 		}
+ 	}
+@@ -5162,10 +5162,10 @@
+ 		lambdap[i]=values[i*NDOF4+3];
+ 
+ 		/*Check solution*/
+-		if(isnan(lambdax[i])) _error2_("NaN found in solution vector");
+-		if(isnan(lambday[i])) _error2_("NaN found in solution vector");
+-		if(isnan(lambdaz[i])) _error2_("NaN found in solution vector");
+-		if(isnan(lambdap[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(lambdax[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(lambday[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(lambdaz[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(lambdap[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Add vx and vy as inputs to the tria element: */
+@@ -5201,8 +5201,8 @@
+ 		lambday[i]=values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(lambdax[i]))       _error2_("NaN found in solution vector");
+-		if(isnan(lambday[i]))       _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(lambdax[i]))       _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(lambday[i]))       _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Add vx and vy as inputs to the tria element: */
+@@ -8127,8 +8127,8 @@
+ 		vy[i+3]=vy[i];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i])) _error2_("NaN found in solution vector");
+-		if(isnan(vy[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vx[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vy[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get parameters fro pressure computation*/
+@@ -8225,8 +8225,8 @@
+ 		vy[i]=macayeal_values[i*NDOF2+1]+pattyn_values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i])) _error2_("NaN found in solution vector");
+-		if(isnan(vy[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vx[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vy[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Now Compute vel*/
+@@ -8313,10 +8313,10 @@
+ 		pressure[i]=stokes_values[i*NDOF4+3]*stokesreconditioning;
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i]))       _error2_("NaN found in solution vector");
+-		if(isnan(vy[i]))       _error2_("NaN found in solution vector");
+-		if(isnan(vzstokes[i])) _error2_("NaN found in solution vector");
+-		if(isnan(pressure[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vx[i]))       _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vy[i]))       _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vzstokes[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(pressure[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get Vz*/
+@@ -8392,8 +8392,8 @@
+ 		vy[i]=values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i])) _error2_("NaN found in solution vector");
+-		if(isnan(vy[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vx[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vy[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get Vz*/
+@@ -8481,10 +8481,10 @@
+ 		pressure[i]=stokes_values[i*NDOF4+3]*stokesreconditioning;
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i]))       _error2_("NaN found in solution vector");
+-		if(isnan(vy[i]))       _error2_("NaN found in solution vector");
+-		if(isnan(vzstokes[i])) _error2_("NaN found in solution vector");
+-		if(isnan(pressure[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vx[i]))       _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vy[i]))       _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vzstokes[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(pressure[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get Vz*/
+@@ -8557,8 +8557,8 @@
+ 		vy[i]=values[i*NDOF2+1];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i])) _error2_("NaN found in solution vector");
+-		if(isnan(vy[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vx[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vy[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Now Compute vel*/
+@@ -8626,7 +8626,7 @@
+ 		vz[i]=values[i*NDOF1+0];
+ 
+ 		/*Check solution*/
+-		if(isnan(vz[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vz[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Get Vx and Vy*/
+@@ -8724,10 +8724,10 @@
+ 		pressure[i]=values[i*NDOF4+3];
+ 
+ 		/*Check solution*/
+-		if(isnan(vx[i]))       _error2_("NaN found in solution vector");
+-		if(isnan(vy[i]))       _error2_("NaN found in solution vector");
+-		if(isnan(vz[i]))       _error2_("NaN found in solution vector");
+-		if(isnan(pressure[i])) _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vx[i]))       _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vy[i]))       _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(vz[i]))       _error2_("NaN found in solution vector");
++		if(xIsNan<IssmDouble>(pressure[i])) _error2_("NaN found in solution vector");
+ 	}
+ 
+ 	/*Recondition pressure and compute vel: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12529)
+@@ -173,8 +173,8 @@
+ /*FUNCTION IntInput::Constrain{{{*/
+ void IntInput::Constrain(IssmPDouble cm_min, IssmPDouble cm_max){
+ 
+-	if(!isnan(cm_min)) if (this->value<cm_min)this->value=(int)cm_min;
+-	if(!isnan(cm_max)) if (this->value>cm_max)this->value=(int)cm_max;
++	if(!xIsNan<IssmDouble>(cm_min)) if (this->value<cm_min)this->value=(int)cm_min;
++	if(!xIsNan<IssmDouble>(cm_max)) if (this->value>cm_max)this->value=(int)cm_max;
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12529)
+@@ -168,8 +168,8 @@
+ /*FUNCTION BoolInput::Constrain{{{*/
+ void BoolInput::Constrain(IssmPDouble cm_min, IssmPDouble cm_max){
+ 
+-	if(!isnan(cm_min)) if (this->value<cm_min)this->value=cm_min;
+-	if(!isnan(cm_max)) if (this->value>cm_max)this->value=cm_max;
++	if(!xIsNan<IssmDouble>(cm_min)) if (this->value<cm_min)this->value=cm_min;
++	if(!xIsNan<IssmDouble>(cm_max)) if (this->value>cm_max)this->value=cm_max;
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12529)
+@@ -333,8 +333,8 @@
+ 	int i;
+ 	const int numnodes=3;
+ 		
+-	if(!isnan(cm_min)) for(i=0;i<numnodes;i++)if (this->values[i]<cm_min)this->values[i]=cm_min;
+-	if(!isnan(cm_max)) for(i=0;i<numnodes;i++)if (this->values[i]>cm_max)this->values[i]=cm_max;
++	if(!xIsNan<IssmDouble>(cm_min)) for(i=0;i<numnodes;i++)if (this->values[i]<cm_min)this->values[i]=cm_min;
++	if(!xIsNan<IssmDouble>(cm_max)) for(i=0;i<numnodes;i++)if (this->values[i]>cm_max)this->values[i]=cm_max;
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12529)
+@@ -470,8 +470,8 @@
+ 	int i;
+ 	const int numnodes=6;
+ 		
+-	if(!isnan(cm_min)) for(i=0;i<numnodes;i++)if (this->values[i]<cm_min)this->values[i]=cm_min;
+-	if(!isnan(cm_max)) for(i=0;i<numnodes;i++)if (this->values[i]>cm_max)this->values[i]=cm_max;
++	if(!xIsNan<IssmDouble>(cm_min)) for(i=0;i<numnodes;i++)if (this->values[i]<cm_min)this->values[i]=cm_min;
++	if(!xIsNan<IssmDouble>(cm_max)) for(i=0;i<numnodes;i++)if (this->values[i]>cm_max)this->values[i]=cm_max;
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12529)
+@@ -224,8 +224,8 @@
+ /*FUNCTION DoubleInput::Constrain{{{*/
+ void DoubleInput::Constrain(IssmPDouble cm_min, IssmPDouble cm_max){
+ 
+-	if(!isnan(cm_min)) if (this->value<cm_min)this->value=cm_min;
+-	if(!isnan(cm_max)) if (this->value>cm_max)this->value=cm_max;
++	if(!xIsNan<IssmDouble>(cm_min)) if (this->value<cm_min)this->value=cm_min;
++	if(!xIsNan<IssmDouble>(cm_max)) if (this->value>cm_max)this->value=cm_max;
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12529)
+@@ -523,7 +523,7 @@
+ 		for(i=0;i<this->indexing.gsize;i++){
+ 			if(this->indexing.s_set[i]){
+ 				values[count]=this->indexing.svalues[i];
+-				_assert_(!isnan(values[count]));
++				_assert_(!xIsNan<IssmDouble>(values[count]));
+ 				count++;
+ 			}
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp	(revision 12529)
+@@ -123,7 +123,7 @@
+ /*FUNCTION SpcDynamic::GetValue {{{*/
+ IssmDouble SpcDynamic::GetValue(){
+ 	_assert_(this->isset);
+-	_assert_(!isnan(value));
++	_assert_(!xIsNan<IssmDouble>(value));
+ 	return value;
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp	(revision 12528)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp	(revision 12529)
+@@ -123,7 +123,7 @@
+ /*}}}*/
+ /*FUNCTION SpcStatic::GetValue {{{*/
+ IssmDouble SpcStatic::GetValue(){
+-	_assert_(!isnan(value));
++	_assert_(!xIsNan<IssmDouble>(value));
+ 	return value;
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12529-12530.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12529-12530.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12529-12530.diff	(revision 12679)
@@ -0,0 +1,2176 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12530)
+@@ -17,7 +17,7 @@
+ 
+ 	public:
+ 		int    enum_type;
+-		IssmPDouble value;
++		IssmDouble value;
+ 
+ 		/*DoubleInput constructors, destructors: {{{*/
+ 		DoubleInput();
+@@ -38,45 +38,45 @@
+ 		Input* PointwiseDivide(Input* inputB);
+ 		Input* PointwiseMin(Input* inputB);
+ 		Input* PointwiseMax(Input* inputB);
+-		ElementResult* SpawnResult(int step, IssmPDouble time);
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
++		ElementResult* SpawnResult(int step, IssmDouble time);
++		void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue);
+ 		void GetInputValue(int* pvalue);
+-		void GetInputValue(IssmPDouble* pvalue);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetInputAverage(IssmPDouble* pvalue);
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputValue(IssmDouble* pvalue);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputAverage(IssmDouble* pvalue);
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
+ 		void ChangeEnum(int newenumtype);
+-		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(IssmPDouble minimum);
+-		void Scale(IssmPDouble scale_factor);
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
+-		void AXPY(Input* xinput,IssmPDouble scalar);
+-		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
+-		IssmPDouble InfinityNorm(void){_error2_("not implemented yet");};
+-		IssmPDouble Max(void);
+-		IssmPDouble MaxAbs(void);
+-		IssmPDouble Min(void);
+-		IssmPDouble MinAbs(void);
++		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
++		void ConstrainMin(IssmDouble minimum);
++		void Scale(IssmDouble scale_factor);
++		void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
++		void AXPY(Input* xinput,IssmDouble scalar);
++		void Constrain(IssmDouble cm_min, IssmDouble cm_max);
++		IssmDouble InfinityNorm(void){_error2_("not implemented yet");};
++		IssmDouble Max(void);
++		IssmDouble MaxAbs(void);
++		IssmDouble Min(void);
++		IssmDouble MinAbs(void);
+ 		void Extrude(void){_error2_("not supported yet");};
+ 		void VerticallyIntegrate(Input* thickness_input);
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
++		void GetValuesPtr(IssmDouble** pvalues,int* pnum_values);
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12530)
+@@ -27,8 +27,8 @@
+ 	gradient    = NULL;
+ }
+ /*}}}*/
+-/*FUNCTION ControlInput::ControlInput(int enum_type,int enum_input,IssmPDouble* pvalues,IssmPDouble* pmin,IssmPDouble* pmax,int id){{{*/
+-ControlInput::ControlInput(int in_enum_type,int enum_input,IssmPDouble* pvalues,IssmPDouble* pmin,IssmPDouble* pmax,int id){
++/*FUNCTION ControlInput::ControlInput(int enum_type,int enum_input,IssmDouble* pvalues,IssmDouble* pmin,IssmDouble* pmax,int id){{{*/
++ControlInput::ControlInput(int in_enum_type,int enum_input,IssmDouble* pvalues,IssmDouble* pmin,IssmDouble* pmax,int id){
+ 
+ 	control_id=id;
+ 	enum_type=in_enum_type;
+@@ -135,8 +135,8 @@
+ 	newvalues=this->values->PointwiseMax(minvalues);
+ 	delete values; this->values=newvalues;
+ }/*}}}*/
+-/*FUNCTION ControlInput::Constrain(IssmPDouble min, IssmPDouble max){{{*/
+-void ControlInput::Constrain(IssmPDouble min, IssmPDouble max){
++/*FUNCTION ControlInput::Constrain(IssmDouble min, IssmDouble max){{{*/
++void ControlInput::Constrain(IssmDouble min, IssmDouble max){
+ 	   values->Constrain(min,max);
+ }/*}}}*/
+ /*FUNCTION ControlInput::Extrude{{{*/
+@@ -150,7 +150,7 @@
+ 	if(gradient) gradient->GetVectorFromInputs(gradient_vec,doflist);
+ }/*}}}*/
+ /*FUNCTION ControlInput::ScaleGradient{{{*/
+-void ControlInput::ScaleGradient(IssmPDouble scaling_factor){
++void ControlInput::ScaleGradient(IssmDouble scaling_factor){
+ 	if(!gradient) _error2_("Gradient of ControlInput " << EnumToStringx(enum_type) << " not found");
+ 	gradient->Scale(scaling_factor);
+ }/*}}}*/
+@@ -185,7 +185,7 @@
+ 
+ }/*}}}*/
+ /*FUNCTION ControlInput::SpawnResult{{{*/
+-ElementResult* ControlInput::SpawnResult(int step, IssmPDouble time){
++ElementResult* ControlInput::SpawnResult(int step, IssmDouble time){
+ 	return savedvalues->SpawnResult(step,time);
+ }/*}}}*/
+ /*FUNCTION ControlInput::SpawnTriaInput{{{*/
+@@ -193,7 +193,7 @@
+ 	return values->SpawnTriaInput(indices);
+ }/*}}}*/
+ /*FUNCTION ControlInput::SpawnGradient{{{*/
+-ElementResult* ControlInput::SpawnGradient(int step, IssmPDouble time){
++ElementResult* ControlInput::SpawnGradient(int step, IssmDouble time){
+ 	_assert_(gradient);
+ 	return gradient->SpawnResult(step,time);
+ }/*}}}*/
+@@ -223,8 +223,8 @@
+ 		 _error2_("Data " << data << " not supported yet");
+ 	 }
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputAverage(IssmPDouble* pvalue){{{*/
+-void ControlInput::GetInputAverage(IssmPDouble* pvalue){
++/*FUNCTION ControlInput::GetInputAverage(IssmDouble* pvalue){{{*/
++void ControlInput::GetInputAverage(IssmDouble* pvalue){
+ 	values->GetInputAverage(pvalue);
+ }/*}}}*/
+ /*FUNCTION ControlInput::GetInputValue(bool* pvalue){{{*/
+@@ -235,24 +235,24 @@
+ void ControlInput::GetInputValue(int* pvalue){
+ 	values->GetInputValue(pvalue);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputValue(IssmPDouble* pvalue){{{*/
+-void ControlInput::GetInputValue(IssmPDouble* pvalue){
++/*FUNCTION ControlInput::GetInputValue(IssmDouble* pvalue){{{*/
++void ControlInput::GetInputValue(IssmDouble* pvalue){
+ 	values->GetInputValue(pvalue);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputValue(IssmPDouble* pvalue){{{*/
+-void ControlInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){
++/*FUNCTION ControlInput::GetInputValue(IssmDouble* pvalue){{{*/
++void ControlInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){
+ 	values->GetInputValue(pvalue,gauss);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputValue(IssmPDouble* pvalue){{{*/
+-void ControlInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){
++/*FUNCTION ControlInput::GetInputValue(IssmDouble* pvalue){{{*/
++void ControlInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){
+ 	values->GetInputValue(pvalue,gauss);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void ControlInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){
++/*FUNCTION ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){
+ 	values->GetInputDerivativeValue(derivativevalues,xyz_list,gauss);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void ControlInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	values->GetInputDerivativeValue(derivativevalues,xyz_list,gauss);
+ }/*}}}*/
+ /*FUNCTION ControlInput::SaveValue{{{*/
+@@ -263,7 +263,7 @@
+ 	this->savedvalues=(Input*)this->values->copy();
+ }/*}}}*/
+ /*FUNCTION ControlInput::UpdateValue{{{*/
+-void ControlInput::UpdateValue(IssmPDouble scalar){
++void ControlInput::UpdateValue(IssmDouble scalar){
+ 	if(!gradient)    _error2_("Gradient of " << EnumToStringx(this->enum_type) << " not found");
+ 	if(!savedvalues) _error2_("Values of " << EnumToStringx(this->enum_type) << " not found");
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/Input.h	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/Input.h	(revision 12530)
+@@ -24,46 +24,46 @@
+ 		virtual int  InstanceEnum()=0; 
+ 		virtual void GetInputValue(bool* pvalue)=0;
+ 		virtual void GetInputValue(int* pvalue)=0;
+-		virtual void GetInputValue(IssmPDouble* pvalue)=0;
+-		virtual void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss)=0;
+-		virtual void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time)=0;
+-		virtual void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss)=0;
+-		virtual void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index)=0;
+-		virtual void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss,int index)=0;
+-		virtual void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss)=0;
+-		virtual void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetInputAverage(IssmPDouble* pvalue)=0;
+-		virtual void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss)=0;
+-		virtual void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss)=0;
+-		virtual void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetInputValue(IssmDouble* pvalue)=0;
++		virtual void GetInputValue(IssmDouble* pvalue,GaussTria* gauss)=0;
++		virtual void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time)=0;
++		virtual void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss)=0;
++		virtual void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index)=0;
++		virtual void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int index)=0;
++		virtual void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss)=0;
++		virtual void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetInputAverage(IssmDouble* pvalue)=0;
++		virtual void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss)=0;
++		virtual void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss)=0;
++		virtual void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
+ 		virtual void ChangeEnum(int newenumtype)=0;
+ 		virtual void Configure(Parameters* parameters)=0;
+ 
+-		virtual void   SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters)=0;
+-		virtual void   ConstrainMin(IssmPDouble minimum)=0;
+-		virtual IssmPDouble InfinityNorm(void)=0;
+-		virtual IssmPDouble MaxAbs(void)=0;
+-		virtual IssmPDouble MinAbs(void)=0;
+-		virtual IssmPDouble Max(void)=0;
+-		virtual IssmPDouble Min(void)=0;
+-		virtual void   Scale(IssmPDouble scale_factor)=0;
+-		virtual void   ArtificialNoise(IssmPDouble min,IssmPDouble max)=0;
+-		virtual void   AXPY(Input* xinput,IssmPDouble scalar)=0;
+-		virtual void   Constrain(IssmPDouble cm_min, IssmPDouble cm_max)=0;
++		virtual void   SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters)=0;
++		virtual void   ConstrainMin(IssmDouble minimum)=0;
++		virtual IssmDouble InfinityNorm(void)=0;
++		virtual IssmDouble MaxAbs(void)=0;
++		virtual IssmDouble MinAbs(void)=0;
++		virtual IssmDouble Max(void)=0;
++		virtual IssmDouble Min(void)=0;
++		virtual void   Scale(IssmDouble scale_factor)=0;
++		virtual void   ArtificialNoise(IssmDouble min,IssmDouble max)=0;
++		virtual void   AXPY(Input* xinput,IssmDouble scalar)=0;
++		virtual void   Constrain(IssmDouble cm_min, IssmDouble cm_max)=0;
+ 		virtual void   VerticallyIntegrate(Input* thickness_input)=0;
+ 		virtual void   Extrude()=0;
+ 		virtual void   GetVectorFromInputs(Vector* vector,int* doflist)=0;
+-		virtual void   GetValuesPtr(IssmPDouble** pvalues,int* pnum_values)=0;
++		virtual void   GetValuesPtr(IssmDouble** pvalues,int* pnum_values)=0;
+ 		
+ 		virtual Input* SpawnTriaInput(int* indices)=0;
+ 		virtual Input* PointwiseDivide(Input* inputB)=0;
+ 		virtual Input* PointwiseMax(Input* inputmax)=0;
+ 		virtual Input* PointwiseMin(Input* inputmin)=0;
+-		virtual ElementResult* SpawnResult(int step, IssmPDouble time)=0;
++		virtual ElementResult* SpawnResult(int step, IssmDouble time)=0;
+ 
+ 		/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12530)
+@@ -26,7 +26,7 @@
+ 
+ 		/*ControlInput constructors, destructors: {{{*/
+ 		ControlInput();
+-		ControlInput(int enum_type,int enum_input,IssmPDouble* pvalues,IssmPDouble* pmin,IssmPDouble* pmax,int id);
++		ControlInput(int enum_type,int enum_input,IssmDouble* pvalues,IssmDouble* pmin,IssmDouble* pmax,int id);
+ 		~ControlInput();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -43,53 +43,53 @@
+ 		Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
+ 		Input* PointwiseMin(Input* inputB){_error2_("not implemented yet");};
+ 		Input* PointwiseMax(Input* inputB){_error2_("not implemented yet");};
+-		ElementResult* SpawnResult(int step, IssmPDouble time);
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
++		ElementResult* SpawnResult(int step, IssmDouble time);
++		void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void SetInput(Input* in_input);
+ 		void GetInputValue(bool* pvalue);
+ 		void GetInputValue(int* pvalue);
+-		void GetInputValue(IssmPDouble* pvalue);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetInputAverage(IssmPDouble* pvalue);
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputAverage(IssmDouble* pvalue);
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype){_error2_("not implemented yet");};
+-		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){_error2_("not implemented yet");};
+-		void ConstrainMin(IssmPDouble minimum){_error2_("not implemented yet");};
+-		void Scale(IssmPDouble scale_factor){_error2_("not implemented yet");};
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
+-		void AXPY(Input* xinput,IssmPDouble scalar){_error2_("not implemented yet");};
++		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){_error2_("not implemented yet");};
++		void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
++		void Scale(IssmDouble scale_factor){_error2_("not implemented yet");};
++		void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
++		void AXPY(Input* xinput,IssmDouble scalar){_error2_("not implemented yet");};
+ 		void Constrain(void);
+-		void Constrain(IssmPDouble min,IssmPDouble max);
+-		IssmPDouble InfinityNorm(void){_error2_("not implemented yet");};
+-		IssmPDouble Max(void){_error2_("not implemented yet");};
+-		IssmPDouble MaxAbs(void){_error2_("not implemented yet");};
+-		IssmPDouble Min(void){_error2_("not implemented yet");};
+-		IssmPDouble MinAbs(void){_error2_("not implemented yet");};
++		void Constrain(IssmDouble min,IssmDouble max);
++		IssmDouble InfinityNorm(void){_error2_("not implemented yet");};
++		IssmDouble Max(void){_error2_("not implemented yet");};
++		IssmDouble MaxAbs(void){_error2_("not implemented yet");};
++		IssmDouble Min(void){_error2_("not implemented yet");};
++		IssmDouble MinAbs(void){_error2_("not implemented yet");};
+ 		void Extrude(void);
+ 		void VerticallyIntegrate(Input* thickness_input);
+ 		void GetVectorFromInputs(Vector* vector,int* doflist,const char* data);
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){_error2_("not implemented yet");};
+-		ElementResult* SpawnGradient(int step, IssmPDouble time);
++		void GetValuesPtr(IssmDouble** pvalues,int* pnum_values){_error2_("not implemented yet");};
++		ElementResult* SpawnGradient(int step, IssmDouble time);
+ 		void GetGradient(Vector* gradient_vec,int* doflist);
+-		void ScaleGradient(IssmPDouble scale);
++		void ScaleGradient(IssmDouble scale);
+ 		void SetGradient(Input* gradient_in);
+-		void UpdateValue(IssmPDouble scalar);
++		void UpdateValue(IssmDouble scalar);
+ 		void SaveValue(void);
+ 		/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp	(revision 12530)
+@@ -110,8 +110,8 @@
+ 	/*do nothing: */
+ }
+ /*}}}*/
+-/*FUNCTION DatasetInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,int index){{{*/
+-void DatasetInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,int index){
++/*FUNCTION DatasetInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss,int index){{{*/
++void DatasetInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss,int index){
+ 
+ 	/*Get requested input within dataset*/
+ 	if(index<0 || index > inputs->Size()-1) _error2_("index requested (" << index << ") exceeds dataset size (" << inputs->Size() << ")");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12530)
+@@ -39,51 +39,51 @@
+ 		Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
+ 		Input* PointwiseMin(Input* inputB){_error2_("not implemented yet");};
+ 		Input* PointwiseMax(Input* inputB){_error2_("not implemented yet");};
+-		ElementResult* SpawnResult(int step, IssmPDouble time){_error2_("not implemented yet");};
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
++		ElementResult* SpawnResult(int step, IssmDouble time){_error2_("not implemented yet");};
++		void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numeriics: {{{*/
+ 		void GetInputValue(bool* pvalue){_error2_("not implemented yet");};
+ 		void GetInputValue(int* pvalue){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index);
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetInputAverage(IssmPDouble* pvalue){_error2_("not implemented yet");};
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index);
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputAverage(IssmDouble* pvalue){_error2_("not implemented yet");};
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype){_error2_("not implemented yet");};
+-		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){_error2_("not implemented yet");};
+-		void ConstrainMin(IssmPDouble minimum){_error2_("not implemented yet");};
+-		void Scale(IssmPDouble scale_factor){_error2_("not implemented yet");};
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
+-		void AXPY(Input* xinput,IssmPDouble scalar){_error2_("not implemented yet");};
++		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){_error2_("not implemented yet");};
++		void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
++		void Scale(IssmDouble scale_factor){_error2_("not implemented yet");};
++		void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
++		void AXPY(Input* xinput,IssmDouble scalar){_error2_("not implemented yet");};
+ 		void Constrain(void){_error2_("not implemented yet");};
+-		void Constrain(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
+-		IssmPDouble InfinityNorm(void){_error2_("not implemented yet");};
+-		IssmPDouble Max(void){_error2_("not implemented yet");};
+-		IssmPDouble MaxAbs(void){_error2_("not implemented yet");};
+-		IssmPDouble Min(void){_error2_("not implemented yet");};
+-		IssmPDouble MinAbs(void){_error2_("not implemented yet");};
++		void Constrain(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
++		IssmDouble InfinityNorm(void){_error2_("not implemented yet");};
++		IssmDouble Max(void){_error2_("not implemented yet");};
++		IssmDouble MaxAbs(void){_error2_("not implemented yet");};
++		IssmDouble Min(void){_error2_("not implemented yet");};
++		IssmDouble MinAbs(void){_error2_("not implemented yet");};
+ 		void Extrude(void){_error2_("not implemented yet");};
+ 		void VerticallyIntegrate(Input* thickness_input){_error2_("not implemented yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist){_error2_("not implemented yet");};
+-		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){_error2_("not implemented yet");};
+-		ElementResult* SpawnGradient(int step, IssmPDouble time){_error2_("not implemented yet");};
++		void GetValuesPtr(IssmDouble** pvalues,int* pnum_values){_error2_("not implemented yet");};
++		ElementResult* SpawnGradient(int step, IssmDouble time){_error2_("not implemented yet");};
+ 		void GetGradient(Vector* gradient_vec,int* doflist){_error2_("not implemented yet");};
+-		void ScaleGradient(IssmPDouble scale){_error2_("not implemented yet");};
++		void ScaleGradient(IssmDouble scale){_error2_("not implemented yet");};
+ 		void SetGradient(Input* gradient_in){_error2_("not implemented yet");};
+-		void UpdateValue(IssmPDouble scalar){_error2_("not implemented yet");};
++		void UpdateValue(IssmDouble scalar){_error2_("not implemented yet");};
+ 		void SaveValue(void){_error2_("not implemented yet");};
+ 		/*}}}*/
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12530)
+@@ -22,7 +22,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::IntInput(IssmPDouble* values){{{*/
++/*FUNCTION IntInput::IntInput(IssmDouble* values){{{*/
+ IntInput::IntInput(int in_enum_type,IssmInt in_value){
+ 
+ 	enum_type=in_enum_type;
+@@ -96,7 +96,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::SpawnResult{{{*/
+-ElementResult* IntInput::SpawnResult(int step, IssmPDouble time){
++ElementResult* IntInput::SpawnResult(int step, IssmDouble time){
+ 	
+ 	_error2_("not supported yet!");
+ 
+@@ -112,22 +112,22 @@
+ 	*pvalue=value;
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue){{{*/
+-void IntInput::GetInputValue(IssmPDouble* pvalue){
+-	_error2_("IntInput cannot return a IssmPDouble in parallel");
++/*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue){{{*/
++void IntInput::GetInputValue(IssmDouble* pvalue){
++	_error2_("IntInput cannot return a IssmDouble in parallel");
+ }
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
+-void IntInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_("not supported yet!");}
++/*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){{{*/
++void IntInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
+-void IntInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_("not supported yet!");}
++/*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){{{*/
++void IntInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
++/*FUNCTION IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void IntInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
++/*FUNCTION IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION IntInput::ChangeEnum{{{*/
+ void IntInput::ChangeEnum(int newenumtype){
+@@ -135,22 +135,22 @@
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::SquareMin{{{*/
+-void IntInput::SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){
++void IntInput::SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){
+ 
+ 	/*square min of an integer is the square of the integer itself: */
+-	*psquaremin=pow((IssmPDouble)value,2);
++	*psquaremin=pow((IssmDouble)value,2);
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::Scale{{{*/
+-void IntInput::Scale(IssmPDouble scale_factor){
+-	IssmPDouble dvalue=(IssmPDouble)value*scale_factor;
++void IntInput::Scale(IssmDouble scale_factor){
++	IssmDouble dvalue=(IssmDouble)value*scale_factor;
+ 	value=(int)dvalue;
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::AXPY{{{*/
+-void IntInput::AXPY(Input* xinput,IssmPDouble scalar){
++void IntInput::AXPY(Input* xinput,IssmDouble scalar){
+ 
+-	IssmPDouble dvalue;
++	IssmDouble dvalue;
+ 	IntInput*  xintinput=NULL;
+ 
+ 	/*xinput is of the same type, so cast it: */
+@@ -160,7 +160,7 @@
+ 	switch(xinput->ObjectEnum()){
+ 
+ 		case IntInputEnum:
+-			dvalue=(IssmPDouble)this->value+scalar*(IssmPDouble)xintinput->value;
++			dvalue=(IssmDouble)this->value+scalar*(IssmDouble)xintinput->value;
+ 			this->value=(int)dvalue;
+ 			return;
+ 
+@@ -171,7 +171,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::Constrain{{{*/
+-void IntInput::Constrain(IssmPDouble cm_min, IssmPDouble cm_max){
++void IntInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){
+ 
+ 	if(!xIsNan<IssmDouble>(cm_min)) if (this->value<cm_min)this->value=(int)cm_min;
+ 	if(!xIsNan<IssmDouble>(cm_max)) if (this->value>cm_max)this->value=(int)cm_max;
+@@ -186,7 +186,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::GetValuesPtr{{{*/
+-void IntInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
++void IntInput::GetValuesPtr(IssmDouble** pvalues,int* pnum_values){
+ 
+ 	_error2_("not supported yet!");
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12530)
+@@ -22,7 +22,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::BoolInput(IssmPDouble* values){{{*/
++/*FUNCTION BoolInput::BoolInput(IssmDouble* values){{{*/
+ BoolInput::BoolInput(int in_enum_type,IssmBool in_value){
+ 
+ 	enum_type=in_enum_type;
+@@ -97,7 +97,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::SpawnResult{{{*/
+-ElementResult* BoolInput::SpawnResult(int step, IssmPDouble time){
++ElementResult* BoolInput::SpawnResult(int step, IssmDouble time){
+ 	
+ 	return new BoolElementResult(this->enum_type,this->value,step,time);
+ 
+@@ -113,20 +113,20 @@
+ /*FUNCTION BoolInput::GetInputValue(int* pvalue){{{*/
+ void BoolInput::GetInputValue(int* pvalue){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue){{{*/
+-void BoolInput::GetInputValue(IssmPDouble* pvalue){_error2_("not supported yet!");}
++/*FUNCTION BoolInput::GetInputValue(IssmDouble* pvalue){{{*/
++void BoolInput::GetInputValue(IssmDouble* pvalue){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
+-void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_("not supported yet!");}
++/*FUNCTION BoolInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){{{*/
++void BoolInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
+-void BoolInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_("not supported yet!");}
++/*FUNCTION BoolInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){{{*/
++void BoolInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
++/*FUNCTION BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void BoolInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
++/*FUNCTION BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::ChangeEnum{{{*/
+ void BoolInput::ChangeEnum(int newenumtype){
+@@ -134,18 +134,18 @@
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::SquareMin{{{*/
+-void BoolInput::SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){
++void BoolInput::SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){
+ 	/*square of a bool is the bool itself: */
+ 	*psquaremin=value;
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::Scale{{{*/
+-void BoolInput::Scale(IssmPDouble scale_factor){
++void BoolInput::Scale(IssmDouble scale_factor){
+ 	/*a bool cannot be scaled: */
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::AXPY{{{*/
+-void BoolInput::AXPY(Input* xinput,IssmPDouble scalar){
++void BoolInput::AXPY(Input* xinput,IssmDouble scalar){
+ 
+ 	BoolInput*  xboolinput=NULL;
+ 
+@@ -166,7 +166,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::Constrain{{{*/
+-void BoolInput::Constrain(IssmPDouble cm_min, IssmPDouble cm_max){
++void BoolInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){
+ 
+ 	if(!xIsNan<IssmDouble>(cm_min)) if (this->value<cm_min)this->value=cm_min;
+ 	if(!xIsNan<IssmDouble>(cm_max)) if (this->value>cm_max)this->value=cm_max;
+@@ -188,7 +188,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION BoolInput::GetValuesPtr{{{*/
+-void BoolInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
++void BoolInput::GetValuesPtr(IssmDouble** pvalues,int* pnum_values){
+ 
+ 	_error2_("not supported yet!");
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12530)
+@@ -39,45 +39,45 @@
+ 		Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
+ 		Input* PointwiseMin(Input* inputB){_error2_("not implemented yet");};
+ 		Input* PointwiseMax(Input* inputB){_error2_("not implemented yet");};
+-		ElementResult* SpawnResult(int step, IssmPDouble time);
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
++		ElementResult* SpawnResult(int step, IssmDouble time);
++		void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue);
+ 		void GetInputValue(int* pvalue);
+-		void GetInputValue(IssmPDouble* pvalue);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetInputAverage(IssmPDouble* pvalue){_error2_("not implemented yet");};
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputAverage(IssmDouble* pvalue){_error2_("not implemented yet");};
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+-		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(IssmPDouble minimum){_error2_("not implemented yet");};
+-		void Scale(IssmPDouble scale_factor);
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
+-		void AXPY(Input* xinput,IssmPDouble scalar);
+-		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
+-		IssmPDouble InfinityNorm(void){_error2_("InfinityNorm not implemented for integers");};
+-		IssmPDouble Max(void){_error2_("Max not implemented for integers");};
+-		IssmPDouble MaxAbs(void){_error2_("Max not implemented for integers");};
+-		IssmPDouble Min(void){_error2_("Min not implemented for integers");};
+-		IssmPDouble MinAbs(void){_error2_("Min not implemented for integers");};
++		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
++		void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
++		void Scale(IssmDouble scale_factor);
++		void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
++		void AXPY(Input* xinput,IssmDouble scalar);
++		void Constrain(IssmDouble cm_min, IssmDouble cm_max);
++		IssmDouble InfinityNorm(void){_error2_("InfinityNorm not implemented for integers");};
++		IssmDouble Max(void){_error2_("Max not implemented for integers");};
++		IssmDouble MaxAbs(void){_error2_("Max not implemented for integers");};
++		IssmDouble Min(void){_error2_("Min not implemented for integers");};
++		IssmDouble MinAbs(void){_error2_("Min not implemented for integers");};
+ 		void Extrude(void){_error2_("not supported yet");};
+ 		void VerticallyIntegrate(Input* thickness_input){_error2_("not supported yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
++		void GetValuesPtr(IssmDouble** pvalues,int* pnum_values);
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12530)
+@@ -39,45 +39,45 @@
+ 		Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
+ 		Input* PointwiseMin(Input* inputB){_error2_("not implemented yet");};
+ 		Input* PointwiseMax(Input* inputB){_error2_("not implemented yet");};
+-		ElementResult* SpawnResult(int step, IssmPDouble time);
++		ElementResult* SpawnResult(int step, IssmDouble time);
+ 		void Configure(Parameters* parameters);
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
++		void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue);
+ 		void GetInputValue(int* pvalue);
+-		void GetInputValue(IssmPDouble* pvalue);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetInputAverage(IssmPDouble* pvalue){_error2_("not implemented yet");};
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputAverage(IssmDouble* pvalue){_error2_("not implemented yet");};
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+-		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(IssmPDouble minimum){_error2_("not implemented yet");};
+-		IssmPDouble InfinityNorm(void){_error2_("InfinityNorm not implemented for booleans");};
+-		IssmPDouble Max(void){_error2_("Max not implemented for booleans");};
+-		IssmPDouble MaxAbs(void){_error2_("Max not implemented for booleans");};
+-		IssmPDouble Min(void){_error2_("Min not implemented for booleans");};
+-		IssmPDouble MinAbs(void){_error2_("Min not implemented for booleans");};
+-		void Scale(IssmPDouble scale_factor);
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
+-		void AXPY(Input* xinput,IssmPDouble scalar);
+-		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
++		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
++		void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
++		IssmDouble InfinityNorm(void){_error2_("InfinityNorm not implemented for booleans");};
++		IssmDouble Max(void){_error2_("Max not implemented for booleans");};
++		IssmDouble MaxAbs(void){_error2_("Max not implemented for booleans");};
++		IssmDouble Min(void){_error2_("Min not implemented for booleans");};
++		IssmDouble MinAbs(void){_error2_("Min not implemented for booleans");};
++		void Scale(IssmDouble scale_factor);
++		void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
++		void AXPY(Input* xinput,IssmDouble scalar);
++		void Constrain(IssmDouble cm_min, IssmDouble cm_max);
+ 		void Extrude(void);
+ 		void VerticallyIntegrate(Input* thickness_input){_error2_("not supported yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
++		void GetValuesPtr(IssmDouble** pvalues,int* pnum_values);
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12530)
+@@ -22,8 +22,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::TriaP1Input(int in_enum_type,IssmPDouble* values){{{*/
+-TriaP1Input::TriaP1Input(int in_enum_type,IssmPDouble* in_values)
++/*FUNCTION TriaP1Input::TriaP1Input(int in_enum_type,IssmDouble* values){{{*/
++TriaP1Input::TriaP1Input(int in_enum_type,IssmDouble* in_values)
+ 	:TriaRef(1)
+ {
+ 
+@@ -107,7 +107,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::SpawnResult{{{*/
+-ElementResult* TriaP1Input::SpawnResult(int step, IssmPDouble time){
++ElementResult* TriaP1Input::SpawnResult(int step, IssmDouble time){
+ 
+ 	return new TriaP1ElementResult(this->enum_type,this->values,step,time);
+ 
+@@ -115,29 +115,29 @@
+ /*}}}*/
+ 
+ /*Object functions*/
+-/*FUNCTION TriaP1Input::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
+-void TriaP1Input::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){
++/*FUNCTION TriaP1Input::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){{{*/
++void TriaP1Input::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){
+ 
+ 	/*Call TriaRef function*/
+ 	TriaRef::GetInputValue(pvalue,&values[0],gauss);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::GetInputDerivativeValue(IssmPDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void TriaP1Input::GetInputDerivativeValue(IssmPDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){
++/*FUNCTION TriaP1Input::GetInputDerivativeValue(IssmDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void TriaP1Input::GetInputDerivativeValue(IssmDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*Call TriaRef function*/
+ 	TriaRef::GetInputDerivativeValue(p,&values[0],xyz_list,gauss);
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::GetVxStrainRate2d{{{*/
+-void TriaP1Input::GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){
++void TriaP1Input::GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*Intermediary*/
+ 	int       i;
+ 	const int numnodes=3;
+-	IssmPDouble B[3][NDOF2*numnodes];
+-	IssmPDouble velocity[3][NDOF2];
++	IssmDouble B[3][NDOF2*numnodes];
++	IssmDouble velocity[3][NDOF2];
+ 
+ 	/*Get B matrix: */
+ 	GetBMacAyeal(&B[0][0], xyz_list, gauss);
+@@ -154,13 +154,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::GetVyStrainRate2d{{{*/
+-void TriaP1Input::GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){
++void TriaP1Input::GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*Intermediary*/
+ 	int       i;
+ 	const int numnodes=3;
+-	IssmPDouble B[3][NDOF2*numnodes];
+-	IssmPDouble velocity[3][NDOF2];
++	IssmDouble B[3][NDOF2*numnodes];
++	IssmDouble velocity[3][NDOF2];
+ 
+ 	/*Get B matrix: */
+ 	GetBMacAyeal(&B[0][0], xyz_list, gauss);
+@@ -182,19 +182,19 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::GetInputAverage{{{*/
+-void TriaP1Input::GetInputAverage(IssmPDouble* pvalue){
++void TriaP1Input::GetInputAverage(IssmDouble* pvalue){
+ 	*pvalue=1./3.*(values[0]+values[1]+values[2]);
+ }
+ /*}}}*/
+ 
+ /*Intermediary*/
+ /*FUNCTION TriaP1Input::SquareMin{{{*/
+-void TriaP1Input::SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){
++void TriaP1Input::SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){
+ 
+ 	int i;
+ 	const int numnodes=3;
+-	IssmPDouble valuescopy[numnodes];
+-	IssmPDouble squaremin;
++	IssmDouble valuescopy[numnodes];
++	IssmDouble squaremin;
+ 
+ 	/*First,  copy values, to process units if requested: */
+ 	for(i=0;i<numnodes;i++)valuescopy[i]=this->values[i];
+@@ -212,7 +212,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::ContrainMin{{{*/
+-void TriaP1Input::ConstrainMin(IssmPDouble minimum){
++void TriaP1Input::ConstrainMin(IssmDouble minimum){
+ 	
+ 	int i;
+ 	const int numnodes=3;
+@@ -221,10 +221,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::InfinityNorm{{{*/
+-IssmPDouble TriaP1Input::InfinityNorm(void){
++IssmDouble TriaP1Input::InfinityNorm(void){
+ 
+ 	/*Output*/
+-	IssmPDouble norm=0;
++	IssmDouble norm=0;
+ 	const int numnodes=3;
+ 
+ 	for(int i=0;i<numnodes;i++) if(fabs(values[i])>norm) norm=fabs(values[i]);
+@@ -232,10 +232,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::Max{{{*/
+-IssmPDouble TriaP1Input::Max(void){
++IssmDouble TriaP1Input::Max(void){
+ 
+ 	const int numnodes=3;
+-	IssmPDouble    max=values[0];
++	IssmDouble    max=values[0];
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(values[i]>max) max=values[i];
+@@ -244,10 +244,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::MaxAbs{{{*/
+-IssmPDouble TriaP1Input::MaxAbs(void){
++IssmDouble TriaP1Input::MaxAbs(void){
+ 
+ 	const int numnodes=3;
+-	IssmPDouble    max=fabs(values[0]);
++	IssmDouble    max=fabs(values[0]);
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(fabs(values[i])>max) max=fabs(values[i]);
+@@ -256,10 +256,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::Min{{{*/
+-IssmPDouble TriaP1Input::Min(void){
++IssmDouble TriaP1Input::Min(void){
+ 
+ 	const int numnodes=3;
+-	IssmPDouble    min=values[0];
++	IssmDouble    min=values[0];
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(values[i]<min) min=values[i];
+@@ -268,10 +268,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::MinAbs{{{*/
+-IssmPDouble TriaP1Input::MinAbs(void){
++IssmDouble TriaP1Input::MinAbs(void){
+ 
+ 	const int numnodes=3;
+-	IssmPDouble    min=fabs(values[0]);
++	IssmDouble    min=fabs(values[0]);
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(fabs(values[i])<min) min=fabs(values[i]);
+@@ -280,7 +280,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::Scale{{{*/
+-void TriaP1Input::Scale(IssmPDouble scale_factor){
++void TriaP1Input::Scale(IssmDouble scale_factor){
+ 	
+ 	int i;
+ 	const int numnodes=3;
+@@ -289,23 +289,23 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::ArtificialNoise{{{*/
+-void TriaP1Input::ArtificialNoise(IssmPDouble min,IssmPDouble max){
++void TriaP1Input::ArtificialNoise(IssmDouble min,IssmDouble max){
+ 
+ 	int i;
+ 	const int numnodes=3;
+-	IssmPDouble noise;
++	IssmDouble noise;
+ 
+ 	/*Compute random number between bounds:
+ 	 * rand() outputs an integer in [0 RAND_MAX]
+-	 * (IssmPDouble)rand()/RAND_MAX is in [0 1]
++	 * (IssmDouble)rand()/RAND_MAX is in [0 1]
+ 	 */
+-	 noise=min+(max-min)*(IssmPDouble)rand()/RAND_MAX;
++	 noise=min+(max-min)*(IssmDouble)rand()/RAND_MAX;
+ 
+ 	for(i=0;i<numnodes;i++)values[i]=values[i]+noise;
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::AXPY{{{*/
+-void TriaP1Input::AXPY(Input* xinput,IssmPDouble scalar){
++void TriaP1Input::AXPY(Input* xinput,IssmDouble scalar){
+ 
+ 	int i;
+ 	const int numnodes=3;
+@@ -328,7 +328,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::Constrain{{{*/
+-void TriaP1Input::Constrain(IssmPDouble cm_min, IssmPDouble cm_max){
++void TriaP1Input::Constrain(IssmDouble cm_min, IssmDouble cm_max){
+ 
+ 	int i;
+ 	const int numnodes=3;
+@@ -346,7 +346,7 @@
+ 
+ } /*}}}*/
+ /*FUNCTION TriaP1Input::GetValuesPtr{{{*/
+-void TriaP1Input::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
++void TriaP1Input::GetValuesPtr(IssmDouble** pvalues,int* pnum_values){
+ 
+ 	*pvalues=this->values;
+ 	if(pnum_values)*pnum_values=3;
+@@ -364,7 +364,7 @@
+ 	TriaP1Input *xinputB     = NULL;
+ 	int               B_numvalues;
+ 	const int         numnodes    = 3;
+-	IssmPDouble            minvalues[numnodes];
++	IssmDouble            minvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (inputB->ObjectEnum()!=TriaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
+@@ -395,7 +395,7 @@
+ 	TriaP1Input *xinputB     = NULL;
+ 	int               B_numvalues;
+ 	const int         numnodes    = 3;
+-	IssmPDouble            maxvalues[numnodes];
++	IssmDouble            maxvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (inputB->ObjectEnum()!=TriaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12530)
+@@ -18,11 +18,11 @@
+ 	public:
+ 		/*just hold 3 values for 3 vertices: */
+ 		int    enum_type;
+-		IssmPDouble values[3];
++		IssmDouble values[3];
+ 
+ 		/*TriaP1Input constructors, destructors: {{{*/
+ 		TriaP1Input();
+-		TriaP1Input(int enum_type,IssmPDouble* values);
++		TriaP1Input(int enum_type,IssmDouble* values);
+ 		~TriaP1Input();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -39,46 +39,46 @@
+ 		Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
+ 		Input* PointwiseMin(Input* inputB);
+ 		Input* PointwiseMax(Input* inputB);
+-		ElementResult* SpawnResult(int step, IssmPDouble time);
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
++		ElementResult* SpawnResult(int step, IssmDouble time);
++		void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue){_error2_("not implemented yet");}
+ 		void GetInputValue(int* pvalue){_error2_("not implemented yet");}
+-		void GetInputValue(IssmPDouble* pvalue){_error2_("not implemented yet");}
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetInputAverage(IssmPDouble* pvalue);
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue){_error2_("not implemented yet");}
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int index){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputAverage(IssmDouble* pvalue);
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+ 
+-		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(IssmPDouble minimum);
+-		void Scale(IssmPDouble scale_factor);
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max);
+-		void AXPY(Input* xinput,IssmPDouble scalar);
+-		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
+-		IssmPDouble InfinityNorm(void);
+-		IssmPDouble Max(void);
+-		IssmPDouble MaxAbs(void);
+-		IssmPDouble Min(void);
+-		IssmPDouble MinAbs(void);
++		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
++		void ConstrainMin(IssmDouble minimum);
++		void Scale(IssmDouble scale_factor);
++		void ArtificialNoise(IssmDouble min,IssmDouble max);
++		void AXPY(Input* xinput,IssmDouble scalar);
++		void Constrain(IssmDouble cm_min, IssmDouble cm_max);
++		IssmDouble InfinityNorm(void);
++		IssmDouble Max(void);
++		IssmDouble MaxAbs(void);
++		IssmDouble Min(void);
++		IssmDouble MinAbs(void);
+ 		void Extrude(void){_error2_("not supported yet");};
+ 		void VerticallyIntegrate(Input* thickness_input){_error2_("not supported yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
++		void GetValuesPtr(IssmDouble** pvalues,int* pnum_values);
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12530)
+@@ -45,7 +45,7 @@
+ /*}}}*/
+ /*FUNCTION TransientInput::~TransientInput{{{*/
+ TransientInput::~TransientInput(){
+-	xDelete<double>(this->timesteps);
++	xDelete<IssmDouble>(this->timesteps);
+ 	this->timesteps=NULL;
+ 	this->numtimesteps=0;
+ 	parameters=NULL;
+@@ -99,8 +99,8 @@
+ 	output = new TransientInput();
+ 	output->enum_type=this->enum_type;
+ 	output->numtimesteps=this->numtimesteps;
+-	output->timesteps=xNew<IssmPDouble>(this->numtimesteps);
+-   memcpy(output->timesteps,this->timesteps,this->numtimesteps*sizeof(IssmPDouble));
++	output->timesteps=xNew<IssmDouble>(this->numtimesteps);
++   memcpy(output->timesteps,this->timesteps,this->numtimesteps*sizeof(IssmDouble));
+ 	output->inputs=(Inputs*)this->inputs->Copy();
+ 	output->parameters=this->parameters;
+ 
+@@ -127,8 +127,8 @@
+ 	outinput=new TransientInput();
+ 	outinput->enum_type=this->enum_type;
+ 	outinput->numtimesteps=this->numtimesteps;
+-	outinput->timesteps=xNew<IssmPDouble>(this->numtimesteps);
+-	memcpy(outinput->timesteps,this->timesteps,this->numtimesteps*sizeof(IssmPDouble));
++	outinput->timesteps=xNew<IssmDouble>(this->numtimesteps);
++	memcpy(outinput->timesteps,this->timesteps,this->numtimesteps*sizeof(IssmDouble));
+ 	outinput->inputs=(Inputs*)this->inputs->SpawnTriaInputs(indices);
+ 	outinput->parameters=this->parameters;
+ 
+@@ -138,7 +138,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::SpawnResult{{{*/
+-ElementResult* TransientInput::SpawnResult(int step, IssmPDouble time){
++ElementResult* TransientInput::SpawnResult(int step, IssmDouble time){
+ 
+ 	ElementResult* elementresult=NULL;
+ 
+@@ -155,9 +155,9 @@
+ /*}}}*/
+ 
+ /*Object functions*/
+-/*FUNCTION TransientInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
+-void TransientInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){
+-	IssmPDouble time;
++/*FUNCTION TransientInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){{{*/
++void TransientInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){
++	IssmDouble time;
+ 
+ 	/*First, recover current time from parameters: */
+ 	this->parameters->FindParam(&time,TimeEnum);
+@@ -171,8 +171,8 @@
+ 	delete input;
+ }
+ /*}}}*/
+-/*FUNCTION TransientInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){{{*/
+-void TransientInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){
++/*FUNCTION TransientInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){{{*/
++void TransientInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){
+ 
+ 	/*Retrieve interpolated values for this time step: */
+ 	Input* input=GetTimeInput(time);
+@@ -183,10 +183,10 @@
+ 	delete input;
+ }
+ /*}}}*/
+-/*FUNCTION TransientInput::GetInputDerivativeValue(IssmPDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void TransientInput::GetInputDerivativeValue(IssmPDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){
++/*FUNCTION TransientInput::GetInputDerivativeValue(IssmDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void TransientInput::GetInputDerivativeValue(IssmDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){
+ 
+-	IssmPDouble time;
++	IssmDouble time;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -207,9 +207,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::GetInputAverage{{{*/
+-void TransientInput::GetInputAverage(IssmPDouble* pvalue){
++void TransientInput::GetInputAverage(IssmDouble* pvalue){
+ 	
+-	IssmPDouble time;
++	IssmDouble time;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -227,26 +227,26 @@
+ 
+ /*Intermediary*/
+ /*FUNCTION TransientInput::AddTimeInput{{{*/
+-void TransientInput::AddTimeInput(Input* input,IssmPDouble time){
++void TransientInput::AddTimeInput(Input* input,IssmDouble time){
+ 
+ 	/*insert values at time step: */
+ 	if (this->numtimesteps>0 && time<=this->timesteps[this->numtimesteps-1]) _assert_("timestep values must increase sequentially");
+ 
+ 	//copy timesteps, add the new time, delete previous timesteps, and add the new input: inputs->AddObject(input);
+-	IssmPDouble* old_timesteps=NULL;
++	IssmDouble* old_timesteps=NULL;
+ 
+ 	if (this->numtimesteps > 0){
+-		old_timesteps=xNew<IssmPDouble>(this->numtimesteps);
+-		memcpy(old_timesteps,this->timesteps,this->numtimesteps*sizeof(IssmPDouble));
+-		xDelete<double>(this->timesteps); 
++		old_timesteps=xNew<IssmDouble>(this->numtimesteps);
++		memcpy(old_timesteps,this->timesteps,this->numtimesteps*sizeof(IssmDouble));
++		xDelete<IssmDouble>(this->timesteps); 
+ 	}
+ 
+ 	this->numtimesteps=this->numtimesteps+1;
+-	this->timesteps=xNew<IssmPDouble>(this->numtimesteps);
++	this->timesteps=xNew<IssmDouble>(this->numtimesteps);
+ 
+ 	if (this->numtimesteps > 1){
+-		memcpy(this->timesteps,old_timesteps,(this->numtimesteps-1)*sizeof(IssmPDouble));
+-		xDelete<double>(old_timesteps);
++		memcpy(this->timesteps,old_timesteps,(this->numtimesteps-1)*sizeof(IssmDouble));
++		xDelete<IssmDouble>(old_timesteps);
+ 	}
+ 
+ 	/*go ahead and plug: */
+@@ -256,9 +256,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::SquareMin{{{*/
+-void TransientInput::SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){
++void TransientInput::SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){
+ 
+-	IssmPDouble time;
++	IssmDouble time;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -274,10 +274,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::InfinityNorm{{{*/
+-IssmPDouble TransientInput::InfinityNorm(void){
++IssmDouble TransientInput::InfinityNorm(void){
+ 
+-	IssmPDouble time;
+-	IssmPDouble infnorm;
++	IssmDouble time;
++	IssmDouble infnorm;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -294,10 +294,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::Max{{{*/
+-IssmPDouble TransientInput::Max(void){
++IssmDouble TransientInput::Max(void){
+ 
+-	IssmPDouble time;
+-	IssmPDouble max;
++	IssmDouble time;
++	IssmDouble max;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -314,10 +314,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::MaxAbs{{{*/
+-IssmPDouble TransientInput::MaxAbs(void){
++IssmDouble TransientInput::MaxAbs(void){
+ 
+-	IssmPDouble time;
+-	IssmPDouble maxabs;
++	IssmDouble time;
++	IssmDouble maxabs;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -335,10 +335,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::Min{{{*/
+-IssmPDouble TransientInput::Min(void){
++IssmDouble TransientInput::Min(void){
+ 
+-	IssmPDouble time;
+-	IssmPDouble min;
++	IssmDouble time;
++	IssmDouble min;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -356,10 +356,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION TransientInput::MinAbs{{{*/
+-IssmPDouble TransientInput::MinAbs(void){
++IssmDouble TransientInput::MinAbs(void){
+ 
+-	IssmPDouble time;
+-	IssmPDouble minabs;
++	IssmDouble time;
++	IssmDouble minabs;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -378,7 +378,7 @@
+ /*FUNCTION TransientInput::GetVectorFromInputs{{{*/
+ void TransientInput::GetVectorFromInputs(Vector* vector,int* doflist){
+ 
+-	IssmPDouble time;
++	IssmDouble time;
+ 
+ 	/*First, recover current time from parameters: */
+ 	parameters->FindParam(&time,TimeEnum);
+@@ -393,11 +393,11 @@
+ 
+ } /*}}}*/
+ /*FUNCTION TransientInput::GetTimeInput{{{*/
+-Input* TransientInput::GetTimeInput(IssmPDouble intime){
++Input* TransientInput::GetTimeInput(IssmDouble intime){
+ 
+ 	int     i,j;
+-	IssmPDouble  deltat;
+-	IssmPDouble  alpha1,alpha2;
++	IssmDouble  deltat;
++	IssmDouble  alpha1,alpha2;
+ 	bool    found=false;
+ 	Input*  input=NULL;
+ 	Input*  input1=NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12530)
+@@ -22,8 +22,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::PentaP1Input(int in_enum_type,IssmPDouble* values){{{*/
+-PentaP1Input::PentaP1Input(int in_enum_type,IssmPDouble* in_values)
++/*FUNCTION PentaP1Input::PentaP1Input(int in_enum_type,IssmDouble* values){{{*/
++PentaP1Input::PentaP1Input(int in_enum_type,IssmDouble* in_values)
+ 		:PentaRef(1)
+ {
+ 
+@@ -97,7 +97,7 @@
+ 
+ 	/*output*/
+ 	TriaP1Input* outinput=NULL;
+-	IssmPDouble newvalues[3];
++	IssmDouble newvalues[3];
+ 
+ 	/*Loop over the new indices*/
+ 	for(int i=0;i<3;i++){
+@@ -118,7 +118,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::SpawnResult{{{*/
+-ElementResult* PentaP1Input::SpawnResult(int step, IssmPDouble time){
++ElementResult* PentaP1Input::SpawnResult(int step, IssmDouble time){
+ 
+ 	return new PentaP1ElementResult(this->enum_type,this->values,step,time);
+ 
+@@ -126,30 +126,30 @@
+ /*}}}*/
+ 
+ /*Object functions*/
+-/*FUNCTION PentaP1Input::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
+-void PentaP1Input::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){
++/*FUNCTION PentaP1Input::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){{{*/
++void PentaP1Input::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){
+ 
+ 	/*Call PentaRef function*/
+ 	PentaRef::GetInputValue(pvalue,&values[0],gauss);
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::GetInputDerivativeValue(IssmPDouble* p, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void PentaP1Input::GetInputDerivativeValue(IssmPDouble* p, IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION PentaP1Input::GetInputDerivativeValue(IssmDouble* p, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void PentaP1Input::GetInputDerivativeValue(IssmDouble* p, IssmPDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	/*Call PentaRef function*/
+ 	PentaRef::GetInputDerivativeValue(p,&values[0],xyz_list,gauss);
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVxStrainRate3d{{{*/
+-void PentaP1Input::GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	int i,j;
+ 
+ 	const int numnodes=6;
+ 	const int DOFVELOCITY=3;
+-	IssmPDouble B[8][27];
+-	IssmPDouble B_reduced[6][DOFVELOCITY*numnodes];
+-	IssmPDouble velocity[numnodes][DOFVELOCITY];
++	IssmDouble B[8][27];
++	IssmDouble B_reduced[6][DOFVELOCITY*numnodes];
++	IssmDouble velocity[numnodes][DOFVELOCITY];
+ 
+ 	/*Get B matrix: */
+ 	GetBStokes(&B[0][0], xyz_list, gauss);
+@@ -187,14 +187,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVyStrainRate3d{{{*/
+-void PentaP1Input::GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	int i,j;
+ 
+ 	const int numnodes=6;
+ 	const int DOFVELOCITY=3;
+-	IssmPDouble B[8][27];
+-	IssmPDouble B_reduced[6][DOFVELOCITY*numnodes];
+-	IssmPDouble velocity[numnodes][DOFVELOCITY];
++	IssmDouble B[8][27];
++	IssmDouble B_reduced[6][DOFVELOCITY*numnodes];
++	IssmDouble velocity[numnodes][DOFVELOCITY];
+ 
+ 	/*Get B matrix: */
+ 	GetBStokes(&B[0][0], xyz_list, gauss);
+@@ -232,14 +232,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVzStrainRate3d{{{*/
+-void PentaP1Input::GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	int i,j;
+ 
+ 	const int numnodes=6;
+ 	const int DOFVELOCITY=3;
+-	IssmPDouble B[8][27];
+-	IssmPDouble B_reduced[6][DOFVELOCITY*numnodes];
+-	IssmPDouble velocity[numnodes][DOFVELOCITY];
++	IssmDouble B[8][27];
++	IssmDouble B_reduced[6][DOFVELOCITY*numnodes];
++	IssmDouble velocity[numnodes][DOFVELOCITY];
+ 
+ 	/*Get B matrix: */
+ 	GetBStokes(&B[0][0], xyz_list, gauss);
+@@ -278,12 +278,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVxStrainRate3dPattyn{{{*/
+-void PentaP1Input::GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	int i;
+ 	const int numnodes=6;
+-	IssmPDouble B[5][NDOF2*numnodes];
+-	IssmPDouble velocity[numnodes][NDOF2];
++	IssmDouble B[5][NDOF2*numnodes];
++	IssmDouble velocity[numnodes][NDOF2];
+ 
+ 	/*Get B matrix: */
+ 	GetBPattyn(&B[0][0], xyz_list, gauss);
+@@ -302,12 +302,12 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVyStrainRate3dPattyn{{{*/
+-void PentaP1Input::GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	int i;
+ 	const int numnodes=6;
+-	IssmPDouble B[5][NDOF2*numnodes];
+-	IssmPDouble velocity[numnodes][NDOF2];
++	IssmDouble B[5][NDOF2*numnodes];
++	IssmDouble velocity[numnodes][NDOF2];
+ 
+ 	/*Get B matrix: */
+ 	GetBPattyn(&B[0][0], xyz_list, gauss);
+@@ -331,19 +331,19 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetInputAverage{{{*/
+-void PentaP1Input::GetInputAverage(IssmPDouble* pvalue){
++void PentaP1Input::GetInputAverage(IssmDouble* pvalue){
+ 	*pvalue=1./6.*(values[0]+values[1]+values[2]+values[3]+values[4]+values[5]);
+ }
+ /*}}}*/
+ 
+ /*Intermediary*/
+ /*FUNCTION PentaP1Input::SquareMin{{{*/
+-void PentaP1Input::SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){
++void PentaP1Input::SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){
+ 
+ 	int i;
+ 	const int numnodes=6;
+-	IssmPDouble valuescopy[numnodes];
+-	IssmPDouble squaremin;
++	IssmDouble valuescopy[numnodes];
++	IssmDouble squaremin;
+ 
+ 	/*First,  copy values, to process units if requested: */
+ 	for(i=0;i<numnodes;i++)valuescopy[i]=this->values[i];
+@@ -361,7 +361,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::ConstrainMin{{{*/
+-void PentaP1Input::ConstrainMin(IssmPDouble minimum){
++void PentaP1Input::ConstrainMin(IssmDouble minimum){
+ 	
+ 	int i;
+ 	const int numnodes=6;
+@@ -370,21 +370,21 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::InfinityNorm{{{*/
+-IssmPDouble PentaP1Input::InfinityNorm(void){
++IssmDouble PentaP1Input::InfinityNorm(void){
+ 
+ 	/*Output*/
+ 	const int numnodes=6;
+-	IssmPDouble norm=0;
++	IssmDouble norm=0;
+ 
+ 	for(int i=0;i<numnodes;i++) if(fabs(values[i])>norm) norm=fabs(values[i]);
+ 	return norm;
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::Max{{{*/
+-IssmPDouble PentaP1Input::Max(void){
++IssmDouble PentaP1Input::Max(void){
+ 
+ 	const int numnodes=6;
+-	IssmPDouble    max=values[0];
++	IssmDouble    max=values[0];
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(values[i]>max) max=values[i];
+@@ -393,10 +393,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::MaxAbs{{{*/
+-IssmPDouble PentaP1Input::MaxAbs(void){
++IssmDouble PentaP1Input::MaxAbs(void){
+ 
+ 	const int numnodes=6;
+-	IssmPDouble    max=fabs(values[0]);
++	IssmDouble    max=fabs(values[0]);
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(fabs(values[i])>max) max=fabs(values[i]);
+@@ -405,10 +405,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::Min{{{*/
+-IssmPDouble PentaP1Input::Min(void){
++IssmDouble PentaP1Input::Min(void){
+ 
+ 	const int numnodes=6;
+-	IssmPDouble    min=values[0];
++	IssmDouble    min=values[0];
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(values[i]<min) min=values[i];
+@@ -417,10 +417,10 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::MinAbs{{{*/
+-IssmPDouble PentaP1Input::MinAbs(void){
++IssmDouble PentaP1Input::MinAbs(void){
+ 
+ 	const int numnodes=6;
+-	IssmPDouble    min=fabs(values[0]);
++	IssmDouble    min=fabs(values[0]);
+ 
+ 	for(int i=1;i<numnodes;i++){
+ 		if(fabs(values[i])<min) min=fabs(values[i]);
+@@ -429,7 +429,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::Scale{{{*/
+-void PentaP1Input::Scale(IssmPDouble scale_factor){
++void PentaP1Input::Scale(IssmDouble scale_factor){
+ 	
+ 	int i;
+ 	const int numnodes=6;
+@@ -438,7 +438,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::AXPY{{{*/
+-void PentaP1Input::AXPY(Input* xinput,IssmPDouble scalar){
++void PentaP1Input::AXPY(Input* xinput,IssmDouble scalar){
+ 
+ 	int i;
+ 	const int numnodes=6;
+@@ -465,7 +465,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::Constrain{{{*/
+-void PentaP1Input::Constrain(IssmPDouble cm_min, IssmPDouble cm_max){
++void PentaP1Input::Constrain(IssmDouble cm_min, IssmDouble cm_max){
+ 
+ 	int i;
+ 	const int numnodes=6;
+@@ -491,7 +491,7 @@
+ 	int i;
+ 	const int  numnodes = 6;
+ 	int        num_thickness_values;
+-	IssmPDouble    *thickness_values = NULL;
++	IssmDouble    *thickness_values = NULL;
+ 
+ 	/*Check that input provided is a thickness*/
+ 	if (thickness_input->InstanceEnum()!=ThicknessEnum) _error2_("Input provided is not a Thickness (enum_type is " << EnumToStringx(thickness_input->InstanceEnum()) << ")");
+@@ -525,7 +525,7 @@
+ 	PentaP1Input *xinputB     = NULL;
+ 	int               B_numvalues;
+ 	const int         numnodes    = 6;
+-	IssmPDouble            AdotBvalues[numnodes];
++	IssmDouble            AdotBvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (inputB->ObjectEnum()!=PentaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
+@@ -556,7 +556,7 @@
+ 	PentaP1Input *xinputB     = NULL;
+ 	int               B_numvalues;
+ 	const int         numnodes    = 6;
+-	IssmPDouble            minvalues[numnodes];
++	IssmDouble            minvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (inputB->ObjectEnum()!=PentaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
+@@ -587,7 +587,7 @@
+ 	PentaP1Input *xinputB     = NULL;
+ 	int               B_numvalues;
+ 	const int         numnodes    = 6;
+-	IssmPDouble            maxvalues[numnodes];
++	IssmDouble            maxvalues[numnodes];
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (inputB->ObjectEnum()!=PentaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
+@@ -615,7 +615,7 @@
+ 
+ } /*}}}*/
+ /*FUNCTION PentaP1Input::GetValuesPtr{{{*/
+-void PentaP1Input::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
++void PentaP1Input::GetValuesPtr(IssmDouble** pvalues,int* pnum_values){
+ 
+ 	*pvalues=this->values;
+ 	*pnum_values=6;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12530)
+@@ -22,7 +22,7 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::DoubleInput(IssmPDouble value){{{*/
++/*FUNCTION DoubleInput::DoubleInput(IssmDouble value){{{*/
+ DoubleInput::DoubleInput(int in_enum_type,IssmDouble in_value){
+ 
+ 	enum_type=in_enum_type;
+@@ -97,7 +97,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::SpawnResult{{{*/
+-ElementResult* DoubleInput::SpawnResult(int step, IssmPDouble time){
++ElementResult* DoubleInput::SpawnResult(int step, IssmDouble time){
+ 
+ 	return new DoubleElementResult(this->enum_type,this->value,step,time);
+ 
+@@ -117,63 +117,63 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputValue(IssmPDouble* pvalue){{{*/
+-void DoubleInput::GetInputValue(IssmPDouble* pvalue){
++/*FUNCTION DoubleInput::GetInputValue(IssmDouble* pvalue){{{*/
++void DoubleInput::GetInputValue(IssmDouble* pvalue){
+ 
+ 	/*return value*/
+ 	*pvalue=value;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){{{*/
+-void DoubleInput::GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){*pvalue=this->value;}
++/*FUNCTION DoubleInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){{{*/
++void DoubleInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){*pvalue=this->value;}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){{{*/
+-void DoubleInput::GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){*pvalue=this->value;}
++/*FUNCTION DoubleInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){{{*/
++void DoubleInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){*pvalue=this->value;}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
++/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
++/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void DoubleInput::GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){
++/*FUNCTION DoubleInput::GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void DoubleInput::GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){
+ 	/*Epsilon is zero as vx is constant over the element*/
+ 	for(int i=0;i<3;i++) epsilonvx[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void DoubleInput::GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){
++/*FUNCTION DoubleInput::GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){{{*/
++void DoubleInput::GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){
+ 	/*Epsilon is zero as vy is constant over the element*/
+ 	for(int i=0;i<3;i++) epsilonvy[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vx is constant over the element*/
+ 	for(int i=0;i<6;i++) epsilonvx[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vy is constant over the element*/
+ 	for(int i=0;i<6;i++) epsilonvy[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vz is constant over the element*/
+ 	for(int i=0;i<6;i++) epsilonvz[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vx is constant over the element*/
+ 	for(int i=0;i<5;i++) epsilonvx[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vy is constant over the element*/
+ 	for(int i=0;i<5;i++) epsilonvy[i]=0;
+ }
+@@ -184,35 +184,35 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::SquareMin{{{*/
+-void DoubleInput::SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters){
++void DoubleInput::SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){
+ 
+-	/*square min of a IssmPDouble is the square of the IssmPDouble itself: */
++	/*square min of a IssmDouble is the square of the IssmDouble itself: */
+ 	*psquaremin=pow(value,2);
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::Scale{{{*/
+-void DoubleInput::Scale(IssmPDouble scale_factor){
++void DoubleInput::Scale(IssmDouble scale_factor){
+ 	value=value*scale_factor;
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::ConstrainMin{{{*/
+-void DoubleInput::ConstrainMin(IssmPDouble minimum){
++void DoubleInput::ConstrainMin(IssmDouble minimum){
+ 	if (value<minimum) value=minimum;
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::AXPY{{{*/
+-void DoubleInput::AXPY(Input* xinput,IssmPDouble scalar){
++void DoubleInput::AXPY(Input* xinput,IssmDouble scalar){
+ 
+-	DoubleInput*  xIssmPDoubleinput=NULL;
++	DoubleInput*  xIssmDoubleinput=NULL;
+ 
+ 	/*xinput is of the same type, so cast it: */
+-	xIssmPDoubleinput=(DoubleInput*)xinput;
++	xIssmDoubleinput=(DoubleInput*)xinput;
+ 
+ 	/*Carry out the AXPY operation depending on type:*/
+ 	switch(xinput->ObjectEnum()){
+ 
+ 		case DoubleInputEnum:
+-			this->value=this->value+scalar*xIssmPDoubleinput->value;
++			this->value=this->value+scalar*xIssmDoubleinput->value;
+ 			return;
+ 
+ 		default:
+@@ -222,7 +222,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::Constrain{{{*/
+-void DoubleInput::Constrain(IssmPDouble cm_min, IssmPDouble cm_max){
++void DoubleInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){
+ 
+ 	if(!xIsNan<IssmDouble>(cm_min)) if (this->value<cm_min)this->value=cm_min;
+ 	if(!xIsNan<IssmDouble>(cm_max)) if (this->value>cm_max)this->value=cm_max;
+@@ -230,22 +230,22 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::Max{{{*/
+-IssmPDouble DoubleInput::Max(void){
++IssmDouble DoubleInput::Max(void){
+ 	return this->value;
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::MaxAbs{{{*/
+-IssmPDouble DoubleInput::MaxAbs(void){
++IssmDouble DoubleInput::MaxAbs(void){
+ 	return fabs(this->value);
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::Min{{{*/
+-IssmPDouble DoubleInput::Min(void){
++IssmDouble DoubleInput::Min(void){
+ 	return this->value;
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::MinAbs{{{*/
+-IssmPDouble DoubleInput::MinAbs(void){
++IssmDouble DoubleInput::MinAbs(void){
+ 	return fabs(this->value);
+ }
+ /*}}}*/
+@@ -257,14 +257,14 @@
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetValuesPtr{{{*/
+-void DoubleInput::GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){
++void DoubleInput::GetValuesPtr(IssmDouble** pvalues,int* pnum_values){
+ 
+ 	_error2_("not supported yet!");
+ 
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetInputAverage{{{*/
+-void DoubleInput::GetInputAverage(IssmPDouble* pvalue){
++void DoubleInput::GetInputAverage(IssmDouble* pvalue){
+ 	*pvalue=value;
+ }
+ /*}}}*/
+@@ -272,7 +272,7 @@
+ void DoubleInput::VerticallyIntegrate(Input* thickness_input){
+ 
+ 	/*Intermediaries*/
+-	IssmPDouble thickness_value;
++	IssmDouble thickness_value;
+ 
+ 	/*Check that input provided is a thickness*/
+ 	if (thickness_input->InstanceEnum()!=ThicknessEnum) _error2_("Input provided is not a Thickness (enum_type is " << EnumToStringx(thickness_input->InstanceEnum()) << ")");
+@@ -297,7 +297,7 @@
+ 	DoubleInput* outinput=NULL;
+ 
+ 	/*Intermediaries*/
+-	IssmPDouble       Bvalue;
++	IssmDouble       Bvalue;
+ 
+ 	/*Check that inputB is of the same type*/
+ 	inputB->GetInputAverage(&Bvalue);
+@@ -317,7 +317,7 @@
+ 	DoubleInput* outinput=NULL;
+ 
+ 	/*Intermediaries*/
+-	IssmPDouble       min;
++	IssmDouble       min;
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (input->Min() < this->Min()) min=input->Min();
+@@ -338,7 +338,7 @@
+ 	DoubleInput* outinput=NULL;
+ 
+ 	/*Intermediaries*/
+-	IssmPDouble       max;
++	IssmDouble       max;
+ 
+ 	/*Check that inputB is of the same type*/
+ 	if (input->Max() > this->Max()) max=input->Max();
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12530)
+@@ -19,14 +19,14 @@
+ 		int     enum_type;
+ 		int     numtimesteps;
+ 		Inputs* inputs;
+-		IssmPDouble* timesteps;
++		IssmDouble* timesteps;
+ 		Parameters* parameters; //to find current time.
+ 
+ 		/*TransientInput constructors, destructors: {{{*/
+ 		TransientInput();
+ 		TransientInput(int enum_type);
+ 		~TransientInput();
+-		void AddTimeInput(Input* input,IssmPDouble time);
++		void AddTimeInput(Input* input,IssmDouble time);
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{*/
+ 		void  Echo();
+@@ -42,47 +42,47 @@
+ 		Input* PointwiseDivide(Input* forcingB){_error2_("not implemented yet");};
+ 		Input* PointwiseMin(Input* forcingB){_error2_("not implemented yet");};
+ 		Input* PointwiseMax(Input* forcingB){_error2_("not implemented yet");};
+-		ElementResult* SpawnResult(int step, IssmPDouble time);
++		ElementResult* SpawnResult(int step, IssmDouble time);
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue){_error2_("not implemented yet");};
+ 		void GetInputValue(int* pvalue){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time);
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetInputAverage(IssmPDouble* pvalue);
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time);
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputAverage(IssmDouble* pvalue);
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+ 
+-		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(IssmPDouble minimum){_error2_("not implemented yet");};
+-		void Scale(IssmPDouble scale_factor){_error2_("not implemented yet");};
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
+-		void AXPY(Input* xforcing,IssmPDouble scalar){_error2_("not implemented yet");};
+-		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max){_error2_("not implemented yet");};
+-		IssmPDouble InfinityNorm(void);
+-		IssmPDouble Max(void);
+-		IssmPDouble MaxAbs(void);
+-		IssmPDouble Min(void);
+-		IssmPDouble MinAbs(void);
++		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
++		void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
++		void Scale(IssmDouble scale_factor){_error2_("not implemented yet");};
++		void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
++		void AXPY(Input* xforcing,IssmDouble scalar){_error2_("not implemented yet");};
++		void Constrain(IssmDouble cm_min, IssmDouble cm_max){_error2_("not implemented yet");};
++		IssmDouble InfinityNorm(void);
++		IssmDouble Max(void);
++		IssmDouble MaxAbs(void);
++		IssmDouble Min(void);
++		IssmDouble MinAbs(void);
+ 		void Extrude(void){_error2_("not supported yet");}
+ 		void VerticallyIntegrate(Input* thickness_forcing){_error2_("not supported yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values){_error2_("not supported yet");};
+-      void GetTimeValues(IssmPDouble* values,IssmPDouble time){_error2_("not implemented yet");};
+-		Input* GetTimeInput(IssmPDouble time);
++		void GetValuesPtr(IssmDouble** pvalues,int* pnum_values){_error2_("not supported yet");};
++      void GetTimeValues(IssmDouble* values,IssmDouble time){_error2_("not implemented yet");};
++		Input* GetTimeInput(IssmDouble time);
+ 		/*}}}*/
+ 
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12529)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12530)
+@@ -18,11 +18,11 @@
+ 	public:
+ 		/*just hold 6 values for 6 vertices: */
+ 		int    enum_type;
+-		IssmPDouble values[6];
++		IssmDouble values[6];
+ 
+ 		/*PentaP1Input constructors, destructors: {{{*/
+ 		PentaP1Input();
+-		PentaP1Input(int enum_type,IssmPDouble* values);
++		PentaP1Input(int enum_type,IssmDouble* values);
+ 		~PentaP1Input();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+@@ -39,46 +39,46 @@
+ 		Input* PointwiseDivide(Input* inputB);
+ 		Input* PointwiseMin(Input* inputB);
+ 		Input* PointwiseMax(Input* inputB);
+-		ElementResult* SpawnResult(int step, IssmPDouble time);
+-		void AddTimeValues(IssmPDouble* values,int step,IssmPDouble time){_error2_("not supported yet");};
++		ElementResult* SpawnResult(int step, IssmDouble time);
++		void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
+ 		void Configure(Parameters* parameters);
+ 		/*}}}*/
+ 		/*numerics: {{{*/
+ 		void GetInputValue(bool* pvalue){_error2_("not implemented yet");};
+ 		void GetInputValue(int* pvalue){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss,IssmPDouble time){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss);
+-		void GetInputValue(IssmPDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputValue(IssmPDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmPDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetInputAverage(IssmPDouble* pvalue);
+-		void GetVxStrainRate2d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVyStrainRate3d(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVzStrainRate3d(IssmPDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVxStrainRate3dPattyn(IssmPDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVyStrainRate3dPattyn(IssmPDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputValue(IssmDouble* pvalue){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
++		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputAverage(IssmDouble* pvalue);
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
+ 		void ChangeEnum(int newenumtype);
+ 
+-		void SquareMin(IssmPDouble* psquaremin, bool process_units,Parameters* parameters);
+-		void ConstrainMin(IssmPDouble minimum);
+-		void Scale(IssmPDouble scale_factor);
+-		void ArtificialNoise(IssmPDouble min,IssmPDouble max){_error2_("not implemented yet");};
+-		void AXPY(Input* xinput,IssmPDouble scalar);
+-		void Constrain(IssmPDouble cm_min, IssmPDouble cm_max);
+-		IssmPDouble InfinityNorm(void);
+-		IssmPDouble Max(void);
+-		IssmPDouble MaxAbs(void);
+-		IssmPDouble Min(void);
+-		IssmPDouble MinAbs(void);
++		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
++		void ConstrainMin(IssmDouble minimum);
++		void Scale(IssmDouble scale_factor);
++		void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
++		void AXPY(Input* xinput,IssmDouble scalar);
++		void Constrain(IssmDouble cm_min, IssmDouble cm_max);
++		IssmDouble InfinityNorm(void);
++		IssmDouble Max(void);
++		IssmDouble MaxAbs(void);
++		IssmDouble Min(void);
++		IssmDouble MinAbs(void);
+ 		void Extrude(void);
+ 		void VerticallyIntegrate(Input* thickness_input);
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
+-		void GetValuesPtr(IssmPDouble** pvalues,int* pnum_values);
++		void GetValuesPtr(IssmDouble** pvalues,int* pnum_values);
+ 		/*}}}*/
+ 
+ };
Index: /issm/oecreview/Archive/12321-12677/ISSM-12530-12531.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12530-12531.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12530-12531.diff	(revision 12679)
@@ -0,0 +1,15 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12530)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12531)
+@@ -56,8 +56,8 @@
+ 		void  GetParameterValue(FILE** pfid){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+ 		void  SetValue(bool boolean){this->value=boolean;}
+-		void  SetValue(int integer){this->value=(bool)integer;}
+-		void  SetValue(IssmPDouble scalar){this->value=(bool)scalar;}
++		void  SetValue(int integer){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an int");}
++		void  SetValue(IssmPDouble scalar){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an IssmPDouble");}
+ 		void  SetValue(char* string){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
+ 		void  SetValue(char** stringarray,int M){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
+ 		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12531-12532.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12531-12532.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12531-12532.diff	(revision 12679)
@@ -0,0 +1,18 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12531)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12532)
+@@ -56,11 +56,11 @@
+ 		void  GetParameterValue(Matrix** pmat){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a Mat");}
+ 		void  GetParameterValue(FILE** pfid){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
+ 
+-		void  SetValue(bool boolean){this->value=(int)boolean;}
++		void  SetValue(bool boolean){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a bool");}
+ 		void  SetValue(int integer){this->value=integer;}
+ 		void  SetValue(int* intarray,int M){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an int array");}
+ 		void  SetValue(int* intarray,int M,int N){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an int array");}
+-		void  SetValue(IssmPDouble scalar){this->value=(int)scalar;}
++		void  SetValue(IssmPDouble scalar){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an IssmDouble");}
+ 		void  SetValue(char* string){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
+ 		void  SetValue(char** stringarray,int M){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
+ 		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12532-12533.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12532-12533.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12532-12533.diff	(revision 12679)
@@ -0,0 +1,26 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12532)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12533)
+@@ -60,7 +60,7 @@
+ 		void  SetValue(int integer){this->value=integer;}
+ 		void  SetValue(int* intarray,int M){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an int array");}
+ 		void  SetValue(int* intarray,int M,int N){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an int array");}
+-		void  SetValue(IssmPDouble scalar){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an IssmDouble");}
++		void  SetValue(IssmDouble scalar){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an IssmDouble");}
+ 		void  SetValue(char* string){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
+ 		void  SetValue(char** stringarray,int M){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
+ 		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12532)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12533)
+@@ -57,7 +57,7 @@
+ 
+ 		void  SetValue(bool boolean){this->value=boolean;}
+ 		void  SetValue(int integer){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an int");}
+-		void  SetValue(IssmPDouble scalar){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an IssmPDouble");}
++		void  SetValue(IssmDouble scalar){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an IssmPDouble");}
+ 		void  SetValue(char* string){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
+ 		void  SetValue(char** stringarray,int M){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
+ 		void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12533-12534.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12533-12534.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12533-12534.diff	(revision 12679)
@@ -0,0 +1,215 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12533)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12534)
+@@ -39,11 +39,11 @@
+ 		int   NDims();
+ 		int*  Size();
+ 		void  Get(int* pvalue){_error2_("An OptionStruct object cannot return a int");};
+-		void  Get(IssmPDouble* pvalue){_error2_("An OptionStruct object cannot return a IssmPDouble");};
++		void  Get(IssmDouble* pvalue){_error2_("An OptionStruct object cannot return a IssmDouble");};
+ 		void  Get(bool* pvalue){  _error2_("An OptionStruct object cannot return a bool");};
+ 		void  Get(char** pvalue){ _error2_("An OptionStruct object cannot return a string");};
+ 		void  Get(char*** ppvalue,int *pnumel){ _error2_("An OptionStruct object cannot return a string vec");};
+-		void  Get(IssmPDouble** pvalue,int *pnumel){ _error2_("An OptionStruct object cannot return a IssmPDouble vec");};
++		void  Get(IssmDouble** pvalue,int *pnumel){ _error2_("An OptionStruct object cannot return a IssmDouble vec");};
+ 		void  Get(Options** pvalue);
+ 		void  Get(Options*** ppvalue,int *pnumel);
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12533)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12534)
+@@ -1,5 +1,5 @@
+ /*!\file OptionDouble.cpp
+- * \brief: implementation of the optionsIssmPDouble object
++ * \brief: implementation of the optionsIssmDouble object
+  */
+ 
+ /*Headers:*/
+@@ -30,7 +30,7 @@
+ /*FUNCTION OptionDouble::~OptionDouble(){{{*/
+ OptionDouble::~OptionDouble(){
+ 
+-	if (values) xDelete<IssmPDouble>(values);
++	if (values) xDelete<IssmDouble>(values);
+ 
+ }
+ /*}}}*/
+@@ -49,7 +49,7 @@
+ 		if(numel == 1) if(flag) _pprintLine_("        values: " << values[0]);
+ 		else {
+ 			StringFromSize(cstr,size,ndims);
+-			if(flag) _pprintLine_("        values: " << cstr << " " << "IssmPDouble");
++			if(flag) _pprintLine_("        values: " << cstr << " " << "IssmDouble");
+ 		}
+ 	}
+ 	else if(flag) _pprintLine_("        values: [empty]");
+@@ -131,28 +131,28 @@
+ 	*pvalue=(int)this->values[0];
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::Get(IssmPDouble* pvalue) {{{*/
+-void OptionDouble::Get(IssmPDouble* pvalue){
++/*FUNCTION OptionDouble::Get(IssmDouble* pvalue) {{{*/
++void OptionDouble::Get(IssmDouble* pvalue){
+ 
+ 	/*We should first check that the size is one*/
+ 	if(this->NumEl()!=1){
+-		_error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single IssmPDouble");
++		_error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single IssmDouble");
+ 	}
+ 
+ 	/*Assign output pointer*/
+ 	*pvalue=this->values[0];
+ }
+ /*}}}*/
+-/*FUNCTION OptionDouble::Get(IssmPDouble** pvalue,int* numel) {{{*/
+-void OptionDouble::Get(IssmPDouble** pvalue,int* numel){
++/*FUNCTION OptionDouble::Get(IssmDouble** pvalue,int* numel) {{{*/
++void OptionDouble::Get(IssmDouble** pvalue,int* numel){
+ 
+ 	/*We should first check that the size is at least one*/
+ 	if(this->NumEl()<=0){
+-		_error2_("option \"" << this->name << "\" is empty and cannot return a IssmPDouble vector");
++		_error2_("option \"" << this->name << "\" is empty and cannot return a IssmDouble vector");
+ 	}
+ 
+ 	/*Copy vector*/
+-	IssmPDouble* outvalue=xNew<IssmPDouble>(this->NumEl());
++	IssmDouble* outvalue=xNew<IssmDouble>(this->NumEl());
+ 	for(int i=0;i<this->NumEl();i++) outvalue[i]=this->values[i];
+ 
+ 	/*Assign output pointer*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp	(revision 12533)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp	(revision 12534)
+@@ -30,8 +30,8 @@
+ 
+ 	/*calculate the dimensions (being careful of integer division)  */
+ 	for (i=ndims-1; i>=0; i--) {
+-		aprod=(int)(((IssmPDouble)aprod+0.5)/(IssmPDouble)size[i]);
+-		dims[i]=(int)floor(((IssmPDouble)index+0.5)/(IssmPDouble)aprod);
++		aprod=(int)(((IssmDouble)aprod+0.5)/(IssmDouble)size[i]);
++		dims[i]=(int)floor(((IssmDouble)index+0.5)/(IssmDouble)aprod);
+ 		index-=dims[i]*aprod;
+ 	}
+ 
+@@ -68,8 +68,8 @@
+ 
+ 	/*calculate the dimensions (being careful of integer division)  */
+ 	for (i=0; i<ndims; i++) {
+-		aprod=(int)(((IssmPDouble)aprod+0.5)/(IssmPDouble)size[i]);
+-		dims[i]=(int)floor(((IssmPDouble)index+0.5)/(IssmPDouble)aprod);
++		aprod=(int)(((IssmDouble)aprod+0.5)/(IssmDouble)size[i]);
++		dims[i]=(int)floor(((IssmDouble)index+0.5)/(IssmDouble)aprod);
+ 		index-=dims[i]*aprod;
+ 	}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12533)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12534)
+@@ -1,5 +1,5 @@
+ /*! \file OptionDouble.h 
+- *  \brief: header file for optionIssmPDouble object
++ *  \brief: header file for optionIssmDouble object
+  */
+ 
+ #ifndef _OPTIONDOUBLE_H_
+@@ -17,7 +17,7 @@
+ 
+ 	public:
+ 
+-		IssmPDouble* values;
++		IssmDouble* values;
+ 
+ 		/*OptionDouble constructors, destructors {{{*/
+ 		OptionDouble();
+@@ -39,11 +39,11 @@
+ 		int   NDims();
+ 		int*  Size();
+ 		void  Get(int* pvalue);
+-		void  Get(IssmPDouble* pvalue);
++		void  Get(IssmDouble* pvalue);
+ 		void  Get(bool* pvalue){  _error2_("An OptionDouble object cannot return a bool");};
+ 		void  Get(char** pvalue){ _error2_("An OptionDouble object cannot return a string");};
+ 		void  Get(char*** ppvalue,int *pnumel){ _error2_("An OptionDouble object cannot return a string vec");};
+-		void  Get(IssmPDouble** pvalue,int* pnumel);
++		void  Get(IssmDouble** pvalue,int* pnumel);
+ 		void  Get(Options** pvalue){ _error2_("An OptionDouble object cannot return an Options DataSet");};
+ 		void  Get(Options*** ppvalue,int *pnumel){ _error2_("An OptionDouble object cannot return an Options DataSet vec");};
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12533)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12534)
+@@ -39,11 +39,11 @@
+ 		int   NDims();
+ 		int*  Size();
+ 		void  Get(int* pvalue){_error2_("An OptionLogical object cannot return a int");};
+-		void  Get(IssmPDouble* pvalue){_error2_("An OptionLogical object cannot return a IssmPDouble");};
++		void  Get(IssmDouble* pvalue){_error2_("An OptionLogical object cannot return a IssmDouble");};
+ 		void  Get(bool* pvalue);
+ 		void  Get(char** pvalue){ _error2_("An OptionLogical object cannot return a string");};
+ 		void  Get(char*** ppvalue,int *pnumel){ _error2_("An OptionLogical object cannot return a string vec");};
+-		void  Get(IssmPDouble** pvalue,int *pnumel){ _error2_("An OptionLogical object cannot return a IssmPDouble vec");};
++		void  Get(IssmDouble** pvalue,int *pnumel){ _error2_("An OptionLogical object cannot return a IssmDouble vec");};
+ 		void  Get(Options** pvalue){ _error2_("An OptionLogical object cannot return an Options DataSet");};
+ 		void  Get(Options*** ppvalue,int *pnumel){ _error2_("An OptionLogical object cannot return an Options DataSet vec");};
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12533)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12534)
+@@ -39,11 +39,11 @@
+ 		int   NDims();
+ 		int*  Size();
+ 		void  Get(int* pvalue){_error2_("An OptionChar object cannot return a int");};
+-		void  Get(IssmPDouble* pvalue){_error2_("An OptionChar object cannot return a IssmPDouble");};
++		void  Get(IssmDouble* pvalue){_error2_("An OptionChar object cannot return a IssmDouble");};
+ 		void  Get(bool* pvalue){  _error2_("An OptionChar object cannot return a bool");};
+ 		void  Get(char** pvalue);
+ 		void  Get(char*** ppvalue,int *pnumel);
+-		void  Get(IssmPDouble** pvalue,int *pnumel){ _error2_("An OptionChar object cannot return a IssmPDouble vec");};
++		void  Get(IssmDouble** pvalue,int *pnumel){ _error2_("An OptionChar object cannot return a IssmDouble vec");};
+ 		void  Get(Options** pvalue){ _error2_("An OptionChar object cannot return an Options DataSet");};
+ 		void  Get(Options*** ppvalue,int *pnumel){ _error2_("An OptionChar object cannot return an Options DataSet vec");};
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.h	(revision 12533)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/Option.h	(revision 12534)
+@@ -42,11 +42,11 @@
+ 		virtual int   NDims()=0;
+ 		virtual int*  Size()=0;
+ 		virtual void  Get(int* pvalue)=0;
+-		virtual void  Get(IssmPDouble* pvalue)=0;
++		virtual void  Get(IssmDouble* pvalue)=0;
+ 		virtual void  Get(bool* pvalue)=0;
+ 		virtual void  Get(char** pvalue)=0;
+ 		virtual void  Get(char*** ppvalue,int *pnumel)=0;
+-		virtual void  Get(IssmPDouble** pvalue,int *pnumel)=0;
++		virtual void  Get(IssmDouble** pvalue,int *pnumel)=0;
+ 		virtual void  Get(Options** pvalue)=0;
+ 		virtual void  Get(Options*** ppvalue,int *pnumel)=0;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12533)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12534)
+@@ -39,11 +39,11 @@
+ 		int   NDims();
+ 		int*  Size();
+ 		void  Get(int* pvalue){_error2_("An OptionCell object cannot return a int");};
+-		void  Get(IssmPDouble* pvalue){_error2_("An OptionCell object cannot return a IssmPDouble");};
++		void  Get(IssmDouble* pvalue){_error2_("An OptionCell object cannot return a IssmDouble");};
+ 		void  Get(bool* pvalue){  _error2_("An OptionCell object cannot return a bool");};
+ 		void  Get(char** pvalue){ _error2_("An OptionCell object cannot return a string");};
+ 		void  Get(char*** ppvalue,int *pnumel){ _error2_("An OptionCell object cannot return a string vec");};
+-		void  Get(IssmPDouble** pvalue,int *pnumel){ _error2_("An OptionCell object cannot return a IssmPDouble vec");};
++		void  Get(IssmDouble** pvalue,int *pnumel){ _error2_("An OptionCell object cannot return a IssmDouble vec");};
+ 		void  Get(Options** pvalue);
+ 		void  Get(Options*** ppvalue,int *pnumel){ _error2_("An OptionCell object cannot return an Options DataSet vec");};
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12534-12535.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12534-12535.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12534-12535.diff	(revision 12679)
@@ -0,0 +1,93 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12534)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12535)
+@@ -56,22 +56,52 @@
+ 
+ 	//intialize inputs, and add as many inputs per element as requested: 
+ 	this->inputs=new Inputs();
+-	if (iomodel->Data(MeshVertexonbedEnum))
++	if (iomodel->Data(MeshVertexonbedEnum)) {
++#ifndef _HAVE_ADOLC_
+ 	 this->inputs->AddInput(new BoolInput(MeshVertexonbedEnum,(IssmBool)iomodel->Data(MeshVertexonbedEnum)[io_index]));
+-	if (iomodel->Data(MeshVertexonsurfaceEnum))
++#else
++	 this->inputs->AddInput(new BoolInput(MeshVertexonbedEnum,(IssmBool)((iomodel->Data(MeshVertexonbedEnum)[io_index]).getValue())));
++#endif
++	}
++	if (iomodel->Data(MeshVertexonsurfaceEnum)) {
++#ifndef _HAVE_ADOLC_
+ 	 this->inputs->AddInput(new BoolInput(MeshVertexonsurfaceEnum,(IssmBool)iomodel->Data(MeshVertexonsurfaceEnum)[io_index]));
+-	if (iomodel->Data(MaskVertexonfloatingiceEnum))
++#else
++	 this->inputs->AddInput(new BoolInput(MeshVertexonsurfaceEnum,(IssmBool)((iomodel->Data(MeshVertexonsurfaceEnum)[io_index]).getValue())));
++#endif
++	}
++	if (iomodel->Data(MaskVertexonfloatingiceEnum)) {
++#ifndef _HAVE_ADOLC_
+ 	 this->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,(IssmBool)iomodel->Data(MaskVertexonfloatingiceEnum)[io_index]));
+-	if (iomodel->Data(MaskVertexongroundediceEnum))
+-	 this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,(IssmBool)iomodel->Data(MaskVertexongroundediceEnum)[io_index]));
+-	if (analysis_type==DiagnosticHorizAnalysisEnum)
++#else
++	 this->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,(IssmBool)((iomodel->Data(MaskVertexonfloatingiceEnum)[io_index]).getValue())));
++#endif
++	}
++	if (iomodel->Data(MaskVertexongroundediceEnum)) {
++#ifndef _HAVE_ADOLC_
++	  this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,(IssmBool)iomodel->Data(MaskVertexongroundediceEnum)[io_index]));
++#else
++	  this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,(IssmBool)((iomodel->Data(MaskVertexongroundediceEnum)[io_index]).getValue())));
++#endif
++	}
++	if (analysis_type==DiagnosticHorizAnalysisEnum) {
++#ifndef _HAVE_ADOLC_
+ 	 this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)iomodel->Data(FlowequationVertexEquationEnum)[io_index]));
+-	
++#else
++	 this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)((iomodel->Data(FlowequationVertexEquationEnum)[io_index]).getValue())));
++#endif
++	}
+ 	/*set single point constraints: */
+ 
+ 	/*spc all nodes on water*/
+ 	if (!iomodel->Data(MaskVertexonwaterEnum)) _error2_("iomodel->nodeonwater is NULL");
+-	if (iomodel->Data(MaskVertexonwaterEnum)[io_index]){
++	IssmBool maskVertexOnWater;
++#ifndef _HAVE_ADOLC_
++	maskVertexOnWater=iomodel->Data(MaskVertexonwaterEnum)[io_index];
++#else
++        maskVertexOnWater=(IssmBool)((iomodel->Data(MaskVertexonwaterEnum)[io_index]).getValue());
++#endif
++	if (maskVertexOnWater){
+ 		for(k=1;k<=gsize;k++){
+ 			this->FreezeDof(k);
+ 		}
+@@ -116,7 +146,11 @@
+ 	if (analysis_type==DiagnosticHutterAnalysisEnum){
+ 		if (!iomodel->Data(FlowequationVertexEquationEnum)) _error2_("iomodel->vertices_type is NULL");
+ 		/*Constrain all nodes that are not Hutter*/
+-		if (!iomodel->Data(FlowequationVertexEquationEnum)[io_index]==HutterApproximationEnum){
++#ifndef _HAVE_ADOLC_
++		if (!(iomodel->Data(FlowequationVertexEquationEnum)[io_index]==HutterApproximationEnum)){
++#else
++		if (!((iomodel->Data(FlowequationVertexEquationEnum)[io_index]).getValue()==HutterApproximationEnum)){
++#endif
+ 			for(k=1;k<=gsize;k++){
+ 				this->FreezeDof(k);
+ 			}
+@@ -134,7 +168,13 @@
+ 		if (dim==3){
+ 			/*On a 3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */
+ 			_assert_(iomodel->Data(MeshVertexonbedEnum));
+-			if (!iomodel->Data(MeshVertexonbedEnum)[io_index]){
++		        IssmBool meshVertexOnBed;
++#ifndef _HAVE_ADOLC_
++		        meshVertexOnBed=iomodel->Data(MeshVertexonbedEnum)[io_index];
++#else
++                        meshVertexOnBed=(IssmBool)((iomodel->Data(MeshVertexonbedEnum)[io_index]).getValue());
++#endif
++			if (!meshVertexOnBed){
+ 				for(k=1;k<=gsize;k++){
+ 					this->FreezeDof(k);
+ 				}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12535-12536.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12535-12536.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12535-12536.diff	(revision 12679)
@@ -0,0 +1,26 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh	(revision 12535)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh	(revision 12536)
+@@ -23,7 +23,9 @@
+ 
+ #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"
++# --enable-framework needs to have the form "$SOME_PATH/Library/Frameworks" to avoid installing components in /Applications directory
++# --prefix is recognized as $SOME_PATH as long as this form is taken, so it's not necessary to include
++./configure --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks" 
+ if [ -z $1 ]; then
+ 	make
+ else
+@@ -42,7 +44,7 @@
+ 
+ #Some modifications to be done in case version is 2.7
+ if [[ $version == "2.7.2" ]]; then 
+-	cd install/
+-	ln -s Python.framework/Headers include
+-	ln -s Python.framework/Versions/2.7/lib lib
++	cd ../install
++	ln -s Library/Frameworks/Python.framework/Headers include
++	ln -s Library/Frameworks/Python.framework/Versions/2.7/lib lib
+ fi
Index: /issm/oecreview/Archive/12321-12677/ISSM-12536-12537.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12536-12537.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12536-12537.diff	(revision 12679)
@@ -0,0 +1,17 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh	(revision 12536)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh	(revision 12537)
+@@ -7,8 +7,10 @@
+ #3 erase
+ install=2
+ 
+-export CC=/usr/bin/gcc-4.0
+-export CXX=/usr/bin/g++-4.0
++# gfortran 4.6 (see ISSM_DIR/externalpackages/gfortran) is necessary for ISSM compilation.
++# On OSX 10.6, this recommended version gets installed in /usr/local/gfortran 
++export CC=/usr/local/gfortran/bin/gcc
++export CXX=/usr/local/gfortran/bin/g++
+ 
+ if [[ $install == "1" ]];then 
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12537-12538.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12537-12538.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12537-12538.diff	(revision 12679)
@@ -0,0 +1,8 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive312.mat
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive306.mat
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
Index: /issm/oecreview/Archive/12321-12677/ISSM-12538-12539.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12538-12539.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12538-12539.diff	(revision 12679)
@@ -0,0 +1,91 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx-snowleopard-python.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx-snowleopard-python.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx-snowleopard-python.sh	(revision 12539)
+@@ -0,0 +1,34 @@
++#!/bin/sh
++
++#petsc 3.2
++#mpich 1.4
++
++#export FCFLAGS=" -m32"
++#export FFLAGS=" -m32"
++#export CFLAGS=" -arch i386"
++#export CXXFLAGS=" -arch i386"
++
++pythonversion=2.7
++
++./configure \
++	--prefix=$ISSM_DIR \
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++	--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\
++	--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-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" \
++	--with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch i386 -O3 -DNDEBUG -w "\
++	--with-numthreads=8 \
++	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
++	--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/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/ \
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx-snowleopard-python.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx-snowleopard-bothapis.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx-snowleopard-bothapis.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx-snowleopard-bothapis.sh	(revision 12539)
+@@ -0,0 +1,35 @@
++#!/bin/sh
++
++#petsc 3.2
++#mpich 1.4
++
++#export FCFLAGS=" -m32"
++#export FFLAGS=" -m32"
++#export CFLAGS=" -arch i386"
++#export CXXFLAGS=" -arch i386"
++
++pythonversion=2.7
++
++./configure \
++	--prefix=$ISSM_DIR \
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++	--with-matlab-dir=$MATLAB_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\
++	--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-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" \
++	--with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch i386 -DMX_COMPAT_32 -O3 -DNDEBUG -w "\
++	--with-numthreads=8 \
++	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
++	--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/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/ 
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx-snowleopard-bothapis.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12539-12540.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12539-12540.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12539-12540.diff	(revision 12679)
@@ -0,0 +1,15 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/scipy/README
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/scipy/README	(revision 12539)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/scipy/README	(revision 12540)
+@@ -1,2 +1,9 @@
+-You will find instructions on scipy at: 
++For OSX 10.7 (Lion), the instructions here can be followed:  
+ http://www.scipy.org/Installing_SciPy/Mac_OS_X
++
++For OSX 10.6 (Snow Leopard), the scipy folks recommend gcc and g++ version 4.0.
++However, ISSM needs the gfortran version recommended in $ISSM_DIR/externalpackages/gfortran.
++On the webpage listed above, make sure the "export CC" and "export CXX" commands point to the 
++binaries associated with this gfortran version (likely in /usr/local/gfortran/bin by default).
++Once this gfortran is installed, the install script in this directory for Snow Leopard should
++work.
Index: /issm/oecreview/Archive/12321-12677/ISSM-12540-12541.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12540-12541.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12540-12541.diff	(revision 12679)
@@ -0,0 +1,73 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx-snowleopard-python.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx-snowleopard-python.sh	(revision 12540)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx-snowleopard-python.sh	(revision 12541)
+@@ -3,26 +3,21 @@
+ #petsc 3.2
+ #mpich 1.4
+ 
+-#export FCFLAGS=" -m32"
+-#export FFLAGS=" -m32"
+-#export CFLAGS=" -arch i386"
+-#export CXXFLAGS=" -arch i386"
+-
+ pythonversion=2.7
+ 
+ ./configure \
+ 	--prefix=$ISSM_DIR \
+ 	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
+-	--with-python-dir=$ISSM_DIR/externalpackages/python/install/\
++	--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\
++	--with-python-numpy-dir=$ISSM_DIR/externalpackages/python/install/Library/Frameworks/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-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" \
+-	--with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch i386 -O3 -DNDEBUG -w "\
++	--with-cxxoptflags=" -fno-common -fexceptions -O3 -DNDEBUG -w "\
+ 	--with-numthreads=8 \
+ 	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
+ 	--with-petsc-arch=$ISSM_ARCH \
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx64-chris.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx64-chris.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx64-chris.sh	(revision 12541)
+@@ -0,0 +1,28 @@
++#!/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 $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.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-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" \
++	--with-cxxoptflags=" -fno-common -fexceptions -mmacosx-version-min=10.5  -O3 -DNDEBUG -w "\
++	--with-numthreads=8
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-macosx64-chris.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12541-12542.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12541-12542.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12541-12542.diff	(revision 12679)
@@ -0,0 +1,8 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive312.mat
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive306.mat
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
Index: /issm/oecreview/Archive/12321-12677/ISSM-12542-12543.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12542-12543.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12542-12543.diff	(revision 12679)
@@ -0,0 +1,63 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h	(revision 12542)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h	(revision 12543)
+@@ -2,15 +2,19 @@
+  * \brief: only used for intel compiler.
+  */ 
+ 
+-#ifndef _ISNAN_INTEL_H_
+-#define _ISNAN_INTEL_H_
++#ifndef _XISNAN_H_
++#define _XISNAN_H_
+ 
+ #ifdef _INTEL_WIN_
+ int isnan(IssmPDouble X);
+ #endif
+ 
+ template <class T> int xIsNan(const T& X) {
+-    return isnan(X);
++#ifdef _INTEL_WIN_
++		return (x!=x)?1:0;
++#else
++		return isnan(X);
++#endif
+ }
+ 
+ #ifdef _HAVE_ADOLC_
+@@ -18,5 +22,5 @@
+   return isnan(X.getValue());
+ }
+ #endif
++
+ #endif
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp	(revision 12542)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/io/PrintfFunction.cpp	(revision 12543)
+@@ -55,10 +55,12 @@
+ 	if(my_rank==0){
+ 		printf("%s\n",message.c_str());
+ 	}
++	return 1;
+ }
+ int PrintfFunction2(const string & message){
+ 	extern int  my_rank;
+ 	if(my_rank==0){
+ 		printf("%s",message.c_str());
+ 	}
++	return 1;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12542)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12543)
+@@ -187,7 +187,6 @@
+ 					./shared/Numerics/GaussPoints.cpp\
+ 					./shared/Numerics/cross.cpp\
+ 					./shared/Numerics/isnan.h\
+-					./shared/Numerics/isnan.cpp\
+ 					./shared/Numerics/extrema.cpp\
+ 					./shared/Numerics/XZvectorsToCoordinateSystem.cpp\
+ 					./shared/Numerics/UnitConversion.cpp\
Index: /issm/oecreview/Archive/12321-12677/ISSM-12543-12544.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12543-12544.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12543-12544.diff	(revision 12679)
@@ -0,0 +1,20 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/collapse.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/collapse.m	(revision 12543)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/collapse.m	(revision 12544)
+@@ -41,6 +41,7 @@
+ if ~isnan(md.initialization.vy),md.initialization.vy=DepthAverage(md,md.initialization.vy);end;
+ if ~isnan(md.initialization.vz),md.initialization.vz=DepthAverage(md,md.initialization.vz);end;
+ if ~isnan(md.initialization.vel),md.initialization.vel=DepthAverage(md,md.initialization.vel);end;
++if ~isnan(md.initialization.temperature),md.initialization.temperature=DepthAverage(md,md.initialization.temperature);end;
+ 
+ %bedinfo and surface info
+ md.mesh.elementonbed=ones(md.mesh.numberofelements2d,1);
+@@ -90,6 +91,7 @@
+ md.geometry.surface=project2d(md,md.geometry.surface,1);
+ md.geometry.thickness=project2d(md,md.geometry.thickness,1);
+ md.geometry.bed=project2d(md,md.geometry.bed,1);
++md.geometry.bathymetry=project2d(md,md.geometry.bathymetry,1);
+ md.mesh.vertexonboundary=project2d(md,md.mesh.vertexonboundary,1);
+ md.mesh.elementconnectivity=project2d(md,md.mesh.elementconnectivity,1);
+ md.mask.elementonfloatingice=project2d(md,md.mask.elementonfloatingice,1);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12544-12545.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12544-12545.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12544-12545.diff	(revision 12679)
@@ -0,0 +1,20 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h	(revision 12544)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h	(revision 12545)
+@@ -5,13 +5,11 @@
+ #ifndef _XISNAN_H_
+ #define _XISNAN_H_
+ 
+-#ifdef _INTEL_WIN_
+-int isnan(IssmPDouble X);
+-#endif
++#include <cmath>
+ 
+ template <class T> int xIsNan(const T& X) {
+ #ifdef _INTEL_WIN_
+-		return (x!=x)?1:0;
++		return (X!=X)?1:0;
+ #else
+ 		return isnan(X);
+ #endif
Index: /issm/oecreview/Archive/12321-12677/ISSM-12545-12546.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12545-12546.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12545-12546.diff	(revision 12679)
@@ -0,0 +1,56 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/recast.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/recast.h	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/recast.h	(revision 12546)
+@@ -0,0 +1,39 @@
++/*
++ * recast.h
++ *
++ *  Created on: Jun 26, 2012
++ *      Author: utke
++ */
++
++#ifndef _RECAST_H_
++#define _RECAST_H_
++
++#ifndef _HAVE_ADOLC_
++
++template<class To, class From>
++To reCast(const From& from) {
++    return (To)from;
++}
++
++#else
++
++template<class To, class From>
++struct ForPartialSpecialization {
++    static  To reCast(const From& from ) { return (To) from;}
++};
++
++template<class To, class From>
++To reCast(const From& from) {
++    return ForPartialSpecialization<To,From>::reCast(from);
++}
++/**
++ * partial specialization
++ */
++template<class To>
++struct ForPartialSpecialization<To,adouble> {
++    static  To reCast(const adouble& from ) { return (To) (from.getValue());}
++};
++
++#endif
++
++#endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/numerics.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/numerics.h	(revision 12545)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/numerics.h	(revision 12546)
+@@ -8,6 +8,7 @@
+ #include "./Verbosity.h"
+ #include "./GaussPoints.h"
+ #include "./isnan.h"
++#include "./recast.h"
+ 
+ class Input;
+ class Parameters;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12546-12547.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12546-12547.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12546-12547.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12546)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12547)
+@@ -143,7 +143,7 @@
+ 	this->GetDofList1(&offsetdof[0]);
+ 	mean=0;
+ 	for(i=0;i<NUMVERTICES;i++){
+-		partition[i]=(int)qmu_part[offsetsid[i]];
++		partition[i]=reCast<int>(qmu_part[offsetsid[i]]);
+ 		mean=mean+1.0/NUMVERTICES*vertex_response[offsetdof[i]];
+ 	}
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12547-12548.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12547-12548.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12547-12548.diff	(revision 12679)
@@ -0,0 +1,15 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 12547)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 12548)
+@@ -105,9 +105,7 @@
+ /*}}}*/
+ /*FUNCTION BoolElementResult::ProcessUnits{{{*/
+ void BoolElementResult::ProcessUnits(Parameters* parameters){
+-	
+-	this->value=UnitConversion(this->value,IuToExtEnum,this->enum_type);
+-
++// no op
+ }
+ /*}}}*/
+ /*FUNCTION BoolElementResult::NumberOfNodalValues{{{*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12548-12549.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12548-12549.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12548-12549.diff	(revision 12679)
@@ -0,0 +1,96 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12548)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Node.cpp	(revision 12549)
+@@ -56,52 +56,21 @@
+ 
+ 	//intialize inputs, and add as many inputs per element as requested: 
+ 	this->inputs=new Inputs();
+-	if (iomodel->Data(MeshVertexonbedEnum)) {
+-#ifndef _HAVE_ADOLC_
+-	 this->inputs->AddInput(new BoolInput(MeshVertexonbedEnum,(IssmBool)iomodel->Data(MeshVertexonbedEnum)[io_index]));
+-#else
+-	 this->inputs->AddInput(new BoolInput(MeshVertexonbedEnum,(IssmBool)((iomodel->Data(MeshVertexonbedEnum)[io_index]).getValue())));
+-#endif
+-	}
+-	if (iomodel->Data(MeshVertexonsurfaceEnum)) {
+-#ifndef _HAVE_ADOLC_
+-	 this->inputs->AddInput(new BoolInput(MeshVertexonsurfaceEnum,(IssmBool)iomodel->Data(MeshVertexonsurfaceEnum)[io_index]));
+-#else
+-	 this->inputs->AddInput(new BoolInput(MeshVertexonsurfaceEnum,(IssmBool)((iomodel->Data(MeshVertexonsurfaceEnum)[io_index]).getValue())));
+-#endif
+-	}
+-	if (iomodel->Data(MaskVertexonfloatingiceEnum)) {
+-#ifndef _HAVE_ADOLC_
+-	 this->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,(IssmBool)iomodel->Data(MaskVertexonfloatingiceEnum)[io_index]));
+-#else
+-	 this->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,(IssmBool)((iomodel->Data(MaskVertexonfloatingiceEnum)[io_index]).getValue())));
+-#endif
+-	}
+-	if (iomodel->Data(MaskVertexongroundediceEnum)) {
+-#ifndef _HAVE_ADOLC_
+-	  this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,(IssmBool)iomodel->Data(MaskVertexongroundediceEnum)[io_index]));
+-#else
+-	  this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,(IssmBool)((iomodel->Data(MaskVertexongroundediceEnum)[io_index]).getValue())));
+-#endif
+-	}
+-	if (analysis_type==DiagnosticHorizAnalysisEnum) {
+-#ifndef _HAVE_ADOLC_
+-	 this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)iomodel->Data(FlowequationVertexEquationEnum)[io_index]));
+-#else
+-	 this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)((iomodel->Data(FlowequationVertexEquationEnum)[io_index]).getValue())));
+-#endif
+-	}
++	if (iomodel->Data(MeshVertexonbedEnum))
++	 this->inputs->AddInput(new BoolInput(MeshVertexonbedEnum,reCast<IssmBool>(iomodel->Data(MeshVertexonbedEnum)[io_index])));
++	if (iomodel->Data(MeshVertexonsurfaceEnum))
++	 this->inputs->AddInput(new BoolInput(MeshVertexonsurfaceEnum,reCast<IssmBool>(iomodel->Data(MeshVertexonsurfaceEnum)[io_index])));
++	if (iomodel->Data(MaskVertexonfloatingiceEnum))
++	 this->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,reCast<IssmBool>(iomodel->Data(MaskVertexonfloatingiceEnum)[io_index])));
++	if (iomodel->Data(MaskVertexongroundediceEnum))
++	  this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,reCast<IssmBool>(iomodel->Data(MaskVertexongroundediceEnum)[io_index])));
++	if (analysis_type==DiagnosticHorizAnalysisEnum)
++	 this->inputs->AddInput(new IntInput(ApproximationEnum,reCast<IssmInt>(iomodel->Data(FlowequationVertexEquationEnum)[io_index])));
+ 	/*set single point constraints: */
+ 
+ 	/*spc all nodes on water*/
+ 	if (!iomodel->Data(MaskVertexonwaterEnum)) _error2_("iomodel->nodeonwater is NULL");
+-	IssmBool maskVertexOnWater;
+-#ifndef _HAVE_ADOLC_
+-	maskVertexOnWater=iomodel->Data(MaskVertexonwaterEnum)[io_index];
+-#else
+-        maskVertexOnWater=(IssmBool)((iomodel->Data(MaskVertexonwaterEnum)[io_index]).getValue());
+-#endif
+-	if (maskVertexOnWater){
++	if (reCast<IssmBool>(iomodel->Data(MaskVertexonwaterEnum)[io_index])){
+ 		for(k=1;k<=gsize;k++){
+ 			this->FreezeDof(k);
+ 		}
+@@ -146,11 +115,7 @@
+ 	if (analysis_type==DiagnosticHutterAnalysisEnum){
+ 		if (!iomodel->Data(FlowequationVertexEquationEnum)) _error2_("iomodel->vertices_type is NULL");
+ 		/*Constrain all nodes that are not Hutter*/
+-#ifndef _HAVE_ADOLC_
+-		if (!(iomodel->Data(FlowequationVertexEquationEnum)[io_index]==HutterApproximationEnum)){
+-#else
+-		if (!((iomodel->Data(FlowequationVertexEquationEnum)[io_index]).getValue()==HutterApproximationEnum)){
+-#endif
++		if (reCast<int>(iomodel->Data(FlowequationVertexEquationEnum)[io_index])!=HutterApproximationEnum){
+ 			for(k=1;k<=gsize;k++){
+ 				this->FreezeDof(k);
+ 			}
+@@ -168,13 +133,7 @@
+ 		if (dim==3){
+ 			/*On a 3d mesh, we may have collapsed elements, hence dead nodes. Freeze them out: */
+ 			_assert_(iomodel->Data(MeshVertexonbedEnum));
+-		        IssmBool meshVertexOnBed;
+-#ifndef _HAVE_ADOLC_
+-		        meshVertexOnBed=iomodel->Data(MeshVertexonbedEnum)[io_index];
+-#else
+-                        meshVertexOnBed=(IssmBool)((iomodel->Data(MeshVertexonbedEnum)[io_index]).getValue());
+-#endif
+-			if (!meshVertexOnBed){
++			if (!(reCast<IssmBool>(iomodel->Data(MeshVertexonbedEnum)[io_index]))){
+ 				for(k=1;k<=gsize;k++){
+ 					this->FreezeDof(k);
+ 				}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12549-12550.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12549-12550.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12549-12550.diff	(revision 12679)
@@ -0,0 +1,510 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12550)
+@@ -51,16 +51,16 @@
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
+ 		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss);
+ 		void GetInputAverage(IssmDouble* pvalue);
+-		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss);
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss);
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss);
+ 		void ChangeEnum(int newenumtype);
+ 		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
+ 		void ConstrainMin(IssmDouble minimum);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12550)
+@@ -247,12 +247,12 @@
+ void ControlInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){
+ 	values->GetInputValue(pvalue,gauss);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){
++/*FUNCTION ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){{{*/
++void ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){
+ 	values->GetInputDerivativeValue(derivativevalues,xyz_list,gauss);
+ }/*}}}*/
+-/*FUNCTION ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){{{*/
++void ControlInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){
+ 	values->GetInputDerivativeValue(derivativevalues,xyz_list,gauss);
+ }/*}}}*/
+ /*FUNCTION ControlInput::SaveValue{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/Input.h	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/Input.h	(revision 12550)
+@@ -30,16 +30,16 @@
+ 		virtual void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss)=0;
+ 		virtual void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index)=0;
+ 		virtual void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int index)=0;
+-		virtual void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss)=0;
+-		virtual void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss)=0;
++		virtual void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss)=0;
+ 		virtual void GetInputAverage(IssmDouble* pvalue)=0;
+-		virtual void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss)=0;
+-		virtual void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss)=0;
+-		virtual void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
+-		virtual void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss)=0;
++		virtual void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss)=0;
++		virtual void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss)=0;
++		virtual void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss)=0;
+ 		virtual void ChangeEnum(int newenumtype)=0;
+ 		virtual void Configure(Parameters* parameters)=0;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12550)
+@@ -57,16 +57,16 @@
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
+ 		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss);
+ 		void GetInputAverage(IssmDouble* pvalue);
+-		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype){_error2_("not implemented yet");};
+ 		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){_error2_("not implemented yet");};
+ 		void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12550)
+@@ -52,16 +52,16 @@
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index);
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void GetInputAverage(IssmDouble* pvalue){_error2_("not implemented yet");};
+-		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype){_error2_("not implemented yet");};
+ 		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){_error2_("not implemented yet");};
+ 		void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12550)
+@@ -123,11 +123,11 @@
+ /*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){{{*/
+ void IntInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
++/*FUNCTION IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){{{*/
++void IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
++/*FUNCTION IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){{{*/
++void IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION IntInput::ChangeEnum{{{*/
+ void IntInput::ChangeEnum(int newenumtype){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12550)
+@@ -122,11 +122,11 @@
+ /*FUNCTION BoolInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){{{*/
+ void BoolInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
++/*FUNCTION BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){{{*/
++void BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
++/*FUNCTION BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){{{*/
++void BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+ /*FUNCTION BoolInput::ChangeEnum{{{*/
+ void BoolInput::ChangeEnum(int newenumtype){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12550)
+@@ -52,16 +52,16 @@
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
+ 		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss);
+ 		void GetInputAverage(IssmDouble* pvalue){_error2_("not implemented yet");};
+-		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+ 		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
+ 		void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12550)
+@@ -52,16 +52,16 @@
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
+ 		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss);
+ 		void GetInputAverage(IssmDouble* pvalue){_error2_("not implemented yet");};
+-		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+ 		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
+ 		void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12550)
+@@ -123,15 +123,15 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION TriaP1Input::GetInputDerivativeValue(IssmDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void TriaP1Input::GetInputDerivativeValue(IssmDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){
++/*FUNCTION TriaP1Input::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, GaussTria* gauss){{{*/
++void TriaP1Input::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*Call TriaRef function*/
+ 	TriaRef::GetInputDerivativeValue(p,&values[0],xyz_list,gauss);
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::GetVxStrainRate2d{{{*/
+-void TriaP1Input::GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){
++void TriaP1Input::GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*Intermediary*/
+ 	int       i;
+@@ -154,7 +154,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1Input::GetVyStrainRate2d{{{*/
+-void TriaP1Input::GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){
++void TriaP1Input::GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){
+ 
+ 	/*Intermediary*/
+ 	int       i;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12550)
+@@ -52,16 +52,16 @@
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void GetInputAverage(IssmDouble* pvalue);
+-		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss);
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss);
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+ 
+ 		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12550)
+@@ -183,8 +183,8 @@
+ 	delete input;
+ }
+ /*}}}*/
+-/*FUNCTION TransientInput::GetInputDerivativeValue(IssmDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void TransientInput::GetInputDerivativeValue(IssmDouble* p, IssmPDouble* xyz_list, GaussTria* gauss){
++/*FUNCTION TransientInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, GaussTria* gauss){{{*/
++void TransientInput::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, GaussTria* gauss){
+ 
+ 	IssmDouble time;
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12550)
+@@ -134,15 +134,15 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION PentaP1Input::GetInputDerivativeValue(IssmDouble* p, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void PentaP1Input::GetInputDerivativeValue(IssmDouble* p, IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION PentaP1Input::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, GaussPenta* gauss){{{*/
++void PentaP1Input::GetInputDerivativeValue(IssmDouble* p, IssmDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	/*Call PentaRef function*/
+ 	PentaRef::GetInputDerivativeValue(p,&values[0],xyz_list,gauss);
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVxStrainRate3d{{{*/
+-void PentaP1Input::GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){
+ 	int i,j;
+ 
+ 	const int numnodes=6;
+@@ -187,7 +187,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVyStrainRate3d{{{*/
+-void PentaP1Input::GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){
+ 	int i,j;
+ 
+ 	const int numnodes=6;
+@@ -232,7 +232,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVzStrainRate3d{{{*/
+-void PentaP1Input::GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){
+ 	int i,j;
+ 
+ 	const int numnodes=6;
+@@ -278,7 +278,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVxStrainRate3dPattyn{{{*/
+-void PentaP1Input::GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	int i;
+ 	const int numnodes=6;
+@@ -302,7 +302,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1Input::GetVyStrainRate3dPattyn{{{*/
+-void PentaP1Input::GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
++void PentaP1Input::GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){
+ 
+ 	int i;
+ 	const int numnodes=6;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12550)
+@@ -130,50 +130,50 @@
+ /*FUNCTION DoubleInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){{{*/
+ void DoubleInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){*pvalue=this->value;}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
++/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){{{*/
++void DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
++/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void DoubleInput::GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){
++/*FUNCTION DoubleInput::GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){{{*/
++void DoubleInput::GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){
+ 	/*Epsilon is zero as vx is constant over the element*/
+ 	for(int i=0;i<3;i++) epsilonvx[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){{{*/
+-void DoubleInput::GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){
++/*FUNCTION DoubleInput::GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){{{*/
++void DoubleInput::GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){
+ 	/*Epsilon is zero as vy is constant over the element*/
+ 	for(int i=0;i<3;i++) epsilonvy[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vx is constant over the element*/
+ 	for(int i=0;i<6;i++) epsilonvx[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vy is constant over the element*/
+ 	for(int i=0;i<6;i++) epsilonvy[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vz is constant over the element*/
+ 	for(int i=0;i<6;i++) epsilonvz[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vx is constant over the element*/
+ 	for(int i=0;i<5;i++) epsilonvx[i]=0;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleInput::GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){{{*/
+-void DoubleInput::GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){
++/*FUNCTION DoubleInput::GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){{{*/
++void DoubleInput::GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){
+ 	/*Epsilon is zero as vy is constant over the element*/
+ 	for(int i=0;i<5;i++) epsilonvy[i]=0;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12550)
+@@ -54,16 +54,16 @@
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss);
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void GetInputAverage(IssmDouble* pvalue);
+-		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
+ 		void ChangeEnum(int newenumtype);
+ 
+ 		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12549)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12550)
+@@ -52,16 +52,16 @@
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
+ 		void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
+ 		void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss);
+ 		void GetInputAverage(IssmDouble* pvalue);
+-		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
+-		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmPDouble* xyz_list, GaussPenta* gauss);
+-		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmPDouble* xyz_list, GaussPenta* gauss);
++		void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
++		void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss);
++		void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss);
+ 		void ChangeEnum(int newenumtype);
+ 
+ 		void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12550-12551.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12550-12551.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12550-12551.diff	(revision 12679)
@@ -0,0 +1,31 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12550)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12551)
+@@ -1389,7 +1389,7 @@
+ 
+ 	/*Recover vertices ids needed to initialize inputs*/
+ 	for(i=0;i<3;i++){ 
+-		tria_vertex_ids[i]=(int)iomodel->Data(MeshElementsEnum)[3*index+i]; //ids for vertices are in the elements array from Matlab
++		tria_vertex_ids[i]=reCast<int>(iomodel->Data(MeshElementsEnum)[3*index+i]); //ids for vertices are in the elements array from Matlab
+ 	}
+ 
+ 	/*Control Inputs*/
+@@ -1607,7 +1607,7 @@
+ 
+ 	switch(type){
+ 
+-		case VertexEnum:
++		case VertexEnum: {
+ 
+ 			/*New TriaP1Input*/
+ 			IssmDouble values[3];
+@@ -1625,7 +1625,7 @@
+ 				this->inputs->AddInput(new TriaP1Input(name,values));
+ 			}
+ 			return;
+-
++		}
+ 		default:
+ 			_error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
+ 	}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12551-12552.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12551-12552.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12551-12552.diff	(revision 12679)
@@ -0,0 +1,408 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h	(revision 12551)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.h	(revision 12552)
+@@ -17,8 +17,8 @@
+ class IoModel {
+ 
+ 	private: 
+-		IssmPDouble **data;        //this dataset holds temporary data, memory intensive.
+-		Parameters  *constants;   //this dataset holds all IssmPDouble, int, bool and char *parameters read in from the input file.*
++		IssmDouble **data;        //this dataset holds temporary data, memory intensive.
++		Parameters  *constants;   //this dataset holds all IssmDouble, int, bool and char *parameters read in from the input file.*
+ 
+ 	public:
+ 		/*This data needs to stay memory resident at all time, even if it's memory intensive: */
+@@ -43,23 +43,23 @@
+ 		void        CheckEnumSync(void);
+ 		void        Constant(bool *poutput,int constant_enum);
+ 		void        Constant(int *poutput,int constant_enum);
+-		void        Constant(IssmPDouble *poutput,int constant_enum);
++		void        Constant(IssmDouble *poutput,int constant_enum);
+ 		void        Constant(char **poutput,int constant_enum);
+ 		Param      *CopyConstantObject(int constant_enum);
+-		IssmPDouble *Data(int dataenum);
++		IssmDouble *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(IssmPDouble* pscalar,int data_enum);
++		void        FetchData(IssmDouble* pscalar,int data_enum);
+ 		void        FetchData(char** pstring,int data_enum);
+ 		void        FetchData(int** pmatrix,int* pM,int* pN,int data_enum);
+-		void        FetchData(IssmPDouble**  pscalarmatrix,int* pM,int* pN,int data_enum);
++		void        FetchData(IssmDouble**  pscalarmatrix,int* pM,int* pN,int data_enum);
+ 		void        FetchData(char***   pstringarray,int* pnumstrings,int data_enum);
+-		void        FetchData(IssmPDouble*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
++		void        FetchData(IssmDouble*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
+ 		void        FetchData(Option **poption,int data_enum);
+ 		void        FetchData(int num,...);
+-		void        FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum=NoneEnum,IssmPDouble default_value=0);
++		void        FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum=NoneEnum,IssmDouble default_value=0);
+ 		void        LastIndex(int *pindex);
+ 		FILE*       SetFilePointerToData(int* pcode,int* pvector_type, int data_enum);
+ };
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12551)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12552)
+@@ -49,10 +49,10 @@
+ 
+ 	/*Initialize and read constants:*/
+ 	this->constants=new Parameters();
+-	this->FetchConstants(); /*this routine goes through the input file, and fetches bools, ints, IssmPDoubles and strings only, nothing memory intensive*/
++	this->FetchConstants(); /*this routine goes through the input file, and fetches bools, ints, IssmDoubles and strings only, nothing memory intensive*/
+ 
+ 	/*Initialize data: */
+-	this->data=xNew<IssmPDouble*>(MaximumNumberOfEnums);
++	this->data=xNew<IssmDouble*>(MaximumNumberOfEnums);
+ 	for(int i=0;i<MaximumNumberOfEnums;i++) this->data[i]=NULL;
+ 	
+ 	/*Initialize permanent data: */
+@@ -83,7 +83,7 @@
+ 	}
+ 	#endif
+ 
+-	xDelete<IssmPDouble*>(this->data);
++	xDelete<IssmDouble*>(this->data);
+ 	xDelete<bool>(this->my_elements);
+ 	xDelete<bool>(this->my_nodes);
+ 	xDelete<int>(this->my_vertices);
+@@ -151,8 +151,8 @@
+ 	this->constants->FindParam(poutput,constant_enum);
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::Constant(IssmPDouble* poutput,int constant_enum){{{*/
+-void IoModel::Constant(IssmPDouble* poutput,int constant_enum){
++/*FUNCTION IoModel::Constant(IssmDouble* poutput,int constant_enum){{{*/
++void IoModel::Constant(IssmDouble* poutput,int constant_enum){
+ 
+ 	_assert_(constant_enum>=0);
+ 	_assert_(this->constants);
+@@ -182,7 +182,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION IoModel::Data{{{*/
+-IssmPDouble* IoModel::Data(int data_enum){
++IssmDouble* IoModel::Data(int data_enum){
+ 
+ 	_assert_(data_enum<MaximumNumberOfEnums);
+ 	_assert_(data_enum>=0);
+@@ -204,7 +204,7 @@
+ 	for(i = 0; i <num; i++){
+ 		dataenum=va_arg(ap, int);
+ 		_assert_(dataenum<MaximumNumberOfEnums);
+-		xDelete<double>(this->data[dataenum]);
++		xDelete<IssmDouble>(this->data[dataenum]);
+ 	}
+ 	va_end(ap);
+ } /*}}}*/
+@@ -236,7 +236,7 @@
+ 		/*First set FILE* position to the beginning of the file: */
+ 		fseek(this->fid,0,SEEK_SET);
+ 
+-		/*Now march through file looking for the correct data identifiers (bool,int,IssmPDouble or string): */
++		/*Now march through file looking for the correct data identifiers (bool,int,IssmDouble or string): */
+ 		for(;;){
+ 			if(fread(&record_enum,sizeof(int),1,this->fid)==0){
+ 
+@@ -498,8 +498,8 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(IssmPDouble*   pscalar,int data_enum){{{*/
+-void  IoModel::FetchData(IssmPDouble* pscalar,int data_enum){
++/*FUNCTION IoModel::FetchData(IssmDouble*   pscalar,int data_enum){{{*/
++void  IoModel::FetchData(IssmDouble* pscalar,int data_enum){
+ 
+ 
+ 	extern int my_rank;
+@@ -513,7 +513,7 @@
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+ 	
+-	if(code!=3)_error2_("expecting a IssmPDouble for enum " << EnumToStringx(data_enum));
++	if(code!=3)_error2_("expecting a IssmDouble for enum " << EnumToStringx(data_enum));
+ 	
+ 	/*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */
+ 	if(my_rank==0){
+@@ -597,7 +597,7 @@
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
+ 
+-	if((code!=5) && (code!=6) && (code!=7))_error2_("expecting a IssmPDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
++	if((code!=5) && (code!=6) && (code!=7))_error2_("expecting a IssmDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
+ 	
+ 	/*Now fetch: */
+ 
+@@ -654,8 +654,8 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(IssmPDouble**  pIssmPDoublematrix,int* pM,int* pN,int data_enum){{{*/
+-void  IoModel::FetchData(IssmPDouble** pmatrix,int* pM,int* pN,int data_enum){
++/*FUNCTION IoModel::FetchData(IssmDouble**  pIssmDoublematrix,int* pM,int* pN,int data_enum){{{*/
++void  IoModel::FetchData(IssmDouble** pmatrix,int* pM,int* pN,int data_enum){
+ 
+ 	extern int my_rank;
+ 	extern int num_procs;
+@@ -668,7 +668,7 @@
+ 	
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
+-	if((code!=5) && (code!=6) && (code!=7))_error2_("expecting a IssmPDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
++	if((code!=5) && (code!=6) && (code!=7))_error2_("expecting a IssmDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
+ 	
+ 	/*Now fetch: */
+ 
+@@ -699,10 +699,13 @@
+ 		#ifdef _HAVE_MPI_
+ 		MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+ 		#endif
++	        *pmatrix=xNew<IssmDouble>(M*N);
++	        for (int i=0;i<M*N;++i) (*pmatrix)[i]=matrix[i];
++	        xDelete<IssmPDouble>(matrix);
+ 	}
+-
++	else
++	  *pmatrix=NULL;
+ 	/*Assign output pointers: */
+-	*pmatrix=matrix;
+ 	if (pM)*pM=M;
+ 	if (pN)*pN=N;
+ }
+@@ -777,8 +780,8 @@
+ 	*pnumstrings=numstrings;
+ }
+ /*}}}*/
+-/*FUNCTION IoModel::FetchData(IssmPDouble*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{*/
+-void  IoModel::FetchData(IssmPDouble*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){
++/*FUNCTION IoModel::FetchData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{*/
++void  IoModel::FetchData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){
+ 
+ 	int i;
+ 
+@@ -786,7 +789,7 @@
+ 	extern int num_procs;
+ 
+ 	/*output: */
+-	IssmPDouble** matrices=NULL;
++	IssmDouble** matrices=NULL;
+ 	int*     mdims=NULL;
+ 	int*     ndims=NULL;
+ 	int      numrecords=0;
+@@ -798,7 +801,7 @@
+ 	
+ 	/*Set file pointer to beginning of the data: */
+ 	fid=this->SetFilePointerToData(&code,NULL,data_enum);
+-	if(code!=8)_error2_("expecting a IssmPDouble mat array for enum " << EnumToStringx(data_enum));
++	if(code!=8)_error2_("expecting a IssmDouble mat array for enum " << EnumToStringx(data_enum));
+ 	
+ 	/*Now fetch: */
+ 	if(my_rank==0){  
+@@ -811,7 +814,7 @@
+ 	if(numrecords){
+ 
+ 		/*Allocate matrices :*/
+-		matrices=xNew<IssmPDouble*>(numrecords);
++		matrices=xNew<IssmDouble*>(numrecords);
+ 		mdims=xNew<int>(numrecords);
+ 		ndims=xNew<int>(numrecords);
+ 
+@@ -850,10 +853,13 @@
+ 				#ifdef _HAVE_MPI_
+ 				MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+ 				#endif
++				matrices[i]=xNew<IssmDouble>(M*N);
++				for (int j=0;j<M*N;++j) {matrices[i][j]=matrix[j];}
++				xDelete<IssmPDouble>(matrix);
+ 			}
+-
++			else
++			  matrices[i]=NULL;
+ 			/*Assign: */
+-			matrices[i]=matrix;
+ 			mdims[i]=M;
+ 			ndims[i]=N;
+ 		}
+@@ -883,9 +889,9 @@
+ 	/*Get option value*/
+ 	fid=this->SetFilePointerToData(&code,NULL,index+1);
+ 	switch(code){
+-		case 3: {//IssmPDouble
+-			  IssmPDouble *value = NULL;
+-			  value=xNew<IssmPDouble>(1);
++		case 3: {//IssmDouble
++			  IssmDouble *value = NULL;
++			  value=xNew<IssmDouble>(1);
+ 			  FetchData(value,index+1);
+ 			  option = new OptionDouble();
+ 			  ((OptionDouble*)option)->values = value;
+@@ -919,12 +925,12 @@
+ 
+ 	va_list ap;
+ 	int     dataenum;
+-	IssmPDouble* matrix=NULL;
++	IssmDouble* matrix=NULL;
+ 	int     M,N;
+ 	int     i;
+ 
+ 	/*Go through the entire list of enums and fetch the corresponding data. Add it to the iomodel->data dataset. Everything
+-	 *we fetch is a IssmPDouble* : */
++	 *we fetch is a IssmDouble* : */
+ 	
+ 	va_start(ap,num);
+ 	for(i=0; i<num; i++){
+@@ -950,7 +956,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION IoModel::FetchDataToInput{{{*/
+-void IoModel::FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum,IssmPDouble default_value){
++void IoModel::FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum,IssmDouble default_value){
+ 
+ 	/*intermediary: */
+ 	int     i;
+@@ -969,9 +975,9 @@
+ 	/*variables being fetched: */
+ 	bool    boolean;
+ 	int     integer;
+-	IssmPDouble  scalar;
++	IssmDouble  scalar;
+ 	char   *string        = NULL;
+-	IssmPDouble *IssmPDoublevector  = NULL;
++	IssmDouble *IssmDoublevector  = NULL;
+ 	int     M,N;
+ 
+ 	/*Fetch parameters: */
+@@ -989,7 +995,7 @@
+ 			for (i=0;i<numberofelements;i++){
+ 				if(this->my_elements[i]){
+ 					Element* element=(Element*)elements->GetObjectByOffset(counter);
+-					element->InputCreate((IssmPDouble)boolean,vector_enum,code); 
++					element->InputCreate((IssmDouble)boolean,vector_enum,code);
+ 					counter++;
+ 				}
+ 			}
+@@ -1002,15 +1008,15 @@
+ 			for (i=0;i<numberofelements;i++){
+ 				if(this->my_elements[i]){
+ 					Element* element=(Element*)elements->GetObjectByOffset(counter);
+-					element->InputCreate((IssmPDouble)integer,vector_enum,code); 
++					element->InputCreate((IssmDouble)integer,vector_enum,code);
+ 					counter++;
+ 				}
+ 			}
+ 			break; /*}}}*/
+-		case 3: //IssmPDouble constant.  {{{
++		case 3: //IssmDouble constant.  {{{
+ 			this->FetchData(&scalar,vector_enum);
+ 
+-			/*Add IssmPDouble constant input to all elements: */
++			/*Add IssmDouble constant input to all elements: */
+ 			counter=0;
+ 			for (i=0;i<numberofelements;i++){
+ 				if(this->my_elements[i]){
+@@ -1023,17 +1029,17 @@
+ 		case 5: //boolean vector.  {{{
+ 
+ 			/*Fetch vector:*/
+-			this->FetchData(&IssmPDoublevector,&M,&N,vector_enum); //we still have a IssmPDoublevector, because it might include times in transient mode
++			this->FetchData(&IssmDoublevector,&M,&N,vector_enum); //we still have a IssmDoublevector, because it might include times in transient mode
+ 			/*Check we got something, otherwise fetch default: */
+-			if(IssmPDoublevector){ 
++			if(IssmDoublevector){
+ 				defaulting=false;  //we are not defaulting, because  we do have a vector
+ 			}
+ 			else{
+ 				/*do we have a default enum to go fetch? */
+ 				if(default_vector_enum!=NoneEnum){
+ 					/*yes. fetch it: */
+-					this->FetchData(&IssmPDoublevector,&M,&N,default_vector_enum);
+-					if(IssmPDoublevector){
++					this->FetchData(&IssmDoublevector,&M,&N,default_vector_enum);
++					if(IssmDoublevector){
+ 						defaulting=false;  //we are not defaulting, because  we do have a vector
+ 					}
+ 					else{
+@@ -1053,7 +1059,7 @@
+ 				if(this->my_elements[i]){
+ 					Element* element=(Element*)elements->GetObjectByOffset(counter);
+ 					if(defaulting) element->InputCreate(default_value,vector_enum,code); 
+-					else           element->InputCreate(IssmPDoublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
++					else           element->InputCreate(IssmDoublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
+ 					counter++;
+ 				}
+ 			}
+@@ -1061,17 +1067,17 @@
+ 		case 6: //int vector{{{
+ 
+ 			/*Fetch vector:*/
+-			this->FetchData(&IssmPDoublevector,&M,&N,vector_enum); //we still have a IssmPDoublevector, because it might include times in transient mode
++			this->FetchData(&IssmDoublevector,&M,&N,vector_enum); //we still have a IssmDoublevector, because it might include times in transient mode
+ 			/*Check we got something, otherwise fetch default: */
+-			if(IssmPDoublevector){ 
++			if(IssmDoublevector){
+ 				defaulting=false;  //we are not defaulting, because  we do have a vector
+ 			}
+ 			else{
+ 				/*do we have a default enum to go fetch? */
+ 				if(default_vector_enum!=NoneEnum){
+ 					/*yes. fetch it: */
+-					this->FetchData(&IssmPDoublevector,&M,&N,default_vector_enum);
+-					if(IssmPDoublevector){
++					this->FetchData(&IssmDoublevector,&M,&N,default_vector_enum);
++					if(IssmDoublevector){
+ 						defaulting=false;  //we are not defaulting, because  we do have a vector
+ 					}
+ 					else{
+@@ -1091,25 +1097,25 @@
+ 				if(this->my_elements[i]){
+ 					Element* element=(Element*)elements->GetObjectByOffset(counter);
+ 					if(defaulting) element->InputCreate(default_value,vector_enum,code); 
+-					else           element->InputCreate(IssmPDoublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
++					else           element->InputCreate(IssmDoublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
+ 					counter++;
+ 				}
+ 			}
+ 			break; /*}}}*/
+-		case 7: //IssmPDouble vector{{{
++		case 7: //IssmDouble vector{{{
+ 
+ 			/*Fetch vector:*/
+-			this->FetchData(&IssmPDoublevector,&M,&N,vector_enum);
++			this->FetchData(&IssmDoublevector,&M,&N,vector_enum);
+ 			/*Check we got something, otherwise fetch default: */
+-			if(IssmPDoublevector){ 
++			if(IssmDoublevector){
+ 				defaulting=false;  //we are not defaulting, because  we do have a vector
+ 			}
+ 			else{
+ 				/*do we have a default enum to go fetch? */
+ 				if(default_vector_enum!=NoneEnum){
+ 					/*yes. fetch it: */
+-					this->FetchData(&IssmPDoublevector,&M,&N,default_vector_enum);
+-					if(IssmPDoublevector){
++					this->FetchData(&IssmDoublevector,&M,&N,default_vector_enum);
++					if(IssmDoublevector){
+ 						defaulting=false;  //we are not defaulting, because  we do have a vector
+ 					}
+ 					else{
+@@ -1129,7 +1135,7 @@
+ 				if(this->my_elements[i]){
+ 					Element* element=(Element*)elements->GetObjectByOffset(counter);
+ 					if(defaulting) element->InputCreate(default_value,vector_enum,code); 
+-					else           element->InputCreate(IssmPDoublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
++					else           element->InputCreate(IssmDoublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
+ 					counter++;
+ 				}
+ 			}
+@@ -1141,7 +1147,7 @@
+ 			/*}}}*/
+ 	}
+ 	/*Free ressources:*/
+-	xDelete<IssmPDouble>(IssmPDoublevector);
++	xDelete<IssmDouble>(IssmDoublevector);
+ 	xDelete<char>(string);
+ }
+ /*FUNCTION IoModel::LastIndex{{{*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12552-12553.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12552-12553.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12552-12553.diff	(revision 12679)
@@ -0,0 +1,119 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12552)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12553)
+@@ -1648,13 +1648,13 @@
+ 	if (!IsInput(name)) return;
+ 	
+ 	if ((code==5) || (code==1)){ //boolean
+-		this->inputs->AddInput(new BoolInput(name,(bool)scalar));
++		this->inputs->AddInput(new BoolInput(name,reCast<bool>(scalar)));
+ 	}
+ 	else if ((code==6) || (code==2)){ //integer
+-		this->inputs->AddInput(new IntInput(name,(int)scalar));
++		this->inputs->AddInput(new IntInput(name,reCast<int>(scalar)));
+ 	}
+ 	else if ((code==7) || (code==3)){ //IssmDouble
+-		this->inputs->AddInput(new DoubleInput(name,(int)scalar));
++		this->inputs->AddInput(new DoubleInput(name,reCast<int>(scalar)));
+ 	}
+ 	else _error2_("could not recognize nature of vector from code " << code);
+ 
+@@ -1685,7 +1685,7 @@
+ 
+ 		/*Recover vertices ids needed to initialize inputs*/
+ 		for(i=0;i<3;i++){ 
+-			tria_vertex_ids[i]=(int)iomodel->Data(MeshElementsEnum)[3*index+i]; //ids for vertices are in the elements array from Matlab
++			tria_vertex_ids[i]=reCast<int>(iomodel->Data(MeshElementsEnum)[3*index+i]); //ids for vertices are in the elements array from Matlab
+ 		}
+ 
+ 		/*Are we in transient or static? */
+@@ -1730,13 +1730,13 @@
+ 			/*static mode: create an input out of the element value: */
+ 
+ 			if (code==5){ //boolean
+-				this->inputs->AddInput(new BoolInput(vector_enum,(bool)vector[index]));
++				this->inputs->AddInput(new BoolInput(vector_enum,reCast<bool>(vector[index])));
+ 			}
+ 			else if (code==6){ //integer
+-				this->inputs->AddInput(new IntInput(vector_enum,(int)vector[index]));
++				this->inputs->AddInput(new IntInput(vector_enum,reCast<int>(vector[index])));
+ 			}
+ 			else if (code==7){ //IssmDouble
+-				this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index]));
++				this->inputs->AddInput(new DoubleInput(vector_enum,vector[index]));
+ 			}
+ 			else _error2_("could not recognize nature of vector from code " << code);
+ 		}
+@@ -1822,7 +1822,7 @@
+ 	bool shelf=false;
+ 
+ 	for(i=0;i<NUMVERTICES;i++){
+-		if (flags[nodes[i]->Sid()]){
++		if (reCast<bool>(flags[nodes[i]->Sid()])){
+ 			shelf=true;
+ 			break;
+ 		}
+@@ -1913,7 +1913,7 @@
+ 	/*go through vertices, and update inputs, considering them to be TriaVertex type: */
+ 	for(i=0;i<NUMVERTICES;i++){
+ 		/*Ice shelf: if bed below bathymetry, impose it at the bathymetry and update surface, elso do nothing */
+-		if(old_floating_ice[nodes[i]->Sid()]){
++		if(reCast<bool>(old_floating_ice[nodes[i]->Sid()])){
+ 			if(b[i]<=ba[i]){ 
+ 				b[i]=ba[i];
+ 				s[i]=b[i]+h[i];
+@@ -1933,7 +1933,7 @@
+ 					nodes[i]->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,true));
+ 					nodes[i]->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,false));
+ 				}
+-				else if(migration_style==SoftMigrationEnum && sheet_ungrounding[nodes[i]->Sid()]){
++				else if(migration_style==SoftMigrationEnum && reCast<bool>(sheet_ungrounding[nodes[i]->Sid()])){
+ 					s[i]=(1-density)*h[i];
+ 					b[i]=-density*h[i];
+ 					nodes[i]->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,true));
+@@ -2186,7 +2186,7 @@
+        /*********compute PD ****************/
+        if (tstar < PDup){
+ 	 pd = 1;
+-	 if (tstar >= -siglimc){ pd = pds[int(tstar/DT + siglim0c)];}}
++	 if (tstar >= -siglimc){ pd = pds[reCast<int,IssmDouble>(tstar/DT + siglim0c)];}}
+        else { 
+ 	 pd = 0;}
+        
+@@ -2206,7 +2206,7 @@
+        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)];
++	 pddsig=pdds[reCast<int,IssmDouble>(tstar/DT + siglim0)];
+ 	 pdd[i] = pdd[i] + pddsig*deltm;
+ 	 frzndd[i] = frzndd[i] - (tstar-pddsig)*deltm;}
+        else{frzndd[i] = frzndd[i] - tstar*deltm; }
+@@ -2520,7 +2520,7 @@
+ 
+ 	/*Recover vertices ids needed to initialize inputs*/
+ 	for(i=0;i<3;i++){ 
+-		tria_vertex_ids[i]=(int)iomodel->Data(MeshElementsEnum)[3*index+i]; //ids for vertices are in the elements array from Matlab
++		tria_vertex_ids[i]=reCast<int>(iomodel->Data(MeshElementsEnum)[3*index+i]); //ids for vertices are in the elements array from Matlab
+ 	}
+ 
+ 	/*Recover nodes ids needed to initialize the node hook.*/
+@@ -2533,7 +2533,7 @@
+ 	else{
+ 		/*Continuous Galerkin*/
+ 		for(i=0;i<3;i++){ 
+-			tria_node_ids[i]=iomodel->nodecounter+(int)*(iomodel->Data(MeshElementsEnum)+3*index+i); //ids for vertices are in the elements array from Matlab
++			tria_node_ids[i]=iomodel->nodecounter+reCast<int,IssmDouble>(*(iomodel->Data(MeshElementsEnum)+3*index+i)); //ids for vertices are in the elements array from Matlab
+ 		}
+ 	}
+ 
+@@ -2591,7 +2591,7 @@
+ 
+ 	/*Go through nodes, and whoever is on the potential_sheet_ungrounding, ends up in nodes_on_iceshelf: */
+ 	for(i=0;i<3;i++){
+-		if (vertices_potentially_ungrounding[nodes[i]->Sid()]){
++		if (reCast<bool>(vertices_potentially_ungrounding[nodes[i]->Sid()])){
+ 			vec_nodes_on_iceshelf->SetValue(nodes[i]->Sid(),1,INS_VAL);
+ 		
+ 			/*If node was not on ice shelf, we flipped*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12553-12554.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12553-12554.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12553-12554.diff	(revision 12679)
@@ -0,0 +1,41 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12553)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12554)
+@@ -156,7 +156,7 @@
+ 	switch(xinput->ObjectEnum()){
+ 
+ 		case BoolInputEnum:
+-			this->value=(bool)(this->value+scalar*xboolinput->value);
++			this->value=reCast<bool,IssmDouble>(this->value+scalar*xboolinput->value);
+ 			return;
+ 
+ 		default:
+@@ -165,14 +165,6 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BoolInput::Constrain{{{*/
+-void BoolInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){
+-
+-	if(!xIsNan<IssmDouble>(cm_min)) if (this->value<cm_min)this->value=cm_min;
+-	if(!xIsNan<IssmDouble>(cm_max)) if (this->value>cm_max)this->value=cm_max;
+-
+-}
+-/*}}}*/
+ /*FUNCTION BoolInput::Extrude{{{*/
+ void BoolInput::Extrude(void){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12553)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12554)
+@@ -73,7 +73,7 @@
+ 		void Scale(IssmDouble scale_factor);
+ 		void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
+ 		void AXPY(Input* xinput,IssmDouble scalar);
+-		void Constrain(IssmDouble cm_min, IssmDouble cm_max);
++		void Constrain(IssmDouble cm_min, IssmDouble cm_max){_error2_("Constrain not implemented for booleans");};
+ 		void Extrude(void);
+ 		void VerticallyIntegrate(Input* thickness_input){_error2_("not supported yet");};
+ 		void GetVectorFromInputs(Vector* vector,int* doflist);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12554-12555.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12554-12555.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12554-12555.diff	(revision 12679)
@@ -0,0 +1,33 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12554)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12555)
+@@ -144,7 +144,7 @@
+ /*FUNCTION IntInput::Scale{{{*/
+ void IntInput::Scale(IssmDouble scale_factor){
+ 	IssmDouble dvalue=(IssmDouble)value*scale_factor;
+-	value=(int)dvalue;
++	value=reCast<int>(dvalue);
+ }
+ /*}}}*/
+ /*FUNCTION IntInput::AXPY{{{*/
+@@ -161,7 +161,7 @@
+ 
+ 		case IntInputEnum:
+ 			dvalue=(IssmDouble)this->value+scalar*(IssmDouble)xintinput->value;
+-			this->value=(int)dvalue;
++			this->value=reCast<int>(dvalue);
+ 			return;
+ 
+ 		default:
+@@ -173,8 +173,8 @@
+ /*FUNCTION IntInput::Constrain{{{*/
+ void IntInput::Constrain(IssmDouble cm_min, IssmDouble cm_max){
+ 
+-	if(!xIsNan<IssmDouble>(cm_min)) if (this->value<cm_min)this->value=(int)cm_min;
+-	if(!xIsNan<IssmDouble>(cm_max)) if (this->value>cm_max)this->value=(int)cm_max;
++	if(!xIsNan<IssmDouble>(cm_min)) if (this->value<cm_min)this->value=reCast<int>(cm_min);
++	if(!xIsNan<IssmDouble>(cm_max)) if (this->value>cm_max)this->value=reCast<int>(cm_max);
+ 
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12555-12556.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12555-12556.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12555-12556.diff	(revision 12679)
@@ -0,0 +1,37 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12555)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12556)
+@@ -543,12 +543,12 @@
+ 
+ 			switch(element->ObjectEnum()){
+ 
+-				case TriaEnum:
++				case TriaEnum: {
+ 					IssmDouble values[3];
+ 					for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetVertexDof()];
+ 					this->inputs->AddInput(new TriaP1Input(name,values));
+ 					return;
+-
++				}
+ 				default: _error2_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
+ 			}
+ 		default: _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
+@@ -585,7 +585,7 @@
+ 
+ 			switch(element->ObjectEnum()){
+ 
+-				case TriaEnum:
++				case TriaEnum: {
+ 					IssmDouble values[3];
+ 					for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetSidList()]; //use sid list, to index into serial oriented vector 
+ 					this->inputs->AddInput(new TriaP1Input(name,values));
+@@ -606,7 +606,7 @@
+ 					}
+ 					/*}}}*/
+ 					return;
+-
++				}
+ 				default: _error2_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
+ 			}
+ 		default: _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
Index: /issm/oecreview/Archive/12321-12677/ISSM-12556-12557.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12556-12557.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12556-12557.diff	(revision 12679)
@@ -0,0 +1,97 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12556)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12557)
+@@ -676,7 +676,7 @@
+ 
+ 		/*Get B*/
+ 		if (iomodel->Data(MaterialsRheologyBEnum)) {
+-			for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(MaterialsRheologyBEnum)[int(iomodel->Data(MeshElementsEnum)[num_vertices*index+i]-1)];
++			for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(MaterialsRheologyBEnum)[reCast<int,IssmDouble>(iomodel->Data(MeshElementsEnum)[num_vertices*index+i]-1)];
+ 			this->inputs->AddInput(new TriaP1Input(MaterialsRheologyBbarEnum,nodeinputs));
+ 		}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12556)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12557)
+@@ -61,27 +61,27 @@
+ 	/*First, see wether this is an internal or boundary edge (if e2=NaN)*/
+ 	if (xIsNan<IssmDouble>((IssmDouble)iomodel->Data(MeshEdgesEnum)[4*i+3])){ //edges are [node1 node2 elem1 elem2]
+ 		/* Boundary edge, only one element */
+-		e1=(int)iomodel->Data(MeshEdgesEnum)[4*i+2];
+-		e2=(int)UNDEF;
++		e1=reCast<int>(iomodel->Data(MeshEdgesEnum)[4*i+2]);
++		e2=reCast<int>(UNDEF);
+ 		num_elems=1;
+ 		num_nodes=2;
+ 		numericalflux_type=BoundaryEnum;
+-		numericalflux_elem_ids[0]=(int)e1;
++		numericalflux_elem_ids[0]=reCast<int>(e1);
+ 	}
+ 	else{
+ 		/* internal edge: connected to 2 elements */
+-		e1=(int)iomodel->Data(MeshEdgesEnum)[4*i+2];
+-		e2=(int)iomodel->Data(MeshEdgesEnum)[4*i+3];
++		e1=reCast<int>(iomodel->Data(MeshEdgesEnum)[4*i+2]);
++		e2=reCast<int>(iomodel->Data(MeshEdgesEnum)[4*i+3]);
+ 		num_elems=2;
+ 		num_nodes=4;
+ 		numericalflux_type=InternalEnum;
+-		numericalflux_elem_ids[0]=(int)e1;
+-		numericalflux_elem_ids[1]=(int)e2;
++		numericalflux_elem_ids[0]=reCast<int>(e1);
++		numericalflux_elem_ids[1]=reCast<int>(e2);
+ 	}
+ 
+ 	/*1: Get vertices ids*/
+-	i1=(int)iomodel->Data(MeshEdgesEnum)[4*i+0];
+-	i2=(int)iomodel->Data(MeshEdgesEnum)[4*i+1];
++	i1=reCast<int>(iomodel->Data(MeshEdgesEnum)[4*i+0]);
++	i2=reCast<int>(iomodel->Data(MeshEdgesEnum)[4*i+1]);
+ 
+ 	if (numericalflux_type==InternalEnum){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12556)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12557)
+@@ -64,21 +64,21 @@
+ 		segment_width=6;
+ 	}
+ 	_assert_(iomodel->Data(DiagnosticIcefrontEnum));
+-	element=(int)(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+segment_width-2)-1); //element is in the penultimate column (node1 node2 ... elem fill)
++	element=reCast<int,IssmDouble>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+segment_width-2)-1); //element is in the penultimate column (node1 node2 ... elem fill)
+ 
+ 	/*Build ids for hook constructors: */
+-	icefront_eid=(int) *(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+segment_width-2); //matlab indexing
++	icefront_eid=reCast<int,IssmDouble>( *(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+segment_width-2)); //matlab indexing
+ 	icefront_mparid=numberofelements+1; //matlab indexing
+ 
+ 	if (in_icefront_type==MacAyeal2dIceFrontEnum || in_icefront_type==MacAyeal3dIceFrontEnum){
+-		icefront_node_ids[0]=iomodel->nodecounter+(int)*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+0);
+-		icefront_node_ids[1]=iomodel->nodecounter+(int)*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+1);
++		icefront_node_ids[0]=iomodel->nodecounter+reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+0));
++		icefront_node_ids[1]=iomodel->nodecounter+reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+1));
+ 	}
+ 	else if (in_icefront_type==PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum){
+-		icefront_node_ids[0]=iomodel->nodecounter+(int)*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+0);
+-		icefront_node_ids[1]=iomodel->nodecounter+(int)*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+1);
+-		icefront_node_ids[2]=iomodel->nodecounter+(int)*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+2);
+-		icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+3);
++		icefront_node_ids[0]=iomodel->nodecounter+reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+0));
++		icefront_node_ids[1]=iomodel->nodecounter+reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+1));
++		icefront_node_ids[2]=iomodel->nodecounter+reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+2));
++		icefront_node_ids[3]=iomodel->nodecounter+reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+3));
+ 	}
+ 	else _error2_("in_icefront_type " << EnumToStringx(in_icefront_type) << " not supported yet!");
+ 
+@@ -88,7 +88,7 @@
+ 	 num_nodes=2;
+ 
+ 	/*Fill*/
+-	icefront_fill=(int)iomodel->Data(DiagnosticIcefrontEnum)[segment_width*i+segment_width-1];
++	icefront_fill=reCast<int>(iomodel->Data(DiagnosticIcefrontEnum)[segment_width*i+segment_width-1]);
+ 	
+ 	/*Ok, we have everything to build the object: */
+ 	this->id=icefront_id;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12557-12558.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12557-12558.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12557-12558.diff	(revision 12679)
@@ -0,0 +1,32 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12557)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12558)
+@@ -57,7 +57,7 @@
+ 	this->matrix=new SeqMat(M,N,sparsity);
+ 	#endif
+ 	#ifdef _HAVE_ADOLC_
+-	this->amatrix=xNew<IssmDouble>;
++ 	this->amatrix=xNew<IssmDouble>(M*N);
+ 	#endif
+ }
+ /*}}}*/
+@@ -130,12 +130,12 @@
+ 	#ifdef _HAVE_ADOLC_
+ 	/*Not sure about that one. Should we use the overloaded operator >>?*/
+ 	_printString_("ADOLC Matrix equivalent:" );
+-	for(i=0;i<M;i++){
+-		for(j=0;j<N;j++){
+-			_printString_(*(amatrix+N*i+j) << " ");
+-		}
+-		_printLine_("");
+-	}
++//	for(i=0;i<M;i++){
++//		for(j=0;j<N;j++){
++//			_printString_(*(amatrix+N*i+j) << " ");
++//		}
++//		_printLine_("");
++//	}
+ 	#endif
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12558-12559.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12558-12559.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12558-12559.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12558)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12559)
+@@ -46,7 +46,7 @@
+ 
+ 	if(M){
+ 		values=xNew<int>(M);
+-		for(int i=0;i<in_M;i++) values[i]=(int)in_values[i];
++		for(int i=0;i<in_M;i++) values[i]=reCast<int>(in_values[i]);
+ 	}
+ 	else values=NULL;
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12559-12560.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12559-12560.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12559-12560.diff	(revision 12679)
@@ -0,0 +1,206 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h	(revision 12559)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h	(revision 12560)
+@@ -16,9 +16,9 @@
+ 
+ 	private: 
+ 		int    enum_type;
+-		IssmDouble values[3];
++		IssmPDouble values[3];
+ 		int    step;
+-		IssmDouble time;
++		IssmPDouble time;
+ 
+ 	public:
+ 
+@@ -37,7 +37,7 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+-		IssmDouble  GetTime(void){return time;};
++		IssmPDouble  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12559)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12560)
+@@ -29,9 +29,9 @@
+ 	int i;
+ 
+ 	enum_type=in_enum_type;
+-	for(i=0;i<6;i++)values[i]=in_values[i];
++	for(i=0;i<6;i++)values[i]=reCast<IssmPDouble>(in_values[i]);
+ 	step=in_step;
+-	time=in_time;
++	time=reCast<IssmPDouble>(in_time);
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1ElementResult::~PentaP1ElementResult(){{{*/
+@@ -94,7 +94,7 @@
+ 
+ 	/*output*/
+ 	TriaP1ElementResult* outresult=NULL;
+-	IssmDouble newvalues[3];
++	IssmPDouble newvalues[3];
+ 
+ 	/*Loop over the new indices*/
+ 	for(int i=0;i<3;i++){
+@@ -139,10 +139,10 @@
+ /*FUNCTION PentaP1ElementResult::GetVectorFromResults{{{*/
+ void PentaP1ElementResult::GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){
+ 
+-	IssmDouble data[6];
++	IssmPDouble data[6];
+ 
+ 	if(numdofs!=6)_error2_("Result " << EnumToStringx(this->enum_type) << " is a PentaP1ElementResult and cannot write vector of " << numdofs << " dofs");
+-	for(int i=0;i<6;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i];
++	for(int i=0;i<6;i++) data[i]=this->values[i]/(IssmPDouble)connectivitylist[i];
+ 	vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
+ 
+ } /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp	(revision 12559)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp	(revision 12560)
+@@ -27,9 +27,9 @@
+ DoubleElementResult::DoubleElementResult(int in_enum_type,IssmDouble in_value,int in_step, IssmDouble in_time){
+ 
+ 	enum_type=in_enum_type;
+-	value=in_value;
++	value=reCast<IssmPDouble>(in_value);
+ 	step=in_step;
+-	time=in_time;
++	time=reCast<IssmPDouble>(in_time);
+ }
+ /*}}}*/
+ /*FUNCTION DoubleElementResult::~DoubleElementResult(){{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h	(revision 12559)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h	(revision 12560)
+@@ -17,9 +17,9 @@
+ 
+ 	private: 
+ 		int    enum_type;
+-		IssmDouble values[6];
++		IssmPDouble values[6];
+ 		int    step;
+-		IssmDouble time;
++		IssmPDouble time;
+ 
+ 	public:
+ 
+@@ -38,7 +38,7 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+-		IssmDouble  GetTime(void){return time;};
++		IssmPDouble  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 12559)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 12560)
+@@ -1,6 +1,6 @@
+ /*! \file DoubleElementResult.h 
+- *  \brief: header file for IssmDouble result object
+- *  A IssmDouble result object is just derived from a DoubleInput object, with additional time and step information.
++ *  \brief: header file for IssmPDouble result object
++ *  A IssmPDouble result object is just derived from a DoubleInput object, with additional time and step information.
+  */
+ 
+ 
+@@ -18,9 +18,9 @@
+ 
+ 	private: 
+ 		int    enum_type;
+-		IssmDouble value;
++		IssmPDouble value;
+ 		int    step;
+-		IssmDouble time;
++		IssmPDouble time;
+ 
+ 	public:
+ 
+@@ -39,7 +39,7 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+-		IssmDouble  GetTime(void){return time;};
++		IssmPDouble  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 12559)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 12560)
+@@ -20,7 +20,7 @@
+ 		int    enum_type;
+ 		bool   value;
+ 		int    step;
+-		IssmDouble time;
++		IssmPDouble time;
+ 
+ 	public:
+ 
+@@ -39,7 +39,7 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+-		IssmDouble  GetTime(void){return time;};
++		IssmPDouble  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12559)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12560)
+@@ -27,11 +27,11 @@
+ TriaP1ElementResult::TriaP1ElementResult(int in_enum_type,IssmDouble* in_values,int in_step, IssmDouble in_time){
+ 
+ 	enum_type=in_enum_type;
+-	values[0]=in_values[0];
+-	values[1]=in_values[1];
+-	values[2]=in_values[2];
++	values[0]=reCast<IssmPDouble>(in_values[0]);
++	values[1]=reCast<IssmPDouble>(in_values[1]);
++	values[2]=reCast<IssmPDouble>(in_values[2]);
+ 	step=in_step;
+-	time=in_time;
++	time=reCast<IssmPDouble>(in_time);
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1ElementResult::~TriaP1ElementResult(){{{*/
+@@ -127,10 +127,10 @@
+ /*FUNCTION TriaP1ElementResult::GetVectorFromResults{{{*/
+ void TriaP1ElementResult::GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){
+ 
+-	IssmDouble data[3];
++	IssmPDouble data[3];
+ 
+ 	if(numdofs!=3)_error2_("Result " << EnumToStringx(this->enum_type) << " is a TriaP1ElementResult and cannot write vector of " << numdofs << " dofs");
+-	for(int i=0;i<3;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i];
++	for(int i=0;i<3;i++) data[i]=this->values[i]/(IssmPDouble)connectivitylist[i];
+ 	vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
+ 
+ } /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/ElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 12559)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 12560)
+@@ -18,7 +18,7 @@
+ 		virtual        ~ElementResult(){};
+ 		
+ 		virtual         ElementResult* SpawnTriaElementResult(int* indices)=0;
+-		virtual IssmDouble  GetTime(void)=0;
++		virtual IssmPDouble  GetTime(void)=0;
+ 		virtual int     GetStep(void)=0;
+ 		virtual void    ProcessUnits(Parameters* parameters)=0;
+ 		virtual int     NumberOfNodalValues(void)=0;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12560-12561.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12560-12561.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12560-12561.diff	(revision 12679)
@@ -0,0 +1,206 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h	(revision 12560)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h	(revision 12561)
+@@ -16,9 +16,9 @@
+ 
+ 	private: 
+ 		int    enum_type;
+-		IssmPDouble values[3];
++		IssmDouble values[3];
+ 		int    step;
+-		IssmPDouble time;
++		IssmDouble time;
+ 
+ 	public:
+ 
+@@ -37,7 +37,7 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+-		IssmPDouble  GetTime(void){return time;};
++		IssmDouble  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12560)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12561)
+@@ -29,9 +29,9 @@
+ 	int i;
+ 
+ 	enum_type=in_enum_type;
+-	for(i=0;i<6;i++)values[i]=reCast<IssmPDouble>(in_values[i]);
++	for(i=0;i<6;i++)values[i]=in_values[i];
+ 	step=in_step;
+-	time=reCast<IssmPDouble>(in_time);
++	time=in_time;
+ }
+ /*}}}*/
+ /*FUNCTION PentaP1ElementResult::~PentaP1ElementResult(){{{*/
+@@ -94,7 +94,7 @@
+ 
+ 	/*output*/
+ 	TriaP1ElementResult* outresult=NULL;
+-	IssmPDouble newvalues[3];
++	IssmDouble newvalues[3];
+ 
+ 	/*Loop over the new indices*/
+ 	for(int i=0;i<3;i++){
+@@ -139,10 +139,10 @@
+ /*FUNCTION PentaP1ElementResult::GetVectorFromResults{{{*/
+ void PentaP1ElementResult::GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){
+ 
+-	IssmPDouble data[6];
++	IssmDouble data[6];
+ 
+ 	if(numdofs!=6)_error2_("Result " << EnumToStringx(this->enum_type) << " is a PentaP1ElementResult and cannot write vector of " << numdofs << " dofs");
+-	for(int i=0;i<6;i++) data[i]=this->values[i]/(IssmPDouble)connectivitylist[i];
++	for(int i=0;i<6;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i];
+ 	vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
+ 
+ } /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp	(revision 12560)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp	(revision 12561)
+@@ -27,9 +27,9 @@
+ DoubleElementResult::DoubleElementResult(int in_enum_type,IssmDouble in_value,int in_step, IssmDouble in_time){
+ 
+ 	enum_type=in_enum_type;
+-	value=reCast<IssmPDouble>(in_value);
++	value=in_value;
+ 	step=in_step;
+-	time=reCast<IssmPDouble>(in_time);
++	time=in_time;
+ }
+ /*}}}*/
+ /*FUNCTION DoubleElementResult::~DoubleElementResult(){{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h	(revision 12560)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h	(revision 12561)
+@@ -17,9 +17,9 @@
+ 
+ 	private: 
+ 		int    enum_type;
+-		IssmPDouble values[6];
++		IssmDouble values[6];
+ 		int    step;
+-		IssmPDouble time;
++		IssmDouble time;
+ 
+ 	public:
+ 
+@@ -38,7 +38,7 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+-		IssmPDouble  GetTime(void){return time;};
++		IssmDouble  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 12560)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 12561)
+@@ -1,6 +1,6 @@
+ /*! \file DoubleElementResult.h 
+- *  \brief: header file for IssmPDouble result object
+- *  A IssmPDouble result object is just derived from a DoubleInput object, with additional time and step information.
++ *  \brief: header file for IssmDouble result object
++ *  A IssmDouble result object is just derived from a DoubleInput object, with additional time and step information.
+  */
+ 
+ 
+@@ -18,9 +18,9 @@
+ 
+ 	private: 
+ 		int    enum_type;
+-		IssmPDouble value;
++		IssmDouble value;
+ 		int    step;
+-		IssmPDouble time;
++		IssmDouble time;
+ 
+ 	public:
+ 
+@@ -39,7 +39,7 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+-		IssmPDouble  GetTime(void){return time;};
++		IssmDouble  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 12560)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 12561)
+@@ -20,7 +20,7 @@
+ 		int    enum_type;
+ 		bool   value;
+ 		int    step;
+-		IssmPDouble time;
++		IssmDouble time;
+ 
+ 	public:
+ 
+@@ -39,7 +39,7 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
+-		IssmPDouble  GetTime(void){return time;};
++		IssmDouble  GetTime(void){return time;};
+ 		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12560)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12561)
+@@ -27,11 +27,11 @@
+ TriaP1ElementResult::TriaP1ElementResult(int in_enum_type,IssmDouble* in_values,int in_step, IssmDouble in_time){
+ 
+ 	enum_type=in_enum_type;
+-	values[0]=reCast<IssmPDouble>(in_values[0]);
+-	values[1]=reCast<IssmPDouble>(in_values[1]);
+-	values[2]=reCast<IssmPDouble>(in_values[2]);
++	values[0]=in_values[0];
++	values[1]=in_values[1];
++	values[2]=in_values[2];
+ 	step=in_step;
+-	time=reCast<IssmPDouble>(in_time);
++	time=in_time;
+ }
+ /*}}}*/
+ /*FUNCTION TriaP1ElementResult::~TriaP1ElementResult(){{{*/
+@@ -127,10 +127,10 @@
+ /*FUNCTION TriaP1ElementResult::GetVectorFromResults{{{*/
+ void TriaP1ElementResult::GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){
+ 
+-	IssmPDouble data[3];
++	IssmDouble data[3];
+ 
+ 	if(numdofs!=3)_error2_("Result " << EnumToStringx(this->enum_type) << " is a TriaP1ElementResult and cannot write vector of " << numdofs << " dofs");
+-	for(int i=0;i<3;i++) data[i]=this->values[i]/(IssmPDouble)connectivitylist[i];
++	for(int i=0;i<3;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i];
+ 	vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
+ 
+ } /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/ElementResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 12560)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 12561)
+@@ -18,7 +18,7 @@
+ 		virtual        ~ElementResult(){};
+ 		
+ 		virtual         ElementResult* SpawnTriaElementResult(int* indices)=0;
+-		virtual IssmPDouble  GetTime(void)=0;
++		virtual IssmDouble  GetTime(void)=0;
+ 		virtual int     GetStep(void)=0;
+ 		virtual void    ProcessUnits(Parameters* parameters)=0;
+ 		virtual int     NumberOfNodalValues(void)=0;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12561-12562.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12561-12562.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12561-12562.diff	(revision 12679)
@@ -0,0 +1,505 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12562)
+@@ -25,8 +25,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatExternalResult::DoubleMatExternalResult(int in_id, int enum_type,IssmDoubleMat values,int M,int N,int in_step,IssmPDouble in_time){{{*/
+-DoubleMatExternalResult::DoubleMatExternalResult(int in_id, int in_enum_type,IssmPDouble* in_values, int in_M,int in_N,int in_step,IssmPDouble in_time){
++/*FUNCTION DoubleMatExternalResult::DoubleMatExternalResult(int in_id, int enum_type,IssmDoubleMat values,int M,int N,int in_step,IssmDouble in_time){{{*/
++DoubleMatExternalResult::DoubleMatExternalResult(int in_id, int in_enum_type,IssmDouble* in_values, int in_M,int in_N,int in_step,IssmDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+@@ -35,8 +35,8 @@
+ 
+ 	/*Copy result in values*/
+ 	if(M*N){
+-		values=xNew<IssmPDouble>(M*N);
+-		xMemCpy<IssmPDouble>(values,in_values,M*N);
++		values=xNew<IssmDouble>(M*N);
++		xMemCpy<IssmDouble>(values,in_values,M*N);
+ 	}
+ 	else values=NULL;
+ 
+@@ -47,7 +47,7 @@
+ /*FUNCTION DoubleMatExternalResult::~DoubleMatExternalResult(){{{*/
+ DoubleMatExternalResult::~DoubleMatExternalResult(){
+ 
+-	xDelete<IssmPDouble>(this->values);
++	xDelete<IssmDouble>(this->values);
+ 	return;
+ }
+ /*}}}*/
+@@ -118,12 +118,16 @@
+ 	int     rows,cols;
+ 	char   *name    = NULL;
+ 	extern  int my_rank;
++	IssmPDouble *passiveDouble_p=NULL;
++	IssmPDouble passiveDouble;
+ 
+ 	if(io_gather){
+ 		/*we are gathering the data on cpu 0, don't write on other cpus: */
+ 		if(my_rank) return;
+ 	}
+ 
++	passiveDouble_p=xNew<IssmPDouble>(M*N);
++
+ 	/*First write enum: */
+ 	EnumToStringx(&name,this->enum_type);
+ 	length=(strlen(name)+1)*sizeof(char);
+@@ -132,17 +136,20 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(IssmPDouble),1,fid);
++	passiveDouble=reCast<IssmPDouble>(time);
++	fwrite(&passiveDouble,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+-	/*writing a IssmPDouble array, type is 3:*/
++	/*writing a IssmDouble array, type is 3:*/
+ 	type=3;
+ 	fwrite(&type,sizeof(int),1,fid);
+ 	rows=this->M;
+ 	fwrite(&rows,sizeof(int),1,fid);
+ 	cols=this->N;
+ 	fwrite(&cols,sizeof(int),1,fid);
+-	fwrite(this->values,cols*rows*sizeof(IssmPDouble),1,fid);
++	for (int i=0; i<N*M; ++i) passiveDouble_p[i]=reCast<IssmPDouble>(values[i]);
++	fwrite(passiveDouble_p,cols*rows*sizeof(IssmPDouble),1,fid);
++	xDelete(passiveDouble_p);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12562)
+@@ -26,7 +26,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION PetscVecExternalResult::PetscVecExternalResult(int enum_type,IssmPetscVec value){{{*/
+-PetscVecExternalResult::PetscVecExternalResult(int in_id, int in_enum_type,Vector* in_value,int in_step, IssmPDouble in_time){
++PetscVecExternalResult::PetscVecExternalResult(int in_id, int in_enum_type,Vector* in_value,int in_step, IssmDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+@@ -104,6 +104,7 @@
+ 	char   *name      = NULL;
+ 	IssmPDouble *serialvec = NULL;
+ 	extern int my_rank;
++	IssmPDouble passiveDouble;
+ 
+ 	/*serialize: */
+ 	VecGetSize(this->value,&size);
+@@ -120,10 +121,11 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(IssmPDouble),1,fid);
++        passiveDouble=reCast<IssmPDouble>(time);
++	fwrite(&passiveDouble,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+-	/*writing a IssmPDouble, type is 1, size is 1: */
++	/*writing a IssmDouble, type is 1, size is 1: */
+ 	type=1;
+ 	
+ 	fwrite(&type,sizeof(int),1,fid);
+@@ -131,7 +133,7 @@
+ 	fwrite(serialvec,size*sizeof(IssmPDouble),1,fid);
+ 
+ 	/*Free ressources:*/
+-	xDelete<char>(serialvec);
++	xDelete<IssmPDouble>(serialvec);
+ }
+ /*}}}*/
+ /*FUNCTION PetscVecExternalResult::GetResultName{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h	(revision 12562)
+@@ -26,15 +26,15 @@
+ 	private: 
+ 		int id;
+ 		int enum_type;
+-		IssmPDouble* values;
++		IssmDouble* values;
+ 		int M;
+ 		int step;
+-		IssmPDouble time;
++		IssmDouble time;
+ 
+ 	public:
+ 		/*DoubleVecExternalResult constructors, destructors: {{{*/
+ 		DoubleVecExternalResult();
+-		DoubleVecExternalResult(int id,int enum_type,IssmPDouble* values,int M,int step, IssmPDouble time);
++		DoubleVecExternalResult(int id,int enum_type,IssmDouble* values,int M,int step, IssmDouble time);
+ 		~DoubleVecExternalResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h	(revision 12562)
+@@ -28,14 +28,14 @@
+ 	public:
+ 		int    id;
+ 		int    enum_type;
+-		IssmPDouble value;
++		IssmDouble value;
+ 		int    step;
+-		IssmPDouble time;
++		IssmDouble time;
+ 
+ 
+ 		/*DoubleExternalResult constructors, destructors: {{{*/
+ 		DoubleExternalResult();
+-		DoubleExternalResult(int id,int enum_type,IssmPDouble value,int step,IssmPDouble time);
++		DoubleExternalResult(int id,int enum_type,IssmDouble value,int step,IssmDouble time);
+ 		~DoubleExternalResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h	(revision 12562)
+@@ -27,12 +27,12 @@
+ 		int    enum_type;
+ 		int    value;
+ 		int    step;
+-		IssmPDouble time;
++		IssmDouble time;
+ 
+ 
+ 		/*IntExternalResult constructors, destructors: {{{*/
+ 		IntExternalResult();
+-		IntExternalResult(int id,int enum_type,int value,int step,IssmPDouble time);
++		IntExternalResult(int id,int enum_type,int value,int step,IssmDouble time);
+ 		~IntExternalResult();
+ 
+ 		/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h	(revision 12562)
+@@ -29,11 +29,11 @@
+ 		int    enum_type;
+ 		bool   value;
+ 		int    step;
+-		IssmPDouble time;
++		IssmDouble time;
+ 
+ 		/*BoolExternalResult constructors, destructors: {{{*/
+ 		BoolExternalResult();
+-		BoolExternalResult(int id, int enum_type,bool value,int step,IssmPDouble time);
++		BoolExternalResult(int id, int enum_type,bool value,int step,IssmDouble time);
+ 		~BoolExternalResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h	(revision 12562)
+@@ -26,16 +26,16 @@
+ 	private: 
+ 		int id;
+ 		int enum_type;
+-		IssmPDouble* values;
++		IssmDouble* values;
+ 		int M;
+ 		int N;
+ 		int step;
+-		IssmPDouble time;
++		IssmDouble time;
+ 
+ 	public:
+ 		/*DoubleMatExternalResult constructors, destructors: {{{*/
+ 		DoubleMatExternalResult();
+-		DoubleMatExternalResult(int id,int enum_type,IssmPDouble* values,int M,int N,int step, IssmPDouble time);
++		DoubleMatExternalResult(int id,int enum_type,IssmDouble* values,int M,int N,int step, IssmDouble time);
+ 		~DoubleMatExternalResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h	(revision 12562)
+@@ -29,12 +29,12 @@
+ 		int enum_type;
+ 		Vector* value;
+ 		int step;
+-		IssmPDouble time;
++		IssmDouble time;
+ 
+ 	public:
+ 		/*PetscVecExternalResult constructors, destructors: {{{*/
+ 		PetscVecExternalResult();
+-		PetscVecExternalResult(int id,int enum_type,Vector* value, int step, IssmPDouble time);
++		PetscVecExternalResult(int id,int enum_type,Vector* value, int step, IssmDouble time);
+ 		~PetscVecExternalResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12562)
+@@ -26,7 +26,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION StringExternalResult::StringExternalResult(int enum_type,IssmString value){{{*/
+-StringExternalResult::StringExternalResult(int in_id, int in_enum_type,char* in_value,int in_step, IssmPDouble in_time){
++StringExternalResult::StringExternalResult(int in_id, int in_enum_type,char* in_value,int in_step, IssmDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+@@ -92,6 +92,7 @@
+ 	int     type;
+ 	char   *name      = NULL;
+ 	extern  int my_rank;
++        IssmPDouble passiveDouble;
+ 
+ 	/*return if now on cpu 0: */
+ 	if(my_rank)return;
+@@ -104,7 +105,8 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(IssmPDouble),1,fid);
++        passiveDouble=reCast<IssmPDouble>(time);
++	fwrite(&passiveDouble,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+ 	/*writing a string, type is 2: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12562)
+@@ -25,16 +25,16 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecExternalResult::DoubleVecExternalResult(int enum_type,IssmDoubleVec values,int M,int in_step,IssmPDouble in_time){{{*/
+-DoubleVecExternalResult::DoubleVecExternalResult(int in_id, int in_enum_type,IssmPDouble* in_values, int in_M,int in_step,IssmPDouble in_time){
++/*FUNCTION DoubleVecExternalResult::DoubleVecExternalResult(int enum_type,IssmDoubleVec values,int M,int in_step,IssmDouble in_time){{{*/
++DoubleVecExternalResult::DoubleVecExternalResult(int in_id, int in_enum_type,IssmDouble* in_values, int in_M,int in_step,IssmDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+ 	M=in_M;
+ 
+ 	if(M){
+-		values=xNew<IssmPDouble>(M);
+-		xMemCpy<IssmPDouble>(values,in_values,M);
++		values=xNew<IssmDouble>(M);
++		xMemCpy<IssmDouble>(values,in_values,M);
+ 	}
+ 	else values=NULL;
+ 
+@@ -44,7 +44,7 @@
+ /*}}}*/
+ /*FUNCTION DoubleVecExternalResult::~DoubleVecExternalResult(){{{*/
+ DoubleVecExternalResult::~DoubleVecExternalResult(){
+-	xDelete<IssmPDouble>(values);
++	xDelete<IssmDouble>(values);
+ 	return;
+ }
+ /*}}}*/
+@@ -110,10 +110,13 @@
+ 	int     size;
+ 	char   *name    = NULL;
+ 	extern  int my_rank;
++	IssmPDouble *passiveDouble_p=NULL;
++	IssmPDouble passiveDouble;
+ 
+ 	/*return if now on cpu 0: */
+ 	if(my_rank)return;
+ 
++	passiveDouble_p=xNew<IssmPDouble>(M);
+ 	/*First write enum: */
+ 	EnumToStringx(&name,this->enum_type);
+ 	length=(strlen(name)+1)*sizeof(char);
+@@ -122,16 +125,18 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(IssmPDouble),1,fid);
++        passiveDouble=reCast<IssmPDouble>(time);
++	fwrite(&passiveDouble,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+-	/*writing a IssmPDouble, type is 1, size is 1: */
++	/*writing a IssmDouble, type is 1, size is 1: */
+ 	type=1;
+ 	size=this->M;
+ 	fwrite(&type,sizeof(int),1,fid);
+ 	fwrite(&size,sizeof(int),1,fid);
+-	fwrite(this->values,size*sizeof(IssmPDouble),1,fid);
+-
++        for (int i=0; i<M; ++i) passiveDouble_p[i]=reCast<IssmPDouble>(values[i]);
++	fwrite(passiveDouble_p,size*sizeof(IssmPDouble),1,fid);
++        xDelete(passiveDouble_p);
+ }
+ /*}}}*/
+ /*FUNCTION DoubleVecExternalResult::GetResultName{{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12562)
+@@ -25,8 +25,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION DoubleExternalResult::DoubleExternalResult(int enum_type,IssmPDouble value){{{*/
+-DoubleExternalResult::DoubleExternalResult(int in_id, int in_enum_type,IssmPDouble in_value,int in_step, IssmPDouble in_time){
++/*FUNCTION DoubleExternalResult::DoubleExternalResult(int enum_type,IssmDouble value){{{*/
++DoubleExternalResult::DoubleExternalResult(int in_id, int in_enum_type,IssmDouble in_value,int in_step, IssmDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+@@ -91,6 +91,7 @@
+ 	int     size;
+ 	char   *name    = NULL;
+ 	extern  int my_rank;
++	IssmPDouble passiveDouble;
+ 
+ 	/*return if now on cpu 0: */
+ 	if(my_rank)return;
+@@ -103,15 +104,17 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(IssmPDouble),1,fid);
++	passiveDouble=reCast<IssmPDouble>(time);
++	fwrite(&passiveDouble,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+-	/*writing a IssmPDouble, type is 1, size is 1: */
++	/*writing a IssmDouble, type is 1, size is 1: */
+ 	type=1;
+ 	size=1;
+ 	fwrite(&type,sizeof(int),1,fid);
+ 	fwrite(&size,sizeof(int),1,fid);
+-	fwrite(&this->value,size*sizeof(IssmPDouble),1,fid);
++        passiveDouble=reCast<IssmPDouble>(this->value);
++	fwrite(&passiveDouble,size*sizeof(IssmPDouble),1,fid);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12562)
+@@ -25,8 +25,8 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION IntExternalResult::IntExternalResult(int in_id, int in_enum_type,int in_value,int in_step, IssmPDouble in_time){{{*/
+-IntExternalResult::IntExternalResult(int in_id, int in_enum_type,int in_value,int in_step, IssmPDouble in_time){
++/*FUNCTION IntExternalResult::IntExternalResult(int in_id, int in_enum_type,int in_value,int in_step, IssmDouble in_time){{{*/
++IntExternalResult::IntExternalResult(int in_id, int in_enum_type,int in_value,int in_step, IssmDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+@@ -90,7 +90,7 @@
+ 	int     type;
+ 	int     size;
+ 	char   *name    = NULL;
+-	IssmPDouble  integer;
++	IssmPDouble  passiveDouble;
+ 	extern  int my_rank;
+ 
+ 	/*return if now on cpu 0: */
+@@ -104,18 +104,18 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(IssmPDouble),1,fid);
++        passiveDouble=reCast<IssmPDouble>(time);
++	fwrite(&passiveDouble,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+-	/*cast to a IssmPDouble: */
+-	integer=(IssmPDouble)this->value;
+-
+ 	/*writing a IssmPDouble, type is 1, size is 1: */
+ 	type=1;
+ 	size=1;
+ 	fwrite(&type,sizeof(int),1,fid);
+ 	fwrite(&size,sizeof(int),1,fid);
+-	fwrite(&integer,size*sizeof(IssmPDouble),1,fid);
++        /*cast to a IssmPDouble: */
++        passiveDouble=reCast<IssmPDouble>(value);
++	fwrite(&passiveDouble,size*sizeof(IssmPDouble),1,fid);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12562)
+@@ -26,7 +26,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION BoolExternalResult::BoolExternalResult(int enum_type,bool value){{{*/
+-BoolExternalResult::BoolExternalResult(int in_id, int in_enum_type,bool in_value,int in_step, IssmPDouble in_time){
++BoolExternalResult::BoolExternalResult(int in_id, int in_enum_type,bool in_value,int in_step, IssmDouble in_time){
+ 
+ 	id=in_id;
+ 	enum_type=in_enum_type;
+@@ -89,7 +89,7 @@
+ 	int     length;
+ 	int     type;
+ 	int     size;
+-	IssmPDouble  boolean;
++	IssmPDouble  passiveDouble;
+ 	extern  int my_rank;
+ 	char*   name = NULL;
+ 
+@@ -104,18 +104,18 @@
+ 	xDelete<char>(name);
+ 
+ 	/*Now write time and step: */
+-	fwrite(&time,sizeof(IssmPDouble),1,fid);
++	passiveDouble=reCast<IssmPDouble>(time);
++	fwrite(&passiveDouble,sizeof(IssmPDouble),1,fid);
+ 	fwrite(&step,sizeof(int),1,fid);
+ 
+-	/*Now write bool, after casting it: */
+-	boolean=(IssmPDouble)this->value;
+-
+-	/*writing a IssmPDouble, type is 1, size is 1: */
++	/*writing a IssmDouble, type is 1, size is 1: */
+ 	type=1;
+ 	size=1;
+ 	fwrite(&type,sizeof(int),1,fid);
+ 	fwrite(&size,sizeof(int),1,fid);
+-	fwrite(&boolean,size*sizeof(IssmPDouble),1,fid);
++        /*Now write bool, after casting it: */
++        passiveDouble=reCast<IssmPDouble>(this->value);
++        fwrite(&passiveDouble,size*sizeof(IssmPDouble),1,fid);
+ 
+ }
+ /*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h	(revision 12561)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h	(revision 12562)
+@@ -29,12 +29,12 @@
+ 		int    enum_type;
+ 		char*  value;
+ 		int    step;
+-		IssmPDouble time;
++		IssmDouble time;
+ 
+ 	public:
+ 		/*StringExternalResult constructors, destructors: {{{*/
+ 		StringExternalResult();
+-		StringExternalResult(int id,int enum_type,char* value,int step, IssmPDouble time);
++		StringExternalResult(int id,int enum_type,char* value,int step, IssmDouble time);
+ 		~StringExternalResult();
+ 		/*}}}*/
+ 		/*Object virtual functions definitions:{{{ */
Index: /issm/oecreview/Archive/12321-12677/ISSM-12564-12565.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12564-12565.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12564-12565.diff	(revision 12679)
@@ -0,0 +1,69 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp	(revision 12564)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp	(revision 12565)
+@@ -49,7 +49,7 @@
+ 		nu=sqrt(nu);
+ 
+ 		/*now, compute eps: */
+-		if(nu)eps=ndu/nu;
++		if(reCast<bool>(nu))eps=ndu/nu;
+ 		else eps=0;
+ 	}
+ 	else _error2_("convergence criterion " << EnumToStringx(criterion_enum) << " not supported yet!");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 12564)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 12565)
+@@ -82,8 +82,8 @@
+ 	if(numrifts){
+ 		iomodel->FetchData(&riftinfo,&numrifts,NULL,RiftsRiftstructEnum);
+ 		for(i=0;i<numrifts;i++){
+-			el1=(int)*(riftinfo+RIFTINFOSIZE*i+2)-1; //matlab indexing to c indexing
+-			el2=(int)*(riftinfo+RIFTINFOSIZE*i+3)-1; //matlab indexing to c indexing
++			el1=reCast<int>(*(riftinfo+RIFTINFOSIZE*i+2))-1; //matlab indexing to c indexing
++			el2=reCast<int>(*(riftinfo+RIFTINFOSIZE*i+3))-1; //matlab indexing to c indexing
+ 			epart[el2]=epart[el1]; //ensures that this pair of elements will be in the same partition, as well as the corresponding vertices;
+ 		}
+ 		xDelete<IssmDouble>(riftinfo); 
+@@ -106,14 +106,14 @@
+ 			 *the  element index to do this. For each element n, we know index[n][0:2] holds the indices (matlab indexing) 
+ 			 into the vertices coordinates. If we start plugging 1 into my_vertices for each index[n][i] (i=0:2), then my_vertices 
+ 			 will hold which vertices belong to this partition*/
+-			my_vertices[(int)*(elements+elements_width*i+0)-1]=1;
+-			my_vertices[(int)*(elements+elements_width*i+1)-1]=1;
+-			my_vertices[(int)*(elements+elements_width*i+2)-1]=1;
++			my_vertices[reCast<int>(*(elements+elements_width*i+0))-1]=1;
++			my_vertices[reCast<int>(*(elements+elements_width*i+1))-1]=1;
++			my_vertices[reCast<int>(*(elements+elements_width*i+2))-1]=1;
+ 			
+ 			if(elements_width==6){
+-				my_vertices[(int)*(elements+elements_width*i+3)-1]=1;
+-				my_vertices[(int)*(elements+elements_width*i+4)-1]=1;
+-				my_vertices[(int)*(elements+elements_width*i+5)-1]=1;
++				my_vertices[reCast<int>(*(elements+elements_width*i+3))-1]=1;
++				my_vertices[reCast<int>(*(elements+elements_width*i+4))-1]=1;
++				my_vertices[reCast<int>(*(elements+elements_width*i+5))-1]=1;
+ 			}
+ 		}
+ 	}//for (i=0;i<numberofelements;i++)
+@@ -125,15 +125,15 @@
+ 	 * The 2 vertices must be in the same cpu as the penpair*/
+ 	iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,DiagnosticVertexPairingEnum);
+ 	for(i=0;i<numvertex_pairing;i++){
+-		if(my_vertices[(int)vertex_pairing[2*i+0]-1] && !my_vertices[(int)vertex_pairing[2*i+1]-1]){
+-			my_vertices[(int)vertex_pairing[2*i+1]-1]=2; //to know that these elements are not on the partition
++		if(my_vertices[reCast<int>(vertex_pairing[2*i+0])-1] && !my_vertices[reCast<int>(vertex_pairing[2*i+1])-1]){
++			my_vertices[reCast<int>(vertex_pairing[2*i+1])-1]=2; //to know that these elements are not on the partition
+ 		}
+ 	}
+ 	xDelete<IssmDouble>(vertex_pairing);
+ 	iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,PrognosticVertexPairingEnum);
+ 	for(i=0;i<numvertex_pairing;i++){
+-		if(my_vertices[(int)vertex_pairing[2*i+0]-1] && !my_vertices[(int)vertex_pairing[2*i+1]-1]){
+-			my_vertices[(int)vertex_pairing[2*i+1]-1]=2; //to know that these elements are not on the partition
++		if(my_vertices[reCast<int>(vertex_pairing[2*i+0])-1] && !my_vertices[reCast<int>(vertex_pairing[2*i+1])-1]){
++			my_vertices[reCast<int>(vertex_pairing[2*i+1])-1]=2; //to know that these elements are not on the partition
+ 		}
+ 	}
+ 	xDelete<IssmDouble>(vertex_pairing);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12565-12566.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12565-12566.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12565-12566.diff	(revision 12679)
@@ -0,0 +1,30 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment.csh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment.csh	(revision 12565)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment.csh	(revision 12566)
+@@ -127,6 +127,11 @@
+ setenv VALGRIND_DIR {$VALGRIND_DIR}
+ setenv PATH {$PATH}:{$VALGRIND_DIR}
+ 
++#MERCURIAL
++#setenv PYTHONPATH {$PYTHONPATH}:{$MERCURIAL_DIR}/mercurial/pure/
++setenv PYTHONPATH {$MERCURIAL_DIR}/mercurial/pure/
++setenv PATH {$PATH}:{$MERCURIAL_DIR}
++
+ #GSL
+ setenv GSL_DIR {$GSL_DIR}
+ setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:{$GSL_DIR}/lib
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment_variables.csh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment_variables.csh	(revision 12565)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment_variables.csh	(revision 12566)
+@@ -80,6 +80,9 @@
+ #ssh
+ set SSH_DIR={$ISSM_DIR}/externalpackages/ssh
+ 
++#mercurial
++set MERCURIAL_DIR={$ISSM_DIR}/externalpackages/mercurial/install
++
+ #valgrind
+ set VALGRIND_DIR={$ISSM_DIR}/externalpackages/valgrind/install/bin
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12566-12567.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12566-12567.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12566-12567.diff	(revision 12679)
@@ -0,0 +1,129 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/petsc/install-dev-pleiades.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/petsc/install-dev-pleiades.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/petsc/install-dev-pleiades.sh	(revision 12567)
+@@ -0,0 +1,118 @@
++#!/bin/bash
++#Step 0: download
++#Step 1: unzip and install
++#Step 2: After Plapack implodes
++STEP=0
++
++if [ $STEP -eq 0 ]; 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
++fi
++
++# To update (via Mercurial):
++#      cd petsc-dev
++#      hg pull -u
++#      cd config/BuildSystem
++#      hg pull -u
++
++
++# configure script
++# Note: using metis from externalpackages did not work...
++# for now downloading new metis
++#   -then rename metis in externalpackages to metis2
++if [ $STEP -eq 1 ]; then
++	#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" \
++		--with-batch=1  \
++		--PETSC_ARCH="$ISSM_ARCH" \
++		--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
++		--with-debugging=0 \
++		--with-shared-libraries=0 \
++		--with-blas-lapack-dir=/nasa/intel/mkl/10.0.011/ \
++		--known-mpi-shared-libraries=1 \
++		--with-mpi-lib=/nasa/sgi/mpt/1.25/lib/libmpi.so \
++		--with-mpi-include=/nasa/sgi/mpt/1.25/include  \
++		--download-mumps=yes \
++		--download-plapack=yes \
++		--download-scalapack=yes \
++		--download-blacs=yes  \
++		--download-blas=yes \
++		--download-f-blas-lapack=yes \
++		--download-parmetis=yes \
++		--download-metis=yes \
++		--download-spai=yes \
++		--FFLAGS=-I/usr/include \
++		--with-cc=icc \
++		--with-fc=ifort \
++		--COPTFLAGS=" -O3 -xS" \
++		--FOPTFLAGS=" -O3 -xS" \
++		--CXXOPTFLAGS=" -O3 -xS" \
++		--with-pic=1
++	echo "== Fix Plapack compilation manually (http://issm.jpl.nasa.gov/documentation/faq/petsc32/) =="
++	echo "== Then run STEP=2 =="
++fi
++if [ $STEP -eq 2 ]; then
++	cd src
++	./config/configure.py \
++	 --prefix="$ISSM_DIR/externalpackages/petsc/install" \
++	 --with-batch=1  \
++	 --PETSC_ARCH="$ISSM_ARCH" \
++	 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
++	 --with-debugging=0 \
++	 --with-shared-libraries=0 \
++	 --with-blas-lapack-dir=/nasa/intel/mkl/10.0.011/ \
++	 --with-mpi-lib=/nasa/sgi/mpt/1.25/lib/libmpi.so \
++	 --with-mpi-include=/nasa/sgi/mpt/1.25/include  \
++	 --known-mpi-shared-libraries=1 \
++	 --download-mumps=yes \
++	 --download-scalapack=yes \
++	 --download-blacs=yes  \
++	 --download-blas=yes \
++	 --download-f-blas-lapack=yes \
++	 --download-parmetis=yes \
++	 --download-metis=yes \
++	 --download-spai=yes \
++	 --with-plapack-dir=$ISSM_DIR/externalpackages/petsc/src/$ISSM_ARCH \
++	 --download-parmetis=yes \
++	 --FFLAGS=-I/usr/include \
++	 --with-cc=icc \
++	 --with-fc=ifort \
++	 --COPTFLAGS=" -O3 -xS" \
++	 --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
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/petsc/install-dev-pleiades.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12567-12568.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12567-12568.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12567-12568.diff	(revision 12679)
@@ -0,0 +1,133 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12567)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12568)
+@@ -852,6 +852,7 @@
+ 		if test "$PETSC_MAJOR" = "2" ; then
+ 		MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps  -lpord "
+ 		else
++		dnl MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps  -lmumps_common -lpord -lparmetis -lzmumps"
+ 		MUMPSLIB=-L"$MUMPS_ROOT/lib -ldmumps -lcmumps  -lmumps_common -lpord -lparmetis"
+ 		fi
+ 
+@@ -895,7 +896,7 @@
+ 		dnl defaults
+ 		HAVE_HYPRE=yes
+ 		HYPREINCL=""
+-		HYPRELIB=-L"$HYPRE_ROOT/ -lHYPRE"
++		HYPRELIB=-L"$HYPRE_ROOT/lib -lHYPRE"
+         
+ 		AC_DEFINE([_HAVE_HYPRE_],[1],[with Blacs in ISSM src])
+ 		AC_SUBST([HYPREINCL])
+@@ -905,6 +906,111 @@
+ 	fi
+ 	AC_MSG_RESULT($HAVE_HYPRE)
+ 	dnl }}}
++	dnl prometheus{{{
++		AC_ARG_WITH([prometheus-dir],
++					AS_HELP_STRING([--with-prometheus-dir=DIR],[prometheus root directory]),
++					[PROMETHEUS_ROOT=$withval],[PROMETHEUS_ROOT=""])
++
++		  AC_MSG_CHECKING(for prometheus headers and libraries in $PROMETHEUS_ROOT)
++		  if test -d "$PROMETHEUS_ROOT"; then
++
++			dnl defaults
++			  HAVE_PROMETHEUS=yes
++			  PROMETHEUSINCL=-I"$PROMETHEUS_ROOT/include"
++			  PROMETHEUSLIB=-L"$PROMETHEUS_ROOT/lib -lpromfei -lprometheus -lparmetis"
++
++			  AC_DEFINE([_HAVE_PROMETHEUS_],[1],[with Prometheus in ISSM src])
++			  AC_SUBST([PROMETHEUSINCL])
++			  AC_SUBST([PROMETHEUSLIB])
++		  else
++			HAVE_PROMETHEUS=no
++			  fi
++			  AC_MSG_RESULT($HAVE_PROMETHEUS)
++			  dnl }}}
++dnl spai{{{
++	AC_ARG_WITH([spai-dir],
++				AS_HELP_STRING([--with-spai-dir=DIR],[spai root directory]),
++				[SPAI_ROOT=$withval],[SPAI_ROOT=""])
++
++	  AC_MSG_CHECKING(for spai headers and libraries in $SPAI_ROOT)
++	  if test -d "$SPAI_ROOT"; then
++
++		dnl defaults
++		  HAVE_SPAI=yes
++		  SPAIINCL=-I"$SPAI_ROOT/include"
++		  SPAILIB=-L"$SPAI_ROOT/lib -lspai"
++
++		  AC_DEFINE([_HAVE_SPAI_],[1],[with Spai in ISSM src])
++		  AC_SUBST([SPAIINCL])
++		  AC_SUBST([SPAILIB])
++	  else
++		HAVE_SPAI=no
++		  fi
++		  AC_MSG_RESULT($HAVE_SPAI)
++		  dnl }}}
++dnl superlu{{{ 
++	AC_ARG_WITH([superlu-dir],
++				AS_HELP_STRING([--with-superlu-dir=DIR],[superlu root directory]),
++				[SUPERLU_ROOT=$withval],[SUPERLU_ROOT=""])
++
++	  AC_MSG_CHECKING(for superlu headers and libraries in $SUPERLU_ROOT)
++	  if test -d "$SUPERLU_ROOT"; then
++
++		dnl defaults
++		  HAVE_SUPERLU=yes
++		  SUPERLUINCL=-I"$SUPERLU_ROOT/include"
++		  SUPERLULIB=-L"$SUPERLU_ROOT/lib -lsuperlu_4.3"
++
++		  AC_DEFINE([_HAVE_SUPERLU_],[1],[with Superlu in ISSM src])
++		  AC_SUBST([SUPERLUINCL])
++		  AC_SUBST([SUPERLULIB])
++	  else
++		HAVE_SUPERLU=no
++		  fi
++		  AC_MSG_RESULT($HAVE_SUPERLU)
++		  dnl }}}
++dnl spooles{{{ 
++	AC_ARG_WITH([spooles-dir],
++				AS_HELP_STRING([--with-spooles-dir=DIR],[spooles root directory]),
++				[SPOOLES_ROOT=$withval],[SPOOLES_ROOT=""])
++
++	  AC_MSG_CHECKING(for spooles headers and libraries in $SPOOLES_ROOT)
++	  if test -d "$SPOOLES_ROOT"; then
++
++		dnl defaults
++		  HAVE_SPOOLES=yes
++		  SPOOLESINCL=-I"$SPOOLES_ROOT/include"
++		  SPOOLESLIB=-L"$SPOOLES_ROOT/lib -lspooles"
++
++		  AC_DEFINE([_HAVE_SPOOLES_],[1],[with Spooles in ISSM src])
++		  AC_SUBST([SPOOLESINCL])
++		  AC_SUBST([SPOOLESLIB])
++	  else
++		HAVE_SPOOLES=no
++		  fi
++		  AC_MSG_RESULT($HAVE_SPOOLES)
++		  dnl }}}
++dnl pastix{{{ 
++	AC_ARG_WITH([pastix-dir],
++				AS_HELP_STRING([--with-pastix-dir=DIR],[pastix root directory]),
++				[PASTIX_ROOT=$withval],[PASTIX_ROOT=""])
++
++	  AC_MSG_CHECKING(for pastix headers and libraries in $PASTIX_ROOT)
++	  if test -d "$PASTIX_ROOT"; then
++
++		dnl defaults
++		  HAVE_PASTIX=yes
++		  PASTIXINCL=-I"$PASTIX_ROOT/include"
++		  PASTIXLIB=-L"$PASTIX_ROOT/lib -lpastix_XXbit_mpi_smp_nobubble_int32_simple_real_scotch_i686_pc_linux -lptscotch -lptscotcherr -lpastix"
++
++		  AC_DEFINE([_HAVE_PASTIX_],[1],[with Pastix in ISSM src])
++		  AC_SUBST([PASTIXINCL])
++		  AC_SUBST([PASTIXLIB])
++	  else
++		HAVE_PASTIX=no
++		  fi
++		  AC_MSG_RESULT($HAVE_PASTIX)
++		  dnl }}}
+ 	dnl ml{{{
+ 	AC_ARG_WITH([ml-dir],
+ 	  AS_HELP_STRING([--with-ml-dir=DIR],[ml root directory]),
Index: /issm/oecreview/Archive/12321-12677/ISSM-12568-12569.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12568-12569.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12568-12569.diff	(revision 12679)
@@ -0,0 +1,48 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-astrid-petscdev.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-astrid-petscdev.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-astrid-petscdev.sh	(revision 12569)
+@@ -0,0 +1,37 @@
++#!/bin/sh
++
++#External packages versions:
++#petsc Dev: FH trying out
++#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/petsc/src/externalpackages/metis-5.0.2-p3 \
++ --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_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-spai-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-hypre-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-prometheus-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-superlu-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-spooles-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-pastix-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" \
++ --with-numthreads=32 \
++ --enable-debugging
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-astrid-petscdev.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12569-12570.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12569-12570.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12569-12570.diff	(revision 12679)
@@ -0,0 +1,26 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Exp/expxy2ll.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Exp/expxy2ll.m	(revision 12569)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Exp/expxy2ll.m	(revision 12570)
+@@ -26,7 +26,7 @@
+ end
+ 
+ %read filename: 
+-domain=expread(filename,1);
++domain=expread(filename);
+ 
+ %change to x,y: 
+ for i=1:length(domain),
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Exp/expll2xy.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Exp/expll2xy.m	(revision 12569)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Exp/expll2xy.m	(revision 12570)
+@@ -26,7 +26,7 @@
+ end
+ 
+ %read filename: 
+-domain=expread(filename,1);
++domain=expread(filename);
+ 
+ %change to x,y: 
+ for i=1:length(domain),
Index: /issm/oecreview/Archive/12321-12677/ISSM-12570-12571.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12570-12571.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12570-12571.diff	(revision 12679)
@@ -0,0 +1,46 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12570)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12571)
+@@ -124,31 +124,31 @@
+ 		 * 3) and if this element is not in the same partition:
+ 		 * we must clone the nodes on this partition so that the loads (Numericalflux)
+ 		 * will have access to their properties (dofs,...)*/
+-		if(my_elements[(int)e1] && !xIsNan<IssmDouble>(e2) && !my_elements[(int)e2]){ 
++		if(my_elements[reCast<int>(e1)] && !xIsNan<IssmDouble>(e2) && !my_elements[reCast<int>(e2)]){
+ 
+ 			/*1: Get vertices ids*/
+-			i1=(int)edges[4*i+0];
+-			i2=(int)edges[4*i+1];
++			i1=reCast<int>(edges[4*i+0]);
++			i2=reCast<int>(edges[4*i+1]);
+ 
+ 			/*2: Get the column where these ids are located in the index*/
+ 			pos=UNDEF;
+ 			for(j=0;j<3;j++){
+-				if ((int)elements[3*(int)e2+j]==i1) pos=j;
++				if (reCast<int>(elements[3*(reCast<int>(e2))+j])==i1) pos=j;
+ 			}
+ 
+ 			/*3: We have the id of the elements and the position of the vertices in the index
+ 			 * we can now create the corresponding nodes:*/
+ 			if (pos==0){
+-				my_nodes[(int)e2*3+0]=true;
+-				my_nodes[(int)e2*3+2]=true;
++				my_nodes[reCast<int>(e2)*3+0]=true;
++				my_nodes[reCast<int>(e2)*3+2]=true;
+ 			}
+ 			else if(pos==1){
+-				my_nodes[(int)e2*3+1]=true;
+-				my_nodes[(int)e2*3+0]=true;
++				my_nodes[reCast<int>(e2)*3+1]=true;
++				my_nodes[reCast<int>(e2)*3+0]=true;
+ 			}
+ 			else if (pos==2){
+-				my_nodes[(int)e2*3+2]=true;
+-				my_nodes[(int)e2*3+1]=true;
++				my_nodes[reCast<int>(e2)*3+2]=true;
++				my_nodes[reCast<int>(e2)*3+1]=true;
+ 			}
+ 			else{
+ 				_error2_("Problem in edges creation");
Index: /issm/oecreview/Archive/12321-12677/ISSM-12571-12572.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12571-12572.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12571-12572.diff	(revision 12679)
@@ -0,0 +1,170 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12571)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12572)
+@@ -53,7 +53,7 @@
+   siglim0c =  siglimc/DT + 0.5;
+   PDup = siglimc+PDCUT;
+ 
+-  itm = (int)(2*siglim/DT + 1.5);
++  itm = reCast<int,IssmDouble>((2*siglim/DT + 1.5));
+   
+   if (itm >= NPDMAX){
+     _printLine_("increase NPDMAX in massBalance.cpp");
+@@ -80,7 +80,7 @@
+   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);
++  itm = reCast<int,IssmDouble>((PDCUT+2.*siglimc)/DT + 1.5);
+   if (itm >= NPDCMAX){
+     _printLine_("'increase NPDCMAX in p35com'");
+     exit (1);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ComputeBasalStressx/ComputeBasalStressx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ComputeBasalStressx/ComputeBasalStressx.cpp	(revision 12571)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ComputeBasalStressx/ComputeBasalStressx.cpp	(revision 12572)
+@@ -14,7 +14,7 @@
+ 	/*Intermediary*/
+ 	int i;
+ 	int      found=0;
+-	double   numberofelements;
++	IssmDouble   numberofelements;
+ 	Element* element=NULL;
+ 
+ 	/*output: */
+@@ -24,7 +24,7 @@
+ 	parameters->FindParam(&numberofelements,MeshNumberofelementsEnum);
+ 
+ 	/*Allocate sigma on numberofelements: */
+-	sigma=new Vector((int)numberofelements);
++	sigma=new Vector(reCast<int>(numberofelements));
+ 
+ 	/*Compute basal stress for each element: */
+ 	for (i=0;i<elements->Size();i++){
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 12571)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 12572)
+@@ -35,7 +35,7 @@
+ 		index=xNew<int>(elements_width*numberofelements);
+ 		for (i=0;i<numberofelements;i++){
+ 			for (j=0;j<elements_width;j++){
+-				*(index+elements_width*i+j)=(int)*(elements+elements_width*i+j)-1; //-1 for C indexing in Metis
++				*(index+elements_width*i+j)=reCast<int>(*(elements+elements_width*i+j))-1; //-1 for C indexing in Metis
+ 			}
+ 		}
+ 
+@@ -62,7 +62,7 @@
+ 
+ 		for (i=0;i<numberofelements2d;i++){
+ 			for (j=0;j<3;j++){
+-				*(index2d+3*i+j)=(int)*(elements2d+3*i+j)-1; //-1 for C indexing in Metis
++				*(index2d+3*i+j)=reCast<int>(*(elements2d+3*i+j))-1; //-1 for C indexing in Metis
+ 			}
+ 		}
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 12571)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 12572)
+@@ -55,7 +55,7 @@
+ 	/*Create connectivity table*/
+ 	for (i=0;i<numberofelements;i++){
+ 		for (j=0;j<elementswidth;j++){
+-			vertexid=(int)elements[elementswidth*i+j];
++			vertexid=reCast<int>(elements[elementswidth*i+j]);
+ 			_assert_(vertexid>0 && vertexid-1<numberofvertices);
+ 			connectivity[vertexid-1]+=1;
+ 		}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp	(revision 12571)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp	(revision 12572)
+@@ -58,7 +58,7 @@
+ 		/*!! in parallel we do not want the vertex to be connected to an element that is not in its partition!!*/
+ 		if(iomodel->my_elements[i]){
+ 			for (j=0;j<elementswidth;j++){
+-				vertexid=(int)elements[elementswidth*i+j];
++				vertexid=reCast<int>(elements[elementswidth*i+j]);
+ 				_assert_(vertexid>0 && vertexid-1<numberofvertices);
+ 				connectivity[vertexid-1]=i+1;
+ 			}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12571)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12572)
+@@ -26,7 +26,7 @@
+ 	int i;
+ 
+ 	/*intermediary: */
+-	IssmPDouble* analyses=NULL;
++	IssmDouble* analyses=NULL;
+ 	char** strings=NULL;
+ 	int numanalyses;
+ 	char* string=NULL;
+@@ -47,7 +47,7 @@
+ 		}
+ 
+ 		/*Now, allocate analyses and strings: */
+-		analyses=xNew<IssmPDouble>(numanalyses);
++		analyses=xNew<IssmDouble>(numanalyses);
+ 		strings=xNew<char*>(numanalyses);
+ 		for(i=0;i<numanalyses;i++)strings[i]=NULL; 
+ 
+@@ -105,7 +105,7 @@
+ 	for(i=0;i<numanalyses;i++){
+ 		char* string=strings[i];
+ 		if(my_rank==0){
+-			if(string==NULL) _error2_("PETSc options for analysis " << EnumToStringx((int)analyses[i]) << " have been declared but were not found");
++			if(string==NULL) _error2_("PETSc options for analysis " << EnumToStringx(reCast<int>(analyses[i])) << " have been declared but were not found");
+ 		}
+ 		if(my_rank==0)stringlength=(strlen(string)+1)*sizeof(char);
+ 		#ifdef _HAVE_MPI_
+@@ -123,6 +123,6 @@
+ 	/*Clean up and return*/
+ 	for(i=0;i<numanalyses;i++) xDelete<char>(strings[i]);
+ 	xDelete<char*>(strings);
+-	xDelete<IssmPDouble>(analyses);
++	xDelete<IssmDouble>(analyses);
+ 	return;
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12571)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12572)
+@@ -128,7 +128,7 @@
+ 	}
+ 
+ 	/*Assign output pointer*/
+-	*pvalue=(int)this->values[0];
++	*pvalue=reCast<int>(values[0]);
+ }
+ /*}}}*/
+ /*FUNCTION OptionDouble::Get(IssmDouble* pvalue) {{{*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp	(revision 12571)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Options/OptionUtilities.cpp	(revision 12572)
+@@ -30,8 +30,8 @@
+ 
+ 	/*calculate the dimensions (being careful of integer division)  */
+ 	for (i=ndims-1; i>=0; i--) {
+-		aprod=(int)(((IssmDouble)aprod+0.5)/(IssmDouble)size[i]);
+-		dims[i]=(int)floor(((IssmDouble)index+0.5)/(IssmDouble)aprod);
++		aprod=reCast<int>(((IssmPDouble)aprod+0.5)/(IssmPDouble)size[i]);
++		dims[i]=(int)floor(((IssmPDouble)index+0.5)/(IssmPDouble)aprod);
+ 		index-=dims[i]*aprod;
+ 	}
+ 
+@@ -68,8 +68,8 @@
+ 
+ 	/*calculate the dimensions (being careful of integer division)  */
+ 	for (i=0; i<ndims; i++) {
+-		aprod=(int)(((IssmDouble)aprod+0.5)/(IssmDouble)size[i]);
+-		dims[i]=(int)floor(((IssmDouble)index+0.5)/(IssmDouble)aprod);
++		aprod=(int)(((IssmPDouble)aprod+0.5)/(IssmPDouble)size[i]);
++		dims[i]=(int)floor(((IssmPDouble)index+0.5)/(IssmPDouble)aprod);
+ 		index-=dims[i]*aprod;
+ 	}
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12572-12573.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12572-12573.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12572-12573.diff	(revision 12679)
@@ -0,0 +1,22 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment.csh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment.csh	(revision 12572)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment.csh	(revision 12573)
+@@ -135,3 +135,6 @@
+ #GSL
+ setenv GSL_DIR {$GSL_DIR}
+ setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:{$GSL_DIR}/lib
++
++#CMAKE
++setenv PATH {$PATH}:{$CMAKE_DIR}/bin
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment_variables.csh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment_variables.csh	(revision 12572)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment_variables.csh	(revision 12573)
+@@ -88,3 +88,6 @@
+ 
+ #gsl
+ set GSL_DIR={$ISSM_DIR}/externalpackages/gsl/install
++
++#cmake
++set CMAKE_DIR={$ISSM_DIR}/externalpackages/cmake/install
Index: /issm/oecreview/Archive/12321-12677/ISSM-12573-12574.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12573-12574.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12573-12574.diff	(revision 12679)
@@ -0,0 +1,145 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12573)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12574)
+@@ -68,13 +68,13 @@
+ 	/*output: */
+ 	bool*   my_nodes=NULL;
+ 
+-	int     i1,i2;
+-	int     cols;
+-	IssmDouble  e1,e2;
+-	int     pos;
+-	int     numberofedges;
+-	IssmDouble* edges=NULL;
+-	IssmDouble* elements=NULL;
++	int  i1,i2;
++	int  cols;
++	int  e1,e2;
++	int  pos;
++	int  numberofedges;
++	int *edges         = NULL;
++	int *elements      = NULL;
+ 
+ 	/*Fetch parameters: */
+ 	iomodel->Constant(&dim,MeshDimensionEnum);
+@@ -124,31 +124,31 @@
+ 		 * 3) and if this element is not in the same partition:
+ 		 * we must clone the nodes on this partition so that the loads (Numericalflux)
+ 		 * will have access to their properties (dofs,...)*/
+-		if(my_elements[reCast<int>(e1)] && !xIsNan<IssmDouble>(e2) && !my_elements[reCast<int>(e2)]){
++		if(my_elements[e1] && e2!=-2 && !my_elements[e2]){
+ 
+ 			/*1: Get vertices ids*/
+-			i1=reCast<int>(edges[4*i+0]);
+-			i2=reCast<int>(edges[4*i+1]);
++			i1=edges[4*i+0];
++			i2=edges[4*i+1];
+ 
+ 			/*2: Get the column where these ids are located in the index*/
+ 			pos=UNDEF;
+ 			for(j=0;j<3;j++){
+-				if (reCast<int>(elements[3*(reCast<int>(e2))+j])==i1) pos=j;
++				if (elements[3*e2+j]==i1) pos=j;
+ 			}
+ 
+ 			/*3: We have the id of the elements and the position of the vertices in the index
+ 			 * we can now create the corresponding nodes:*/
+ 			if (pos==0){
+-				my_nodes[reCast<int>(e2)*3+0]=true;
+-				my_nodes[reCast<int>(e2)*3+2]=true;
++				my_nodes[e2*3+0]=true;
++				my_nodes[e2*3+2]=true;
+ 			}
+ 			else if(pos==1){
+-				my_nodes[reCast<int>(e2)*3+1]=true;
+-				my_nodes[reCast<int>(e2)*3+0]=true;
++				my_nodes[e2*3+1]=true;
++				my_nodes[e2*3+0]=true;
+ 			}
+ 			else if (pos==2){
+-				my_nodes[reCast<int>(e2)*3+2]=true;
+-				my_nodes[reCast<int>(e2)*3+1]=true;
++				my_nodes[e2*3+2]=true;
++				my_nodes[e2*3+1]=true;
+ 			}
+ 			else{
+ 				_error2_("Problem in edges creation");
+@@ -157,8 +157,8 @@
+ 	}
+ 
+ 	/*Free data: */
+-	xDelete<IssmDouble>(elements);
+-	xDelete<IssmDouble>(edges);
++	xDelete<int>(elements);
++	xDelete<int>(edges);
+ 
+ 	/*Assign output pointers:*/
+ 	*pmy_nodes=my_nodes;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12573)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12574)
+@@ -58,15 +58,15 @@
+ 	/* Get MatPar id */
+ 	numericalflux_mparid=numberofelements+1; //matlab indexing
+ 
+-	/*First, see wether this is an internal or boundary edge (if e2=NaN)*/
+-	if (xIsNan<IssmDouble>((IssmDouble)iomodel->Data(MeshEdgesEnum)[4*i+3])){ //edges are [node1 node2 elem1 elem2]
++	/*First, see wether this is an internal or boundary edge (if e2=-1)*/
++	if (iomodel->Data(MeshEdgesEnum)[4*i+3]==-1.){ //edges are [node1 node2 elem1 elem2]
+ 		/* Boundary edge, only one element */
+ 		e1=reCast<int>(iomodel->Data(MeshEdgesEnum)[4*i+2]);
+ 		e2=reCast<int>(UNDEF);
+ 		num_elems=1;
+ 		num_nodes=2;
+ 		numericalflux_type=BoundaryEnum;
+-		numericalflux_elem_ids[0]=reCast<int>(e1);
++		numericalflux_elem_ids[0]=e1;
+ 	}
+ 	else{
+ 		/* internal edge: connected to 2 elements */
+@@ -75,8 +75,8 @@
+ 		num_elems=2;
+ 		num_nodes=4;
+ 		numericalflux_type=InternalEnum;
+-		numericalflux_elem_ids[0]=reCast<int>(e1);
+-		numericalflux_elem_ids[1]=reCast<int>(e2);
++		numericalflux_elem_ids[0]=e1;
++		numericalflux_elem_ids[1]=e2;
+ 	}
+ 
+ 	/*1: Get vertices ids*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12573)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12574)
+@@ -617,7 +617,7 @@
+ 		SetOfEdges4* edge4=new SetOfEdges4(nbt*3,nbv);
+ 		double* elemedge=NULL;
+ 		elemedge=xNew<double>(3*nbt);
+-		for (i=0;i<3*nbt;i++) elemedge[i]=NAN;
++		for (i=0;i<3*nbt;i++) elemedge[i]=-2.;//will become -1
+ 		k=0;
+ 		for (i=0;i<nbt;i++){
+ 			//Do not take into account outside triangles (reft<0)
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12573)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/IoModel.cpp	(revision 12574)
+@@ -473,7 +473,6 @@
+ 
+ 	extern int my_rank;
+ 	extern int num_procs;
+-	
+ 
+ 	/*output: */
+ 	int   integer;
+@@ -495,7 +494,6 @@
+ 
+ 	/*Assign output pointers: */
+ 	*pinteger=integer;
+-
+ }
+ /*}}}*/
+ /*FUNCTION IoModel::FetchData(IssmDouble*   pscalar,int data_enum){{{*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12574-12575.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12574-12575.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12574-12575.diff	(revision 12679)
@@ -0,0 +1,60 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/install.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/install.sh	(revision 12575)
+@@ -0,0 +1,49 @@
++#!/bin/bash
++
++#0: cleanup
++#1: install
++#2: test
++
++install=2
++
++export ESMF_DIR=$ISSM_DIR/externalpackages/esmf/esmf
++export ESMF_COMPILER=gfortran
++
++if [[ $install == "0" ]]; then
++	#Some cleanup
++	rm -rf esmf_5_2_0rp2
++	rm -rf esmf
++fi
++
++if [[ $install == "1" ]]; then
++
++	#Download from ISSM server
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/esmf_5_2_0rp2_src.tar.gz' 'esmf_5_2_0rp2_src.tar.gz'
++
++	#Untar 
++	tar -zxvf  esmf_5_2_0rp2_src.tar.gz
++
++
++	#Configure esmf
++	cd esmf
++
++
++
++	#Compile and install esmf
++	if [ -z $1 ]; then
++		make
++		make install
++	else
++		make -j $1
++		make -j $1 install
++	fi
++fi
++
++if [[ $install == "2" ]]; then
++	cd esmf
++	if [ -z $1 ]; then
++		make all_tests
++	else
++		make -j $1 all_tests
++	fi
++fi
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/install.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12575-12576.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12575-12576.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12575-12576.diff	(revision 12679)
@@ -0,0 +1,40 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/modelextract.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/modelextract.m	(revision 12575)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/modelextract.m	(revision 12576)
+@@ -165,27 +165,27 @@
+ 	%Edges
+ 	if size(md2.mesh.edges,2)>1, %do not use ~isnan because there are some NaNs...
+ 		%renumber first two columns
+-		pos=find(~isnan(md2.mesh.edges(:,4)));
++		pos=find(md2.mesh.edges(:,4)~=-1);
+ 		md2.mesh.edges(:  ,1)=Pnode(md2.mesh.edges(:,1)); 
+ 		md2.mesh.edges(:  ,2)=Pnode(md2.mesh.edges(:,2)); 
+ 		md2.mesh.edges(:  ,3)=Pelem(md2.mesh.edges(:,3));
+ 		md2.mesh.edges(pos,4)=Pelem(md2.mesh.edges(pos,4));
+ 		%remove edges when the 2 vertices are not in the domain.
+ 		md2.mesh.edges=md2.mesh.edges(find(md2.mesh.edges(:,1) & md2.mesh.edges(:,2)),:);
+-		%Replace all zeros by NaN in the last two columns;
++		%Replace all zeros by -1 in the last two columns;
+ 		pos=find(md2.mesh.edges(:,3)==0);
+-		md2.mesh.edges(pos,3)=NaN;
++		md2.mesh.edges(pos,3)=-1;
+ 		pos=find(md2.mesh.edges(:,4)==0);
+-		md2.mesh.edges(pos,4)=NaN;
+-		%Invert NaN of the third column with last column (Also invert first two columns!!)
+-		pos=find(isnan(md2.mesh.edges(:,3)));
++		md2.mesh.edges(pos,4)=-1;
++		%Invert -1 on the third column with last column (Also invert first two columns!!)
++		pos=find(md2.mesh.edges(:,3)==-1);
+ 		md2.mesh.edges(pos,3)=md2.mesh.edges(pos,4);
+-		md2.mesh.edges(pos,4)=NaN;
++		md2.mesh.edges(pos,4)=-1;
+ 		values=md2.mesh.edges(pos,2);
+ 		md2.mesh.edges(pos,2)=md2.mesh.edges(pos,1);
+ 		md2.mesh.edges(pos,1)=values;
+ 		%Finally remove edges that do not belong to any element
+-		pos=find(isnan(md2.mesh.edges(:,3)) & isnan(md2.mesh.edges(:,4)));
++		pos=find(md2.mesh.edges(:,3)==-1 & md2.mesh.edges(:,4)==-1);
+ 		md2.mesh.edges(pos,:)=[];
+ 	end
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12576-12577.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12576-12577.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12576-12577.diff	(revision 12679)
@@ -0,0 +1,40 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/install.sh	(revision 12576)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/install.sh	(revision 12577)
+@@ -8,6 +8,7 @@
+ 
+ export ESMF_DIR=$ISSM_DIR/externalpackages/esmf/esmf
+ export ESMF_COMPILER=gfortran
++export ESMF_COMM=mpich2
+ 
+ if [[ $install == "0" ]]; then
+ 	#Some cleanup
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/doc/ESMF_usrdoc.pdf
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/doc/ESMF_usrdoc.pdf
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/doc/ESMF_usrdoc.pdf	(revision 12576)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/doc/ESMF_usrdoc.pdf	(revision 12577)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/doc/ESMF_usrdoc.pdf
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/doc/ESMF_refdoc.pdf
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/doc/ESMF_refdoc.pdf
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/doc/ESMF_refdoc.pdf	(revision 12576)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/doc/ESMF_refdoc.pdf	(revision 12577)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/esmf/doc/ESMF_refdoc.pdf
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
Index: /issm/oecreview/Archive/12321-12677/ISSM-12577-12578.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12577-12578.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12577-12578.diff	(revision 12679)
@@ -0,0 +1,24 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12577)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12578)
+@@ -42,7 +42,12 @@
+ 	gsl_vector_view  b;
+ 	gsl_vector      *x = NULL;
+ 	gsl_permutation *p = NULL;
+-
++#ifdef _HAVE_ADOLC_
++	// if we use Adol-C then the IssmDouble will be an adouble
++	// and the calls to gsl_... will not work
++	// and we should call  a suitable wrapped solve instead
++	_error2_("SolverxGsl: should not be here with Adol-C");
++#else
+ 	/*A will be modified by LU decomposition. Use copy*/
+ 	IssmDouble* Acopy = xNew<IssmDouble>(n*n);
+ 	xMemCpy<IssmDouble>(Acopy,A,n*n);
+@@ -69,4 +74,5 @@
+ 	gsl_permutation_free(p);
+ 	gsl_vector_free(x);
+ 	*pX=X;
++#endif
+ }/*}}}*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12578-12579.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12578-12579.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12578-12579.diff	(revision 12679)
@@ -0,0 +1,326 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12578)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12579)
+@@ -1,5 +1,6 @@
+ #This installs the Android SDK (Software Development Kit)
+ #which is needed for the compilation of the Java project. 
++source $ANDROID_DIR/android_variables.sh
+ 
+ step=1;
+ 
+@@ -10,24 +11,29 @@
+ #4: cleanup
+ 
+ present_dir=`pwd`;
+-default_droid="Android-4.0"
+ sd_card="issm-sdcard"
+ 
++((tmp=$1- 3)) 
++
++if [[ $tmp -ge "-2" && $tmp -le "3" ]]; then
++    step=$1
++else
++    echo "Using default step: " $step
++fi
++
+ if [[ $step == "1" ]]; then
+ 
+ 	#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_r18-macosx.zip' 'android-sdk_r18-macosx.zip'
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-sdk_r'$sdk_rev'-macosx.zip' 'android-sdk_r'${sdk_rev}'-macosx.zip'
+ 
+ 	# Install Android SDK and NDK.
+-	unzip -o android-sdk_r18-macosx.zip
+-	unzip -o apache-ant-1.8.2-bin.zip
++	unzip -o android-sdk_r${sdk_rev}-macosx.zip
+ 
+ 	#Move to install
+ 	mv -f android-sdk-macosx install-sdk
+-	mv -f apache-ant-1.8.2 install-ant
+ 
+ 	#Post_install configuration: 
+ 	#We need specific settings for specific platforms, for the SDK to 
+@@ -35,10 +41,10 @@
+ 
+ 	#For now, we need to install:  
+ 	#android sdk platform tools  
+-	#and a specific android api: API 15 and API 14
+-	#Note: API 15 and 14 correspond to Android 4.0.3 and 4.0 respectively. 
++	#and a specific android api: API 16, API 15 and API 14
++	#Note: API 16, API 15 and 14 correspond to Android 4.1, 4.0.3 and 4.0 respectively. 
+ 
+-	cd install-sdk/tools/ && source ./android update sdk -t platform-tools,android-15,android-14,system-image --no-ui
++	cd install-sdk/tools/ && source ./android update sdk -t platform-tool,${api_levels},system-image --no-ui
+ 
+ fi
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android_variables.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android_variables.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android_variables.sh	(revision 12579)
+@@ -0,0 +1,5 @@
++sdk_rev=20
++ndk_rev=8
++api_levels="android-14,android-15,android-16"
++default_droid="android-4.1"
++toolchain_path=${ANDROID_DIR}"/arm-linux-"${default_droid}"/bin/arm-linux-androideabi"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-ndk/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-ndk/install.sh	(revision 12578)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-ndk/install.sh	(revision 12579)
+@@ -2,23 +2,26 @@
+ #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 
++#The android-ndk-r8-darwin-x86.tar.bz2 ndk.tar.bz2 file was downloaded 
+ #from the android developer website: 
++source $ANDROID_DIR/android_variables.sh
+ 
+ #Cleanup the install
+ rm -rf install
+-rm -rf $ANDROID_DIR/arm-linux-android-4.0
++rm -rf $ANDROID_DIR/arm-linux-android-${default_droid}
+ 
+ #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'
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-ndk-r'${ndk_rev}'-darwin-x86.tar.bz2' 'ndk.tar.bz2'
+ 
+ # Install Android SDK and NDK.
+-bunzip2 dummy.tar.bz2
+-tar -xvf dummy.tar
+-rm -rf dummy.tar dummy.tar.bz2
++bunzip2 ndk.tar.bz2
++tar -xvf ndk.tar
++rm -rf ndk.tar ndk.tar.bz2
+ 
+ #Move to install
+-mv android-ndk-r7b install
++mv android-ndk-r${ndk_rev} 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
++#Note: API-14 corresponds to Android 4.0 although we are
++#calling our toolchain 4.1 to agree with our device.
++$ANDROID_NDK_DIR/build/tools/make-standalone-toolchain.sh --platform=android-14 --install-dir=$ANDROID_DIR/arm-linux-${default_droid}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android-4.0.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android-4.0.sh	(revision 12578)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android-4.0.sh	(revision 12579)
+@@ -1,38 +0,0 @@
+-#!/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 \
+-    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_DIR/externalpackages/gsl/install" 
+-
+-#Compile gsl
+-if [ -z $1 ]; then
+-	make
+-else
+-	make -j $1
+-fi
+-
+-make install
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh	(revision 12579)
+@@ -0,0 +1,39 @@
++#!/bin/bash
++source $ANDROID_DIR/android_variables.sh
++
++#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 \
++    CC=${toolchain_path}-gcc\
++    LD=${toolchain_path}-ld\
++    AR=${toolchain_path}-ar\
++    RANLIB=${toolchain_path}-ranlib\
++    NM=${toolchain_path}-nm\
++    OBJ_EXT=o\
++    LIB_EXT=a\
++    --host="arm-linux"\
++	--prefix="$ISSM_DIR/externalpackages/gsl/install" 
++
++#Compile gsl
++if [ -z $1 ]; then
++	make
++else
++	make -j $1
++fi
++
++make install
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android-4.0.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android-4.0.sh	(revision 12578)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android-4.0.sh	(revision 12579)
+@@ -1,33 +0,0 @@
+-#!/bin/bash
+-
+-#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 ./
+-unzip triangle.zip
+-
+-#copy new makefile
+-cp ../configs/android/android-4.0/configure.make ./
+-cp ../makefile ./
+-
+-#Patch triangle.c 
+-if [[ $matlab == "1" ]];then
+-	patch triangle.c ../triangle.c.patch.matlab
+-else
+-	patch triangle.c ../triangle.c.patch.python
+-fi
+-
+-#Compile triangle
+-make
+-
+-#Patch triangle.h
+-patch triangle.h ../triangle.h.patch
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make	(revision 12578)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make	(revision 12579)
+@@ -1,19 +0,0 @@
+-# This makefile configures build process to cross-compile to the android platform.
+-# The binary tools referenced below are specifically configuered to target armeabi-v7a.
+-# Furthermore, the compilers (which are simply wrappers around GNU GCC) are set to
+-# produce binaries that are EABI complient.
+-#
+-# Note that the AAPCS standard defines 'EABI' as a moniker used to specify
+-# a _family_ of similar but distinct ABIs. Android follows the little-endian
+-# ARM GNU/Linux ABI as documented in the following document:
+-#
+-# 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_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: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/configure.make
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/configure.make	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/configs/android/configure.make	(revision 12579)
+@@ -0,0 +1,17 @@
++# This makefile configures build process to cross-compile to the android platform.
++# The binary tools referenced below are specifically configuered to target armeabi-v7a.
++# Furthermore, the compilers (which are simply wrappers around GNU GCC) are set to
++# produce binaries that are EABI complient.
++#
++# Note that the AAPCS standard defines 'EABI' as a moniker used to specify
++# a _family_ of similar but distinct ABIs. Android follows the little-endian
++# ARM GNU/Linux ABI as documented in the following document:
++#
++# http://www.codesourcery.com/gnu_toolchains/arm/arm_gnu_linux_abi.pdf
++CC=${toolchain_path}-gcc
++AR=${toolchain_path}-ar
++RANLIB=${toolchain_path}-ranlib
++CSWITCHES = $(CFLAGS)
++TRILIBDEFS = -DTRILIBRARY
++OBJ_EXT=o
++LIB_EXT=a
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android.sh	(revision 12579)
+@@ -0,0 +1,35 @@
++#!/bin/bash
++source $ANDROID_DIR/android_variables.sh
++export toolchain_path
++
++#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 ./
++unzip triangle.zip
++
++#copy new makefile
++cp ../configs//android/configure.make ./
++cp ../makefile ./
++
++#Patch triangle.c 
++if [[ $matlab == "1" ]];then
++	patch triangle.c ../triangle.c.patch.matlab
++else
++	patch triangle.c ../triangle.c.patch.python
++fi
++
++#Compile triangle
++make
++
++#Patch triangle.h
++patch triangle.h ../triangle.h.patch
Index: /issm/oecreview/Archive/12321-12677/ISSM-12579-12580.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12579-12580.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12579-12580.diff	(revision 12679)
@@ -0,0 +1,49 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp	(revision 12579)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp	(revision 12580)
+@@ -46,7 +46,7 @@
+ 		for (i=0;i<numberofedges;i++){
+ 
+ 			/*Get left and right elements*/
+-			element=(int)(iomodel->Data(MeshEdgesEnum)[4*i+2])-1; //edges are [node1 node2 elem1 elem2]
++			element=reCast<int>(iomodel->Data(MeshEdgesEnum)[4*i+2])-1; //edges are [node1 node2 elem1 elem2]
+ 
+ 			/*Now, if this element is not in the partition, pass: */
+ 			if(!iomodel->my_elements[element]) continue;
+@@ -67,17 +67,17 @@
+ 
+ 	for(i=0;i<numvertex_pairing;i++){
+ 
+-		if(iomodel->my_vertices[(int)vertex_pairing[2*i+0]-1]){
++		if(iomodel->my_vertices[reCast<int>(vertex_pairing[2*i+0])-1]){
+ 
+ 			/*In debugging mode, check that the second node is in the same cpu*/
+-			_assert_(iomodel->my_vertices[(int)vertex_pairing[2*i+1]-1]);
++			_assert_(iomodel->my_vertices[reCast<int>(vertex_pairing[2*i+1])-1]);
+ 
+ 			/*Skip if one of the two is not on the bed*/
+-			if(!nodeonbed[(int)vertex_pairing[2*i+0]-1] || !nodeonbed[(int)vertex_pairing[2*i+1]-1]) continue;
++			if(!(reCast<bool>(nodeonbed[reCast<int>(vertex_pairing[2*i+0])-1])) || !(reCast<bool>(nodeonbed[reCast<int>(vertex_pairing[2*i+1])-1]))) continue;
+ 
+ 			/*Get node ids*/
+-			penpair_ids[0]=iomodel->nodecounter+(int)vertex_pairing[2*i+0];
+-			penpair_ids[1]=iomodel->nodecounter+(int)vertex_pairing[2*i+1];
++			penpair_ids[0]=iomodel->nodecounter+reCast<int>(vertex_pairing[2*i+0]);
++			penpair_ids[1]=iomodel->nodecounter+reCast<int>(vertex_pairing[2*i+1]);
+ 
+ 			/*Create Load*/
+ 			loads->AddObject(new Penpair(
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp	(revision 12579)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp	(revision 12580)
+@@ -71,7 +71,7 @@
+ 				if(iomodel->my_nodes[3*i+j]){ 
+ 
+ 					//Get index of the vertex on which the current node is located
+-					vertex_id=(int)*(iomodel->Data(MeshElementsEnum)+3*i+j); //(Matlab indexing)
++					vertex_id=reCast<int>(*(iomodel->Data(MeshElementsEnum)+3*i+j)); //(Matlab indexing)
+ 					io_index=vertex_id-1;                      //(C indexing)
+ 					_assert_(vertex_id>0 && vertex_id<=numberofvertices);
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12580-12581.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12580-12581.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12580-12581.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/elements.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/elements.h	(revision 12580)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Elements/elements.h	(revision 12581)
+@@ -28,7 +28,7 @@
+ void   TransformSolutionCoord(IssmDouble* solution,Node** nodes,int numnodes,int* cs_array);
+ #endif
+ 
+-inline void printarray(IssmDouble* array,int lines,int cols=1){
++inline void printarray(IssmPDouble* array,int lines,int cols=1){
+ 	_printLine_("");
+ 	for(int i=0;i<lines;i++){  
+ 		_printString_("   [ ");
Index: /issm/oecreview/Archive/12321-12677/ISSM-12581-12582.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12581-12582.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12581-12582.diff	(revision 12679)
@@ -0,0 +1,30 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.h	(revision 12581)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Vector.h	(revision 12582)
+@@ -16,10 +16,6 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 
+-#ifdef _HAVE_ADOLC_
+-#include "adolc.h"
+-#endif
+-		
+ /*}}}*/
+ 
+ class Vector{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.h	(revision 12581)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Numerics/Matrix.h	(revision 12582)
+@@ -16,10 +16,6 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 
+-#ifdef _HAVE_ADOLC_
+-#include "adolc.h"
+-#endif
+-
+ class Vector;
+ 
+ /*}}}*/
Index: /issm/oecreview/Archive/12321-12677/ISSM-12582-12583.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12582-12583.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12582-12583.diff	(revision 12679)
@@ -0,0 +1,34 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.cpp	(revision 12582)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.cpp	(revision 12583)
+@@ -1,8 +1,10 @@
+ /*This routine only used by Intel compler: */
+-#ifdef _INTEL_WIN_
+ 
+-int xIsNan<IssmDouble>(IssmPDouble x){
+-	return (x!=x)?1:0;
++#include "../../include/include.h"
++#include "isnan.h"
++
++#ifdef _HAVE_ADOLC_
++template <> int xIsNan<adouble> (const adouble& X) {
++  return isnan(X.getValue());
+ }
+ #endif
+-
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h	(revision 12582)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/isnan.h	(revision 12583)
+@@ -16,9 +16,7 @@
+ }
+ 
+ #ifdef _HAVE_ADOLC_
+-template <> int xIsNan<adouble> (const adouble& X) {
+-  return isnan(X.getValue());
+-}
++template <> int xIsNan<adouble> (const adouble& X);
+ #endif
+ 
+ #endif
Index: /issm/oecreview/Archive/12321-12677/ISSM-12583-12584.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12583-12584.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12583-12584.diff	(revision 12679)
@@ -0,0 +1,21 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12583)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12584)
+@@ -187,6 +187,7 @@
+ 					./shared/Numerics/GaussPoints.cpp\
+ 					./shared/Numerics/cross.cpp\
+ 					./shared/Numerics/isnan.h\
++					./shared/Numerics/isnan.cpp\
+ 					./shared/Numerics/extrema.cpp\
+ 					./shared/Numerics/XZvectorsToCoordinateSystem.cpp\
+ 					./shared/Numerics/UnitConversion.cpp\
+@@ -1021,7 +1022,7 @@
+ LDADD = ./libISSMCore.a ./libISSMOverload.a
+ 
+ #External packages
+-LDADD += $(PETSCLIB) $(TAOLIB) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB)
++LDADD += $(PETSCLIB) $(TAOLIB) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB) $(ADOLCLIB)
+ 
+ if FORTRAN
+ LDADD += $(FLIBS)
Index: /issm/oecreview/Archive/12321-12677/ISSM-12584-12585.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12584-12585.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12584-12585.diff	(revision 12679)
@@ -0,0 +1,26 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12584)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12585)
+@@ -428,7 +428,7 @@
+ 
+ 			dnl defaults
+ 			HAVE_ADOLC=yes
+-			ADOLCINCL="-I$ADOLC_ROOT/include/adolc -I$ADOLC_ROOT/include"
++			ADOLCINCL="-I$ADOLC_ROOT/include"
+ 			ADOLCLIB="-L$ADOLC_ROOT/lib64 -ladolc"
+ 
+ 			AC_DEFINE([_HAVE_ADOLC_],[1],[with adolc in ISSM src])
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/types.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/types.h	(revision 12584)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/include/types.h	(revision 12585)
+@@ -27,7 +27,7 @@
+ #endif  
+ 
+ #ifdef _HAVE_ADOLC_
+-#include "adolc.h"
++#include "adolc/adolc.h"
+ // for active variables
+ typedef adouble IssmDouble;
+ // for passive variables
Index: /issm/oecreview/Archive/12321-12677/ISSM-12585-12586.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12585-12586.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12585-12586.diff	(revision 12679)
@@ -0,0 +1,33 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android.sh	(revision 12585)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android.sh	(revision 12586)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/triangle/install-android.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/scripts/automakererun.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/scripts/automakererun.sh	(revision 12585)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/scripts/automakererun.sh	(revision 12586)
+@@ -2,8 +2,17 @@
+ #  this shell script will automatically reconfigure the entire ISSM 
+ #  archive.
+ 
++# As it turns out, the autoreconf script provided by Autotools
++# encompasses the functionality of this script. As such, the 
++# following two lines will replace the remainder of the script.
++# If all goes well, then the script will be shortened in the future.
+ 
+- ACLOCAL="$ISSM_DIR/externalpackages/automake/install/bin/aclocal"
++cd $ISSM_DIR
++autoreconf -iv -I m4
++
++exit 0
++
++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"
Index: /issm/oecreview/Archive/12321-12677/ISSM-12586-12587.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12586-12587.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12586-12587.diff	(revision 12679)
@@ -0,0 +1,40 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12586)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12587)
+@@ -65,11 +65,11 @@
+ 			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-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
++			export CC=$ANDROID_DIR/arm-linux-android-4.1/bin/arm-linux-androideabi-gcc
++			export GCC=$ANDROID_DIR/arm-linux-android-4.1/bin/arm-linux-androideabi-gcc
++			export CXX=$ANDROID_DIR/arm-linux-android-4.1/bin/arm-linux-androideabi-g++
++			export AR=$ANDROID_DIR/arm-linux-android-4.1/bin/arm-linux-androideabi-ar
++			export RANLIB=$ANDROID_DIR/arm-linux-android-4.1/bin/arm-linux-androideabi-ranlib
+         else
+ 		AC_MSG_ERROR([unknow compiler vendor!])
+ 		fi
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-arm-linux.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-arm-linux.sh	(revision 12586)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-arm-linux.sh	(revision 12587)
+@@ -4,10 +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++ \
++    CC=$ANDROID_DIR/arm-linux-android-4.1/bin/arm-linux-androideabi-gcc \
++    GCC=$ANDROID_DIR/arm-linux-android-4.1/bin/arm-linux-androideabi-gcc \
++    CXX=$ANDROID_DIR/arm-linux-android-4.1/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\
+-    --without-fortran-lib
++    --with-fortran="no"
Index: /issm/oecreview/Archive/12321-12677/ISSM-12587-12588.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12587-12588.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12587-12588.diff	(revision 12679)
@@ -0,0 +1,88 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/adolc/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/adolc/install.sh	(revision 12587)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/adolc/install.sh	(revision 12588)
+@@ -21,6 +21,11 @@
+ #Compile ADOL-C
+ cd src 
+ 
++export CC=gcc
++export CXX=g++
++export CFLAGS="-arch x86_64"
++export CXXFLAGS="-arch x86_64"
++
+ ./configure \
+ 	--prefix=$ISSM_DIR/externalpackages/adolc/install \
+ 	--enable-sparse \
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/adolc/install-macosx64.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/adolc/install-macosx64.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/adolc/install-macosx64.sh	(revision 12588)
+@@ -0,0 +1,61 @@
++#!/bin/bash
++
++#some issues on macosx64 with ISSM's autoconf. you might want to run native to mac on this.
++
++#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
++
++#Untar 
++tar -zxvf  ADOL-C-2.2.0.tar.gz
++
++#Move ADOL-C into install directory
++mv ADOL-C-2.2.0/* src
++rm -rf ADOL-C-2.2.0
++
++#Compile ADOL-C
++cd src 
++
++#export CC=gcc
++#export CXX=g++
++#export CFLAGS="-arch x86_64"
++#export CXXFLAGS="-arch x86_64"
++
++./configure \
++	--prefix=$ISSM_DIR/externalpackages/adolc/install \
++	--enable-sparse \
++	--enable-docexa \
++	--enable-addexa \
++	--disable-shave
++
++if [ -z $1 ]; then
++	make
++else
++	make -j $1
++fi
++make install
++
++
++#Ok, bug with libtool: replace all LIBTOOL= by LIBTOOL=libtool 
++#in all Makefiles
++for i in `find ./ -name Makefile `
++do
++	echo $i
++	cat $i | sed 's/LIBTOOL =/LIBTOOL = libtool/g' > $i.bak 
++	mv $i.bak $i
++done
++
++#remake: 
++if [ -z $1 ]; then
++	make
++else
++	make -j $1
++fi
++make install
++
++
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/adolc/install-macosx64.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12588-12589.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12588-12589.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12588-12589.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment.sh	(revision 12588)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/etc/environment.sh	(revision 12589)
+@@ -261,7 +261,7 @@
+ #PYTHON
+ 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 LD_LIBRARY_PATH=$ISSM_DIR/src/modules/python:$ISSM_DIR/externalpackages/python/install/lib:$LD_LIBRARY_PATH
+ export PYTHONSTARTUP
+ 
+ #MODELE
Index: /issm/oecreview/Archive/12321-12677/ISSM-12589-12590.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12589-12590.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12589-12590.diff	(revision 12679)
@@ -0,0 +1,25 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12589)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12590)
+@@ -319,8 +319,19 @@
+ 		PYTHONINCL=-I$PYTHON_ROOT/include
+ 		PYTHONLIB="-L$PYTHON_ROOT/lib -lpython$PYTHONVERSION"
+ 		PYTHONEXT=.so
+-		PYTHONLINK="-dynamiclib"
+ 
++		case "${host_os}" in
++			*cygwin*)
++			PYTHONLINK="-shared"
++			;;
++			*linux*)
++			PYTHONLINK="-shared"
++			;;
++			*darwin*)
++			PYTHONLINK="-dynamiclib"
++			;;
++		esac
++
+ 		AC_DEFINE([_HAVE_PYTHON_],[1],[with Python in ISSM src])
+ 		AC_SUBST([PYTHONINCL])
+ 		AC_SUBST([PYTHONLIB])
Index: /issm/oecreview/Archive/12321-12677/ISSM-12590-12591.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12590-12591.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12590-12591.diff	(revision 12679)
@@ -0,0 +1,45 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-astrid-python.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-astrid-python.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-astrid-python.sh	(revision 12591)
+@@ -0,0 +1,34 @@
++#!/bin/sh
++
++#External packages versions:
++#petsc 3.1 or 3.2
++#mpich 1.4
++
++./configure \
++ --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/lib/python2.7/site-packages/numpy/core/include/numpy\
++ --with-python-version=2.7\
++ --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-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" \
++ --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 -lutil" \
++ --with-numthreads=32 \
++ --enable-debugging
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-linux64-astrid-python.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12591-12592.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12591-12592.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12591-12592.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/python/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/python/Makefile.am	(revision 12591)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/python/Makefile.am	(revision 12592)
+@@ -16,7 +16,7 @@
+ 
+ #Python part
+ AM_LDFLAGS   = $(PYTHONLINK)
+-AM_CXXFLAGS +=  -D_HAVE_PYTHON_MODULES_ 
++AM_CXXFLAGS +=  -D_HAVE_PYTHON_MODULES_  -fPIC
+ if PYTHON3
+ AM_CXXFLAGS +=  -DNPY_NO_DEPRECATED_API 
+ endif
Index: /issm/oecreview/Archive/12321-12677/ISSM-12592-12593.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12592-12593.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12592-12593.diff	(revision 12679)
@@ -0,0 +1,27 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/python/install-linux64-astrid.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/python/install-linux64-astrid.sh	(revision 12592)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/python/install-linux64-astrid.sh	(revision 12593)
+@@ -22,7 +22,7 @@
+ 
+ #Configure doxygen
+ cd src 
+-./configure --prefix="$ISSM_DIR/externalpackages/python/install" 
++./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-shared
+ 
+ if [ -z $1 ]; then
+ 	make
+@@ -38,6 +38,11 @@
+ 	cd ../
+ 	ln -s Python.framework/Versions/3.2/include/python3.2m include
+ 	ln -s Python.framework/Versions/3.2/lib/ lib
+-
+-
+ fi
++if [[ $version == "2.7.2" ]]; then 
++	cd install/include
++	cp python2.7/* ./
++	cd ../lib
++	ln -s  libpython2.7.so.1.0 libpython.so
++	
++fi
Index: /issm/oecreview/Archive/12321-12677/ISSM-12593-12594.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12593-12594.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12593-12594.diff	(revision 12679)
@@ -0,0 +1,147 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12593)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12594)
+@@ -26,7 +26,11 @@
+ 		outmatrix_cols=0;
+ 		outmatrix=NULL;
+ 	}
+-	else if(mxIsClass(dataref,"double") || mxIsClass(dataref,"single") || mxIsClass(dataref,"int16")){
++	else if( mxIsClass(dataref,"double") || 
++				mxIsClass(dataref,"single") || 
++				mxIsClass(dataref,"int16") || 
++				mxIsClass(dataref,"int8") || 
++				mxIsClass(dataref,"uint8")){
+ 		/*Check dataref is not pointing to NaN: */
+ 		if ( mxIsNaN(*(mxGetPr(dataref))) && (mxGetM(dataref)==1) && (mxGetN(dataref)==1) ){
+ 			outmatrix_rows=0;
+@@ -389,7 +393,7 @@
+ 
+ 	/*Assign output pointers:*/
+ 	*pstring=outstring;
+-}
++}/*}}}*/
+ /*FUNCTION FetchData(char** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){{{*/
+ void FetchData(char** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp	(revision 12593)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp	(revision 12594)
+@@ -2,25 +2,19 @@
+  * \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;
+-	short int *pmxint16matrix  = NULL;
+ 
+ 	/*output: */
+ 	double* matrix=NULL;
+@@ -33,7 +27,7 @@
+ 	if (mxIsSparse(mxmatrix)){
+ 
+ 		/*Dealing with sparse matrix: recover size first: */
+-		pmxdoublematrix=(double*)mxGetPr(mxmatrix);
++		double* pmxmatrix=(double*)mxGetPr(mxmatrix);
+ 		rows=mxGetM(mxmatrix);
+ 		cols=mxGetN(mxmatrix);
+ 		
+@@ -48,7 +42,7 @@
+ 			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];
++					matrix[rows*ir[count]+i]=pmxmatrix[count];
+ 					count++;
+ 				}
+ 			}
+@@ -57,7 +51,7 @@
+ 	}
+ 	else if(mxIsClass(mxmatrix,"double")){
+ 		/*Dealing with dense matrix: recover pointer and size: */
+-		pmxdoublematrix=(double*)mxGetPr(mxmatrix);
++		double* pmxmatrix=(double*)mxGetPr(mxmatrix);
+ 		rows=mxGetM(mxmatrix);
+ 		cols=mxGetN(mxmatrix);
+ 		
+@@ -67,14 +61,14 @@
+ 
+ 			for(i=0;i<rows;i++){
+ 				for(j=0;j<cols;j++){
+-					matrix[cols*i+j]=(double)pmxdoublematrix[rows*j+i];
++					matrix[cols*i+j]=(double)pmxmatrix[rows*j+i];
+ 				}
+ 			}
+ 		}
+ 	}
+ 	else if(mxIsClass(mxmatrix,"single")){
+ 		/*Dealing with dense matrix: recover pointer and size: */
+-		pmxsinglematrix=(float*)mxGetPr(mxmatrix);
++		float *pmxmatrix=(float*)mxGetPr(mxmatrix);
+ 		rows=mxGetM(mxmatrix);
+ 		cols=mxGetN(mxmatrix);
+ 
+@@ -84,14 +78,14 @@
+ 
+ 			for(i=0;i<rows;i++){
+ 				for(j=0;j<cols;j++){
+-					matrix[cols*i+j]=(double)pmxsinglematrix[rows*j+i];
++					matrix[cols*i+j]=(double)pmxmatrix[rows*j+i];
+ 				}
+ 			}
+ 		}
+ 	}
+ 	else if(mxIsClass(mxmatrix,"int16")){
+ 		/*Dealing with dense matrix: recover pointer and size: */
+-		pmxint16matrix=(short*)mxGetPr(mxmatrix);
++		short int *pmxmatrix=(short*)mxGetPr(mxmatrix);
+ 		rows=mxGetM(mxmatrix);
+ 		cols=mxGetN(mxmatrix);
+ 
+@@ -101,11 +95,28 @@
+ 
+ 			for(i=0;i<rows;i++){
+ 				for(j=0;j<cols;j++){
+-					matrix[cols*i+j]=(double)pmxint16matrix[rows*j+i];
++					matrix[cols*i+j]=(double)pmxmatrix[rows*j+i];
+ 				}
+ 			}
+ 		}
+ 	}
++	else if(mxIsClass(mxmatrix,"uint8")){
++		/*Dealing with dense matrix: recover pointer and size: */
++		char *pmxmatrix=(char*)mxGetPr(mxmatrix);
++		rows=mxGetM(mxmatrix);
++		cols=mxGetN(mxmatrix);
++
++		/*Create serial matrix: */
++		if(rows*cols){
++			matrix=xNewZeroInit<double>(rows*cols);
++
++			for(i=0;i<rows;i++){
++				for(j=0;j<cols;j++){
++					matrix[cols*i+j]=(double)pmxmatrix[rows*j+i];
++				}
++			}
++		}
++	}
+ 	else{
+ 		_error2_("Matlab matrix type Not implemented yet");
+ 	}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12594-12595.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12594-12595.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12594-12595.diff	(revision 12679)
@@ -0,0 +1,85 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp	(revision 12594)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp	(revision 12595)
+@@ -175,22 +175,22 @@
+ /*FUNCTION MatlabNArrayToNArray(char** 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  i,j,rows,cols;
+-	int  numel,ndims;
+-	int *size,*dims;
+-	mxChar* mxmatrix_ptr=NULL;
+-	const mwSize* ipt=NULL;
++	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;
++	mwIndex *ir    = NULL;
++	mwIndex *jc    = NULL;
++	char    *pm    = NULL;
++	int      count;
++	int      nnz;
++	int      nz;
+ 
+ 	/*get Matlab matrix information: */
+ 	numel=mxGetNumberOfElements(mxmatrix);
+@@ -232,6 +232,7 @@
+ 		
+ 		/*Create serial matrix: */
+ 		matrix=xNew<char>(numel+1);
++		matrix[numel]='\0';
+ 
+ 		/*looping code adapted from Matlab example explore.c: */
+ 		int elements_per_page = size[0] * size[1];
+@@ -256,7 +257,6 @@
+ 				}
+ 			}
+ 		}
+-
+ 	}
+ 
+ 	/*Assign output pointer: */
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12594)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12595)
+@@ -189,7 +189,7 @@
+ 		percent[my_thread]=double(idx-i0)/double(i1-i0)*100.;
+ 		localpercent=percent[0];
+ 		for(int i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]);
+-		_printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
++		if(my_thread==0) _printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
+ 
+ 		/*Kriging interpolation*/
+ 		observations->InterpolationKriging(&predictions[idx],&error[idx],x_interp[idx],y_interp[idx],radius,mindata,maxdata,variogram);
+@@ -238,7 +238,7 @@
+ 		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]);
+-		_printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
++		if(my_thread==0) _printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
+ 
+ 		observations->InterpolationNearestNeighbor(&predictions[idx],x_interp[idx],y_interp[idx],radius);
+ 	}
+@@ -286,7 +286,7 @@
+ 		percent[my_thread]=double(idx-i0)/double(i1-i0)*100.;
+ 		localpercent=percent[0];
+ 		for(int i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]);
+-		_printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
++		if(my_thread==0) _printString_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<localpercent<<"%");
+ 
+ 		observations->InterpolationIDW(&predictions[idx],x_interp[idx],y_interp[idx],radius,mindata,maxdata,power);
+ 	}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12595-12596.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12595-12596.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12595-12596.diff	(revision 12679)
@@ -0,0 +1,19 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12595)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12596)
+@@ -934,10 +934,10 @@
+ 			  AC_SUBST([PROMETHEUSINCL])
+ 			  AC_SUBST([PROMETHEUSLIB])
+ 		  else
+-			HAVE_PROMETHEUS=no
+-			  fi
+-			  AC_MSG_RESULT($HAVE_PROMETHEUS)
+-			  dnl }}}
++				HAVE_PROMETHEUS=no
++			fi
++			AC_MSG_RESULT($HAVE_PROMETHEUS)
++		dnl }}}
+ dnl spai{{{
+ 	AC_ARG_WITH([spai-dir],
+ 				AS_HELP_STRING([--with-spai-dir=DIR],[spai root directory]),
Index: /issm/oecreview/Archive/12321-12677/ISSM-12596-12597.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12596-12597.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12596-12597.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12596)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12597)
+@@ -1022,7 +1022,7 @@
+ LDADD = ./libISSMCore.a ./libISSMOverload.a
+ 
+ #External packages
+-LDADD += $(PETSCLIB) $(TAOLIB) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB) $(ADOLCLIB)
++LDADD += $(PETSCLIB) $(TAOLIB) $(PLAPACKLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPOOLESLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB) $(ADOLCLIB)
+ 
+ if FORTRAN
+ LDADD += $(FLIBS)
Index: /issm/oecreview/Archive/12321-12677/ISSM-12599-12600.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12599-12600.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12599-12600.diff	(revision 12679)
@@ -0,0 +1,349 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 12599)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 12600)
+@@ -12,13 +12,15 @@
+ using namespace bamg;
+ using namespace std;
+ 
+-int InterpFromMeshToMesh2dx(double** pdata_interp,double* index_data,double* x_data,double* y_data,int nods_data,int nels_data,
+-			double* data,int data_rows,int data_cols,double* x_interp,double* y_interp,int nods_interp,double* default_values,int num_default_values, DataSet* contours){
++int InterpFromMeshToMesh2dx(double** pdata_interp,int* index_data,double* x_data,double* y_data,int nods_data,int nels_data,
++			double* data,int M_data,int N_data,double* x_interp,double* y_interp,int N_interp,Options* options){
+ 	
+ 	/*Output*/
+ 	double* data_interp=NULL;
+ 
+ 	/*Intermediary*/
++	bool   isdefault;
++	double defaultvalue;
+ 	R2     r;
+ 	I2     I;
+ 	int    i,j,k;
+@@ -28,78 +30,58 @@
+ 	double aa,bb;
+ 	double data_value;
+ 	Icoor2 dete[3];
+-	int verbose=0;
+ 
+-	/*default values: */
+-	Vector*    vec_incontour=NULL;
+-	double*    incontour=NULL;
+-	bool   skip_bamg=false;
+-
+ 	/*Checks*/
+-	if (data_cols<=0){
+-		_error2_("data provided has a negative number of columns");
++	if (M_data!=nods_data && M_data!=nels_data){
++		_error2_("data provided should have either " << nods_data << " or " << nels_data << " lines (not " << M_data << ")");
+ 	}
+-	if (data_rows!=nods_data && data_rows!=nels_data){
+-		_error2_("data provided should have either " << nods_data << " or " << nels_data << " lines (not " << data_rows << ")");
++
++	/*Get default*/
++	if(options->GetOption("default")){
++		isdefault=true;
++		options->Get(&defaultvalue,"default");
+ 	}
+-	if((num_default_values) && (data_cols>1)){
+-		_error2_("data provided can only have 1 column if a default value is provided");
++	else{
++		isdefault=false;
+ 	}
+-	
+-	/*If default values supplied, figure out which nodes are inside the contour, including the border of the contour: */
+-	if(num_default_values){
+-		ContourToNodesx( &vec_incontour,x_interp,y_interp,nods_interp,contours,1);
+-		incontour=vec_incontour->ToMPISerial();
+-	}
+ 
+ 	/*Initialize output*/
+-	if (verbose) _printLine_("Initializing output vector");
+-	data_interp=xNew<double>(nods_interp*data_cols);
++	data_interp=xNew<double>(N_interp*N_data);
+ 
+-	// read background mesh 
+-	if (verbose) _printLine_("Reading mesh");
++	/*read background mesh*/
+ 	Mesh Th(index_data,x_data,y_data,nods_data,nels_data); 
+ 	Th.CreateSingleVertexToTriangleConnectivity();
+ 
+-	//Loop over output nodes
+-	if (verbose) _printLine_("Loop over the nodes");
+-	for(i=0;i<nods_interp;i++){
+-		
+-		/*reset skip_bamg: */
+-		skip_bamg=false;
++	/*Loop over output nodes*/
++	for(i=0;i<N_interp;i++){
+ 
+-		/*figure out if we should skip bamg logic: */
+-		if(num_default_values){
+-			if(!incontour[i]){
+-				/*This node is not inside the contour. Skip Bamg logic and apply default value.: */
+-				skip_bamg=true;
+-			}
+-		}
++		//Get current point coordinates
++		r.x=x_interp[i]; r.y=y_interp[i];
++		I2 I=Th.R2ToI2(r);
+ 
+-		if(skip_bamg==false){
++		//Find triangle holding r/I
++		Triangle &tb=*Th.TriangleFindFromCoord(I,dete);
+ 
+-			//Get current point coordinates
+-			r.x=x_interp[i]; r.y=y_interp[i];
+-			I2 I=Th.R2ToI2(r);
+-
+-			//Find triangle holding r/I
+-			Triangle &tb=*Th.TriangleFindFromCoord(I,dete);
+-
+-			// internal point 
+-			if (tb.det>0){ 
+-				//Area coordinate
+-				areacoord[0]= (double) dete[0]/tb.det;
+-				areacoord[1]= (double) dete[1]/tb.det;
+-				areacoord[2]= (double) dete[2]/tb.det;
+-				//3 vertices of the triangle
+-				i0=Th.GetId(tb[0]);
+-				i1=Th.GetId(tb[1]);
+-				i2=Th.GetId(tb[2]);
+-				//triangle number
+-				it=Th.GetId(tb);
++		// internal point 
++		if (tb.det>0){ 
++			//Area coordinate
++			areacoord[0]= (double) dete[0]/tb.det;
++			areacoord[1]= (double) dete[1]/tb.det;
++			areacoord[2]= (double) dete[2]/tb.det;
++			//3 vertices of the triangle
++			i0=Th.GetId(tb[0]);
++			i1=Th.GetId(tb[1]);
++			i2=Th.GetId(tb[2]);
++			//triangle number
++			it=Th.GetId(tb);
++		}
++		//external point
++		else{
++			if(isdefault){
++				for(j=0;j<N_data;j++) data_interp[i*N_data+j]=defaultvalue;
++				continue;
+ 			}
+-			//external point
+-			else {
++			else{
+ 				//Get closest adjacent triangle (inside the mesh)
+ 				AdjacentTriangle ta=CloseBoundaryEdge(I,&tb,aa,bb).Adj();
+ 				int k=ta;
+@@ -115,29 +97,24 @@
+ 				//triangle number
+ 				it=Th.GetId(tc);
+ 			}
+-			
+-			if (data_rows==nods_data){
+-				for (j=0;j<data_cols;j++){
+-					data_interp[i*data_cols+j]=areacoord[0]*data[data_cols*i0+j]+areacoord[1]*data[data_cols*i1+j]+areacoord[2]*data[data_cols*i2+j];
+-				}
++		}
++
++		if (M_data==nods_data){
++			for (j=0;j<N_data;j++){
++				data_interp[i*N_data+j]=areacoord[0]*data[N_data*i0+j]+areacoord[1]*data[N_data*i1+j]+areacoord[2]*data[N_data*i2+j];
+ 			}
+-			else{
+-				for (j=0;j<data_cols;j++){
+-					if (it<0 || it>=nels_data){
+-						_error2_("Triangle number " << it << " not in [0 " << nels_data << "], because not correctly implemented yet... interpolate on grid first");
+-					}
+-					data_interp[i*data_cols+j]=data[data_cols*it+j];
++		}
++		else{
++			for (j=0;j<N_data;j++){
++				if (it<0 || it>=nels_data){
++					_error2_("Triangle number " << it << " not in [0 " << nels_data << "], report bug to developers");
+ 				}
++				data_interp[i*N_data+j]=data[N_data*it+j];
+ 			}
+ 		}
+-		else{
+-			if(num_default_values==1) data_interp[i]=default_values[0];
+-			else data_interp[i]=default_values[i];
+-		}
+ 	}
+ 
+ 	/*Assign output pointers:*/
+-	if (verbose) _printLine_("Assigning output");
+ 	*pdata_interp=data_interp;
+ 
+ 	/*No error return*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.h	(revision 12599)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.h	(revision 12600)
+@@ -5,10 +5,9 @@
+ #ifndef _INTERPFROMMESHTOMESH2DX_H
+ #define _INTERPFROMMESHTOMESH2DX_H
+ 
+-#include "../../objects/objects.h"
++class Options;
+ 
+-/* local prototypes: */
+-int InterpFromMeshToMesh2dx(double** pdata_interp,double* index_data,double* x_data,double* y_data,int nods_data,int nels_data,
+-			double* data,int data_rows,int data_cols,double* x_interp,double* y_interp,int nods_interp,double* default_values,int num_default_values,DataSet* contours);
++int InterpFromMeshToMesh2dx(double** pdata_interp,int* index_data,double* x_data,double* y_data,int nods_data,int nels_data,
++			double* data,int M_data,int N_data,double* x_interp,double* y_interp,int N_interp,Options* options);
+ 
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.h	(revision 12599)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.h	(revision 12600)
+@@ -8,6 +8,6 @@
+ #include "../../objects/objects.h"
+ 
+ /* local prototypes: */
+-int BamgConvertMeshx(BamgMesh* bamgmesh,BamgGeom* bamggeom,double* index,double* x,double* y,int nods,int nels);
++int BamgConvertMeshx(BamgMesh* bamgmesh,BamgGeom* bamggeom,int* index,double* x,double* y,int nods,int nels);
+ 
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.cpp	(revision 12599)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.cpp	(revision 12600)
+@@ -11,31 +11,20 @@
+ using namespace bamg;
+ using namespace std;
+ 
+-int BamgConvertMeshx(BamgMesh* bamgmesh,BamgGeom* bamggeom,double* index,double* x,double* y,int nods,int nels){
++int BamgConvertMeshx(BamgMesh* bamgmesh,BamgGeom* bamggeom,int* index,double* x,double* y,int nods,int nels){
+ 
+-	/*Intermediary*/
+-	int i,j,k;
+-	int verbose=0;
+-	int noerr=1;
+-
+ 	/*Options*/
+-	BamgOpts* bamgopts=NULL;
+-	bamgopts=new BamgOpts();
++	BamgOpts* bamgopts=new BamgOpts();
+ 
+-	// read mesh
+-	if(verbose) _printLine_("Reading mesh");
++	/*read mesh*/
+ 	Mesh Th(index,x,y,nods,nels); 
+ 
+-	//write mesh and geometry
+-	if (verbose) _printLine_("Write Geometry");
++	/*write mesh and geometry*/
+ 	Th.Gh.WriteGeometry(bamggeom,bamgopts);
+-	if (verbose) _printLine_("Write Mesh");
+ 	Th.WriteMesh(bamgmesh,bamgopts);
+ 
+-	//clean up
++	/*clean up and return*/
+ 	delete bamgopts;
++	return 1;
+ 
+-	/*No error return*/
+-	return noerr;
+-
+ }
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12599)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12600)
+@@ -61,19 +61,15 @@
+ 		double *y     = NULL;
+ 		double *data  = NULL;
+ 		int    *index = NULL;
+-		double *indexd= NULL;
+ 
+ 		observations->ObservationList(&x,&y,&data,&nobs);
+ 
+ 		_printLine_("Generation Delaunay Triangulation");
+ 		BamgTriangulatex(&index,&nel,x,y,nobs);
+-		indexd =xNewZeroInit<double>(nel*3);
+-		for(int i=0;i<nel*3;i++) indexd[i]=(double)index[i];
+-		xDelete<int>(index);
+ 
+ 		_printLine_("Interpolating");
+ 		xDelete<double>(predictions);
+-		InterpFromMeshToMesh2dx(&predictions,indexd,x,y,nobs,nel,data,nobs,1,x_interp,y_interp,n_interp,NULL,0,new DataSet());
++		InterpFromMeshToMesh2dx(&predictions,index,x,y,nobs,nel,data,nobs,1,x_interp,y_interp,n_interp,options);
+ 		xDelete<double>(x);
+ 		xDelete<double>(y);
+ 		xDelete<double>(data);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.h	(revision 12599)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.h	(revision 12600)
+@@ -8,6 +8,6 @@
+ #include "../../objects/objects.h"
+ 
+ /* local prototypes: */
+-void TriaSearchx(double** ptria,double* index,int nel, double* x, double* y, int nods,double* x0, double* y0,int numberofnodes);
++void TriaSearchx(double** ptria,int* index,int nel, double* x, double* y, int nods,double* x0, double* y0,int numberofnodes);
+ 
+ #endif
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp	(revision 12599)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp	(revision 12600)
+@@ -12,7 +12,7 @@
+ using namespace bamg;
+ using namespace std;
+ 
+-void TriaSearchx(double** ptria,double* index,int nel, double* x, double* y, int nods,double* x0, double* y0,int numberofnodes){
++void TriaSearchx(double** ptria,int* index,int nel, double* x, double* y, int nods,double* x0, double* y0,int numberofnodes){
+ 
+ 	/*Output*/
+ 	double* tria=NULL;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.h	(revision 12599)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.h	(revision 12600)
+@@ -56,7 +56,7 @@
+ 
+ 			//Constructors/Destructors
+ 			Mesh(BamgGeom* bamggeom,BamgMesh* bamgmesh,BamgOpts* bamgopts);
+-			Mesh(double* index,double* x,double* y,int nods,int nels);/*MeshConvert*/
++			Mesh(int* index,double* x,double* y,int nods,int nels);/*MeshConvert*/
+ 			Mesh(double* x,double* y,int nods); /*BamgTriangulate*/
+ 			Mesh(Mesh &,Geometry * pGh=0,Mesh* pBTh=0,long maxnbv_in=0 ); //copy operator
+ 			Mesh(const Mesh &,const int *flag,const int *bb,BamgOpts* bamgopts); // truncature
+@@ -109,7 +109,7 @@
+ 			long GetId(const Edge * t) const;
+ 			BamgVertex* NearestVertex(Icoor1 i,Icoor1 j) ;
+ 			Triangle* TriangleFindFromCoord(const I2 & ,Icoor2 [3],Triangle *tstart=0) const;
+-			void ReadMesh(double* index,double* x,double* y,int nods,int nels);
++			void ReadMesh(int* index,double* x,double* y,int nods,int nels);
+ 			void ReadMesh(BamgMesh* bamgmesh, BamgOpts* bamgopts);
+ 			void WriteMesh(BamgMesh* bamgmesh,BamgOpts* bamgopts);
+ 			void ReadMetric(const BamgOpts* bamgopts);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12599)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12600)
+@@ -40,8 +40,8 @@
+ 		ReconstructExistingMesh();
+ 	}
+ 	/*}}}*/
+-	/*FUNCTION Mesh::Mesh(double* index,double* x,double* y,int nods,int nels){{{*/
+-	Mesh::Mesh(double* index,double* x,double* y,int nods,int nels):Gh(*(new Geometry())),BTh(*this){
++	/*FUNCTION Mesh::Mesh(int* index,double* x,double* y,int nods,int nels){{{*/
++	Mesh::Mesh(int* index,double* x,double* y,int nods,int nels):Gh(*(new Geometry())),BTh(*this){
+ 
+ 		Init(0);
+ 		ReadMesh(index,x,y,nods,nels);
+@@ -264,8 +264,8 @@
+ 	/*}}}*/
+ 
+ 	/*IO*/
+-	/*FUNCTION Mesh::ReadMesh(double* index,double* x,double* y,int nods,int nels){{{*/
+-	void Mesh::ReadMesh(double* index,double* x,double* y,int nods,int nels){
++	/*FUNCTION Mesh::ReadMesh(int* index,double* x,double* y,int nods,int nels){{{*/
++	void Mesh::ReadMesh(int* index,double* x,double* y,int nods,int nels){
+ 
+ 		double Hmin = HUGE_VAL;// the infinie value 
+ 		long i1,i2,i3;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12600-12601.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12600-12601.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12600-12601.diff	(revision 12679)
@@ -0,0 +1,336 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12600)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12601)
+@@ -3,28 +3,20 @@
+  */
+ #include "./BamgConvertMesh.h"
+ 
+-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++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;
++	int    *index      = NULL;
++	double *x          = NULL;
++	double *y          = NULL;
++	int     nods,nels,test1,test2;
+ 
+ 	/*Output*/
+-	BamgMesh* bamgmesh=NULL;
+-	BamgGeom* bamggeom=NULL;
+-	mxArray* bamgmesh_mat=NULL;
+-	mxArray* bamggeom_mat=NULL;
++	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();
+ 
+@@ -36,30 +28,17 @@
+ 	bamgmesh=new BamgMesh();
+ 
+ 	/*Input datasets: */
+-	if (verbose) _printLine_("Fetching inputs");
+-	FetchData(&index,&nels,&index_rows,INDEXHANDLE);
+-	FetchData(&x,&nods,&x_cols,XHANDLE);
+-	FetchData(&y,&y_rows,&y_cols,YHANDLE);
++	FetchData(&index,&nels,&test1,INDEXHANDLE);
++	FetchData(&x,&nods,XHANDLE);
++	FetchData(&y,&test2,YHANDLE);
+ 
+ 	/*Check inputs*/
+-	if (nels<0){
+-		_error2_("Number of elements must be positive, check index number of lines");
+-	}
+-	if (nods<0){
+-		_error2_("Number of nods must be positive, check x and y sizes");
+-	}
+-	if (index_rows!=3){
+-		_error2_("index should have 3 columns");
+-	}
+-	if (y_rows!=nods){
+-		_error2_("x and y do not have the same length");
+-	}
+-	if (x_cols>1 || y_cols>1){
+-		_error2_("x and y should have only one column");
+-	}
++	if(nels<0) _error2_("Number of elements must be positive, check index number of lines");
++	if(nods<0) _error2_("Number of nods must be positive, check x and y sizes");
++	if(test1!=3) _error2_("index should have 3 columns");
++	if(test2!=nods) _error2_("x and y do not have the same length");
+ 
+ 	/* Run core computations: */
+-	if (verbose) _printLine_("Call core");
+ 	BamgConvertMeshx(bamgmesh,bamggeom,index,x,y,nods,nels);
+ 
+ 	/*Generate output Matlab Structures*/
+@@ -74,8 +53,7 @@
+ 	MODULEEND();
+ }
+ 
+-void BamgConvertMeshUsage(void)
+-{
++void BamgConvertMeshUsage(void){
+ 	_pprintString_("BAMGCONVERTMESH - convert [x y index] to a bamg geom and mesh geom");
+ 	_pprintLine_("");
+ 	_pprintLine_("   Usage:");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp	(revision 12600)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp	(revision 12601)
+@@ -8,7 +8,7 @@
+ 	int i;
+ 
+ 	/*input: */
+-	double* index=NULL;
++	int*    index=NULL;
+ 	int     nel;
+ 	int     dummy;
+ 
+@@ -36,10 +36,6 @@
+ 	FetchData(&x0,&numberofnodes,X0HANDLE);
+ 	FetchData(&y0,&numberofnodes,Y0HANDLE);
+ 
+-	/* Echo: {{{1*/
+-	//_printLine_("(x0,y0)=(" << x0 << "," << y0 << ")");
+-	/*}}}*/
+-
+ 	/* Run core computations: */
+ 	TriaSearchx(&tria,index,nel,x,y,nods,x0,y0,numberofnodes);
+ 
+@@ -53,8 +49,7 @@
+ 	MODULEEND();
+ }
+ 
+-void TriaSearchUsage(void)
+-{
++void TriaSearchUsage(void){
+ 	_pprintLine_("TriaSearch- find triangle holding a point (x0,y0) in a mesh");
+ 	_pprintLine_("");
+ 	_pprintLine_("   Usage:");
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12600)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12601)
+@@ -6,31 +6,20 @@
+ 
+ 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;
+-	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;
++	/*Intermediaties*/
++	int     *index              = NULL;
++	double  *x_data             = NULL;
++	double  *y_data             = NULL;
++	double  *data               = NULL;
++	int      nods_data,nels_data;
++	int      M_data,N_data;
++	double  *x_interp           = NULL;
++	double  *y_interp           = NULL;
++	int      N_interp;
++	Options *options   = NULL;
++	double  *data_interp = NULL;
++	int      test1,test2,test;
+ 
+-	/*Intermediary*/
+-	int nels_data;
+-
+-	/* output: */
+-	double* data_interp=NULL;
+-
+ 	/*Boot module: */
+ 	MODULEBOOT();
+ 
+@@ -42,78 +31,52 @@
+ 	}
+ 	#endif
+ 	/*check on input arguments: */
+-	if((nrhs!=6) & (nrhs!=8)){
++	if(nrhs<NRHS){
+ 		InterpFromMeshToMesh2dUsage();
+ 		_error2_("InterpFromMeshToMesh2dUsage usage error");
+ 	}
+ 
+-	/*Input datasets: */
+-	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);
++	/*Fetch inputs: */
++	FetchData(&index,&nels_data,&test,INDEX); if(test!=3) _error2_("index should have 3 columns");
++	FetchData(&x_data,&nods_data,X);          if(nods_data<3) _error2_("there should be at least three points");
++	FetchData(&y_data,&test,Y);               if(test!=nods_data) _error2_("vectors x and y should have the same length");
++	FetchData(&data,&M_data,&N_data,DATA);    if(M_data*N_data<1) _error2_("data is empty");
++	FetchData(&x_interp,&N_interp,XINTERP);   if(N_interp<1) _error2_("no interpolation requested");
++	FetchData(&y_interp,&test,YINTERP);       if(test!=N_interp) _error2_("vectors x_interp and y_interp should have the same length");
++	FetchData(&options,NRHS,nrhs,prhs);
+ 
+-	/*Figure out contours and default values: */
+-	if(nrhs==8){
+-		FetchData(&default_values,&num_default_values,DEFAULT);
+-		FetchData(&contourname,CONTOURNAME);
+-		contours=DomainOutlineRead(contourname);
+-	}
+-	else{
+-		num_default_values=0;
+-		default_values=NULL;
+-		contours=new DataSet();
+-	}
++	/*Run core computations*/
++	InterpFromMeshToMesh2dx(&data_interp,index,x_data,y_data,nods_data,nels_data,data,M_data,N_data,x_interp,y_interp,N_interp,options);
+ 
+-
+-	/*some checks*/
+-	if (x_data_rows!=y_data_rows){
+-		_error2_("vectors x and y should have the same length!");
+-	}
+-	if (x_interp_rows!=y_interp_rows){
+-		_error2_("vectors x_interp and y_interp should have the same length!");
+-	}
+-	if (index_cols!=3){
+-		_error2_("index should have 3 columns (input provided has " << index_cols << " columns)");
+-	}
+-
+-	/* Run core computations: */
+-	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,x_interp_rows,data_cols);
++	WriteData(DATAINTERP,data_interp,N_interp,N_data);
+ 
+ 	/*end module: */
+ 	MODULEEND();
+ }
+ 
+-void InterpFromMeshToMesh2dUsage(void)//{{{1
+-
+-{
++void InterpFromMeshToMesh2dUsage(void){ /*{{{*/
+ 	_pprintLine_("INTERFROMMESHTOMESH2D - interpolation from a 2d triangular mesh onto a list of point");
+ 	_pprintLine_("");
+ 	_pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
+-	_pprintLine_("   defined on a triangular mesh onto a list of point");
++	_pprintLine_("   defined on a Delaunay triangulation onto a list of point");
+ 	_pprintLine_("");
+ 	_pprintLine_("   Usage:");
+ 	_pprintLine_("         data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp);");
+-	_pprintLine_("      or data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp,default_value,contourname);");
++	_pprintLine_("      or data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp,OPTIONS);");
+ 	_pprintLine_("");
+-	_pprintLine_("      index: index of the mesh where data is defined");
+-	_pprintLine_("      x,y: coordinates of the nodes where data is defined");
+-	_pprintLine_("      data: matrix holding the data to be interpolated onto the mesh. (one column per field)");
+-	_pprintLine_("      x_interp,y_interp: coordinates of the points onto which we interpolate.");
+-	_pprintLine_("      if default_value and contourname not specified: linear interpolation will happen on all x_interp,y_interp.");
+-	_pprintLine_("      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.");
+-	_pprintLine_("      note that default_value is either a scalar, or a vector of size  length(x_interp)");
+-	_pprintLine_("      data_interp: vector of mesh interpolated data.");
++	_pprintLine_("      index             : index of the mesh where data is defined");
++	_pprintLine_("      x,y               : coordinates of the nodes where data is defined");
++	_pprintLine_("      data              : matrix holding the data to be interpolated onto the mesh. (one column per field)");
++	_pprintLine_("      x_interp,y_interp : coordinates of the points onto which we interpolate.");
++	_pprintLine_("      data_interp       : vector of mesh interpolated data.");
++	_pprintLine_("      Available options :");
++	_pprintLine_("         - 'default' : default value if point is outsite of triangulation (instead of linear interolation)");
+ 	_pprintLine_("");
+ 	_pprintLine_("   Example:");
+ 	_pprintLine_("      load('temperature.mat');");
+ 	_pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y);");
+-	_pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y,253,'Contour.exp');");
++	_pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y,'default',253);");
+ 	_pprintLine_("");
+ }
+-//}}}
++/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h	(revision 12600)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h	(revision 12601)
+@@ -11,7 +11,10 @@
+ #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*/
++/* local prototypes: */
++void InterpFromMeshToMesh2dUsage(void);
++
++/*If python: this macro needs to come before header files inclusion*/
+ #ifdef _HAVE_PYTHON_
+ #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
+ #endif
+@@ -27,6 +30,9 @@
+ #include "../../c/io/io.h"
+ #include "../../c/EnumDefinitions/EnumDefinitions.h"
+ 
++#undef __FUNCT__ 
++#define __FUNCT__  "InterpFromMeshToMesh2d"
++
+ #ifdef _HAVE_MATLAB_MODULES_
+ /* serial input macros: */
+ #define INDEX prhs[0]
+@@ -35,8 +41,6 @@
+ #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]
+@@ -50,22 +54,15 @@
+ #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
++#define NRHS  6
+ 
+-/* local prototypes: */
+-void InterpFromMeshToMesh2dUsage(void);
+-
+ #endif
Index: /issm/oecreview/Archive/12321-12677/ISSM-12601-12602.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12601-12602.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12601-12602.diff	(revision 12679)
@@ -0,0 +1,31 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plotmodel.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plotmodel.m	(revision 12601)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plotmodel.m	(revision 12602)
+@@ -47,7 +47,6 @@
+ 	try,
+ 		for i=1:numberofplots,
+ 			plot_manager(getfieldvalue(options.list{i},'model',md),options.list{i},subplotwidth,nlines,ncols,i);
+-
+ 		end
+ 	catch me,
+ 		%figure(figurenumber),close;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m	(revision 12601)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m	(revision 12602)
+@@ -1,4 +1,4 @@
+-function plot_profile(md,data,options,nlines,ncols,i)
++function plot_profile(md,data,options,nlines,ncols,ii)
+ %PLOT_SECTION - plot a given field on a profile
+ %
+ %   Usage:
+@@ -42,7 +42,7 @@
+ 	[z,data_interp]=ProfileValues(md,data,xprof,yprof,resolution);
+ 
+ 	%plot profile
+-	subplot(nlines,ncols,i)
++	subplot(nlines,ncols,ii)
+ 	plot(data_interp,z,'color',color(i,:),'LineWidth',getfieldvalue(options,'linewidth',1),'LineStyle','-');
+ 	hold on;
+ end
Index: /issm/oecreview/Archive/12321-12677/ISSM-12602-12603.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12602-12603.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12602-12603.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m	(revision 12602)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_profile.m	(revision 12603)
+@@ -39,7 +39,7 @@
+ 	end
+ 
+ 	%Compute profile value
+-	[z,data_interp]=ProfileValues(md,data,xprof,yprof,resolution);
++	[z,data_interp]=ProfileValues(md,datai,xprof,yprof,resolution);
+ 
+ 	%plot profile
+ 	subplot(nlines,ncols,ii)
Index: /issm/oecreview/Archive/12321-12677/ISSM-12603-12604.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12603-12604.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12603-12604.diff	(revision 12679)
@@ -0,0 +1,64 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 12603)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 12604)
+@@ -50,30 +50,41 @@
+ 
+ 	/*read background mesh*/
+ 	Mesh Th(index_data,x_data,y_data,nods_data,nels_data); 
++
++	/*Get reference number (for subdomains)*/
++	long* reft = xNew<long>(Th.nbt);
++	Th.TriangleReferenceList(reft);
+ 	Th.CreateSingleVertexToTriangleConnectivity();
+ 
+ 	/*Loop over output nodes*/
+ 	for(i=0;i<N_interp;i++){
+ 
+-		//Get current point coordinates
++		/*Get current point coordinates*/
+ 		r.x=x_interp[i]; r.y=y_interp[i];
+ 		I2 I=Th.R2ToI2(r);
+ 
+-		//Find triangle holding r/I
++		/*Find triangle holding r/I*/
+ 		Triangle &tb=*Th.TriangleFindFromCoord(I,dete);
+ 
+-		// internal point 
++		/*point inside convex*/
+ 		if (tb.det>0){ 
+-			//Area coordinate
++
++			/*Area coordinates*/
+ 			areacoord[0]= (double) dete[0]/tb.det;
+ 			areacoord[1]= (double) dete[1]/tb.det;
+ 			areacoord[2]= (double) dete[2]/tb.det;
+-			//3 vertices of the triangle
++			/*3 vertices of the triangle*/
+ 			i0=Th.GetId(tb[0]);
+ 			i1=Th.GetId(tb[1]);
+ 			i2=Th.GetId(tb[2]);
+-			//triangle number
++			/*triangle number*/
+ 			it=Th.GetId(tb);
++
++			/*Inside convex but outside mesh*/
++			if (reft[it]<0 & isdefault){
++				for(j=0;j<N_data;j++) data_interp[i*N_data+j]=defaultvalue;
++				continue;
++			}
+ 		}
+ 		//external point
+ 		else{
+@@ -114,9 +125,8 @@
+ 		}
+ 	}
+ 
+-	/*Assign output pointers:*/
++	/*clean-up and return*/
++	xDelete<long>(reft);
+ 	*pdata_interp=data_interp;
+-
+-	/*No error return*/
+ 	return 1;
+ }
Index: /issm/oecreview/Archive/12321-12677/ISSM-12604-12605.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12604-12605.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12604-12605.diff	(revision 12679)
@@ -0,0 +1,83 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/averaging.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/averaging.m	(revision 12604)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/averaging.m	(revision 12605)
+@@ -1,4 +1,4 @@
+-function average=averaging(md,data,iterations)
++function average=averaging(md,data,iterations,varargin)
+ %AVERAGING - smooths the input over the mesh
+ %
+ %   This routine takes a list over the elements or the nodes in input
+@@ -7,35 +7,63 @@
+ %   of the vertices values) and then computes the average over each node
+ %   by taking the average of the element around a node weighted by the
+ %   elements volume
++%   For 3d mesh, a last argument can be added to specify the layer to be averaged on.
+ %
+ %   Usage:
+ %      smoothdata=averaging(md,data,iterations)
++%      smoothdata=averaging(md,data,iterations,layer)
+ %
+ %   Examples:
+ %      velsmoothed=averaging(md,md.initialization.vel,4);
+ %      pressure=averaging(md,md.initialization.pressure,0);
++%      temperature=averaging(md,md.initialization.temperature,1,1);
+ 
+-if length(data)~=md.mesh.numberofelements & length(data)~=md.mesh.numberofvertices
++if ((nargin~=4) & (nargin~=3)),
++	error('averaging error message');
++end
++if (length(data)~=md.mesh.numberofelements & length(data)~=md.mesh.numberofvertices),
+ 	error('averaging error message: data not supported yet');
+ end
++if md.mesh.dimension==3 & nargin==4,
++	if varargin{1}<=0 | varargin{1}>md.mesh.numberoflayers,
++		error('layer should be between 1 and md.mesh.numberoflayers');
++	end
++	layer=varargin{1};
++else
++	layer=0;
++end
+ 
+ %initialization
+-weights=zeros(md.mesh.numberofvertices,1);
+-data=data(:);
++if layer==0,
++	weights=zeros(md.mesh.numberofvertices,1);
++	data=data(:);
++else 
++	weights=zeros(md.mesh.numberofvertices2d,1);
++	data=data((layer-1)*md.mesh.numberofvertices2d+1:layer*md.mesh.numberofvertices2d,:);
++end
+ 
+-%load some variables (it is much faster if the variab;es are loaded from md once for all)
+-index=md.mesh.elements;
+-numberofnodes=md.mesh.numberofvertices;
+-numberofelements=md.mesh.numberofelements;
++%load some variables (it is much faster if the variabes are loaded from md once for all)
++if layer==0,
++	index=md.mesh.elements;
++	numberofnodes=md.mesh.numberofvertices;
++	numberofelements=md.mesh.numberofelements;
++else
++	index=md.mesh.elements2d;
++	numberofnodes=md.mesh.numberofvertices2d;
++	numberofelements=md.mesh.numberofelements2d;
++end
+ 
+ %build some variables
+ line=index(:);
+-if md.mesh.dimension==3
++if md.mesh.dimension==3 & layer==0,
+ 	rep=6;
+ 	areas=GetAreas(index,md.mesh.x,md.mesh.y,md.mesh.z);
++elseif md.mesh.dimension==2,
++	rep=3;
++	areas=GetAreas(index,md.mesh.x,md.mesh.y);
+ else
+ 	rep=3;
+-	areas=GetAreas(index,md.mesh.x,md.mesh.y);
++	areas=GetAreas(index,md.mesh.x2d,md.mesh.y2d);
+ end
+ summation=1/rep*ones(rep,1);
+ linesize=rep*numberofelements;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12605-12606.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12605-12606.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12605-12606.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12605)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12606)
+@@ -119,8 +119,6 @@
+ 	b=colorm(:,3); image_rgb(:,:,3)=b(ind); clear b;
+ 
+ 	%Now add radarmap
+-	radar = (md.radaroverlay.pwr).^(contrast);
+-	radar = radar/max(radar(:));
+ 	r = image_rgb(:,:,1).*radar;  r(data_nan) = radar(data_nan);  image_rgb(:,:,1) = r;  clear r;
+ 	g = image_rgb(:,:,2).*radar;  g(data_nan) = radar(data_nan);  image_rgb(:,:,2) = g;  clear g;
+ 	b = image_rgb(:,:,3).*radar;  b(data_nan) = radar(data_nan);  image_rgb(:,:,3) = b;  clear b;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12606-12607.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12606-12607.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12606-12607.diff	(revision 12679)
@@ -0,0 +1,78 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12606)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12607)
+@@ -13,9 +13,9 @@
+ present_dir=`pwd`;
+ sd_card="issm-sdcard"
+ 
+-((tmp=$1- 3)) 
++((tmp=$1 )) 
+ 
+-if [[ $tmp -ge "-2" && $tmp -le "3" ]]; then
++if [[ $tmp -ge "1" && $tmp -le "4" ]]; then
+     step=$1
+ else
+     echo "Using default step: " $step
+@@ -24,7 +24,7 @@
+ if [[ $step == "1" ]]; then
+ 
+ 	#Cleanup the install
+-	rm -rf install-sdk install-ant
++	rm -rf install-sdk
+ 
+ 	#Download from ISSM server
+ 	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-sdk_r'$sdk_rev'-macosx.zip' 'android-sdk_r'${sdk_rev}'-macosx.zip'
+@@ -80,13 +80,14 @@
+ 	./emulator -avd $default_droid -sdcard $ANDROID_DIR/android-emulators/$sd_card.img &
+ 
+     cd ../platform-tools
+-    ./adb wait-for-device shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system
++    ./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
++    #./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
+-	rm -rf install-sdk install-ant
++	rm -rf install-sdk
+ fi
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android_variables.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android_variables.sh	(revision 12606)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/android_variables.sh	(revision 12607)
+@@ -1,6 +1,5 @@
+ sdk_rev=20
+ ndk_rev=8
+ api_levels="android-14,android-15,android-16"
+-host_triplet=""
++host_triplet="arm-linux-androideabi"
+ default_droid="android-4.1"
+-toolchain_path=${ANDROID_DIR}"/arm-linux-"${default_droid}"/bin/arm-linux-androideabi"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh	(revision 12606)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/gsl/install-android.sh	(revision 12607)
+@@ -19,14 +19,8 @@
+ cd src
+ 
+ ./configure \
+-    CC=${toolchain_path}-gcc\
+-    LD=${toolchain_path}-ld\
+-    AR=${toolchain_path}-ar\
+-    RANLIB=${toolchain_path}-ranlib\
+-    NM=${toolchain_path}-nm\
+-    OBJ_EXT=o\
+-    LIB_EXT=a\
+-    --host="arm-linux"\
++    --build="i386-apple-darwin10.8.0" \
++    --host=$host_triplet\
+ 	--prefix="$ISSM_DIR/externalpackages/gsl/install" 
+ 
+ #Compile gsl
Index: /issm/oecreview/Archive/12321-12677/ISSM-12607-12608.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12607-12608.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12607-12608.diff	(revision 12679)
@@ -0,0 +1,39 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-pleiades-petscdev.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-pleiades-petscdev.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-pleiades-petscdev.sh	(revision 12608)
+@@ -0,0 +1,28 @@
++#!/bin/csh
++
++./configure \
++ --prefix=$ISSM_DIR \
++ --with-modules=no \
++ --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++ --with-metis-dir=$ISSM_DIR/externalpackages/petsc/src/externalpackages/metis-5.0.2-p3 \
++ --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-tao-dir=$ISSM_DIR/externalpackages/tao/install \
++ --with-mpi-include=/nasa/sgi/mpt/2.04/include \
++ --with-mpi-lib="-L/nasa/sgi/mpt/2.04/lib/ -lmpi -lpthread -lgfortran" \
++ --with-petsc-arch=$ISSM_ARCH \
++ --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++ --with-mkl-dir=/nasa/intel/mkl/10.0.011/lib/64/ \
++ --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++ --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/src/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-spai-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-hypre-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-prometheus-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-superlu-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-spooles-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-pastix-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-graphics-lib=/usr/lib64/libX11.so \
++ --with-cxxoptflags="-O3 -xS" \
++ --with-vendor=intel-pleiades
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-pleiades-petscdev.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12608-12609.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12608-12609.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12608-12609.diff	(revision 12679)
@@ -0,0 +1,108 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/petsc/install-dev-pleiades.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/petsc/install-dev-pleiades.sh	(revision 12608)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/petsc/install-dev-pleiades.sh	(revision 12609)
+@@ -1,6 +1,6 @@
+ #!/bin/bash
+ #Step 0: download
+-#Step 1: unzip and install
++#Step 1: install before plapack crasehs
+ #Step 2: After Plapack implodes
+ STEP=0
+ 
+@@ -25,18 +25,9 @@
+ # for now downloading new metis
+ #   -then rename metis in externalpackages to metis2
+ if [ $STEP -eq 1 ]; then
+-	#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'
++	mkdir install
+ 
+-	#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 \
+@@ -48,8 +39,8 @@
+ 		--with-shared-libraries=0 \
+ 		--with-blas-lapack-dir=/nasa/intel/mkl/10.0.011/ \
+ 		--known-mpi-shared-libraries=1 \
+-		--with-mpi-lib=/nasa/sgi/mpt/1.25/lib/libmpi.so \
+-		--with-mpi-include=/nasa/sgi/mpt/1.25/include  \
++		--with-mpi-lib=/nasa/sgi/mpt/2.04/lib/libmpi.so \
++		--with-mpi-include=/nasa/sgi/mpt/2.04/include  \
+ 		--download-mumps=yes \
+ 		--download-plapack=yes \
+ 		--download-scalapack=yes \
+@@ -58,7 +49,13 @@
+ 		--download-f-blas-lapack=yes \
+ 		--download-parmetis=yes \
+ 		--download-metis=yes \
++		--download-trilinos=yes \
++		--download-euclid=yes \
++		--download-pastix=yes \
++		--download-ptscotch=yes \
++		--download-spooles=yes \
+ 		--download-spai=yes \
++		--download-superlu=http://crd.lbl.gov/~xiaoye/SuperLU/superlu_4.3.tar.gz \
+ 		--FFLAGS=-I/usr/include \
+ 		--with-cc=icc \
+ 		--with-fc=ifort \
+@@ -79,19 +76,27 @@
+ 	 --with-debugging=0 \
+ 	 --with-shared-libraries=0 \
+ 	 --with-blas-lapack-dir=/nasa/intel/mkl/10.0.011/ \
+-	 --with-mpi-lib=/nasa/sgi/mpt/1.25/lib/libmpi.so \
+-	 --with-mpi-include=/nasa/sgi/mpt/1.25/include  \
++	 --with-mpi-lib=/nasa/sgi/mpt/2.04/lib/libmpi.so \
++	 --with-mpi-include=/nasa/sgi/mpt/2.04/include  \
+ 	 --known-mpi-shared-libraries=1 \
+ 	 --download-mumps=yes \
+ 	 --download-scalapack=yes \
+ 	 --download-blacs=yes  \
+ 	 --download-blas=yes \
+-	 --download-f-blas-lapack=yes \
++	 --with-f-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/src/$ISSM_ARCH \
+ 	 --download-parmetis=yes \
+ 	 --download-metis=yes \
+-	 --download-spai=yes \
++	 --with-cxx=icpc \
++	 --download-hypre=yes \
++	 --download-trilinos=yes \
++	 --download-prometheus=yes \
++	 --download-euclid=yes \
++	 --download-pastix=yes \
++	 --download-ptscotch=yes \
++	 --download-spooles=yes \
++	 --download-superlu=http://crd.lbl.gov/~xiaoye/SuperLU/superlu_4.3.tar.gz \
++	 --with-spai-dir=$ISSM_DIR/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 \
+ 	 --with-fc=ifort \
+@@ -99,7 +104,7 @@
+ 	 --FOPTFLAGS=" -O3 -xS" \
+ 	 --CXXOPTFLAGS=" -O3 -xS" \
+ 	 --with-pic=1
+-	 cat > src/script.queue << EOF
++	 cat > script.queue << EOF
+ #PBS -S /bin/bash
+ #PBS -q debug 
+ #PBS -l select=1:ncpus=1:model=har 
+@@ -108,7 +113,7 @@
+ #PBS -m e 
+ . /usr/share/modules/init/bash 
+ module load comp-intel/11.1.046 
+-module load mpi/mpt.1.25 
++module load mpi-sgi/mpt.2.04  #DEFINES MPI_Type_create_indexed_block
+ module load math/intel_mkl_64_10.0.011 
+ export PATH="$PATH:." 
+ export MPI_GROUP_MAX=64 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12609-12610.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12609-12610.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12609-12610.diff	(revision 12679)
@@ -0,0 +1,10 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12609)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12610)
+@@ -1,4 +1,4 @@
+-INCLUDES = @DAKOTAINCL@ @SHAPELIBINCL@ @PETSCINCL@ @SLEPCINCL@ @MPIINCL@ @MATLABINCL@ @METISINCL@ @CHACOINCL@ @SCOTCHINCL@ @PLAPACKINCL@ @BLASLAPACKINCL@ @MKLINCL@ @MUMPSINCL@ @TRIANGLEINCL@ @HYPREINCL@ @MLINCL@ @TAOINCL@ @ADIC2INCL@ @ADOLCINCL@ @GSLINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
++INCLUDES = @DAKOTAINCL@ @SHAPELIBINCL@ @PETSCINCL@ @SLEPCINCL@ @MPIINCL@ @MATLABINCL@ @METISINCL@ @CHACOINCL@ @SCOTCHINCL@ @PLAPACKINCL@ @BLASLAPACKINCL@ @MKLINCL@ @MUMPSINCL@ @TRIANGLEINCL@ @SPAIINCL@ @HYPREINCL@ @PROMETHEUSINCL@ @SUPERLUINCL@ @SPOOLESINCL@ @PASTIXINCL@ @MLINCL@ @TAOINCL@ @ADIC2INCL@ @ADOLCINCL@ @GSLINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
+ 
+ EXEEXT=$(ISSMEXT)
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12610-12611.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12610-12611.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12610-12611.diff	(revision 12679)
@@ -0,0 +1,28 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/matlab/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/matlab/Makefile.am	(revision 12610)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/modules/matlab/Makefile.am	(revision 12611)
+@@ -1,4 +1,4 @@
+-INCLUDES = @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
++INCLUDES = @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @SPOOLESINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
+ EXEEXT=$(MATLABWRAPPEREXT)
+ #Bin programs {{{1
+ if MODULES
+@@ -40,7 +40,7 @@
+ 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)
++LDADD = ../../c/libISSMCore.a ../../c/libISSMModules.a $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(SPOOLESLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(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
+@@ -51,7 +51,7 @@
+ LDADD       += $(MEXLIB) ../../c/libISSMMatlab.a 
+ LDADD       += ../../c/libISSMCore.a 
+ if CIRCULAR_DEPENDENCIES
+-LDADD       += $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
++LDADD       += $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(SPOOLESLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
+ endif
+ LDADD       += ../../c/libISSMModules.a
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12611-12612.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12611-12612.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12611-12612.diff	(revision 12679)
@@ -0,0 +1,117 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/contourenvelope.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/contourenvelope.m	(revision 12611)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/contourenvelope.m	(revision 12612)
+@@ -34,32 +34,47 @@
+ 
+ %Now, build the connectivity tables for this mesh.
+ %Computing connectivity
+-if size(md.mesh.vertexconnectivity,1)~=md.mesh.numberofvertices,
++if (size(md.mesh.vertexconnectivity,1)~=md.mesh.numberofvertices & size(md.mesh.vertexconnectivity,1)~=md.mesh.numberofvertices2d),
+ 	md.mesh.vertexconnectivity=NodeConnectivity(md.mesh.elements,md.mesh.numberofvertices);
+ end
+-if size(md.mesh.elementconnectivity,1)~=md.mesh.numberofelements,
++if (size(md.mesh.elementconnectivity,1)~=md.mesh.numberofelements & size(md.mesh.elementconnectivity,1)~=md.mesh.numberofelements2d),
+ 	md.mesh.elementconnectivity=ElementConnectivity(md.mesh.elements,md.mesh.vertexconnectivity);
+ end
+ 
+ %get nodes inside profile
+ mesh.elementconnectivity=md.mesh.elementconnectivity;
++if md.mesh.dimension==2;
++	mesh.elements=md.mesh.elements;
++	mesh.x=md.mesh.x;
++	mesh.y=md.mesh.y;
++	mesh.numberofvertices=md.mesh.numberofvertices;
++	mesh.numberofelements=md.mesh.numberofelements;
++else
++	mesh.elements=md.mesh.elements2d;
++	mesh.x=md.mesh.x2d;
++	mesh.y=md.mesh.y2d;
++	mesh.numberofvertices=md.mesh.numberofvertices2d;
++	mesh.numberofelements=md.mesh.numberofelements2d;
++end
++
+ if nargin==2,
++
+ 	if isfile,
+ 		%get flag list of elements and nodes inside the contour
+-		nodein=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,file,'node',1);
+-		elemin=(sum(nodein(md.mesh.elements),2)==size(md.mesh.elements,2));
++		nodein=ContourToMesh(mesh.elements,mesh.x,mesh.y,file,'node',1);
++		elemin=(sum(nodein(mesh.elements),2)==size(mesh.elements,2));
+ 		%modify element connectivity
+ 		elemout=find(~elemin);
+ 		mesh.elementconnectivity(elemout,:)=0;
+ 		mesh.elementconnectivity(find(ismember(mesh.elementconnectivity,elemout)))=0;
+ 	else
+ 		%get flag list of elements and nodes inside the contour
+-		nodein=zeros(md.mesh.numberofvertices,1); 
+-		elemin=zeros(md.mesh.numberofelements,1); 
++		nodein=zeros(mesh.numberofvertices,1); 
++		elemin=zeros(mesh.numberofelements,1); 
+ 		
+ 		pos=find(flags); 
+ 		elemin(pos)=1;
+-		nodein(md.mesh.elements(pos,:))=1;
++		nodein(mesh.elements(pos,:))=1;
+ 
+ 		%modify element connectivity
+ 		elemout=find(~elemin);
+@@ -86,13 +101,13 @@
+ 	el1=pos(i);
+ 	els2=mesh.elementconnectivity(el1,find(mesh.elementconnectivity(el1,:)));
+ 	if length(els2)>1,
+-		flag=intersect(md.mesh.elements(els2(1),:),md.mesh.elements(els2(2),:));
+-		nods1=md.mesh.elements(el1,:);
++		flag=intersect(mesh.elements(els2(1),:),mesh.elements(els2(2),:));
++		nods1=mesh.elements(el1,:);
+ 		nods1(find(nods1==flag))=[];
+ 		segments(count,:)=[nods1 el1];
+ 
+-		ord1=find(nods1(1)==md.mesh.elements(el1,:));
+-		ord2=find(nods1(2)==md.mesh.elements(el1,:));
++		ord1=find(nods1(1)==mesh.elements(el1,:));
++		ord2=find(nods1(2)==mesh.elements(el1,:));
+ 
+ 		%swap segment nodes if necessary
+ 		if ( (ord1==1 & ord2==2) | (ord1==2 & ord2==3) | (ord1==3 & ord2==1) ),
+@@ -103,14 +118,14 @@
+ 		segments(count,1:2)=fliplr(segments(count,1:2));
+ 		count=count+1;
+ 	else
+-		nods1=md.mesh.elements(el1,:);
+-		flag=setdiff(nods1,md.mesh.elements(els2,:));
++		nods1=mesh.elements(el1,:);
++		flag=setdiff(nods1,mesh.elements(els2,:));
+ 		for j=1:3,
+ 			nods=nods1; nods(j)=[];
+ 			if any(ismember(flag,nods)),
+ 				segments(count,:)=[nods el1];
+-				ord1=find(nods(1)==md.mesh.elements(el1,:));
+-				ord2=find(nods(2)==md.mesh.elements(el1,:));
++				ord1=find(nods(1)==mesh.elements(el1,:));
++				ord2=find(nods(2)==mesh.elements(el1,:));
+ 				if ( (ord1==1 & ord2==2) | (ord1==2 & ord2==3) | (ord1==3 & ord2==1) ),
+ 					temp=segments(count,1);
+ 					segments(count,1)=segments(count,2);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/modelextract.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/modelextract.m	(revision 12611)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/modelextract.m	(revision 12612)
+@@ -209,6 +209,16 @@
+ 		md2.mesh.elementconnectivity=ElementConnectivity(md2.mesh.elements,md2.mesh.vertexconnectivity);
+ 		md2.mesh.segments=contourenvelope(md2);
+ 		md2.mesh.vertexonboundary=zeros(numberofvertices2,1); md2.mesh.vertexonboundary(md2.mesh.segments(:,1:2))=1;
++	else
++		%First do the connectivity for the contourenvelope in 2d
++		md2.mesh.vertexconnectivity=NodeConnectivity(md2.mesh.elements2d,md2.mesh.numberofvertices2d);
++		md2.mesh.elementconnectivity=ElementConnectivity(md2.mesh.elements2d,md2.mesh.vertexconnectivity);
++		md2.mesh.segments=contourenvelope(md2);
++		md2.mesh.vertexonboundary=zeros(numberofvertices2/md2.mesh.numberoflayers,1); md2.mesh.vertexonboundary(md2.mesh.segments(:,1:2))=1;
++		md2.mesh.vertexonboundary=repmat(md2.mesh.vertexonboundary,md2.mesh.numberoflayers,1);
++		%Then do it for 3d as usual
++		md2.mesh.vertexconnectivity=NodeConnectivity(md2.mesh.elements,md2.mesh.numberofvertices);
++		md2.mesh.elementconnectivity=ElementConnectivity(md2.mesh.elements,md2.mesh.vertexconnectivity);
+ 	end
+ 
+ 	%Boundary conditions: Dirichlets on new boundary
Index: /issm/oecreview/Archive/12321-12677/ISSM-12612-12613.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12612-12613.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12612-12613.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Numerics/cfl_step.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Numerics/cfl_step.m	(revision 12612)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Numerics/cfl_step.m	(revision 12613)
+@@ -7,7 +7,7 @@
+ %      maxtime=cfl_step(md,vx,vy);
+ %
+ %   Example:
+-%      dt=cfl_step(md,md,md.results.DiagnosticSolution.Vx,md.results.DiagnosticSolution.Vy)
++%      dt=cfl_step(md,md.results.DiagnosticSolution.Vx,md.results.DiagnosticSolution.Vy)
+ 
+ %Check length of velocities 
+ if size(vx,1)~=md.mesh.numberofvertices & size(vy,1)~=md.mesh.numberofvertices,
Index: /issm/oecreview/Archive/12321-12677/ISSM-12615-12616.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12615-12616.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12615-12616.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/startup.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/startup.py	(revision 12615)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/startup.py	(revision 12616)
+@@ -76,8 +76,6 @@
+ from soroptions import *           
+ from stokesoptions import *
+ from generic import *
+-from none import *
+-from none import *
+ from hydrology import *
+ from miscellaneous import *
+ from private import *
Index: /issm/oecreview/Archive/12321-12677/ISSM-12616-12617.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12616-12617.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12616-12617.diff	(revision 12679)
@@ -0,0 +1,32 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Exp/manipulation/cutarea.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Exp/manipulation/cutarea.m	(revision 12616)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Exp/manipulation/cutarea.m	(revision 12617)
+@@ -86,10 +86,12 @@
+ 									%cut in 2 profiles
+ 									A(selection).x=x(1:p1);
+ 									A(selection).y=y(1:p1);
++									closed(selection)=0;
+ 									A(end+1).x=x(p2:end);
+ 									A(end).y=y(p2:end);
+ 									A(end).density=A(selection).density;
+ 									A(end).name=A(selection).name;
++									closed(end+1)=0;
+ 									numprofiles=numprofiles+1;
+ 									numpoints=numpoints-(p2-p1-1);
+ 								end
+@@ -112,12 +114,14 @@
+ 									closed(selection)=0;
+ 								else
+ 									%cut in 2 profiles
++									closed(selection)=0;
+ 									A(selection).x=x(1:p2);
+ 									A(selection).y=y(1:p2);
+ 									A(end+1).x=x(p1:end);
+ 									A(end).y=y(p1:end);
+ 									A(end).density=A(selection).density;
+ 									A(end).name=A(selection).name;
++									closed(end+1)=0;
+ 									numprofiles=numprofiles+1;
+ 									numpoints=numpoints-(p1-p2-1);
+ 								end
Index: /issm/oecreview/Archive/12321-12677/ISSM-12617-12618.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12617-12618.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12617-12618.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/regionaltransient2d.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/regionaltransient2d.m	(revision 12617)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/regionaltransient2d.m	(revision 12618)
+@@ -105,7 +105,7 @@
+ 			vy=PatchToVec(md1.results.TransientSolution(t).Vy);
+ 			thickness=PatchToVec(md1.results.TransientSolution(t).Thickness);
+ 			spcx=[spcx InterpFromMeshToMesh2d(md1.mesh.elements,md1.mesh.x,md1.mesh.y,vx,md2.mesh.x,md2.mesh.y)];
+-			spcy=[spcy InterpFromMeshToMesh2d(md1.mesh.elements,md1.mesh.x,md1.mesh.y,vx,md2.mesh.x,md2.mesh.y)];
++			spcy=[spcy InterpFromMeshToMesh2d(md1.mesh.elements,md1.mesh.x,md1.mesh.y,vy,md2.mesh.x,md2.mesh.y)];
+ 			spct=[spct InterpFromMeshToMesh2d(md1.mesh.elements,md1.mesh.x,md1.mesh.y,thickness,md2.mesh.x,md2.mesh.y)];
+ 			steps=[steps t*md1.timestepping.time_step];
+ 		end
Index: /issm/oecreview/Archive/12321-12677/ISSM-12618-12619.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12618-12619.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12618-12619.diff	(revision 12679)
@@ -0,0 +1,228 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test268.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test268.m	(revision 12618)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test268.m	(revision 12619)
+@@ -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,100);
+-
+-%responses
+-md.qmu.responses.MaxVel=response_function('MaxVel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
+-md.qmu.responses.IceVolume=response_function('IceVolume',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
+-md.qmu.responses.MassFlux1=response_function('indexed_MassFlux_1',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
+-md.qmu.responses.MassFlux2=response_function('indexed_MassFlux_2',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
+-md.qmu.responses.MassFlux3=response_function('indexed_MassFlux_3',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
+-md.qmu.responses.MassFlux4=response_function('indexed_MassFlux_4',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
+-md.qmu.responses.MassFlux5=response_function('indexed_MassFlux_5',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
+-md.qmu.responses.massFlux6=response_function('indexed_MassFlux_6',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
+-
+-%mass flux profiles
+-md.qmu.mass_flux_profiles={'../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp'};
+-md.qmu.mass_flux_profile_directory=pwd;
+-
+-%method
+-md.qmu.method     =dakota_method('nond_l');
+-
+-%parameters
+-md.qmu.params.direct=true;
+-md.qmu.params.analysis_driver='';
+-md.qmu.params.analysis_components='';
+-md.qmu.params.evaluation_concurrency=1;
+-md.qmu.params.interval_type='forward';
+-md.qmu.params.fd_gradient_step_size='0.1';
+-md.qmu.isdakota=1;
+-
+-md.diagnostic.reltol=10^-5; %tighten for qmu analyses
+-md.transient.requested_outputs=IceVolumeEnum();
+-
+-%solve
+-md=solve(md,TransientSolutionEnum,'overwrite','y');
+-md=tres(md,'dakota');
+-
+-%Fields and tolerances to track changes
+-md.results.dakota.importancefactors=[];
+-for i=1:8,
+-	md.results.dakota.importancefactors=[md.results.dakota.importancefactors md.results.dakota.dresp_out(i).mean];
+-end
+-for i=1:8,
+-	md.results.dakota.importancefactors=[md.results.dakota.importancefactors md.results.dakota.dresp_out(i).stddev];
+-end
+-field_names     ={'importancefactors'};
+-field_tolerances={1e-11};
+-field_values={...
+-         md.results.dakota.importancefactors,...
+-	};
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test270.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test270.m	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test270.m	(revision 12619)
+@@ -0,0 +1,72 @@
++md=triangle(model,'../Exp/Square.exp',180000);
++md=setmask(md,'all','');
++md=parameterize(md,'../Par/SquareShelf.par');
++md=setflowequation(md,'macayeal','all');
++md.cluster=generic('name',oshostname(),'np',3);
++
++md.timestepping.time_step=1;
++md.settings.output_frequency=1;
++md.timestepping.final_time=4;
++
++smb = ones(md.mesh.numberofvertices,1)*3.6;
++smb=[ smb smb*-1 ];
++
++md.surfaceforcings.mass_balance= smb;
++md.surfaceforcings.mass_balance(end+1,:)=[1.5 3];
++md.transient.isthermal=0;
++%Dakota options
++
++%partitioning
++md.qmu.numberofpartitions=20;
++md=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on');
++md.qmu.partition=md.qmu.partition-1;
++
++%variables
++md.qmu.variables.surface_mass_balance=normal_uncertain('scaled_SurfaceforcingsMassBalance',1,100);
++
++%responses
++md.qmu.responses.MaxVel=response_function('MaxVel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.IceVolume=response_function('IceVolume',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux1=response_function('indexed_MassFlux_1',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux2=response_function('indexed_MassFlux_2',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux3=response_function('indexed_MassFlux_3',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux4=response_function('indexed_MassFlux_4',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux5=response_function('indexed_MassFlux_5',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.massFlux6=response_function('indexed_MassFlux_6',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++
++%mass flux profiles
++md.qmu.mass_flux_profiles={'../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp'};
++md.qmu.mass_flux_profile_directory=pwd;
++
++%method
++md.qmu.method     =dakota_method('nond_l');
++
++%parameters
++md.qmu.params.direct=true;
++md.qmu.params.analysis_driver='';
++md.qmu.params.analysis_components='';
++md.qmu.params.evaluation_concurrency=1;
++md.qmu.params.interval_type='forward';
++md.qmu.params.fd_gradient_step_size='0.1';
++md.qmu.isdakota=1;
++
++md.diagnostic.reltol=10^-5; %tighten for qmu analyses
++md.transient.requested_outputs=IceVolumeEnum();
++
++%solve
++md=solve(md,TransientSolutionEnum,'overwrite','y');
++md=tres(md,'dakota');
++
++%Fields and tolerances to track changes
++md.results.dakota.importancefactors=[];
++for i=1:8,
++	md.results.dakota.importancefactors=[md.results.dakota.importancefactors md.results.dakota.dresp_out(i).mean];
++end
++for i=1:8,
++	md.results.dakota.importancefactors=[md.results.dakota.importancefactors md.results.dakota.dresp_out(i).stddev];
++end
++field_names     ={'importancefactors'};
++field_tolerances={1e-11};
++field_values={...
++         md.results.dakota.importancefactors,...
++	};
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/IdToName.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/IdToName.m	(revision 12618)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/IdToName.m	(revision 12619)
+@@ -115,8 +115,8 @@
+ 	case 264, name='SquareShelfTherTranForcTempParallel';
+ 	case 265, name='SquareShelfTranP3dForcTempSerial';
+ 	case 266, name='SquareShelfTranP3dForcTempParallel';
+-	case 267, name='SquareShelfTranForceNeg2dDakotaSamp';
+-   case 268, name='SquareShelfTranForceNeg2dDakotaLocal';
++	case 268, name='SquareShelfTranForceNeg2dDakotaSamp';
++	case 270, name='SquareShelfTranForceNeg2dDakotaLocal';
+ 	case 301, name='SquareSheetConstrainedDiagM2dSerial';
+ 	case 302, name='SquareSheetConstrainedDiagM2dParallel';
+ 	case 303, name='SquareSheetConstrainedDiagH2dSerial';
+@@ -204,7 +204,7 @@
+ 	case 431, name='SquareSheetShelfCMDragSteaP3dSerial';
+ 	case 432, name='SquareSheetShelfCMDragSteaP3dParallel';
+ 	case 434, name='SquareSheetShelfDiadM3dDakotaSamp';
+-	case 435, name='SquareSheetShelfDiadM3dDakotaAreaAverage';
++	case 436, name='SquareSheetShelfDiadM3dDakotaAreaAverage';
+ 	case 437, name='SquareSheetShelfDiagMP3dTilingSerial';
+ 	case 438, name='SquareSheetShelfDiagMP3dTilingParallel';
+ 	case 439, name='SquareSheetShelfDakotaScaledResponse';
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/dak.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/dak.m	(revision 12618)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/dak.m	(revision 12619)
+@@ -8,6 +8,8 @@
+ md.settings.output_frequency=1;
+ md.timestepping.final_time=4;
+ 
++%md=extrude(md,10,1);
++
+ %Set up transient
+ smb = ones(md.mesh.numberofvertices,1)*3.6;
+ smb=[ smb smb*-1 ];
+@@ -27,7 +29,8 @@
+ 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]);
+ 
+ %%  nond_sampling study
+-md.qmu.method     =dakota_method('nond_samp');
++%md.qmu.method     =dakota_method('nond_samp');
++md.qmu.method     =dakota_method('nond_l');
+ md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),...
+ 'seed',1234,...
+ 'samples',20,...
+@@ -42,7 +45,7 @@
+ md.qmu.numberofpartitions=20;
+ md=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on');
+ md.qmu.partition=md.qmu.partition-1;
+-md.qmu.isdakota=1;
++%md.qmu.isdakota=1;
+ 
+ md.transient.requested_outputs=IceVolumeEnum();
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive268.mat
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive270.mat
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive270.mat
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive270.mat	(revision 12618)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive270.mat	(revision 12619)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive270.mat
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
Index: /issm/oecreview/Archive/12321-12677/ISSM-12619-12620.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12619-12620.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12619-12620.diff	(revision 12679)
@@ -0,0 +1,195 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/dak.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/dak.m	(revision 12619)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/dak.m	(revision 12620)
+@@ -1,55 +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=generic('name',oshostname(),'np',1);
+-
+-md.timestepping.time_step=1;
+-md.settings.output_frequency=1;
+-md.timestepping.final_time=4;
+-
+-%md=extrude(md,10,1);
+-
+-%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;
+-
+-%sigma_on_partition=AreaAverageOntoPartition(md,sigma);
+-%sigma_on_grids=sigma_on_partition(md.part+1); %just to check in case
+-%md.variables.thickness=normal_uncertain('scaled_Thickness',1,1);
+-%md.variables.thickness.stddev=sigma_on_partition;
+-
+-%Dakota inputs,outputs
+-md.qmu.variables.surface_mass_balance=normal_uncertain('scaled_SurfaceforcingsMassBalance',1,0.1);
+-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.MaxVel=response_function('MaxVel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
+-
+-%%  nond_sampling study
+-%md.qmu.method     =dakota_method('nond_samp');
+-md.qmu.method     =dakota_method('nond_l');
+-md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),...
+-'seed',1234,...
+-'samples',20,...
+-'sample_type','lhs');
+-
+-%%  a variety of parameters
+-md.qmu.params.evaluation_concurrency=1;
+-md.qmu.params.analysis_driver='';
+-md.qmu.params.analysis_components='';
+-
+-%partitioning
+-md.qmu.numberofpartitions=20;
+-md=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on');
+-md.qmu.partition=md.qmu.partition-1;
+-%md.qmu.isdakota=1;
+-
+-md.transient.requested_outputs=IceVolumeEnum();
+-
+-md.diagnostic.reltol=10^-5; %tighten for qmu analyses
+-%md.debug.valgrind=1;
+-%md.verbose.solution=true;
+-md=solve(md,TransientSolutionEnum,'overwrite','y');
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test268.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test268.m	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test268.m	(revision 12620)
+@@ -0,0 +1,72 @@
++md=triangle(model,'../Exp/Square.exp',180000);
++md=setmask(md,'all','');
++md=parameterize(md,'../Par/SquareShelf.par');
++md=setflowequation(md,'macayeal','all');
++md.cluster=generic('name',oshostname(),'np',3);
++
++md.timestepping.time_step=1;
++md.settings.output_frequency=1;
++md.timestepping.final_time=4;
++
++smb = ones(md.mesh.numberofvertices,1)*3.6;
++smb=[ smb smb*-1 ];
++
++md.surfaceforcings.mass_balance= smb;
++md.surfaceforcings.mass_balance(end+1,:)=[1.5 3];
++md.transient.isthermal=0;
++%Dakota options
++
++%partitioning
++md.qmu.numberofpartitions=20;
++md=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on');
++md.qmu.partition=md.qmu.partition-1;
++
++%variables
++md.qmu.variables.surface_mass_balance=normal_uncertain('scaled_SurfaceforcingsMassBalance',1,0.1);
++
++%responses
++md.qmu.responses.MaxVel=response_function('MaxVel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.IceVolume=response_function('IceVolume',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux1=response_function('indexed_MassFlux_1',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux2=response_function('indexed_MassFlux_2',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux3=response_function('indexed_MassFlux_3',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux4=response_function('indexed_MassFlux_4',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux5=response_function('indexed_MassFlux_5',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.massFlux6=response_function('indexed_MassFlux_6',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++
++%mass flux profiles
++md.qmu.mass_flux_profiles={'../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp'};
++md.qmu.mass_flux_profile_directory=pwd;
++
++%%  nond_sampling study
++md.qmu.method=dakota_method('nond_samp');
++md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),'seed',1234,'samples',20,'sample_type','lhs');
++
++%parameters
++md.qmu.params.direct=true;
++md.qmu.params.analysis_driver='';
++md.qmu.params.analysis_components='';
++md.qmu.params.evaluation_concurrency=1;
++md.qmu.params.interval_type='forward';
++md.qmu.isdakota=1;
++
++md.diagnostic.reltol=10^-5; %tighten for qmu analyses
++md.transient.requested_outputs=IceVolumeEnum();
++
++%solve
++md=solve(md,TransientSolutionEnum,'overwrite','y');
++md=tres(md,'dakota');
++
++%Fields and tolerances to track changes
++md.results.dakota.importancefactors=[];
++for i=1:8,
++	md.results.dakota.importancefactors=[md.results.dakota.importancefactors md.results.dakota.dresp_out(i).mean];
++end
++for i=1:8,
++	md.results.dakota.importancefactors=[md.results.dakota.importancefactors md.results.dakota.dresp_out(i).stddev];
++end
++field_names     ={'importancefactors'};
++field_tolerances={1e-11};
++field_values={...
++         md.results.dakota.importancefactors,...
++	};
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test436.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test436.m	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test436.m	(revision 12620)
+@@ -0,0 +1,21 @@
++%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=generic('name',oshostname(),'np',3);
++
++%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: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive270.mat
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive436.mat
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive436.mat
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive436.mat	(revision 12619)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive436.mat	(revision 12620)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive436.mat
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive268.mat
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive268.mat
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive268.mat	(revision 12619)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive268.mat	(revision 12620)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive268.mat
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
Index: /issm/oecreview/Archive/12321-12677/ISSM-12620-12621.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12620-12621.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12620-12621.diff	(revision 12679)
@@ -0,0 +1,23 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/discover.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/discover.m	(revision 12620)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/discover.m	(revision 12621)
+@@ -13,7 +13,7 @@
+ 		 numnodes=20;
+ 		 cpuspernode=8; 
+ 		 port=1025;
+-		 queue='long';
++		 queue='general';
+ 		 time=12*60;
+ 		 processor='west';
+ 		 codepath='';
+@@ -63,6 +63,9 @@
+ 
+ 			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
+ 
++			 if ( strcmpi(cluster.queue,'general') & cluster.cpuspernode*cluster.numnodes < 17)
++				 checkmessage('cpus must be great than 17 for general queue');
++			 end
+ 			 %now, check cluster.cpuspernode according to processor type
+ 			 if ( strcmpi(cluster.processor,'neha')),
+ 				 if ((cluster.cpuspernode>8 ) | (cluster.cpuspernode<1)),
Index: /issm/oecreview/Archive/12321-12677/ISSM-12621-12622.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12621-12622.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12621-12622.diff	(revision 12679)
@@ -0,0 +1,23 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/petsc/install-3.2-discover.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/petsc/install-3.2-discover.sh	(revision 12621)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/petsc/install-3.2-discover.sh	(revision 12622)
+@@ -22,11 +22,15 @@
+ 	--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-mpi-dir=/usr/local/intel/mpi/4.0.3.008/lib64/ \
+ 	--with-blas-lapack-dir=/usr/local/intel/mkl/10.1.2.024/lib/64/ \
++	--with-scalapack-lib=/usr/local/intel/mkl/10.1.2.024/lib/64/libmkl_scalapack_lp64.a \
++	--with-scalapack-include=/usr/local/intel/mkl/10.1.2.024/include/ \
++	--with-blacs-lib=/usr/local/intel/mkl/10.1.2.024/lib/64/libmkl_blacs_intelmpi_lp64.a \
++	--with-blacs-include=/usr/local/intel/mkl/10.1.2.024/include/ \
+ 	--download-mumps=yes \
+-	--download-scalapack=yes \
+-	--download-blacs=yes \
++	--download-scalapack=no \
++	--download-blacs=no \
+ 	--download-plapack=yes \
+ 	--download-parmetis=yes \
+ 	--with-pic=1
Index: /issm/oecreview/Archive/12321-12677/ISSM-12622-12623.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12622-12623.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12622-12623.diff	(revision 12679)
@@ -0,0 +1,15 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/dakota/install-discover.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/dakota/install-discover.sh	(revision 12622)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/dakota/install-discover.sh	(revision 12623)
+@@ -35,8 +35,8 @@
+ --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"
++--with-blas="-L/usr/local/intel/mkl/10.1.2.024/lib/64 -lmkl_lapack -lmkl -lguide -lpthread" \
++--with-lapack="-L/usr/local/intel/mkl/10.1.2.024/lib/64 -lmkl_lapack -lmkl -lguide -lpthread"
+ cd ..
+ 
+ #Before compiling, if running on 64 bits, we need to active fPIC compilation. Some packages 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12623-12624.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12623-12624.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12623-12624.diff	(revision 12679)
@@ -0,0 +1,62 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12623)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/m4/issm_options.m4	(revision 12624)
+@@ -59,6 +59,11 @@
+ 			export CXX=icpc
+ 			export CFLAGS=" -D_INTEL_LINUX_"
+ 			export CXXFLAGS=" -D_INTEL_LINUX_"
++		elif test $VENDOR = intel-discover; then
++			export CC=icc
++			export CXX=icpc
++			export CXXFLAGS=" -O3 -D_INTEL_LINUX_ "
++			export CFLAGS=" -O3 -D_INTEL_LINUX_ "
+ 		elif test $VENDOR = intel-pleiades; then
+ 			export CC=icc
+ 			export CXX=icpc
+@@ -750,7 +755,11 @@
+ 
+ 		dnl defaults
+ 		HAVE_SCALAPACK=yes
+-		SCALAPACKLIB=-L"$SCALAPACK_ROOT/ -lscalapack"
++		if test $VENDOR = intel-discover; then
++		 SCALAPACKLIB=-L"$SCALAPACK_ROOT/ -lmkl_scalapack_lp64"
++		else
++		 SCALAPACKLIB=-L"$SCALAPACK_ROOT/ -lscalapack"
++		fi
+ 
+ 		AC_DEFINE([_HAVE_SCALAPACK_],[1],[with Scalapack in ISSM src])
+ 		AC_SUBST([SCALAPACKLIB])
+@@ -770,7 +779,10 @@
+ 		dnl defaults
+ 		HAVE_BLASLAPACK=yes
+ 		BLASLAPACKINCL=""
+-		
++	
++		if test $VENDOR = intel-discover; then
++		 BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lmkl_lapack -lmkl -lguide -lpthread"
++		else
+ 		dnl: branch on whether we are running on windows or linux.
+ 		case "${host_os}" in
+ 			*cygwin*)
+@@ -783,6 +795,7 @@
+ 			BLASLAPACKLIB=-L"$BLASLAPACK_ROOT -lflapack -lfblas " 
+ 			;;
+ 		esac
++		fi
+ 
+ 		AC_DEFINE([_HAVE_BLASLAPACK_],[1],[with blas lapack in ISSM src])
+ 		AC_SUBST([BLASLAPACKLIB])
+@@ -880,7 +893,11 @@
+ 		dnl defaults
+ 		HAVE_BLACS=yes
+ 		BLACSINCL=""
+-		BLACSLIB=-L"$BLACS_ROOT/ -lblacs"
++		if test $VENDOR = intel-discover; then
++		 BLACSLIB=-L"$BLACS_ROOT/ -lmkl_blacs_intelmpi_lp64"
++		else
++		 BLACSLIB=-L"$BLACS_ROOT/ -lblacs"
++		fi
+         
+ 		AC_DEFINE([_HAVE_BLACS_],[1],[with Blacs in ISSM src])
+ 		AC_SUBST([BLACSINCL])
Index: /issm/oecreview/Archive/12321-12677/ISSM-12624-12625.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12624-12625.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12624-12625.diff	(revision 12679)
@@ -0,0 +1,39 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-discover.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-discover.sh	(revision 12624)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-discover.sh	(revision 12625)
+@@ -1,25 +1,26 @@
+ #!/bin/csh
+ 
+ #PETSc 3.2
+-#MPI /usr/local/intel/mpi/3.2.2.006/lib64/
++#MPI /usr/local/intel/mpi/4.0.3.008/lib64/
+ 
+ ./configure \
+  --prefix=$ISSM_DIR \
+- --without-serial \
+  --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="/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-mkl-dir="/usr/local/intel/mkl/10.1.2.024/lib/64/" \
++ --with-mpi-include="/usr/local/intel/mpi/4.0.3.008/include64/" \
++ --with-mpi-lib="-L/usr/local/intel/mpi/4.0.3.008/lib64/ -lmpi -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-scalapack-dir="/usr/local/intel/mkl/10.1.2.024/lib/64/" \
++ --with-blacs-dir="/usr/local/intel/mkl/10.1.2.024/lib/64/" \
+  --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
+  --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
++ --with-blas-lapack-dir="/usr/local/intel/mkl/10.1.2.024/lib/64/" \
+  --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
++ --with-vendor=intel-discover
++
Index: /issm/oecreview/Archive/12321-12677/ISSM-12625-12626.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12625-12626.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12625-12626.diff	(revision 12679)
@@ -0,0 +1,20 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh	(revision 12625)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh	(revision 12626)
+@@ -23,6 +23,7 @@
+ 	python setup.py install
+ 	cd ..
+ 	${PYTHON} -c "import numpy; print 'Installed NumPy', numpy.__version__"
++	${PYTHON} -c "import numpy; numpy.test()"
+ 	
+ elif [[ $install == "2" ]];then 
+ 	
+@@ -35,6 +36,7 @@
+ 	python setup.py install
+ 	cd ..
+ 	${PYTHON} -c "import scipy; print 'Installed SciPy', scipy.__version__"
++	${PYTHON} -c "import scipy; scipy.test()"
+ 
+ elif [[ $install == "3" ]];then 
+ 	rm -rf numpy scipy
Index: /issm/oecreview/Archive/12321-12677/ISSM-12626-12627.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12626-12627.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12626-12627.diff	(revision 12679)
@@ -0,0 +1,12 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-discover.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-discover.sh	(revision 12626)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/configs/config-discover.sh	(revision 12627)
+@@ -6,6 +6,7 @@
+ ./configure \
+  --prefix=$ISSM_DIR \
+  --with-matlab-dir=$MATLAB_DIR \
++ --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/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 \
Index: /issm/oecreview/Archive/12321-12677/ISSM-12631-12632.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12631-12632.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12631-12632.diff	(revision 12679)
@@ -0,0 +1,19 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/SectionValues.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/SectionValues.m	(revision 12631)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/SectionValues.m	(revision 12632)
+@@ -11,10 +11,10 @@
+ %check what we have for profile as input
+ if ischar(infile),
+ 	%read infile:
+-	contempt=expread(infile);
+-	nods=contempt.nods;
+-	x=contempt.x;
+-	y=contempt.y;
++	profile=expread(infile);
++	nods=profile.nods;
++	x=profile.x;
++	y=profile.y;
+ else
+ 	%read infile:
+ 	nods=infile.nods;
Index: /issm/oecreview/Archive/12321-12677/ISSM-12632-12633.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12632-12633.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12632-12633.diff	(revision 12679)
@@ -0,0 +1,223 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/Android.tex
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/Android.tex	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/Android.tex	(revision 12633)
+@@ -0,0 +1,138 @@
++%Preamble {{{
++%Packages
++\documentclass[9pt,notes=hide]{beamer}
++
++\definecolor{links}{HTML}{2A1B81}
++\hypersetup{colorlinks,linkcolor=,urlcolor=links}
++
++\usetheme[jpl,headstyle=institute,fnolabel=,sidebar=.15\paperwidth,footstyle=low,footsep={ $\cdot$ },TPomitframeno,conference=This is a test]{Pasadena}         
++\useinnertheme{MLHacks}         % ISSM bonuses (ghostframes for example)
++\usepackage[T1]{fontenc}        % T1 encoding is better for foreign langages
++\usepackage{aeguill,aecompl}    % Virtual fonts
++\usepackage{amsmath,amssymb}    % Mathematical symbols (useful for equations)
++\usepackage{xcolor}             % We can define new colors
++\usepackage{graphicx}           % Include pictures
++\usepackage{times}              % Use Times Font instead of default
++\graphicspath{                  % directories where the pictures are located
++{Images/Results/}
++}
++
++\setbeamercovered{transparent}  %invisible, transparent, dynamic, highly dynamic
++
++%%Automatically insert outline slide at the begining of each new section (very nice!)
++%\AtBeginSection[]{
++%\begin{frame}<beamer>
++%	\frametitle{Outline}             % title of the slide
++%	\tableofcontents[currentsection]
++%	\ghostframe                      %do not count slide
++%\end{frame}
++%}
++%}}}
++%Presentation properties{{{1
++%between brackets    []: shown on headers and footers of every slide (short)
++%between parenthesis (): shown on title page only (long)
++\title[ISSM on Android]{Ice Sheet System Model on the Android Platform}
++\author[G.Perez]{Gilberto \textsc{Perez}\inst{1}}
++\institute[JPL]{
++\inst{1}California State Polytechnic University, Pomona\\
++}
++\conference[conference shouldnt be required]{Not sure why this is needed...}
++\date[\today]{June 2010 \hspace{3em}\copyright Copyright 2011. All rights reserved}
++\logo{\includegraphics[width=8em]{ISSMlogo}}
++%}}}
++
++\begin{document}
++
++%Title slide {{{
++\begin{frame}[plain] %No headers or footers
++	\titlepage
++\end{frame}%}}}
++%Outline {{{
++\begin{frame}
++	\frametitle{Outline}
++	\tableofcontents
++\end{frame}%}}}
++
++\section[Motivation]{Why Port ISSM to Android?}
++\begin{frame}%{{{
++	\frametitle{intro}
++    The ISSM Android project is an attempt at outreach by the scientific community by producing a readily distributable application that the layman can use to hold tangible evidence of climate change. 
++\end{frame}%}}}
++\subsection{Why Android Specifically?}
++\begin{frame}%{{{
++	\frametitle{Why Android?}
++    The reasons Android was selected as our target platform are as follows:
++	\begin{itemize}
++		\item<2-2> Android is a GNU/Linux based open source platform
++		\item<3-3> ISSM was developed with portability to Unix-like operating systems
++        \item<4-4> Android holds the largest market share in the smart phone market. 
++	\end{itemize}
++\end{frame}%}}}
++\section[SDK]{About the Android SDK}
++\begin{frame}
++    \frametitle{Android SDK}
++    The Android Software Development Kit(SDK) is a set of tools for developing applications for the Android platform. While a the Java Software Development Kit is still required, one need never make calls to Java SDK programs as the tools provided by the Android SDK and the Apache Ant build tools.
++    \\[12pt]
++    For more information on the Android SDK and the Apache Ant Project see the following links:
++    \begin{itemize}
++        \item \href{http://ant.apache.org/}{Apache Ant Project}
++        \item \href{http://ant.apache.org/}{Android SDK}
++    \end{itemize}
++    \includegraphics[width=4em]{android-hub}
++\end{frame}
++\subsection{Why the use SDK?}
++\begin{frame}
++    \frametitle{Why use the Android SDK?}
++    Although developing for Android is typically done in the Java programming language, one cannot simply use Java SDK to produce an Android app for the following reasons:
++	\begin{itemize}
++		\item<2-3> Android apps do not run on an implementation of the Java Virtual Machine. Instead, they run the Dalvik Virtual Machine.
++            \begin{itemize}
++                \item<3-> Different byte code and API
++            \end{itemize}
++		\item<4-7> Applications are distributed as APK files which are zipped, signed and aligned packages that include
++	        \begin{itemize}
++		        \item<5-5> Application binaries
++		        \item<6-6> Resources like images, text, etc.
++                \item<7-7> AndroidManifest.xml
++	        \end{itemize}
++	\end{itemize}
++    \includegraphics[width=\linewidth]{build-simplified}
++\end{frame}
++\subsection[Tools]{Important Tools}
++\begin{frame}
++    \frametitle{Important Tools}
++    There are many useful tools provided in the Android SDK, those we are using are:
++    \begin{itemize}
++        \item<2-> \href{http://developer.android.com/tools/help/android.html}{android}: is arguably the most useful tool. It allows you to:
++            \begin{itemize}
++                \item Create, delete and view Android Virtual Devices (AVDs)
++                \item Create and update Android projects
++                \item Update Android SDK with new platforms, add-ons and documentation
++            \end{itemize}
++        \item<3-> \href{http://developer.android.com/tools/help/emulator.html}{emulator}: is a generic Android device emulator which can emulate any existing device specification.
++        \item<4-> \href{ttp://developer.android.com/tools/help/adb.html}{adb}: The Android Debug Bridge allows you to communicate with an emulated device by piping shell commands, granting a terminal, and pushing/pulling files from the file system.
++    \end{itemize}
++\end{frame}
++\section[NDK]{Android Native Development Kit}
++\begin{frame}
++\frametitle{Native Development Kit}
++    Since ISSM is written in C/C++, we must be able to compile it for an Android device running on an ARM processor. Furthermore, we must be able to run ISSM from the context of an Android application. \href{http://developer.android.com/tools/sdk/ndk/index.html}{The Android Native Development Kit (NDK)} provides tools to this end.
++\end{frame}
++\subsection[Standalone Toolchain]{Android Native CPU ABI Management}
++\begin{frame}
++    Although the NDK provides tools, as well as useful examples, to compile and package native libraries along with a typical Android application, it is best used for our purposes to provide a full compliment of compilers, linkers, archivers, etc.
++    \begin{itemize}
++        \item make-stand-toolchain.sh: will create wrappers around the GNU GCC that are tailored to a specific Android API and Application Binary Interface(ABI)
++        \begin{itemize}
++            \item \href{http://www.sco.com/developers/devspecs/gabi41.pdf}{ELF System V Application Binary Interface}
++        \end{itemize}
++    \end{itemize}
++\end{frame}
++
++\section{Compiling ISSM}
++\subsection{External Packages}
++\subsection{Configuration}
++
++\section{Java Native Interface}
++
++\end{document}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/ISSMlogo.pdf
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/ISSMlogo.pdf
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/ISSMlogo.pdf	(revision 12632)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/ISSMlogo.pdf	(revision 12633)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/ISSMlogo.pdf
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/build-simplified.png
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/build-simplified.png
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/build-simplified.png	(revision 12632)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/build-simplified.png	(revision 12633)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/build-simplified.png
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/android-hub.jpg
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/android-hub.jpg
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/android-hub.jpg	(revision 12632)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/android-hub.jpg	(revision 12633)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/android-hub.jpg
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/Makefile
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/Makefile	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/Makefile	(revision 12633)
+@@ -0,0 +1,27 @@
++#Makefile for beamer
++
++#if nothing specified, make pdf
++all: one
++
++#document name (no extension)
++TARGET=Android
++export TEXINPUTS=~/issm-jpl/issm/publications/Templates/beamer/Theme/Pasadena//:
++
++#compile only once and open
++one: 
++
++	pdflatex -halt-on-error $(TARGET).tex
++	open $(TARGET).pdf
++
++#compile three times and open
++complete: 
++
++	#compile three times fpr the structure
++	#first two times draftmode to go faster (no image inclusion -> faster)
++	pdflatex -halt-on-error -draftmode $(TARGET).tex
++	pdflatex -halt-on-error -draftmode $(TARGET).tex
++	pdflatex -halt-on-error $(TARGET).tex
++	open $(TARGET).pdf
++
++clean: 
++	rm -f ${TARGET}.{dvi,ps,pdf,toc,log,aux,out,nav,snm}
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/android/doc/Makefile
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12633-12634.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12633-12634.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12633-12634.diff	(revision 12679)
@@ -0,0 +1,54 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12633)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/convergence.cpp	(revision 12634)
+@@ -80,11 +80,11 @@
+ 
+ 	//print
+ 	if(res<eps_res){
+-		if(VerboseConvergence()) _pprintLine_("   mechanical equilibrium convergence criterion" << "50s" << res*100 << " < " << eps_res*100 << " %");
++		if(VerboseConvergence()) _pprintLine_(setw(50) << left << "   mechanical equilibrium convergence criterion" << res*100 << " < " << eps_res*100 << " %");
+ 		converged=true;
+ 	}
+ 	else{ 
+-		if(VerboseConvergence()) _pprintLine_("   mechanical equilibrium convergence criterion" << "50s" << res*100 << " > " << eps_res*100 << " %");
++		if(VerboseConvergence()) _pprintLine_(setw(50) << left << "   mechanical equilibrium convergence criterion" << res*100 << " > " << eps_res*100 << " %");
+ 		converged=false;
+ 	}
+ 
+@@ -103,14 +103,14 @@
+ 		//print
+ 		if (!xIsNan<IssmDouble>(eps_rel)){
+ 			if((ndu/nu)<eps_rel){
+-				if(VerboseConvergence()) _pprintLine_("   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " < " << eps_rel*100 << " %");
++				if(VerboseConvergence()) _pprintLine_(setw(50) << left << "   Convergence criterion: norm(du)/norm(u)" << ndu/nu*100 << " < " << eps_rel*100 << " %");
+ 			}
+ 			else{ 
+-				if(VerboseConvergence()) _pprintLine_("   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " > " << eps_rel*100 << " %");
++				if(VerboseConvergence()) _pprintLine_(setw(50) << left << "   Convergence criterion: norm(du)/norm(u)" << ndu/nu*100 << " > " << eps_rel*100 << " %");
+ 				converged=false;
+ 			}
+ 		}
+-		else _pprintLine_("   Convergence criterion: norm(du)/norm(u)" << "50s" << ndu/nu*100 << " %");
++		else _pprintLine_(setw(50) << left << "   Convergence criterion: norm(du)/norm(u)" << ndu/nu*100 << " %");
+ 
+ 	}
+ 
+@@ -128,14 +128,14 @@
+ 		//print
+ 		if (!xIsNan<IssmDouble>(eps_abs)){
+ 			if ((nduinf*yts)<eps_abs){
+-				if(VerboseConvergence()) _pprintLine_("   Convergence criterion: max(du)" << "50s" << nduinf*yts << " < " << eps_abs << " m/yr");
++				if(VerboseConvergence()) _pprintLine_(setw(50) << left << "   Convergence criterion: max(du)" << nduinf*yts << " < " << eps_abs << " m/yr");
+ 			}
+ 			else{
+-				if(VerboseConvergence()) _pprintLine_("   Convergence criterion: max(du)" << "50s" << nduinf*yts << " > " << eps_abs << " m/yr");
++				if(VerboseConvergence()) _pprintLine_(setw(50) << left << "   Convergence criterion: max(du)" << nduinf*yts << " > " << eps_abs << " m/yr");
+ 				converged=false;
+ 			}
+ 		}
+-		else  _pprintLine_("   Convergence criterion: max(du)" << "50s" << nduinf*yts << " m/yr");
++		else  _pprintLine_(setw(50) << left << "   Convergence criterion: max(du)" << nduinf*yts << " m/yr");
+ 
+ 	}
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12634-12635.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12634-12635.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12634-12635.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp	(revision 12634)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/transient_core.cpp	(revision 12635)
+@@ -85,7 +85,7 @@
+ 		femmodel->parameters->SetParam(time,TimeEnum);
+ 		femmodel->parameters->SetParam(step,StepEnum);
+ 
+-		if(VerboseSolution()) _pprintLine_("iteration " << step << "/" << floor((finaltime-time)/dt)+step << "  time [yr]: " << time/yts << "7.3g (time step: " << dt/yts << "2g)");
++		if(VerboseSolution()) _pprintLine_("iteration " << step << "/" << floor((finaltime-time)/dt)+step << "  time [yr]: " << time/yts << " (time step: " << dt/yts << ")");
+ 		if(step%output_frequency==0 || time==finaltime)
+ 		 save_results=true;
+ 		else
Index: /issm/oecreview/Archive/12321-12677/ISSM-12635-12636.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12635-12636.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12635-12636.diff	(revision 12679)
@@ -0,0 +1,16 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12635)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12636)
+@@ -81,9 +81,10 @@
+ 	gate.nods=nods;
+ 	gate.data_mesh=data_mesh;
+ 	gate.data=data;
++	gate.default_value=default_value;
++	gate.interp=interpenum;
+ 	gate.M=M;
+ 	gate.N=N;
+-	gate.interp=interpenum;
+ 
+ 	/*launch the thread manager with InterpFromGridToMeshxt as a core: */
+ 	LaunchThread(InterpFromGridToMeshxt,(void*)&gate,num);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12636-12637.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12636-12637.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12636-12637.diff	(revision 12679)
@@ -0,0 +1,31 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Cluster/parallelrange.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Cluster/parallelrange.py	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Cluster/parallelrange.py	(revision 12637)
+@@ -0,0 +1,26 @@
++#! /usr/bin/env python
++"""PARALLELRANGE - from a rank, and a number of processors, figure out a range, for parallel tasks."""
++#
++#   Usage: 
++#      [i1,i1]=parallelrange(rank,numprocs,globalsize)
++
++def parallelrange(rank,numprocs,globalsize):
++
++	#We use floor. we under distribute rows. The rows left are then redistributed, therefore resulting in a more even distribution.
++	num_local_rows=[int(globalsize/numprocs) for i in xrange(numprocs)]
++
++	#There may be some rows left. Distribute evenly.
++	row_rest=globalsize - numprocs*int(globalsize/numprocs)
++
++	for i in xrange(row_rest):
++		num_local_rows[i]=num_local_rows[i]+1
++	print "num_local_rows=",num_local_rows
++
++	i1=0
++	for i in xrange(rank-1):
++		i1+=num_local_rows[i]
++	i2=i1+num_local_rows[rank-1]-1
++	print "i1,i2=",i1,i2
++
++	return i1,i2
++
Index: /issm/oecreview/Archive/12321-12677/ISSM-12637-12638.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12637-12638.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12637-12638.diff	(revision 12679)
@@ -0,0 +1,18 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Cluster/parallelrange.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Cluster/parallelrange.py	(revision 12637)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Cluster/parallelrange.py	(revision 12638)
+@@ -14,13 +14,11 @@
+ 
+ 	for i in xrange(row_rest):
+ 		num_local_rows[i]=num_local_rows[i]+1
+-	print "num_local_rows=",num_local_rows
+ 
+ 	i1=0
+ 	for i in xrange(rank-1):
+ 		i1+=num_local_rows[i]
+ 	i2=i1+num_local_rows[rank-1]-1
+-	print "i1,i2=",i1,i2
+ 
+ 	return i1,i2
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12638-12639.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12638-12639.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12638-12639.diff	(revision 12679)
@@ -0,0 +1,167 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/runme.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/runme.py	(revision 12638)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/runme.py	(revision 12639)
+@@ -33,7 +33,9 @@
+ import glob
+ import socket
+ import numpy
++import h5py
+ import sys
++from parallelrange import parallelrange
+ from IdToName import IdToName
+ 
+ def runme(id=None,exclude=None,benchmark='nightly',procedure='check',output='none',rank=1,numprocs=1):
+@@ -72,19 +74,14 @@
+ 	print 'numprocs =',numprocs
+ 
+ 	#GET ids  {{{1
+-#	flist=os.listdir('.')     #use dir, as it seems to act OS independent
+-	flist=glob.glob('test*.m')    #File name must start with 'test' and must end by '.m'
+-	list_ids=[] 
+-	for file in flist:
+-#		if file[:4] == 'test' and \    #File name must start with 'test'
+-#		   file[-2:] == '.m' and \    #File name must end by '.m'
+-#		   not file == 'test.m':    #File name must be different than 'test.m'
+-		if not file == 'test.m':    #File name must be different than 'test.m'
+-			list_ids.append(int(file[4:-2]))    #Keep test id only (skip 'test' and '.m')
+-#	[i1,i2]=parallelrange(rank,numprocs,length(list_ids));               #Get tests for this cpu only
+-#	list_ids=list_ids(i1:i2);
++	flist=glob.glob('test*.py')    #File name must start with 'test' and must end by '.py' and must be different than 'test.py'
++	list_ids=[int(file[4:-3]) for file in flist if not file == 'test.py']    #Keep test id only (skip 'test' and '.py')
+ 	print 'list_ids =',list_ids
+ 
++	i1,i2=parallelrange(rank,numprocs,len(list_ids))    #Get tests for this cpu only
++	list_ids=list_ids[i1:i2+1]
++	print 'list_ids after parallelrange =',list_ids
++
+ 	if id:
+ 		if isinstance(id,list):
+ 			test_ids=id
+@@ -93,7 +90,7 @@
+ 		test_ids=set(test_ids).intersection(set(list_ids))
+ 	else:
+ 		test_ids=set(list_ids)
+-	print 'test_ids after list =',test_ids
++#	print 'test_ids after list =',test_ids
+ 	# }}}
+ 
+ 	#GET exclude {{{1
+@@ -103,7 +100,7 @@
+ 		else:
+ 			exclude_ids=[exclude]
+ 		test_ids=test_ids.difference(set(exclude_ids))
+-	print 'test_ids after exclude =',test_ids
++#	print 'test_ids after exclude =',test_ids
+ 	# }}}
+ 
+ 	#Process Ids according to benchmarks {{{1
+@@ -121,7 +118,7 @@
+ 		test_ids=test_ids.intersection(set(range(1001,2000)))
+ 	elif benchmark.lower() == 'tranforcing':
+ 		test_ids=test_ids.intersection(set(range(1501,1503)))
+-	print 'test_ids after benchmark =',test_ids
++#	print 'test_ids after benchmark =',test_ids
+ 	test_ids=list(test_ids)
+ 	test_ids.sort()
+ 	print 'test_ids after sort =',test_ids
+@@ -135,36 +132,49 @@
+ 			#Execute test
+ 			os.chdir(root)
+ 			id_string=IdToName(id)
+-			execfile('test'+str(id)+'.py')
++			execfile('test'+str(id)+'.py',globals())
+ 
+ 			#UPDATE ARCHIVE?
+ 			archive_name='Archive'+str(id)
+ 			if procedure.lower() == 'update':
+ 
+ 				if not socket.gethostname().lower().split('.')[0] == 'larsen':
+-					raise RuntimeError('Nightly run archives must be saved on "larsen" (hostname is "'+socket.gethostname()+'")')
++#					raise RuntimeError("Nightly run archives must be saved on 'larsen' (hostname is '"+socket.gethostname()+"').")
++					print "Nightly run archives must be saved on 'larsen' (hostname is '"+socket.gethostname()+"')."
++				f = h5py.File(os.path.join('..','Archives',archive_name+'.hdf5'),'w')
+ 				for k,fieldname in enumerate(field_names):
+-					field=field_values[k]
+-					exec(archive_name+'_field'+str(k)+' =  field')
+-#				eval(['save ../Archives/' archive_name ' ' archive_name '_field*']);
+-				print 'File ./../Archives/'+archive_name+' saved\n'
++					field=numpy.array(field_values[k],dtype=float)
++					f.create_dataset(archive_name+'_field'+str(k),data=field)
++				f.close()
++				print "File '%s' saved.\n" % os.path.join('..','Archives',archive_name+'.hdf5')
+ 
+ 			#ELSE: CHECK TEST
+ 			else:
+ 
+-#				#load archive
+-#				load(['../Archives/' archive_name ]);
++				#load archive
++				if os.path.exists(os.path.join('..','Archives',archive_name+'.hdf5')):
++					f = h5py.File(os.path.join('..','Archives',archive_name+'.hdf5'),'r')
++				else:
++					raise IOError("Archive file '"+os.path.join('..','Archives',archive_name+'.hdf5')+"' does not exist.")
+ 
+ 				for k,fieldname in enumerate(field_names):
+ 
+ 					try:
+ 						#Get field and tolerance
+ 						field=numpy.array(field_values[k],dtype=float)
++#						print 'field =',field
+ 						tolerance=field_tolerances[k]
++#						print 'tolerance =',tolerance
+ 
+ 						#compare to archive
+-						exec('archive=numpy.array('+archive_name+'_field'+str(k)+',dtype=float)')
+-						error_diff=max(abs(archive-field))/(max(abs(archive))+sys.float_info.epsilon)
++						if archive_name+'_field'+str(k) in f:
++							archive=f[archive_name+'_field'+str(k)][...]
++						else:
++							raise NameError("Field name '"+archive_name+'_field'+str(k)+"' does not exist in archive file.")
++#						print 'archive =',archive
++						error_diff=numpy.amax(numpy.abs(archive-field),axis=1)/ \
++								   (numpy.amax(numpy.abs(archive),axis=1)+sys.float_info.epsilon)
++#						print 'error_diff =',error_diff
+ 
+ 						#disp test result
+ 						if (error_diff>tolerance):
+@@ -180,13 +190,13 @@
+ 						directory=os.getcwd().split('/')    #  not used?
+ 						message=me2
+ 						if   output.lower() == 'nightly':
+-							fid=open(ISSM_DIR+'/nightlylog/matlaberror.log', 'a')
++							fid=open(os.path.join(ISSM_DIR,'nightlylog','matlaberror.log'), 'a')
+ 							fid.write('%s' % message)
+ 							fid.write('\n------------------------------------------------------------------\n')
+ 							fid.close()
+ 							print 'FAILURE difference: N/A test id: %i test name: %s field: %s' % (id,id_string,fieldname)
+ 						elif output.lower() == 'daily':
+-							fid=open(ISSM_DIR+'/dailylog/matlaberror.log', 'a')
++							fid=open(os.path.join(ISSM_DIR,'dailylog','matlaberror.log'), 'a')
+ 							fid.write('%s' % message)
+ 							fid.write('\n------------------------------------------------------------------\n')
+ 							fid.close()
+@@ -195,19 +205,21 @@
+ 							print 'FAILURE difference: N/A test id: %i test name: %s field: %s' % (id,id_string,fieldname)
+ 							raise RuntimeError(me2)
+ 
++				f.close()
++
+ 		except Exception as me:
+ 
+ 			#something went wrong, print failure message:
+ 			directory=os.getcwd().split('/')    #  not used?
+ 			message=me
+ 			if   output.lower() == 'nightly':
+-				fid=open(ISSM_DIR+'/nightlylog/matlaberror.log', 'a')
++				fid=open(os.path.join(ISSM_DIR+'nightlylog','matlaberror.log'), 'a')
+ 				fid.write('%s' % message)
+ 				fid.write('\n------------------------------------------------------------------\n')
+ 				fid.close()
+ 				print 'FAILURE difference: N/A test id: %i test name: %s field: %s' % (id,id_string,'N/A')
+ 			elif output.lower() == 'daily':
+-				fid=open(ISSM_DIR+'/dailylog/matlaberror.log', 'a')
++				fid=open(os.path.join(ISSM_DIR+'dailylog','matlaberror.log'), 'a')
+ 				fid.write('%s' % message)
+ 				fid.write('\n------------------------------------------------------------------\n')
+ 				fid.close()
Index: /issm/oecreview/Archive/12321-12677/ISSM-12644-12645.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12644-12645.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12644-12645.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solvers/stokesoptions.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solvers/stokesoptions.m	(revision 12644)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solvers/stokesoptions.m	(revision 12645)
+@@ -5,7 +5,7 @@
+ %      options=stokesoptions;
+ 
+ %retrieve options provided in varargin
+-arguments=pairoptions(varargin{:});
++options=pairoptions(varargin{:});
+ stokes=struct();
+ 
+ %default stokes options
Index: /issm/oecreview/Archive/12321-12677/ISSM-12645-12646.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12645-12646.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12645-12646.diff	(revision 12679)
@@ -0,0 +1,37 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/hdf5/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/hdf5/install.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/hdf5/install.sh	(revision 12646)
+@@ -0,0 +1,26 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf src install hdf5-1.8.9
++mkdir src install
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/hdf5-1.8.9.tar.gz' 'hdf5-1.8.9.tar.gz'
++
++#Untar 
++tar -zxvf  hdf5-1.8.9.tar.gz
++
++#Move hdf5 to src directory
++rm -rf src/*
++mv hdf5-1.8.9/* src/
++rm -rf hdf5-1.8.9
++
++#Configure and compile
++cd src
++./configure  --prefix="$ISSM_DIR/externalpackages/hdf5/install" 
++if [ -z $1 ]; then
++	make
++else
++	make -j $1
++fi
++make install
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/hdf5/install.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12646-12647.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12646-12647.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12646-12647.diff	(revision 12679)
@@ -0,0 +1,46 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test999.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test999.py	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/test999.py	(revision 12647)
+@@ -0,0 +1,27 @@
++#md=model()
++#md=triangle(md,'../Exp/Square.exp',50000)
++#md=setmask(md,'all','')
++#md=parameterize(md,'../Par/SquareShelfConstrained.py')
++
++md1=[11,12,13]
++md2=[21,22,23]
++md3=[34,32,33]
++md4=[41,44,43]
++md5=[51,52,53]
++md6=[61,62,63]
++md7=[71,72,73]
++
++#Fields and tolerances to track changes
++field_names     =['Vx','Vy','Vel','Pressure',\
++	'StressTensorxx','StressTensoryy','StressTensorxy']
++field_tolerances=[1e-13,1e-13,1e-13,1e-13,\
++	1e-13,1e-13,1e-13]
++field_values=[\
++	[md1],\
++	[md2],\
++	[md3],\
++	[md4],\
++	[md5],\
++	[md6],\
++	[md7],\
++	]
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive999.hdf5
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive999.hdf5
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive999.hdf5	(revision 12646)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive999.hdf5	(revision 12647)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive999.hdf5
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
Index: /issm/oecreview/Archive/12321-12677/ISSM-12647-12648.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12647-12648.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12647-12648.diff	(revision 12679)
@@ -0,0 +1,47 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/organizer.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/organizer.m	(revision 12647)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/organizer.m	(revision 12648)
+@@ -68,6 +68,24 @@
+ 			 end
+ 		 end
+ 		 %}}}
++		 function md=load(org,string),% {{{
++
++			 %Get model path
++			 if ~ischar(string), error('argument provided is not a string'); end
++			 path=[org.repository '/' org.prefix string];
++
++			 %figure out if the model is there
++			 if exist(path,'file'),
++				 struc=load(path,'-mat');
++				 name=char(fieldnames(struc));
++				 md=struc.(name);
++				 if nargout,
++					 varargout{1}=md;
++				 end
++			 else
++				 error(['Could not find ' path ]);
++			 end
++		 end%}}}
+ 		 function md=loadmodel(org,string),% {{{
+ 
+ 			 %Get model path
+@@ -75,7 +93,7 @@
+ 			 path=[org.repository '/' org.prefix string];
+ 
+ 			 %figure out if the model is there, otherwise, we have to use the default path supplied by user.
+-			 if exist(path,'file'),
++			 if exist(path,'file') | exist([path '.mat'],'file'),
+ 				 md=loadmodel(path);
+ 				 return;
+ 			 end
+@@ -138,7 +156,7 @@
+ 			 disp(['saving model as: ' name]);
+ 			 
+ 			 %check that md is a model
+-			 if ~isa(md,'model'),       error('savemodel error message: third argument is not a model'); end
++			 if ~isa(md,'model'), warning('third argument is not a model'); end
+ 			 if (org.currentstep>length(org.steps)), error(['organizer error message: element with id ' num2str(org.currentstep) ' not found']); end
+ 
+ 			 %save model
Index: /issm/oecreview/Archive/12321-12677/ISSM-12648-12649.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12648-12649.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12648-12649.diff	(revision 12679)
@@ -0,0 +1,20 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Model/loadmodel.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Model/loadmodel.m	(revision 12648)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Model/loadmodel.m	(revision 12649)
+@@ -11,8 +11,14 @@
+ if nargout>1,
+ 	error('loadmodel usage error: md=loadmodel(path)');
+ end
++
+ %check existence
+-if ~exist(path)
++if exist(path,'file')
++	%do nothing
++elseif exist([path '.mat'],'file')
++	%add extension
++	path = [path '.mat'];
++else
+ 	error(['loadmodel error message: file ' path ' does not exist']);
+ end
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12649-12650.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12649-12650.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12649-12650.diff	(revision 12679)
@@ -0,0 +1,14 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Geometry/find_point.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Geometry/find_point.m	(revision 12649)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Geometry/find_point.m	(revision 12650)
+@@ -7,5 +7,8 @@
+ %   Usage:
+ %      f=find_point(tabx,taby,pointx,pointy)
+ 
++%Compute distance between point and cloud of points
+ distance=sqrt((tabx-pointx).^2+(taby-pointy).^2);
+-f=find(distance==min(min(distance)));
++
++%find index of the minimum distance and return the first one only
++f=find(distance==min(min(distance)),1);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12650-12651.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12650-12651.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12650-12651.diff	(revision 12679)
@@ -0,0 +1,137 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/runme.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/runme.py	(revision 12650)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/runme.py	(revision 12651)
+@@ -1,39 +1,41 @@
+ #! /usr/bin/env python
+-"""RUNME - test deck for ISSM nightly runs"""
+-#
+-#   In a test deck directory (tests/Vertification/NightlyRun for example)
+-#   The following command will launch all the existing tests:
+-#   >> runme
+-#   To run the tests 101 and 102:
+-#   >> runme('id',[101 102])
+-#   etc...
+-#
+-#   Available options:
+-#      'id'            followed by the list of ids requested
+-#      'exclude'       ids to be excluded from the test
+-#      'benchmark'     'nightly' (nightly run/ daily run)
+-#                      'ismip'  : validation of ismip-hom tests
+-#                      'eismint': validation of eismint tests
+-#                      'thermal': validation of thermal tests
+-#                      'mesh'   : validation of mesh tests
+-#                      ...
+-#      'procedure'     'check' : run the test (default)
+-#                      'update': update the archive
+-#                      'model' : prepare the model but no test is run
+-#
+-#   Usage:
+-#      md=runme(varargin);
+-#
+-#   Examples:
+-#      runme;
+-#      runme('exclude',101);
+-#      md=runme('id',102,'procedure','model');
++"""
++RUNME - test deck for ISSM nightly runs
++ 
++    In a test deck directory (tests/Vertification/NightlyRun for example)
++    The following command will launch all the existing tests:
++    >>> runme()
++    To run the tests 101 and 102:
++    >>> runme(id=[101,102])
++    etc...
++ 
++    Available options:
++       'id'            followed by the list of ids requested
++       'exclude'       ids to be excluded from the test
++       'benchmark'     'nightly' (nightly run/ daily run)
++                       'ismip'  : validation of ismip-hom tests
++                       'eismint': validation of eismint tests
++                       'thermal': validation of thermal tests
++                       'mesh'   : validation of mesh tests
++                       ...
++       'procedure'     'check' : run the test (default)
++                       'update': update the archive
++ 
++    Usage:
++       md=runme(varargin);
++ 
++    Examples:
++       runme()
++       runme(exclude=101)
++       md=runme(id=102,procedure='update')
++"""
+ 
+ import os
+ import glob
+ import socket
+ import numpy
+-import h5py
++#import h5py
++import netCDF4
+ import sys
+ from parallelrange import parallelrange
+ from IdToName import IdToName
+@@ -141,21 +143,27 @@
+ 				if not socket.gethostname().lower().split('.')[0] == 'larsen':
+ #					raise RuntimeError("Nightly run archives must be saved on 'larsen' (hostname is '"+socket.gethostname()+"').")
+ 					print "Nightly run archives must be saved on 'larsen' (hostname is '"+socket.gethostname()+"')."
+-				f = h5py.File(os.path.join('..','Archives',archive_name+'.hdf5'),'w')
++#				f = h5py.File(os.path.join('..','Archives',archive_name+'.hdf5'),'w')
++				f = netCDF4.Dataset(os.path.join('..','Archives',archive_name+'.nc'),'w')
+ 				for k,fieldname in enumerate(field_names):
+ 					field=numpy.array(field_values[k],dtype=float)
+-					f.create_dataset(archive_name+'_field'+str(k),data=field)
++#					f.create_dataset(archive_name+'_field'+str(k),data=field)
++					f.createDimension(archive_name+'_field'+str(k)+'_0',numpy.size(field,0))
++					f.createDimension(archive_name+'_field'+str(k)+'_1',numpy.size(field,1))
++					v = f.createVariable(archive_name+'_field'+str(k),'f8',(archive_name+'_field'+str(k)+'_0',archive_name+'_field'+str(k)+'_1'))
++					v[:] = field
+ 				f.close()
+-				print "File '%s' saved.\n" % os.path.join('..','Archives',archive_name+'.hdf5')
++				print "File '%s' saved.\n" % os.path.join('..','Archives',archive_name+'.nc')
+ 
+ 			#ELSE: CHECK TEST
+ 			else:
+ 
+ 				#load archive
+-				if os.path.exists(os.path.join('..','Archives',archive_name+'.hdf5')):
+-					f = h5py.File(os.path.join('..','Archives',archive_name+'.hdf5'),'r')
++				if os.path.exists(os.path.join('..','Archives',archive_name+'.nc')):
++#					f = h5py.File(os.path.join('..','Archives',archive_name+'.hdf5'),'r')
++					f = netCDF4.Dataset(os.path.join('..','Archives',archive_name+'.nc'),'r')
+ 				else:
+-					raise IOError("Archive file '"+os.path.join('..','Archives',archive_name+'.hdf5')+"' does not exist.")
++					raise IOError("Archive file '"+os.path.join('..','Archives',archive_name+'.nc')+"' does not exist.")
+ 
+ 				for k,fieldname in enumerate(field_names):
+ 
+@@ -167,8 +175,10 @@
+ #						print 'tolerance =',tolerance
+ 
+ 						#compare to archive
+-						if archive_name+'_field'+str(k) in f:
+-							archive=f[archive_name+'_field'+str(k)][...]
++#						if archive_name+'_field'+str(k) in f:
++#							archive=f[archive_name+'_field'+str(k)][...]
++						if archive_name+'_field'+str(k) in f.variables:
++							archive=f.variables[archive_name+'_field'+str(k)][:]
+ 						else:
+ 							raise NameError("Field name '"+archive_name+'_field'+str(k)+"' does not exist in archive file.")
+ #						print 'archive =',archive
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive999.nc
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive999.nc
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive999.nc	(revision 12650)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive999.nc	(revision 12651)
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/Archives/Archive999.nc
+___________________________________________________________________
+Added: svn:mime-type
+## -0,0 +1 ##
++application/octet-stream
Index: /issm/oecreview/Archive/12321-12677/ISSM-12651-12652.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12651-12652.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12651-12652.diff	(revision 12679)
@@ -0,0 +1,65 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/IdToName.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/IdToName.py	(revision 12651)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/IdToName.py	(revision 12652)
+@@ -1,8 +1,10 @@
+ #! /usr/bin/env python
+-"""IDTONAME- return name of test"""
+-#
+-#   Usage:
+-#      name=IdToName(id);
++"""
++IDTONAME- return name of test
++ 
++    Usage:
++       name=IdToName(id)
++"""
+ 
+ def IdToName(id):
+ 	idname={
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/IdFromString.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/IdFromString.py	(revision 12651)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/IdFromString.py	(revision 12652)
+@@ -1,12 +1,14 @@
+ #! /usr/bin/env python
+-"""IDFROMSTRING - output ids from a given string"""
+-#
+-#   Usage:
+-#      ids=IdFromString(string);
+-#
+-#   Examples:
+-#      ids=IdFromString('Parallel');
+-#      ids=IdFromString('79North');
++"""
++IDFROMSTRING - output ids from a given string
++ 
++    Usage:
++       ids=IdFromString(string)
++ 
++    Examples:
++       ids=IdFromString('Parallel')
++       ids=IdFromString('79North')
++"""
+ 
+ from IdToName import IdToName
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Cluster/parallelrange.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Cluster/parallelrange.py	(revision 12651)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/Cluster/parallelrange.py	(revision 12652)
+@@ -1,8 +1,10 @@
+ #! /usr/bin/env python
+-"""PARALLELRANGE - from a rank, and a number of processors, figure out a range, for parallel tasks."""
+-#
+-#   Usage: 
+-#      [i1,i1]=parallelrange(rank,numprocs,globalsize)
++"""
++PARALLELRANGE - from a rank, and a number of processors, figure out a range, for parallel tasks.
++ 
++    Usage: 
++       i1,i2=parallelrange(rank,numprocs,globalsize)
++"""
+ 
+ def parallelrange(rank,numprocs,globalsize):
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12652-12653.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12652-12653.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12652-12653.diff	(revision 12679)
@@ -0,0 +1,46 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/netcdf/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/netcdf/install.sh	(revision 12652)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/netcdf/install.sh	(revision 12653)
+@@ -1,23 +1,32 @@
+ #!/bin/bash
+ 
++version=4.0.1
++#version=4.2
++
++#for versions 4.2, you need hdf5 compiled, as well as doxygen for the 
++#documentation!
++
+ #Some cleanup
+-rm -rf install netcdf-4.0.1
+-mkdir install
++rm -rf src install netcdf-$version
++mkdir install src
+ 
+ #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'
++$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/netcdf-$version.tar.gz" "netcdf-$version.tar.gz"
+ 
+ #Untar 
+-tar -zxvf  netcdf-4.0.1.tar.gz
++tar -zxvf  netcdf-$version.tar.gz
+ 
+ #Move netcdf to install directory
+-rm -rf install/*
+-mv netcdf-4.0.1/* install/
+-rm -rf netcdf-4.0.1
++rm -rf src/*
++mv netcdf-$version/* src/
++rm -rf netcdf-$version
+ 
+ #Configure and compile
+-cd install
+-./configure  --prefix="$ISSM_DIR/externalpackages/netcdf/install" 
++cd src
++
++#version dependent: 
++./configure  --prefix="$ISSM_DIR/externalpackages/netcdf/install"  
++
+ if [ -z $1 ]; then
+ 	make
+ else
Index: /issm/oecreview/Archive/12321-12677/ISSM-12653-12654.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12653-12654.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12653-12654.diff	(revision 12679)
@@ -0,0 +1,82 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12653)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12654)
+@@ -5351,7 +5351,6 @@
+ 			/*Branch on the specified type of update: */
+ 			switch(name){
+ 				case ThicknessEnum:
+-					/*Update thickness + surface: assume bed is constant. On ice shelves, takes hydrostatic equilibrium {{{*/
+ 					IssmDouble  thickness[3];
+ 					IssmDouble  thickness_init[3];
+ 					IssmDouble  hydrostatic_ratio[3];
+@@ -5364,51 +5363,40 @@
+ 					GetInputListOnVertices(&bed[0],BedEnum);
+ 					GetInputListOnVertices(&surface[0],SurfaceEnum);
+ 
+-					/*build new thickness: */
+-//					for(j=0;j<3;j++)thickness[j]=values[j];
+-
+ 					/*build new bed and surface: */
+ 					if (this->IsFloating()){
+ 						/*hydrostatic equilibrium: */
+ 						IssmDouble rho_ice,rho_water,di;
+-						rho_ice=this->matpar->GetRhoIce();
+-						rho_water=this->matpar->GetRhoWater();
++						rho_ice   = this->matpar->GetRhoIce();
++						rho_water = this->matpar->GetRhoWater();
++						di        = rho_ice/rho_water;
+ 
+-						di=rho_ice/rho_water;
+-
+ 						/*build new thickness: */
+ 						for (j=0; j<3; j++) {
+-						/*  for observed/interpolated/hydrostatic thickness, remove scaling from any hydrostatic thickness  */
+-							if     (hydrostatic_ratio[j] >= 0.)
++							/*  for observed/interpolated/hydrostatic thickness, remove scaling from any hydrostatic thickness  */
++							if (hydrostatic_ratio[j] >= 0.)
+ 								thickness[j]=values[j]-(values[j]/thickness_init[j]-1.)*hydrostatic_ratio[j]*surface[j]/(1.-di);
+-						/*  for minimum thickness, don't scale  */
++							/*  for minimum thickness, don't scale  */
+ 							else
+ 								thickness[j]=thickness_init[j];
+ 
+-						/*  check the computed thickness and update bed  */
+-							if (thickness[j] < 0.)
+-								thickness[j]=1./(1.-di);
++							/*  check the computed thickness and update bed*/
++							if (thickness[j] < 0.) thickness[j]=1./(1.-di);
+ 							bed[j]=surface[j]-thickness[j];
+ 						}
+-
+-//						for(j=0;j<3;j++){
+-//							surface[j]=(1-di)*thickness[j];
+-//							bed[j]=-di*thickness[j];
+-//						}
+ 					}
+ 					else{
+ 						/*build new thickness: */
+ 						for (j=0; j<3; j++) {
+-						/*  for observed thickness, use scaled value  */
++							/*  for observed thickness, use scaled value  */
+ 							if (hydrostatic_ratio[j] >= 0.)
+ 								thickness[j]=values[j];
+-						/*  for minimum thickness, don't scale  */
++							/*  for minimum thickness, don't scale  */
+ 							else
+ 								thickness[j]=thickness_init[j];
+ 						}
+ 
+ 						/*update bed on grounded ice: */
+-//						for(j=0;j<3;j++)surface[j]=bed[j]+thickness[j];
+ 						for(j=0;j<3;j++)bed[j]=surface[j]-thickness[j];
+ 					}
+ 
+@@ -5417,7 +5405,6 @@
+ 					this->inputs->AddInput(new TriaP1Input(BedEnum,bed));
+ 					this->inputs->AddInput(new TriaP1Input(SurfaceEnum,surface));
+ 
+-					/*}}}*/
+ 					break;
+ 				default:
+ 					this->inputs->AddInput(new TriaP1Input(name,values));
Index: /issm/oecreview/Archive/12321-12677/ISSM-12654-12655.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12654-12655.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12654-12655.diff	(revision 12679)
@@ -0,0 +1,75 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12654)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/issm.cpp	(revision 12655)
+@@ -34,6 +34,11 @@
+ 	IssmPDouble   start_init, finish_init;
+ 	int      ierr;
+ 
++	/*PETSc profiling*/   
++	bool petsc_profiling = false;
++	PetscLogDouble petscTime_start, petscTime_finish;
++	PetscLogDouble petsc_memUse, petscFlops_start, petscFlops_finish;
++
+ 	ISSMBOOT();
+ 
+ 	/*Initialize environments: Petsc, MPI, etc...: */
+@@ -93,6 +98,8 @@
+ 	femmodel->parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum);
+ 	femmodel->parameters->FindParam(&control_analysis,InversionIscontrolEnum);
+ 	femmodel->parameters->FindParam(&tao_analysis,InversionTaoEnum);
++   femmodel->parameters->FindParam(&petsc_profiling,DebugPetscProfilingEnum); 
++
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); finish_init=MPI_Wtime();
+ 	#else
+@@ -106,6 +113,11 @@
+ 	start_core=(IssmPDouble)clock();
+ 	#endif
+ 	
++	if(petsc_profiling){
++		PetscGetTime(&petscTime_start);
++		PetscGetFlops(&petscFlops_start);
++	}
++
+ 	if(dakota_analysis){
+ 		#ifdef _HAVE_DAKOTA_
+ 		Dakotax(femmodel);
+@@ -126,12 +138,27 @@
+ 	else{
+ 		solutioncore(femmodel);
+ 	}
++
++	if(petsc_profiling){
++		PetscGetTime(&petscTime_finish);
++		PetscGetFlops(&petscFlops_finish);
++		PetscMemoryGetCurrentUsage(&petsc_memUse);
++
++		_pprintLine_("PETSc elapsed time  : " << (petscTime_finish-petscTime_start) << "  Seconds");
++		_pprintLine_("PETSc elapsed flops : " << (petscFlops_finish-petscFlops_start) << "  Flops");
++		_pprintLine_("PETSc memory used   : " << petsc_memUse << "  Bytes");
++		
++		femmodel->results->AddObject(new DoubleExternalResult(femmodel->results->Size()+1, PetscProfilingSolutionTimeEnum, (petscTime_finish-petscTime_start), 1, 0));
++		femmodel->results->AddObject(new DoubleExternalResult(femmodel->results->Size()+1, PetscProfilingCurrentMemEnum, petsc_memUse, 1, 0));
++		femmodel->results->AddObject(new DoubleExternalResult(femmodel->results->Size()+1, PetscProfilingCurrentFlopsEnum, (petscFlops_finish-petscFlops_start), 1, 0));
++	}
++
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
+ 	#else
+ 	finish_core=(IssmPDouble)clock();
+ 	#endif
+-	
++
+ 	_pprintLine_("write results to disk:");
+ 	OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
+ 
+@@ -142,7 +169,7 @@
+ 		WriteLockFile(lockfilename);
+ 	}
+ 
+-	/*Free ressources */
++	/*Free resources */
+ 	xDelete<int>(analyses);
+ 	xDelete<char>(lockfilename);
+ 	xDelete<char>(binfilename);
Index: /issm/oecreview/Archive/12321-12677/ISSM-12655-12656.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12655-12656.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12655-12656.diff	(revision 12679)
@@ -0,0 +1,40 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/netcdf-python/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/netcdf-python/install.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/netcdf-python/install.sh	(revision 12656)
+@@ -0,0 +1,29 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf install netCDF4-1.0
++mkdir install 
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/netCDF4-1.0.tar.gz" "netCDF4-1.0.tar.gz"
++
++#Untar 
++tar -zxvf  netCDF4-1.0.tar.gz
++
++#for later: 
++rm -rf ISSMDIR
++echo $ISSM_DIR | sed 's/\//\\\//g' > ISSMDIR
++ISSMDIR=`cat ISSMDIR` && rm -rf ISSMDIR
++
++#Move netCDF4 to install directory
++rm -rf install/*
++mv netCDF4-1.0/* install/
++rm -rf netCDF4-1.0
++
++#Configur and compile
++cd install
++#edit setup.cfg to point to hdf5 and netcdf
++cat setup.cfg.template  | sed "s/\#netCDF4_dir = \/usr\/local/netCDF4_dir = $ISSMDIR\/externalpackages\/netcdf\/install/g"  | sed "s/\#HDF5_dir = \/usr\/local/HDF5_DIR = $ISSMDIR\/externalpackages\/hdf5\/install/g" > setup.cfg
++
++python setup.py build 
++python setup.py install
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/netcdf-python/install.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12656-12657.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12656-12657.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12656-12657.diff	(revision 12679)
@@ -0,0 +1,31 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/startup.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/startup.py	(revision 12656)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/startup.py	(revision 12657)
+@@ -21,20 +21,26 @@
+ 
+ #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_DIR+ '/src/py'):
++	if '.svn' in dirs:
++		dirs.remove('.svn')
+ 	for file in files:
+ 		if file.find(".py") != -1:
+ 			if file.find(".pyc") == -1:
+ 				#add to path 
+ 				sys.path.append(root)
++				print root, "\n"
+ 				file=os.path.splitext(file)[0]
+ 				#__import__(file)
+ 
+ for root,dirs,files in os.walk(ISSM_DIR+ '/src/m'):
++	if '.svn' in dirs:
++		dirs.remove('.svn')
+ 	for file in files:
+ 		if file.find(".py") != -1:
+ 			if file.find(".pyc") == -1:
+ 				#add to path 
+ 				sys.path.append(root)
++				print root, "\n"
+ 				file=os.path.splitext(file)[0]
+ 				#__import__(file)
+ 				
Index: /issm/oecreview/Archive/12321-12677/ISSM-12657-12658.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12657-12658.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12657-12658.diff	(revision 12679)
@@ -0,0 +1,37 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/runme.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/runme.py	(revision 12657)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/test/NightlyRun/runme.py	(revision 12658)
+@@ -37,11 +37,12 @@
+ #import h5py
+ import netCDF4
+ import sys
+-from parallelrange import parallelrange
+-from IdToName import IdToName
+ 
+ def runme(id=None,exclude=None,benchmark='nightly',procedure='check',output='none',rank=1,numprocs=1):
+ 
++	from parallelrange import parallelrange
++	from IdToName import IdToName
++
+ 	#Get ISSM_DIR variable
+ 	ISSM_DIR=os.environ['ISSM_DIR']
+ 	print 'ISSM_DIR =',ISSM_DIR
+@@ -246,6 +247,17 @@
+ 	return
+ 
+ if __name__ == '__main__':
++	if 'PYTHONSTARTUP' in os.environ:
++		PYTHONSTARTUP=os.environ['PYTHONSTARTUP']
++		print 'PYTHONSTARTUP =',PYTHONSTARTUP
++		if os.path.exists(PYTHONSTARTUP):
++			try:
++				execfile(PYTHONSTARTUP)
++			except Exception as e:
++				print "PYTHONSTARTUP error: ",e
++		else:
++			print "PYTHONSTARTUP file '%s' does not exist." % PYTHONSTARTUP
++
+ 	import argparse
+ 	parser = argparse.ArgumentParser(description='RUNME - test deck for ISSM nightly runs')
+ 	parser.add_argument('-i','--id', nargs='*', type=int, help='followed by the list of ids requested', default=[])
Index: /issm/oecreview/Archive/12321-12677/ISSM-12660-12661.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12660-12661.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12660-12661.diff	(revision 12679)
@@ -0,0 +1,31 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/pairoptions.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/pairoptions.py	(revision 12660)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/pairoptions.py	(revision 12661)
+@@ -13,13 +13,10 @@
+ 		self.functionname = ''
+ 		self.list         = {}
+ 
+-#		%get calling function name
+-#		a=dbstack;
+-#		if length(a)>1,
+-#			self.functionname=a(2).file(1:end-2);
+-#		else
+-#			self.functionname='';
+-#		end
++		#get calling function name
++		import inspect
++		if len(inspect.stack()) > 1:
++			self.functionname=inspect.stack()[1][3]
+ 
+ 		#initialize list
+ 		if not len(arg):
+@@ -98,7 +95,7 @@
+ #	end % }}}
+ 
+ 	def __repr__(self):    # {{{
+-		s="   functionname: %s\n" % self.functionname
++		s="   functionname: '%s'\n" % self.functionname
+ 		if self.list:
+ 			s+="   list: (%ix%i)\n\n" % (len(self.list),2)
+ 			for item in self.list.iteritems():
Index: /issm/oecreview/Archive/12321-12677/ISSM-12661-12662.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12661-12662.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12661-12662.diff	(revision 12679)
@@ -0,0 +1,277 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/checkmessage.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/checkmessage.m	(revision 12661)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/checkmessage.m	(revision 12662)
+@@ -1,10 +0,0 @@
+-function checkmessage(string)
+-%CHECKMESSAGE - checkmessage
+-%
+-%   Used to check model consistency
+-%
+-%   Usage:
+-%      checkmessage(string);
+-
+-disp(['model not consistent: ' string]);
+-modelconsistency(false);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/modelconsistency.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/modelconsistency.m	(revision 12661)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/modelconsistency.m	(revision 12662)
+@@ -1,23 +0,0 @@
+-function flag=modelconsistency(flag_in)
+-%MODELCONSISTENCY - return flag for model consistency
+-%
+-%   Used to check model consistency
+-%
+-%   Usage:
+-%      flag=modelconsistency(flag_in)
+-
+-persistent consistency;
+-
+-if nargin==1 & nargout==0,
+-	%OK model is inconsistent, set flag as false
+-	consistency=flag_in;
+-elseif nargin==0 & nargout==1,
+-	if isempty(consistency),
+-		%modelinconsistent has never been called, model is consistent
+-		consistency=true;
+-	end
+-else
+-	message('Bad usage');
+-end
+-
+-flag=consistency;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/checkfield.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/checkfield.m	(revision 12661)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/checkfield.m	(revision 12662)
+@@ -1,4 +1,4 @@
+-function checkfield(md,fieldname,varargin)
++function md = checkfield(md,fieldname,varargin)
+ %CHECKFIELD - check field consistency
+ %
+ %   Used to check model consistency.
+@@ -18,12 +18,12 @@
+ %      - message: overloaded error message
+ %
+ %   Usage:
+-%      checkfield(md,fieldname,options);
++%      md = checkfield(md,fieldname,options);
+ %
+ %   Example:
+-%      checkfield(md,'mesh.elementonbed','size',[md.mesh.numberofelements 1],'values',[0 1]);
+-%      checkfield(md,'diagnostic.icefront','size',[NaN 4],'NaN',1);
+-%      checkfield(md,'diagnostic.icefront(:,end)','values',[0 1 2]);
++%      md = checkfield(md,'mesh.elementonbed','size',[md.mesh.numberofelements 1],'values',[0 1]);
++%      md = checkfield(md,'diagnostic.icefront','size',[NaN 4],'NaN',1);
++%      md = checkfield(md,'diagnostic.icefront(:,end)','values',[0 1 2]);
+ 
+ %get options
+ options=pairoptions(varargin{:});
+@@ -34,7 +34,7 @@
+ %check empty
+ if exist(options,'empty')
+ 	if isempty(field),
+-		checkmessage(getfieldvalue(options,'message',...
++		md = checkmessage(md,getfieldvalue(options,'message',...
+ 			['field ''' fieldname ''' is empty']));
+ 	end
+ end
+@@ -44,17 +44,17 @@
+ 	fieldsize=getfieldvalue(options,'size');
+ 	if isnan(fieldsize(1)),
+ 		if (size(field,2)~=fieldsize(2)),
+-			checkmessage(getfieldvalue(options,'message',...
++			md = checkmessage(md,getfieldvalue(options,'message',...
+ 				['field ''' fieldname ''' should have ' num2str(fieldsize(2)) ' columns']));
+ 		end
+ 	elseif isnan(fieldsize(2)),
+ 		if (size(field,1)~=fieldsize(1)),
+-			checkmessage(getfieldvalue(options,'message',...
++			md = checkmessage(md,getfieldvalue(options,'message',...
+ 				['field ''' fieldname ''' should have ' num2str(fieldsize(1)) ' lines']));
+ 		end
+ 	else
+ 		if ((size(field)~=fieldsize(1)) |  (size(field,2)~=fieldsize(2)))
+-			checkmessage(getfieldvalue(options,'message',...
++			md = checkmessage(md,getfieldvalue(options,'message',...
+ 				['field ''' fieldname ''' size should be ' num2str(fieldsize(1)) ' x ' num2str(fieldsize(2))]));
+ 		end
+ 	end
+@@ -65,13 +65,13 @@
+ 	fieldnumel=getfieldvalue(options,'numel');
+ 	if ~ismember(numel(field),fieldnumel),
+ 		if length(fieldnumel)==1
+-			checkmessage(getfieldvalue(options,'message',...
++			md = checkmessage(md,getfieldvalue(options,'message',...
+ 				['field ''' fieldname ''' size should be ' sprintf('%g ',fieldnumel) ]));
+ 		elseif length(fieldnumel)==2
+-			checkmessage(getfieldvalue(options,'message',...
++			md = checkmessage(md,getfieldvalue(options,'message',...
+ 				['field ''' fieldname ''' size should be ' num2str(fieldnumel(1)) ' or ' num2str(fieldnumel(2)) ]));
+ 		else
+-			checkmessage(getfieldvalue(options,'message',...
++			md = checkmessage(md,getfieldvalue(options,'message',...
+ 				['field ''' fieldname ''' size should be ' sprintf('%g, ',fieldnumel(1:end-1)) ' or ' num2str(fieldnumel(end)) ]));
+ 		end
+ 	end
+@@ -81,7 +81,7 @@
+ if getfieldvalue(options,'NaN',0);
+ 	field2=reshape(field,prod(size(field)),1);
+ 	if any(isnan(field2)),
+-		checkmessage(getfieldvalue(options,'message',...
++		md = checkmessage(md,getfieldvalue(options,'message',...
+ 			['NaN values found in field ''' fieldname '''']));
+ 	end
+ end
+@@ -89,7 +89,7 @@
+ %check NaN
+ if getfieldvalue(options,'cell',0);
+ 	if ~iscell(field),
+-		checkmessage(getfieldvalue(options,'message',...
++		md = checkmessage(md,getfieldvalue(options,'message',...
+ 			['field ''' fieldname ''' should be a cell']));
+ 	end
+ end
+@@ -101,29 +101,29 @@
+ 	if ischar(field) | iscell(fieldvalues),
+ 		if any(~ismember(field,fieldvalues)),
+ 			if length(fieldvalues)==1
+-				checkmessage(getfieldvalue(options,'message',...
++				md = checkmessage(md,getfieldvalue(options,'message',...
+ 					['field ''' fieldname ''' value should be ' fieldvalues{1} ]));
+ 			elseif length(fieldvalues)==2
+-				checkmessage(getfieldvalue(options,'message',...
++				md = checkmessage(md,getfieldvalue(options,'message',...
+ 					['field ''' fieldname ''' values should be ' fieldvalues{1} ' or ' fieldvalues{2} ]));
+ 			else
+-				checkmessage(getfieldvalue(options,'message',...
++				md = checkmessage(md,getfieldvalue(options,'message',...
+ 					['field ''' fieldname ''' should have values in ' sprintf('''%s'', ',fieldvalues{1:end-1}) 'or ''' fieldvalues{end} '''']));
+ 			end
+ 		end
+ 	else
+-		checkmessage(getfieldvalue(options,'message',...
++		md = checkmessage(md,getfieldvalue(options,'message',...
+ 			['field ''' fieldname ''' should be one of the following strings: ' sprintf('''%s'', ',fieldvalues{1:end-1}) 'or ''' fieldvalues{end} '''']));
+ 	end
+ else
+ 	field2=reshape(field,prod(size(field)),1);
+ 	if isnumeric(field),
+ 		if any(~ismember(field2,fieldvalues)),
+-			checkmessage(getfieldvalue(options,'message',...
++			md = checkmessage(md,getfieldvalue(options,'message',...
+ 				['field ''' fieldname ''' should have values in [' num2str(fieldvalues) ']']));
+ 		end
+ 	else
+-		checkmessage(getfieldvalue(options,'message',...
++		md = checkmessage(md,getfieldvalue(options,'message',...
+ 			['field ''' fieldname ''' should be a number in [' num2str(fieldvalues) ']']));
+ 	end
+ 	end
+@@ -134,7 +134,7 @@
+ 	lowerbound=getfieldvalue(options,'>=');
+ 	field2=reshape(field,prod(size(field)),1);
+ 	if any(field2<lowerbound),
+-		checkmessage(getfieldvalue(options,'message',...
++		md = checkmessage(md,getfieldvalue(options,'message',...
+ 			['field ''' fieldname ''' should have values above ' num2str(lowerbound)]));
+ 	end
+ end
+@@ -142,7 +142,7 @@
+ 	lowerbound=getfieldvalue(options,'>');
+ 	field2=reshape(field,prod(size(field)),1);
+ 	if any(field2<=lowerbound),
+-		checkmessage(getfieldvalue(options,'message',...
++		md = checkmessage(md,getfieldvalue(options,'message',...
+ 			['field ''' fieldname ''' should have values above ' num2str(lowerbound)]));
+ 	end
+ end
+@@ -152,7 +152,7 @@
+ 	upperbound=getfieldvalue(options,'<=');
+ 	field2=reshape(field,prod(size(field)),1);
+ 	if any(field2>upperbound),
+-		checkmessage(getfieldvalue(options,'message',...
++		md = checkmessage(md,getfieldvalue(options,'message',...
+ 			['field ''' fieldname ''' should have values below ' num2str(upperbound)]));
+ 	end
+ end
+@@ -160,7 +160,7 @@
+ 	upperbound=getfieldvalue(options,'<');
+ 	field2=reshape(field,prod(size(field)),1);
+ 	if any(field2>=upperbound),
+-		checkmessage(getfieldvalue(options,'message',...
++		md = checkmessage(md,getfieldvalue(options,'message',...
+ 			['field ''' fieldname ''' should have values below ' num2str(upperbound(1))]));
+ 	end
+ end
+@@ -168,7 +168,7 @@
+ %check file
+ if getfieldvalue(options,'file',0),
+ 	if ~exist(field,'file')
+-		checkmessage(['file profided in ''' fieldname ''': ''' field ''' does not exist']);
++		md = checkmessage(md,['file profided in ''' fieldname ''': ''' field ''' does not exist']);
+ 	end
+ end
+ 
+@@ -176,20 +176,20 @@
+ if getfieldvalue(options,'forcing',0),
+ 	if size(field,1)==md.mesh.numberofvertices,
+ 		if ~size(field,2)==1,
+-			checkmessage(getfieldvalue(options,'message',...
++			md = checkmessage(md,getfieldvalue(options,'message',...
+ 				['field ''' fieldname ''' should have only one column as there are md.mesh.numberofvertices lines']));
+ 		end
+ 	elseif size(field,1)==md.mesh.numberofvertices+1
+ 		if any(field(end,:)~=sort(field(end,:))),
+-			checkmessage(getfieldvalue(options,'message',...
++			md = checkmessage(md,getfieldvalue(options,'message',...
+ 				['field ''' fieldname ''' columns should be chronological']));
+ 		end
+ 		if any(field(end,1:end-1)==field(end,2:end)),
+-			checkmessage(getfieldvalue(options,'message',...
++			md = checkmessage(md,getfieldvalue(options,'message',...
+ 				['field ''' fieldname ''' columns must not contain duplicate timesteps']));
+ 		end
+ 	else
+-		checkmessage(getfieldvalue(options,'message',...
++		md = checkmessage(md,getfieldvalue(options,'message',...
+ 			['field ''' fieldname ''' should have md.mesh.numberofvertices or md.mesh.numberofvertices+1 lines']));
+ 	end
+ end
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/DataProcessing/pkriging.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/DataProcessing/pkriging.m	(revision 12661)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/DataProcessing/pkriging.m	(revision 12662)
+@@ -7,7 +7,7 @@
+ options=pairoptions(varargin{:});
+ cluster=getfieldvalue(options,'cluster',generic('np',10));
+ options=removefield(options,'cluster',0);
+-name   = 'krig';
++name   = ['krig' num2str(feature('GetPid'))];
+ 
+ % =========================================   MARSHALL.m =================================================
+ disp(['marshalling file ' name '.bin']);
+@@ -37,11 +37,19 @@
+ tic
+ LaunchQueueJob(cluster,name,name,{[name '.bin'] [name '.queue']});
+ toc
++choice=input('Is the job successfully completed? (y/n)','s');
+ Download(cluster,name,{[name '.outbin']});
++structure=parseresultsfromdisk([name '.outbin'],0);
++delete([name '.outlog']);
++delete([name '.errlog']);
++delete([name '.outbin']);
++delete([name '.bin']);
++if ~ispc,
++	delete([name '.tar.gz']);
++end
+ 
+ %Process results
+-structure=parseresultsfromdisk([name '.outbin'],0);
+ B=structure.AutodiffForward;
+-B=reshape(B,size(x_interp,1),size(x_interp,2))';
++B=reshape(B,size(x_interp,2),size(x_interp,1))';
+ E=structure.AutodiffIsautodiff;
+-E=reshape(E,size(x_interp,1),size(x_interp,2))';
++E=reshape(E,size(x_interp,2),size(x_interp,1))';
Index: /issm/oecreview/Archive/12321-12677/ISSM-12662-12663.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12662-12663.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12662-12663.diff	(revision 12679)
@@ -0,0 +1,1170 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/initialization.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/initialization.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/initialization.m	(revision 12663)
+@@ -26,36 +26,36 @@
+ 		function obj = setdefaultparameters(obj) % {{{
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 			if ismember(DiagnosticHorizAnalysisEnum,analyses)
+ 				if ~isnan(md.initialization.vx) & ~isnan(md.initialization.vy),
+-					checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices 1]);
+-					checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices 1]);
++					md = checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices 1]);
++					md = checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices 1]);
+ 				end
+ 			end
+ 			if ismember(PrognosticAnalysisEnum,analyses),
+-				checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices 1]);
+-				checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices 1]);
++				md = checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices 1]);
++				md = checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices 1]);
+ 			end
+ 			if ismember(HydrologyAnalysisEnum,analyses),
+-				checkfield(md,'initialization.watercolumn','NaN',1,'size',[md.mesh.numberofvertices 1]);
++				md = checkfield(md,'initialization.watercolumn','NaN',1,'size',[md.mesh.numberofvertices 1]);
+ 			end
+ 			if ismember(BalancethicknessAnalysisEnum,analyses),
+-				checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices 1]);
+-				checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices 1]);
++				md = checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices 1]);
++				md = checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices 1]);
+ 				%Triangle with zero velocity
+ 				if any(sum(abs(md.initialization.vx(md.mesh.elements)),2)==0 & sum(abs(md.initialization.vy(md.mesh.elements)),2)==0)
+-					checkmessage('at least one triangle has all its vertices with a zero velocity');
++					md = checkmessage(md,'at least one triangle has all its vertices with a zero velocity');
+ 				end
+ 			end
+ 			if ismember(ThermalAnalysisEnum,analyses),
+-				checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices 1]);
+-				checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices 1]);
+-				checkfield(md,'initialization.vz','NaN',1,'size',[md.mesh.numberofvertices 1]);
+-				checkfield(md,'initialization.pressure','NaN',1,'size',[md.mesh.numberofvertices 1]);
++				md = checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices 1]);
++				md = checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices 1]);
++				md = checkfield(md,'initialization.vz','NaN',1,'size',[md.mesh.numberofvertices 1]);
++				md = checkfield(md,'initialization.pressure','NaN',1,'size',[md.mesh.numberofvertices 1]);
+ 			end
+ 			if (ismember(EnthalpyAnalysisEnum,analyses) & md.thermal.isenthalpy) | solution==EnthalpySolutionEnum,
+-				checkfield(md,'initialization.waterfraction','>=',0,'size',[md.mesh.numberofvertices 1]);
++				md = checkfield(md,'initialization.waterfraction','>=',0,'size',[md.mesh.numberofvertices 1]);
+ 			end
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/prognostic.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/prognostic.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/prognostic.m	(revision 12663)
+@@ -35,15 +35,15 @@
+ 			%Hydrostatic adjustment
+ 			obj.hydrostatic_adjustment='Absolute';
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			%Early return,
+ 			if ~ismember(PrognosticAnalysisEnum,analyses) |  (solution==TransientSolutionEnum & md.transient.isprognostic==0), return; end
+ 
+-			checkfield(md,'prognostic.spcthickness','forcing',1);
+-			checkfield(md,'prognostic.hydrostatic_adjustment','values',{'Absolute' 'Incremental'});
+-			checkfield(md,'prognostic.stabilization','values',[0 1 2 3]);
+-			checkfield(md,'prognostic.min_thickness','>',0);
++			md = checkfield(md,'prognostic.spcthickness','forcing',1);
++			md = checkfield(md,'prognostic.hydrostatic_adjustment','values',{'Absolute' 'Incremental'});
++			md = checkfield(md,'prognostic.stabilization','values',[0 1 2 3]);
++			md = checkfield(md,'prognostic.min_thickness','>',0);
+ 
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/flaim.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/flaim.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/flaim.m	(revision 12663)
+@@ -31,16 +31,16 @@
+ 		function obj = setdefaultparameters(obj) % {{{
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			%Early return
+ 			if solution~=FlaimSolutionEnum, return; end
+ 
+-			checkfield(md,'flaim.tracks','file',1);
++			md = checkfield(md,'flaim.tracks','file',1);
+ 			if any(isnan(md.flaim.criterion)) || isempty(md.flaim.criterion)
+-				checkfield(md,'flaim.targets','file',1);
++				md = checkfield(md,'flaim.targets','file',1);
+ 			else
+-				checkfield(md,'flaim.criterion','numel',[md.mesh.numberofvertices md.mesh.numberofelements]);
++				md = checkfield(md,'flaim.criterion','numel',[md.mesh.numberofvertices md.mesh.numberofelements]);
+ 			end
+ 
+ 		end % }}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/mask.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/mask.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/mask.m	(revision 12663)
+@@ -24,14 +24,14 @@
+ 		function obj = setdefaultparameters(obj) % {{{
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+-			checkfield(md,'mask.elementonfloatingice','size',[md.mesh.numberofelements 1],'values',[0 1]);
+-			checkfield(md,'mask.elementongroundedice','size',[md.mesh.numberofelements 1],'values',[0 1]);
+-			checkfield(md,'mask.elementonwater'      ,'size',[md.mesh.numberofelements 1],'values',[0 1]);
+-			checkfield(md,'mask.vertexonfloatingice','size',[md.mesh.numberofvertices 1],'values',[0 1]);
+-			checkfield(md,'mask.vertexongroundedice','size',[md.mesh.numberofvertices 1],'values',[0 1]);
+-			checkfield(md,'mask.vertexonwater'      ,'size',[md.mesh.numberofvertices 1],'values',[0 1]);
++			md = checkfield(md,'mask.elementonfloatingice','size',[md.mesh.numberofelements 1],'values',[0 1]);
++			md = checkfield(md,'mask.elementongroundedice','size',[md.mesh.numberofelements 1],'values',[0 1]);
++			md = checkfield(md,'mask.elementonwater'      ,'size',[md.mesh.numberofelements 1],'values',[0 1]);
++			md = checkfield(md,'mask.vertexonfloatingice','size',[md.mesh.numberofvertices 1],'values',[0 1]);
++			md = checkfield(md,'mask.vertexongroundedice','size',[md.mesh.numberofvertices 1],'values',[0 1]);
++			md = checkfield(md,'mask.vertexonwater'      ,'size',[md.mesh.numberofvertices 1],'values',[0 1]);
+ 		end % }}}
+ 		function disp(obj) % {{{
+ 			fielddisplay(obj,'elementonfloatingice','element on floating ice flags list');
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/balancethickness.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/balancethickness.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/balancethickness.m	(revision 12663)
+@@ -24,13 +24,13 @@
+ 			obj.stabilization=1;
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 			%Early return
+ 			if solution~=BalancethicknessSolutionEnum, return; end
+ 
+-			checkfield(md,'balancethickness.spcthickness','forcing',1);
+-			checkfield(md,'balancethickness.thickening_rate','size',[md.mesh.numberofvertices 1],'NaN',1);
+-			checkfield(md,'balancethickness.stabilization','size',[1 1],'values',[0 1 2 3]);
++			md = checkfield(md,'balancethickness.spcthickness','forcing',1);
++			md = checkfield(md,'balancethickness.thickening_rate','size',[md.mesh.numberofvertices 1],'NaN',1);
++			md = checkfield(md,'balancethickness.stabilization','size',[1 1],'values',[0 1 2 3]);
+ 		end % }}}
+ 		function disp(obj) % {{{
+ 			disp(sprintf('   balance thickness solution parameters:'));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/inversion.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/inversion.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/inversion.m	(revision 12663)
+@@ -74,7 +74,7 @@
+ 			obj.cost_function_threshold=NaN; %not activated
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			%Early return
+ 			if ~obj.iscontrol, return; end
+@@ -82,25 +82,25 @@
+ 			num_controls=numel(md.inversion.control_parameters);
+ 			num_costfunc=size(md.inversion.cost_functions,2);
+ 
+-			checkfield(md,'inversion.iscontrol','values',[0 1]);
+-			checkfield(md,'inversion.tao','values',[0 1]);
+-			checkfield(md,'inversion.incomplete_adjoint','values',[0 1]);
+-			checkfield(md,'inversion.control_parameters','cell',1,'values',{'BalancethicknessThickeningRate' 'FrictionCoefficient' 'MaterialsRheologyBbar' 'Vx' 'Vy'});
+-			checkfield(md,'inversion.nsteps','numel',1,'>=',1);
+-			checkfield(md,'inversion.maxiter_per_step','size',[md.inversion.nsteps 1],'>=',0);
+-			checkfield(md,'inversion.step_threshold','size',[md.inversion.nsteps 1]);
+-			checkfield(md,'inversion.cost_functions','size',[md.inversion.nsteps num_costfunc],'values',[101:105 201 501:503]);
+-			checkfield(md,'inversion.cost_functions_coefficients','size',[md.mesh.numberofvertices num_costfunc],'>=',0);
+-			checkfield(md,'inversion.gradient_only','values',[0 1]);
+-			checkfield(md,'inversion.gradient_scaling','size',[md.inversion.nsteps num_controls]);
+-			checkfield(md,'inversion.min_parameters','size',[md.mesh.numberofvertices num_controls]);
+-			checkfield(md,'inversion.max_parameters','size',[md.mesh.numberofvertices num_controls]);
++			md = checkfield(md,'inversion.iscontrol','values',[0 1]);
++			md = checkfield(md,'inversion.tao','values',[0 1]);
++			md = checkfield(md,'inversion.incomplete_adjoint','values',[0 1]);
++			md = checkfield(md,'inversion.control_parameters','cell',1,'values',{'BalancethicknessThickeningRate' 'FrictionCoefficient' 'MaterialsRheologyBbar' 'Vx' 'Vy'});
++			md = checkfield(md,'inversion.nsteps','numel',1,'>=',1);
++			md = checkfield(md,'inversion.maxiter_per_step','size',[md.inversion.nsteps 1],'>=',0);
++			md = checkfield(md,'inversion.step_threshold','size',[md.inversion.nsteps 1]);
++			md = checkfield(md,'inversion.cost_functions','size',[md.inversion.nsteps num_costfunc],'values',[101:105 201 501:503]);
++			md = checkfield(md,'inversion.cost_functions_coefficients','size',[md.mesh.numberofvertices num_costfunc],'>=',0);
++			md = checkfield(md,'inversion.gradient_only','values',[0 1]);
++			md = checkfield(md,'inversion.gradient_scaling','size',[md.inversion.nsteps num_controls]);
++			md = checkfield(md,'inversion.min_parameters','size',[md.mesh.numberofvertices num_controls]);
++			md = checkfield(md,'inversion.max_parameters','size',[md.mesh.numberofvertices num_controls]);
+ 
+ 			if solution==BalancethicknessSolutionEnum
+-				checkfield(md,'inversion.thickness_obs','size',[md.mesh.numberofvertices 1],'NaN',1);
++				md = checkfield(md,'inversion.thickness_obs','size',[md.mesh.numberofvertices 1],'NaN',1);
+ 			else
+-				checkfield(md,'inversion.vx_obs','size',[md.mesh.numberofvertices 1],'NaN',1);
+-				checkfield(md,'inversion.vy_obs','size',[md.mesh.numberofvertices 1],'NaN',1);
++				md = checkfield(md,'inversion.vx_obs','size',[md.mesh.numberofvertices 1],'NaN',1);
++				md = checkfield(md,'inversion.vy_obs','size',[md.mesh.numberofvertices 1],'NaN',1);
+ 			end
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/geometry.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/geometry.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/geometry.m	(revision 12663)
+@@ -23,16 +23,16 @@
+ 		function obj = setdefaultparameters(obj) % {{{
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+-			checkfield(md,'geometry.surface'  ,'NaN',1,'size',[md.mesh.numberofvertices 1]);
+-			checkfield(md,'geometry.bed'      ,'NaN',1,'size',[md.mesh.numberofvertices 1]);
+-			checkfield(md,'geometry.thickness','NaN',1,'size',[md.mesh.numberofvertices 1],'>',0);
++			md = checkfield(md,'geometry.surface'  ,'NaN',1,'size',[md.mesh.numberofvertices 1]);
++			md = checkfield(md,'geometry.bed'      ,'NaN',1,'size',[md.mesh.numberofvertices 1]);
++			md = checkfield(md,'geometry.thickness','NaN',1,'size',[md.mesh.numberofvertices 1],'>',0);
+ 			if any((obj.thickness-obj.surface+obj.bed)>10^-9),
+-				checkmessage(['equality thickness=surface-bed violated']);
++				md = checkmessage(md,['equality thickness=surface-bed violated']);
+ 			end 
+ 			if solution==TransientSolutionEnum & md.transient.isgroundingline,
+-				checkfield(md,'geometry.bathymetry','NaN',1,'size',[md.mesh.numberofvertices 1]);
++				md = checkfield(md,'geometry.bathymetry','NaN',1,'size',[md.mesh.numberofvertices 1]);
+ 			end
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/thermal.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/thermal.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/thermal.m	(revision 12663)
+@@ -39,16 +39,16 @@
+ 			%Should we use cold ice (default) or enthalpy formulation
+ 			obj.isenthalpy=0;
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			%Early return
+ 			if (~ismember(ThermalAnalysisEnum,analyses) & ~ismember(EnthalpyAnalysisEnum,analyses)) | (solution==TransientSolutionEnum & md.transient.isthermal==0), return; end
+ 
+-			checkfield(md,'thermal.stabilization','numel',1,'values',[0 1 2]);
+-			checkfield(md,'thermal.spctemperature','forcing',1);
++			md = checkfield(md,'thermal.stabilization','numel',1,'values',[0 1 2]);
++			md = checkfield(md,'thermal.spctemperature','forcing',1);
+ 			if (ismember(EnthalpyAnalysisEnum,analyses) & md.thermal.isenthalpy & md.mesh.dimension==3),
+-			checkfield(md,'thermal.spctemperature','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*(md.geometry.surface-md.mesh.z),'message','spctemperature should be below the adjusted melting point');
+-			checkfield(md,'thermal.isenthalpy','numel',1,'values',[0 1]);
++			md = checkfield(md,'thermal.spctemperature','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*(md.geometry.surface-md.mesh.z),'message','spctemperature should be below the adjusted melting point');
++			md = checkfield(md,'thermal.isenthalpy','numel',1,'values',[0 1]);
+ 			end
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/settings.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/settings.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/settings.m	(revision 12663)
+@@ -40,13 +40,13 @@
+ 			%0 to desactivate
+ 			obj.waitonlock=Inf;
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+-			checkfield(md,'settings.io_gather','numel',1,'values',[0 1]);
+-			checkfield(md,'settings.lowmem','numel',1,'values',[0 1]);
+-			checkfield(md,'settings.results_as_patches','numel',1,'values',[0 1]);
+-			checkfield(md,'settings.output_frequency','numel',1,'>=',1);
+-			checkfield(md,'settings.waitonlock','numel',1);
++			md = checkfield(md,'settings.io_gather','numel',1,'values',[0 1]);
++			md = checkfield(md,'settings.lowmem','numel',1,'values',[0 1]);
++			md = checkfield(md,'settings.results_as_patches','numel',1,'values',[0 1]);
++			md = checkfield(md,'settings.output_frequency','numel',1,'>=',1);
++			md = checkfield(md,'settings.waitonlock','numel',1);
+ 
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/miscellaneous.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/miscellaneous.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/miscellaneous.m	(revision 12663)
+@@ -18,9 +18,9 @@
+ 					error('constructor not supported');
+ 			end
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+-			checkfield(md,'miscellaneous.name','empty',1);
++			md = checkfield(md,'miscellaneous.name','empty',1);
+ 
+ 		end % }}}
+ 		function obj = setdefaultparameters(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/groundingline.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/groundingline.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/groundingline.m	(revision 12663)
+@@ -27,21 +27,21 @@
+ 
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+-			checkfield(md,'groundingline.migration','values',{'None' 'AgressiveMigration' 'SoftMigration'});
++			md = checkfield(md,'groundingline.migration','values',{'None' 'AgressiveMigration' 'SoftMigration'});
+ 
+ 			if ~strcmp(obj.migration,'None'),
+ 				if isnan(md.geometry.bathymetry),
+-					checkmessage(['requesting grounding line migration, but bathymetry is absent!']);
++					md = checkmessage(md,['requesting grounding line migration, but bathymetry is absent!']);
+ 				end
+ 				pos=find(md.mask.vertexongroundedice); 
+ 				if any(abs(md.geometry.bed(pos)-md.geometry.bathymetry(pos))>10^-10),
+-					checkmessage(['bathymetry not equal to bed on grounded ice !']);
++					md = checkmessage(md,['bathymetry not equal to bed on grounded ice !']);
+ 				end
+ 				pos=find(md.mask.vertexonfloatingice); 
+ 				if any(md.geometry.bathymetry(pos)-md.geometry.bed(pos)>10^-9),
+-					checkmessage(['bathymetry superior to bed on floating ice !']);
++					md = checkmessage(md,['bathymetry superior to bed on floating ice !']);
+ 				end
+ 			end
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/greenplanet.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/greenplanet.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/greenplanet.m	(revision 12663)
+@@ -47,7 +47,7 @@
+ 			 disp(sprintf('    interactive: %i',cluster.interactive));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{
++		 function md = checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'rignot','default'};
+ 			 queue_requirements_time=[Inf Inf];
+@@ -56,9 +56,9 @@
+ 			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,1)
+ 
+ 			 %Miscelaneous
+-			 if isempty(cluster.login), checkmessage('login empty'); end
+-			 if isempty(cluster.codepath), checkmessage('codepath empty'); end
+-			 if isempty(cluster.executionpath), checkmessage('executionpath empty'); end
++			 if isempty(cluster.login), md = checkmessage(md,'login empty'); end
++			 if isempty(cluster.codepath), md = checkmessage(md,'codepath empty'); end
++			 if isempty(cluster.executionpath), md = checkmessage(md,'executionpath empty'); end
+ 
+ 		 end
+ 		 %}}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/gemini.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/gemini.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/gemini.m	(revision 12663)
+@@ -36,7 +36,7 @@
+ 			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{
++		 function md = checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'debug','shortg','longg'};
+ 			 queue_requirements_time=[60 180 720];
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pfe.m	(revision 12663)
+@@ -55,7 +55,7 @@
+ 			 disp(sprintf('    hyperthreading: %i',cluster.hyperthreading));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{
++		 function md = checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'long','normal','debug'};
+ 			 queue_requirements_time=[5*24*60 8*60 2*60];
+@@ -67,31 +67,31 @@
+ 			 if (strcmpi(cluster.processor,'har') | strcmpi(cluster.processor,'neh')),
+ 				 if cluster.hyperthreading,
+ 					 if ((cluster.cpuspernode>16 ) | (cluster.cpuspernode<1)),
+-						 checkmessage('cpuspernode should be between 1 and 16 for ''neh'' and ''har'' processors in hyperthreading mode');
++						 md = checkmessage(md,'cpuspernode should be between 1 and 16 for ''neh'' and ''har'' processors in hyperthreading mode');
+ 					 end
+ 				 else
+ 					 if ((cluster.cpuspernode>8 ) | (cluster.cpuspernode<1)),
+-						 checkmessage('cpuspernode should be between 1 and 8 for ''neh'' and ''har'' processors');
++						 md = checkmessage(md,'cpuspernode should be between 1 and 8 for ''neh'' and ''har'' processors');
+ 					 end
+ 				 end
+ 			 elseif strcmpi(cluster.processor,'wes'),
+ 				 if cluster.hyperthreading,
+ 					 if ((cluster.cpuspernode>24 ) | (cluster.cpuspernode<1)),
+-						 checkmessage('cpuspernode should be between 1 and 24 for ''wes'' processors in hyperthreading mode');
++						 md = checkmessage(md,'cpuspernode should be between 1 and 24 for ''wes'' processors in hyperthreading mode');
+ 					 end
+ 				 else
+ 					 if ((cluster.cpuspernode>12 ) | (cluster.cpuspernode<1)),
+-						 checkmessage('cpuspernode should be between 1 and 12 for ''wes'' processors');
++						 md = checkmessage(md,'cpuspernode should be between 1 and 12 for ''wes'' processors');
+ 					 end
+ 				 end
+ 			 else
+-				 checkmessage('unknown processor type, should be ''neh'',''wes'' or ''har''');
++				 md = checkmessage(md,'unknown processor type, should be ''neh'',''wes'' or ''har''');
+ 			 end
+ 
+ 			 %Miscelaneous
+-			 if isempty(cluster.login), checkmessage('login empty'); end
+-			 if isempty(cluster.codepath), checkmessage('codepath empty'); end
+-			 if isempty(cluster.executionpath), checkmessage('executionpath empty'); end
++			 if isempty(cluster.login), md = checkmessage(md,'login empty'); end
++			 if isempty(cluster.codepath), md = checkmessage(md,'codepath empty'); end
++			 if isempty(cluster.executionpath), md = checkmessage(md,'executionpath empty'); end
+ 
+ 		 end
+ 		 %}}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/castor.m	(revision 12663)
+@@ -36,7 +36,7 @@
+ 			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{
++		 function md = checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'shortc','longc'};
+ 			 queue_requirements_time=[180 720];
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/generic.m	(revision 12663)
+@@ -49,9 +49,9 @@
+ 			 disp(sprintf('    valgrindsup: %s',cluster.valgrindsup));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{
++		 function md = checkconsistency(cluster,md,solution,analyses) % {{{
+ 			 if cluster.np<1
+-				 checkmessage(['number of processors should be at least 1']);
++				 md = checkmessage(md,['number of processors should be at least 1']);
+ 			 end
+ 			 if isnan(cluster.np),
+ 				 checkessage('number of processors should not be NaN!');
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/discover.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/discover.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/discover.m	(revision 12663)
+@@ -55,7 +55,7 @@
+ 			 disp(sprintf('    hyperthreading: %i',cluster.hyperthreading));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{
++		 function md = checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'general_long','general','general_small','debug'};
+ 			 queue_requirements_time=[24*60 12*60 12*60 60];
+@@ -64,25 +64,25 @@
+ 			 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,cluster.time)
+ 
+ 			 if ( strcmpi(cluster.queue,'general') & cluster.cpuspernode*cluster.numnodes < 17)
+-				 checkmessage('cpus must be great than 17 for general queue');
++				 md = checkmessage(md,'cpus must be great than 17 for general queue');
+ 			 end
+ 			 %now, check cluster.cpuspernode according to processor type
+ 			 if ( strcmpi(cluster.processor,'neha')),
+ 				 if ((cluster.cpuspernode>8 ) | (cluster.cpuspernode<1)),
+-					 checkmessage('cpuspernode should be between 1 and 8 for ''neha'' processors');
++					 md = checkmessage(md,'cpuspernode should be between 1 and 8 for ''neha'' processors');
+ 				 end
+ 			 elseif strcmpi(cluster.processor,'west'),
+ 				 if ((cluster.cpuspernode>12 ) | (cluster.cpuspernode<1)),
+-					 checkmessage('cpuspernode should be between 1 and 12 for ''west'' processors');
++					 md = checkmessage(md,'cpuspernode should be between 1 and 12 for ''west'' processors');
+ 				 end
+ 			 else
+-				 checkmessage('unknown processor type, should be ''neha'' or ''west'' ');
++				 md = checkmessage(md,'unknown processor type, should be ''neha'' or ''west'' ');
+ 			 end
+ 
+ 			 %Miscelaneous
+-			 if isempty(cluster.login), checkmessage('login empty'); end
+-			 if isempty(cluster.codepath), checkmessage('codepath empty'); end
+-			 if isempty(cluster.executionpath), checkmessage('executionpath empty'); end
++			 if isempty(cluster.login), md = checkmessage(md,'login empty'); end
++			 if isempty(cluster.codepath), md = checkmessage(md,'codepath empty'); end
++			 if isempty(cluster.executionpath), md = checkmessage(md,'executionpath empty'); end
+ 
+ 		 end
+ 		 %}}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/acenet.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/acenet.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/acenet.m	(revision 12663)
+@@ -46,7 +46,7 @@
+ 			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{
++		 function md = checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'debug','shortq','longq'};
+ 			 queue_requirements_time=[60*1 60*3 60*17];
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/cosmos.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/cosmos.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/cosmos.m	(revision 12663)
+@@ -36,7 +36,7 @@
+ 			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{
++		 function md = checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'debug','shortq','longq'};
+ 			 queue_requirements_time=[60*1 60*3 60*17];
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pollux.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pollux.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/clusters/pollux.m	(revision 12663)
+@@ -36,7 +36,7 @@
+ 			 disp(sprintf('    executionpath: %s',cluster.executionpath));
+ 		 end
+ 		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{
++		 function md = checkconsistency(cluster,md,solution,analyses) % {{{
+ 
+ 			 available_queues={'shortp','longp'};
+ 			 queue_requirements_time=[180 720];
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/solver.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/solver.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/solver.m	(revision 12663)
+@@ -53,11 +53,11 @@
+ 				 disp(obj.(analysis));
+ 			 end
+ 		 end % }}}
+-		 function checkconsistency(obj,md,solution,analyses) % {{{
++		 function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 			 analyses=properties(obj);
+ 			 for i=1:numel(analyses),
+ 				 if isempty(fieldnames(obj.(analyses{i})))
+-					 checkmessage(['md.solver.' analyses{i} ' is empty']);
++					 md = checkmessage(md,['md.solver.' analyses{i} ' is empty']);
+ 				 end
+ 			 end
+ 		 end % }}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/friction.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/friction.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/friction.m	(revision 12663)
+@@ -21,14 +21,14 @@
+ 		function obj = setdefaultparameters(obj) % {{{
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			%Early return
+ 			if ~ismember(DiagnosticHorizAnalysisEnum,analyses) & ~ismember(ThermalAnalysisEnum,analyses), return; end
+ 
+-			checkfield(md,'friction.coefficient','NaN',1,'size',[md.mesh.numberofvertices 1]);
+-			checkfield(md,'friction.q','NaN',1,'size',[md.mesh.numberofelements 1]);
+-			checkfield(md,'friction.p','NaN',1,'size',[md.mesh.numberofelements 1]);
++			md = checkfield(md,'friction.coefficient','NaN',1,'size',[md.mesh.numberofvertices 1]);
++			md = checkfield(md,'friction.q','NaN',1,'size',[md.mesh.numberofelements 1]);
++			md = checkfield(md,'friction.p','NaN',1,'size',[md.mesh.numberofelements 1]);
+ 		end % }}}
+ 		function disp(obj) % {{{
+ 			disp(sprintf('Sigma= drag^2 * Neff ^r * u ^s, with Neff=rho_ice*g*thickness+rho_water*g*bed, r=q/p and s=1/p'));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/hydrology.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/hydrology.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/hydrology.m	(revision 12663)
+@@ -34,13 +34,13 @@
+ 			%Type of stabilization to use 0:nothing 1:artificial_diffusivity
+ 			obj.stabilization=1;
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			%Early return
+ 			if ~ismember(HydrologyAnalysisEnum,analyses), return; end
+ 
+-			checkfield(md,'hydrology.spcwatercolumn','forcing',1);
+-			checkfield(md,'hydrology.stabilization','>=',0);
++			md = checkfield(md,'hydrology.spcwatercolumn','forcing',1);
++			md = checkfield(md,'hydrology.stabilization','>=',0);
+ 		end % }}}
+ 		function disp(obj) % {{{
+ 			disp(sprintf('   hydrology solution parameters:'));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/materials.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/materials.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/materials.m	(revision 12663)
+@@ -68,14 +68,14 @@
+ 			%available: none, paterson and arrhenius
+ 			obj.rheology_law='Paterson';
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
+-			checkfield(md,'materials.rho_ice','>',0);
+-			checkfield(md,'materials.rho_water','>',0);
+-			checkfield(md,'materials.rho_freshwater','>',0);
+-			checkfield(md,'materials.mu_water','>',0);
+-			checkfield(md,'materials.rheology_B','>',0,'size',[md.mesh.numberofvertices 1]);
+-			checkfield(md,'materials.rheology_n','>',0,'size',[md.mesh.numberofelements 1]);
+-			checkfield(md,'materials.rheology_law','values',{'None' 'Paterson' 'Arrhenius'});
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
++			md = checkfield(md,'materials.rho_ice','>',0);
++			md = checkfield(md,'materials.rho_water','>',0);
++			md = checkfield(md,'materials.rho_freshwater','>',0);
++			md = checkfield(md,'materials.mu_water','>',0);
++			md = checkfield(md,'materials.rheology_B','>',0,'size',[md.mesh.numberofvertices 1]);
++			md = checkfield(md,'materials.rheology_n','>',0,'size',[md.mesh.numberofelements 1]);
++			md = checkfield(md,'materials.rheology_law','values',{'None' 'Paterson' 'Arrhenius'});
+ 		end % }}}
+ 		function disp(obj) % {{{
+ 			disp(sprintf('   Materials:\n'));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/steadystate.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/steadystate.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/steadystate.m	(revision 12663)
+@@ -25,17 +25,17 @@
+ 			%Relative tolerance for the steadystate convertgence
+ 			obj.reltol=0.01;
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			%Early return
+ 			if solution~=SteadystateSolutionEnum, return; end;
+ 
+ 			if md.timestepping.time_step~=0,
+-				checkmessage(['for a steadystate computation, timestepping.time_step must be zero.']);
++				md = checkmessage(md,['for a steadystate computation, timestepping.time_step must be zero.']);
+ 			end
+ 
+ 			if isnan(md.diagnostic.reltol),
+-				checkmessage(['for a steadystate computation, diagnostic.reltol (relative convergence criterion) must be defined!']);
++				md = checkmessage(md,['for a steadystate computation, diagnostic.reltol (relative convergence criterion) must be defined!']);
+ 			end
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/mesh.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/mesh.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/mesh.m	(revision 12663)
+@@ -63,58 +63,58 @@
+ 			%trunk/test/Miscellaneous/runme.m
+ 			obj.average_vertex_connectivity=25;
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+-			checkfield(md,'mesh.x','NaN',1,'size',[md.mesh.numberofvertices 1]);
+-			checkfield(md,'mesh.y','NaN',1,'size',[md.mesh.numberofvertices 1]);
+-			checkfield(md,'mesh.z','NaN',1,'size',[md.mesh.numberofvertices 1]);
+-			checkfield(md,'mesh.elements','NaN',1,'>',0,'values',1:md.mesh.numberofvertices);
++			md = checkfield(md,'mesh.x','NaN',1,'size',[md.mesh.numberofvertices 1]);
++			md = checkfield(md,'mesh.y','NaN',1,'size',[md.mesh.numberofvertices 1]);
++			md = checkfield(md,'mesh.z','NaN',1,'size',[md.mesh.numberofvertices 1]);
++			md = checkfield(md,'mesh.elements','NaN',1,'>',0,'values',1:md.mesh.numberofvertices);
+ 			if(md.mesh.dimension==2),
+-				checkfield(md,'mesh.elements','size',[md.mesh.numberofelements 3]);
++				md = checkfield(md,'mesh.elements','size',[md.mesh.numberofelements 3]);
+ 			else
+-				checkfield(md,'mesh.elements','size',[md.mesh.numberofelements 6]);
++				md = checkfield(md,'mesh.elements','size',[md.mesh.numberofelements 6]);
+ 			end
+ 			if any(~ismember(1:md.mesh.numberofvertices,sort(unique(md.mesh.elements(:)))));
+-				checkmessage('orphan nodes have been found. Check the mesh outline');
++				md = checkmessage(md,'orphan nodes have been found. Check the mesh outline');
+ 			end
+-			checkfield(md,'mesh.dimension','values',[2 3]);
+-			checkfield(md,'mesh.numberoflayers','>=',0);
+-			checkfield(md,'mesh.numberofelements','>',0);
+-			checkfield(md,'mesh.numberofvertices','>',0);
++			md = checkfield(md,'mesh.dimension','values',[2 3]);
++			md = checkfield(md,'mesh.numberoflayers','>=',0);
++			md = checkfield(md,'mesh.numberofelements','>',0);
++			md = checkfield(md,'mesh.numberofvertices','>',0);
+ 			%no checks for numberofedges lat long and hemisphere
+-			checkfield(md,'mesh.elementonbed','size',[md.mesh.numberofelements 1],'values',[0 1]);
+-			checkfield(md,'mesh.elementonsurface','size',[md.mesh.numberofelements 1],'values',[0 1]);
+-			checkfield(md,'mesh.vertexonbed','size',[md.mesh.numberofvertices 1],'values',[0 1]);
+-			checkfield(md,'mesh.vertexonsurface','size',[md.mesh.numberofvertices 1],'values',[0 1]);
++			md = checkfield(md,'mesh.elementonbed','size',[md.mesh.numberofelements 1],'values',[0 1]);
++			md = checkfield(md,'mesh.elementonsurface','size',[md.mesh.numberofelements 1],'values',[0 1]);
++			md = checkfield(md,'mesh.vertexonbed','size',[md.mesh.numberofvertices 1],'values',[0 1]);
++			md = checkfield(md,'mesh.vertexonsurface','size',[md.mesh.numberofvertices 1],'values',[0 1]);
+ 			if (md.mesh.dimension==2),
+-				checkfield(md,'mesh.average_vertex_connectivity','>=',9,'message','''mesh.average_vertex_connectivity'' should be at least 9 in 2d');
++				md = checkfield(md,'mesh.average_vertex_connectivity','>=',9,'message','''mesh.average_vertex_connectivity'' should be at least 9 in 2d');
+ 			else
+-				checkfield(md,'mesh.average_vertex_connectivity','>=',24,'message','''mesh.average_vertex_connectivity'' should be at least 24 in 3d');
++				md = checkfield(md,'mesh.average_vertex_connectivity','>=',24,'message','''mesh.average_vertex_connectivity'' should be at least 24 in 3d');
+ 			end
+-			checkfield(md,'mesh.elementconnectivity','size',[md.mesh.numberofelements 3],'NaN',1);
++			md = checkfield(md,'mesh.elementconnectivity','size',[md.mesh.numberofelements 3],'NaN',1);
+ 
+ 			%Solution specific checks
+ 			switch(solution),
+ 				case PrognosticSolutionEnum,
+ 					if md.prognostic.stabilization==3,
+-						checkfield(md,'mesh.dimension','values',2,'message','Discontinuous Galerkin only supported for 2d meshes');
+-						checkfield(md,'mesh.edges','size',[NaN 4]);
+-						checkfield(md,'mesh.edges(:,1:3)','>',0);
++						md = checkfield(md,'mesh.dimension','values',2,'message','Discontinuous Galerkin only supported for 2d meshes');
++						md = checkfield(md,'mesh.edges','size',[NaN 4]);
++						md = checkfield(md,'mesh.edges(:,1:3)','>',0);
+ 					end
+ 				case BalancethicknessSolutionEnum,
+ 					if md.balancethickness.stabilization==3,
+-						checkfield(md,'mesh.dimension','values',2,'message','Discontinuous Galerkin only supported for 2d meshes');
+-						checkfield(md,'mesh.edges','size',[NaN 4]);
+-						checkfield(md,'mesh.edges(:,1:3)','>',0);
++						md = checkfield(md,'mesh.dimension','values',2,'message','Discontinuous Galerkin only supported for 2d meshes');
++						md = checkfield(md,'mesh.edges','size',[NaN 4]);
++						md = checkfield(md,'mesh.edges(:,1:3)','>',0);
+ 					end
+ 				case TransientSolutionEnum,
+ 					if md.transient.isprognostic & md.prognostic.stabilization==3,
+-						checkfield(md,'mesh.dimension','values',2,'message','Discontinuous Galerkin only supported for 2d meshes');
+-						checkfield(md,'mesh.edges','size',[NaN 4]);
+-						checkfield(md,'mesh.edges(:,1:3)','>',0);
++						md = checkfield(md,'mesh.dimension','values',2,'message','Discontinuous Galerkin only supported for 2d meshes');
++						md = checkfield(md,'mesh.edges','size',[NaN 4]);
++						md = checkfield(md,'mesh.edges(:,1:3)','>',0);
+ 					end
+ 				case ThermalSolutionEnum,
+-					checkfield(md,'mesh.dimension','values',3,'message','thermal solution only supported on 3d meshes');
++					md = checkfield(md,'mesh.dimension','values',3,'message','thermal solution only supported on 3d meshes');
+ 			end
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/autodiff.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/autodiff.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/autodiff.m	(revision 12663)
+@@ -21,7 +21,7 @@
+ 		function obj = setdefaultparameters(obj) % {{{
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/qmu.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/qmu.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/qmu.m	(revision 12663)
+@@ -34,41 +34,41 @@
+ 		function obj = setdefaultparameters(obj) % {{{
+ 	
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			%Early return
+ 			if ~md.qmu.isdakota, return; end
+ 
+ 			if md.qmu.params.evaluation_concurrency~=1,
+-				checkmessage(['concurrency should be set to 1 when running dakota in library mode']);
++				md = checkmessage(md,['concurrency should be set to 1 when running dakota in library mode']);
+ 			end
+ 			if ~isempty(md.qmu.partition),
+ 				if numel(md.qmu.partition)~=md.mesh.numberofvertices,
+-					checkmessage(['user supplied partition for qmu analysis should have size md.mesh.numberofvertices x 1 ']);
++					md = checkmessage(md,['user supplied partition for qmu analysis should have size md.mesh.numberofvertices x 1 ']);
+ 				end
+ 				if find(md.qmu.partition)>=md.mesh.numberofvertices,
+-					checkmessage(['user supplied partition should be indexed from 0 (c-convention)']);
++					md = checkmessage(md,['user supplied partition should be indexed from 0 (c-convention)']);
+ 				end
+ 				if min(md.qmu.partition)~=0,
+-					checkmessage(['partition vector not indexed from 0 on']);
++					md = checkmessage(md,['partition vector not indexed from 0 on']);
+ 				end
+ 				if max(md.qmu.partition)>=md.mesh.numberofvertices,
+-					checkmessage(['partition vector cannot have maximum index larger than number of nodes']);
++					md = checkmessage(md,['partition vector cannot have maximum index larger than number of nodes']);
+ 				end
+ 				if ~isempty(find(md.qmu.partition<0)),
+-					checkmessage(['partition vector cannot have values less than 0']);
++					md = checkmessage(md,['partition vector cannot have values less than 0']);
+ 				end
+ 				if ~isempty(find(md.qmu.partition>=md.qmu.numberofpartitions)),
+-					checkmessage(['partition vector cannot have values more than md.qmu.numberofpartitions-1']);
++					md = checkmessage(md,['partition vector cannot have values more than md.qmu.numberofpartitions-1']);
+ 				end
+ 				if max(md.qmu.partition)>=md.qmu.numberofpartitions,
+-					checkmessage(['for qmu analysis, partitioning vector cannot go over npart, number of partition areas']);
++					md = checkmessage(md,['for qmu analysis, partitioning vector cannot go over npart, number of partition areas']);
+ 				end
+ 			end
+ 
+ 			if ~strcmpi(md.cluster.name,'none'),
+ 				if md.settings.waitonlock==0,
+-					checkmessage(['waitonlock should be activated when running qmu in parallel mode!']);
++					md = checkmessage(md,['waitonlock should be activated when running qmu in parallel mode!']);
+ 				end
+ 			end
+ 		end % }}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/verbose.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/verbose.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/verbose.m	(revision 12663)
+@@ -98,7 +98,7 @@
+ 
+ 		end
+ 		%}}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 		end % }}}
+ 		function disp(verbose) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/model/model.m	(revision 12663)
+@@ -84,6 +84,12 @@
+ 				 end
+ 		 end
+ 		 %}}}
++		 function md = checkmessage(md,string) % {{{
++			 if(nargout~=1) error('wrong usage, model must be an output'); end
++			 disp(['model not consistent: ' string]);
++			 md.private.isconsistent=false;
++		 end
++		 %}}}
+ 		 function md = structtomodel(md,structmd) % {{{
+ 
+ 			 if ~isstruct(structmd) error('input model is not a structure'); end
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/transient.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/transient.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/transient.m	(revision 12663)
+@@ -29,15 +29,15 @@
+ 			obj.isgroundingline=0;
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			%Early return
+ 			if solution~=TransientSolutionEnum, return; end
+ 
+-			checkfield(md,'transient.isprognostic','numel',1,'values',[0 1]);
+-			checkfield(md,'transient.isdiagnostic','numel',1,'values',[0 1]);
+-			checkfield(md,'transient.isthermal','numel',1,'values',[0 1]);
+-			checkfield(md,'transient.isgroundingline','numel',1,'values',[0 1]);
++			md = checkfield(md,'transient.isprognostic','numel',1,'values',[0 1]);
++			md = checkfield(md,'transient.isdiagnostic','numel',1,'values',[0 1]);
++			md = checkfield(md,'transient.isthermal','numel',1,'values',[0 1]);
++			md = checkfield(md,'transient.isgroundingline','numel',1,'values',[0 1]);
+ 
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/timestepping.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/timestepping.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/timestepping.m	(revision 12663)
+@@ -32,15 +32,15 @@
+ 			obj.time_adapt=0;
+ 			obj.cfl_coefficient=.5;
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+-			checkfield(md,'timestepping.start_time','numel',1,'NaN',1);
+-			checkfield(md,'timestepping.final_time','numel',1,'NaN',1);
+-			checkfield(md,'timestepping.time_step','numel',1,'>=',0,'NaN',1);
+-			checkfield(md,'timestepping.time_adapt','numel',1,'values',[0 1]);
+-			checkfield(md,'timestepping.cfl_coefficient','numel',1,'>',0,'<=',1);
++			md = checkfield(md,'timestepping.start_time','numel',1,'NaN',1);
++			md = checkfield(md,'timestepping.final_time','numel',1,'NaN',1);
++			md = checkfield(md,'timestepping.time_step','numel',1,'>=',0,'NaN',1);
++			md = checkfield(md,'timestepping.time_adapt','numel',1,'values',[0 1]);
++			md = checkfield(md,'timestepping.cfl_coefficient','numel',1,'>',0,'<=',1);
+ 			if obj.final_time-obj.start_time<0,
+-				checkmessage('timestepping.final_time should be larger than timestepping.start_time');
++				md = checkmessage(md,'timestepping.final_time should be larger than timestepping.start_time');
+ 			end 
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/private.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/private.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/private.m	(revision 12663)
+@@ -5,9 +5,10 @@
+ 
+ classdef private
+ 	properties (SetAccess=public) 
+-		 runtimename = '';
+-		 bamg        = struct();
+-		 solution    = '';
++		isconsistent = true;
++		runtimename  = '';
++		bamg         = struct();
++		solution     = '';
+ 	end
+ 	methods
+ 		function obj = private(varargin) % {{{
+@@ -21,12 +22,13 @@
+ 		function obj = setdefaultparameters(obj) % {{{
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 		end % }}}
+ 		function disp(obj) % {{{
+ 			disp(sprintf('   private parameters: do not change'));
+ 
++			fielddisplay(obj,'isconsistent','is model self consistent');
+ 			fielddisplay(obj,'runtimename','name of the run launched');
+ 			fielddisplay(obj,'bamg','structure with mesh properties construced if bamg is used to mesh the domain');
+ 			fielddisplay(obj,'solution','type of solution launched');
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/constants.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/constants.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/constants.m	(revision 12663)
+@@ -30,11 +30,11 @@
+ 			obj.referencetemperature=223.15;
+ 
+ 		end % }}}
+-		function flag = checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+-			checkfield(md,'constants.g','>',0,'size',[1 1]);
+-			checkfield(md,'constants.yts','>',0,'size',[1 1]);
+-			checkfield(md,'constants.referencetemperature','size',[1 1]);
++			md = checkfield(md,'constants.g','>',0,'size',[1 1]);
++			md = checkfield(md,'constants.yts','>',0,'size',[1 1]);
++			md = checkfield(md,'constants.referencetemperature','size',[1 1]);
+ 
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/surfaceforcings.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/surfaceforcings.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/surfaceforcings.m	(revision 12663)
+@@ -25,18 +25,18 @@
+ 		  obj.ispdd=0;
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			if ismember(PrognosticAnalysisEnum,analyses),
+-				checkfield(md,'surfaceforcings.ispdd','numel',1,'values',[0 1]);
++				md = checkfield(md,'surfaceforcings.ispdd','numel',1,'values',[0 1]);
+ 				if(obj.ispdd)
+-					checkfield(md,'surfaceforcings.monthlytemperatures','forcing',1,'NaN',1);
++					md = checkfield(md,'surfaceforcings.monthlytemperatures','forcing',1,'NaN',1);
+ 				else
+-					checkfield(md,'surfaceforcings.mass_balance','forcing',1,'NaN',1);
++					md = checkfield(md,'surfaceforcings.mass_balance','forcing',1,'NaN',1);
+ 				end
+ 			end
+ 			if ismember(BalancethicknessAnalysisEnum,analyses),
+-				checkfield(md,'surfaceforcings.mass_balance','size',[md.mesh.numberofvertices 1],'NaN',1);
++				md = checkfield(md,'surfaceforcings.mass_balance','size',[md.mesh.numberofvertices 1],'NaN',1);
+ 			end
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/diagnostic.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/diagnostic.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/diagnostic.m	(revision 12663)
+@@ -63,53 +63,53 @@
+ 			 obj.rift_penalty_lock=10;
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			%Early return
+ 			if ~ismember(DiagnosticHorizAnalysisEnum,analyses), return; end
+ 			%if ~ismember(DiagnosticHorizAnalysisEnum,analyses) |  (solution==TransientSolutionEnum & md.transient.isdiagnostic==0), return; end
+ 
+-			checkfield(md,'diagnostic.spcvx','forcing',1);
+-			checkfield(md,'diagnostic.spcvy','forcing',1);
+-			if md.mesh.dimension==3, checkfield(md,'diagnostic.spcvz','forcing',1); end
+-			checkfield(md,'diagnostic.restol','size',[1 1],'>',0);
+-			checkfield(md,'diagnostic.reltol','size',[1 1]);
+-			checkfield(md,'diagnostic.abstol','size',[1 1]);
+-			checkfield(md,'diagnostic.isnewton','numel',1,'values',[0 1]);
+-			checkfield(md,'diagnostic.stokesreconditioning','size',[1 1],'NaN',1);
+-			checkfield(md,'diagnostic.viscosity_overshoot','size',[1 1],'NaN',1);
++			md = checkfield(md,'diagnostic.spcvx','forcing',1);
++			md = checkfield(md,'diagnostic.spcvy','forcing',1);
++			if md.mesh.dimension==3, md = checkfield(md,'diagnostic.spcvz','forcing',1); end
++			md = checkfield(md,'diagnostic.restol','size',[1 1],'>',0);
++			md = checkfield(md,'diagnostic.reltol','size',[1 1]);
++			md = checkfield(md,'diagnostic.abstol','size',[1 1]);
++			md = checkfield(md,'diagnostic.isnewton','numel',1,'values',[0 1]);
++			md = checkfield(md,'diagnostic.stokesreconditioning','size',[1 1],'NaN',1);
++			md = checkfield(md,'diagnostic.viscosity_overshoot','size',[1 1],'NaN',1);
+ 			if md.mesh.dimension==2,
+-				checkfield(md,'diagnostic.icefront','size',[NaN 4],'NaN',1);
++				md = checkfield(md,'diagnostic.icefront','size',[NaN 4],'NaN',1);
+ 			else
+-				checkfield(md,'diagnostic.icefront','size',[NaN 6],'NaN',1);
++				md = checkfield(md,'diagnostic.icefront','size',[NaN 6],'NaN',1);
+ 			end
+-			checkfield(md,'diagnostic.icefront(:,end)','values',[0 1 2]);
+-			checkfield(md,'diagnostic.maxiter','size',[1 1],'>=',1);
+-			checkfield(md,'diagnostic.referential','size',[md.mesh.numberofvertices 6]);
++			md = checkfield(md,'diagnostic.icefront(:,end)','values',[0 1 2]);
++			md = checkfield(md,'diagnostic.maxiter','size',[1 1],'>=',1);
++			md = checkfield(md,'diagnostic.referential','size',[md.mesh.numberofvertices 6]);
+ 			if ~isempty(md.diagnostic.requested_outputs),
+-				checkfield(md,'diagnostic.requested_outputs','size',[NaN 1]);
++				md = checkfield(md,'diagnostic.requested_outputs','size',[NaN 1]);
+ 			end
+ 
+ 			%singular solution
+ 			if ~any((~isnan(md.diagnostic.spcvx)+~isnan(md.diagnostic.spcvy))==2),
+-				checkmessage(['model ' md.miscellaneous.name ' is not well posed (singular). You need at least one node with fixed velocity!'])
++				md = checkmessage(md,['model is not well posed (singular). You need at least one node with fixed velocity!']);
+ 			end
+ 			%CHECK THAT EACH LINES CONTAINS ONLY NAN VALUES OR NO NAN VALUES
+ 			if any(sum(isnan(md.diagnostic.referential),2)~=0 & sum(isnan(md.diagnostic.referential),2)~=6),
+-				checkmessage(['model ' md.miscellaneous.name ' has problem with rotated spc. Each line of diagnostic.referential should contain either only NaN values or no NaN values']);
++				md = checkmessage(md,['Each line of diagnostic.referential should contain either only NaN values or no NaN values']);
+ 			end
+ 			%CHECK THAT THE TWO VECTORS PROVIDED ARE ORTHOGONAL
+ 			if any(sum(isnan(md.diagnostic.referential),2)==0),
+ 				pos=find(sum(isnan(md.diagnostic.referential),2)==0);
+ 				if any(abs(dot(md.diagnostic.referential(pos,1:3)',md.diagnostic.referential(pos,4:6)'))>eps),
+-					checkmessage(['model ' md.miscellaneous.name ' has problem with referential. Vectors in diagnostic.referential (colums 1 to 3 and 4 to 6) must be orthogonal']);
++					md = checkmessage(md,['Vectors in diagnostic.referential (colums 1 to 3 and 4 to 6) must be orthogonal']);
+ 				end
+ 			end
+ 			%CHECK THAT NO rotation specified for FS Grounded ice at base
+ 			if md.mesh.dimension==3 & md.flowequation.isstokes,
+ 				pos=find(md.mask.vertexongroundedice & md.mesh.vertexonbed);
+ 				if any(~isnan(md.diagnostic.referential(pos,:))),
+-					checkmessage(['no referential should be specified for basal vertices of grounded ice']);
++					md = checkmessage(md,['no referential should be specified for basal vertices of grounded ice']);
+ 				end
+ 			end
+ 		end % }}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/rifts.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/rifts.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/rifts.m	(revision 12663)
+@@ -20,7 +20,7 @@
+ 		function obj = setdefaultparameters(obj) % {{{
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 			if isempty(obj.riftstruct) | isnans(obj.riftstruct),
+ 				numrifts=0;
+ 			else
+@@ -28,19 +28,19 @@
+ 			end
+ 			if numrifts,
+ 				if ~(md.mesh.dimension==2),
+-					checkmessage(['models with rifts are only supported in 2d for now!']);
++					md = checkmessage(md,['models with rifts are only supported in 2d for now!']);
+ 				end
+ 				if ~isstruct(obj.riftstruct),
+-					checkmessage(['rifts.riftstruct should be a structure!']);
++					md = checkmessage(md,['rifts.riftstruct should be a structure!']);
+ 				end
+ 				if ~isempty(find(md.mesh.segmentmarkers>=2)),
+ 					%We have segments with rift markers, but no rift structure!
+-					checkmessage(['model should be processed for rifts (run meshprocessrifts)!']);
++					md = checkmessage(md,['model should be processed for rifts (run meshprocessrifts)!']);
+ 				end
+-				checkfield(md,'rifts.riftstruct.fill','values',[WaterEnum() AirEnum() IceEnum() MelangeEnum()]);
++				md = checkfield(md,'rifts.riftstruct.fill','values',[WaterEnum() AirEnum() IceEnum() MelangeEnum()]);
+ 			else
+ 				if ~isnans(obj.riftstruct),
+-					checkmessage(['riftstruct shoud be NaN since numrifts is 0!']);
++					md = checkmessage(md,['riftstruct shoud be NaN since numrifts is 0!']);
+ 				end
+ 			end
+ 		end % }}}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/basalforcings.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/basalforcings.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/basalforcings.m	(revision 12663)
+@@ -21,17 +21,17 @@
+ 		function obj = setdefaultparameters(obj) % {{{
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			if ismember(PrognosticAnalysisEnum,analyses) & ~(solution==TransientSolutionEnum & md.transient.isprognostic==0),
+-				checkfield(md,'basalforcings.melting_rate','NaN',1,'forcing',1);
++				md = checkfield(md,'basalforcings.melting_rate','NaN',1,'forcing',1);
+ 			end
+ 			if ismember(BalancethicknessAnalysisEnum,analyses),
+-				checkfield(md,'basalforcings.melting_rate','NaN',1,'size',[md.mesh.numberofvertices 1]);
++				md = checkfield(md,'basalforcings.melting_rate','NaN',1,'size',[md.mesh.numberofvertices 1]);
+ 			end
+ 			if ismember(ThermalAnalysisEnum,analyses) & ~(solution==TransientSolutionEnum & md.transient.isthermal==0),
+-				checkfield(md,'basalforcings.melting_rate','NaN',1,'forcing',1);
+-				checkfield(md,'basalforcings.geothermalflux','NaN',1,'forcing',1,'>=',0);
++				md = checkfield(md,'basalforcings.melting_rate','NaN',1,'forcing',1);
++				md = checkfield(md,'basalforcings.geothermalflux','NaN',1,'forcing',1,'>=',0);
+ 			end
+ 		end % }}}
+ 		function disp(obj) % {{{
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/flowequation.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/flowequation.m	(revision 12662)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/flowequation.m	(revision 12663)
+@@ -26,30 +26,32 @@
+ 		function obj = setdefaultparameters(obj) % {{{
+ 
+ 		end % }}}
+-		function checkconsistency(obj,md,solution,analyses) % {{{
++		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			if ismember(DiagnosticHorizAnalysisEnum,analyses),
+ 
+-				checkfield(md,'flowequation.ismacayealpattyn','numel',1,'values',[0 1]);
+-				checkfield(md,'flowequation.ishutter','numel',1,'values',[0 1]);
+-				checkfield(md,'flowequation.isstokes','numel',1,'values',[0 1]);
+-				checkfield(md,'flowequation.bordermacayeal','size',[md.mesh.numberofvertices 1],'values',[0 1]);
+-				checkfield(md,'flowequation.borderpattyn','size',[md.mesh.numberofvertices 1],'values',[0 1]);
+-				checkfield(md,'flowequation.borderstokes','size',[md.mesh.numberofvertices 1],'values',[0 1]);
++				md = checkfield(md,'flowequation.ismacayealpattyn','numel',1,'values',[0 1]);
++				md = checkfield(md,'flowequation.ishutter','numel',1,'values',[0 1]);
++				md = checkfield(md,'flowequation.isstokes','numel',1,'values',[0 1]);
++				md = checkfield(md,'flowequation.bordermacayeal','size',[md.mesh.numberofvertices 1],'values',[0 1]);
++				md = checkfield(md,'flowequation.borderpattyn','size',[md.mesh.numberofvertices 1],'values',[0 1]);
++				md = checkfield(md,'flowequation.borderstokes','size',[md.mesh.numberofvertices 1],'values',[0 1]);
+ 				if (md.mesh.dimension==2),
+-					checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices 1],'values',[1:2]);
+-					checkfield(md,'flowequation.element_equation','size',[md.mesh.numberofelements 1],'values',[1:2]);
++					md = checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices 1],'values',[1:2]);
++					md = checkfield(md,'flowequation.element_equation','size',[md.mesh.numberofelements 1],'values',[1:2]);
+ 				else
+-					checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices 1],'values',[0:7]);
+-					checkfield(md,'flowequation.element_equation','size',[md.mesh.numberofelements 1],'values',[0:7]);
++					md = checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices 1],'values',[0:7]);
++					md = checkfield(md,'flowequation.element_equation','size',[md.mesh.numberofelements 1],'values',[0:7]);
+ 				end
+ 				if (md.flowequation.ismacayealpattyn==0 && md.flowequation.ishutter==0 && md.flowequation.isstokes==0),
+-					checkmessage(['no element types set for this model. At least one of ismacayealpattyn, ishutter or isstokes need to be =1']);
++					md = checkmessage(md,['no element types set for this model. At least one of ismacayealpattyn, ishutter or isstokes need to be =1']);
+ 				end
+ 			end
+ 			if ismember(DiagnosticHutterAnalysisEnum,analyses),
+-				if any(md.flowequation.element_equation==1 & md.mask.elementonfloatingice),
+-					disp(sprintf('\n !!! Warning: Hutter''s model is not consistent on ice shelves !!!\n'));
++				if any(md.flowequation.element_equation==1),
++					if(md.flowequation.element_equation & md.mask.elementonfloatingice),
++						disp(sprintf('\n !!! Warning: Hutter''s model is not consistent on ice shelves !!!\n'));
++					end
+ 				end
+ 			end
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12663-12664.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12663-12664.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12663-12664.diff	(revision 12679)
@@ -0,0 +1,37 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/ismodelselfconsistent.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/ismodelselfconsistent.m	(revision 12663)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/ismodelselfconsistent.m	(revision 12664)
+@@ -5,7 +5,7 @@
+ %      ismodelselfconsistent(md),
+ 
+ %initialize consistency as true
+-modelconsistency(true);
++md.private.isconsistent=true;
+ 
+ %Get solution and associated analyses
+ solution=md.private.solution;
+@@ -23,18 +23,18 @@
+ 
+ 	%Check that current field is an object
+ 	if ~isobject(md.(field))
+-		checkmessage(['field ''' char(field) ''' is not an object']);
++		md=checkmessage(md,['field ''' char(field) ''' is not an object']);
+ 	end
+ 
+ 	%Check consistency of the object
+ 	if verLessThan('matlab', '7.6')
+-		checkconsistency(md.(field),md,solution,analyses);
++		md=checkconsistency(md.(field),md,solution,analyses);
+ 	else
+-		md.(field).checkconsistency(md,solution,analyses);
++		md=md.(field).checkconsistency(md,solution,analyses);
+ 	end
+ end
+ 
+ %error message if mode is not consistent
+-if modelconsistency==false,
+-	error(' ');
++if md.private.isconsistent==false,
++	error('Model not consistent, see messages above');
+ end
Index: /issm/oecreview/Archive/12321-12677/ISSM-12664-12665.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12664-12665.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12664-12665.diff	(revision 12679)
@@ -0,0 +1,30 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12664)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12665)
+@@ -42,7 +42,7 @@
+ end
+ contrast = getfieldvalue(options,'contrast',1);  
+ radar = (md.radaroverlay.pwr).^(contrast);
+-radar = radar/max(radar(:));
++radar = radar./max(radar(:));
+ %radar(find(radar==0))=1; %Change background from black to white
+ 
+ %InterpFromMeshToGrid
+@@ -53,8 +53,14 @@
+ nlines=length(md.radaroverlay.y);
+ ncols =length(md.radaroverlay.x);
+ disp('Interpolating data on grid...');
+-[x_m y_m data_grid]=InterpFromMeshToGrid(elements,x/getfieldvalue(options,'unit',1),y/getfieldvalue(options,'unit',1),...
+-	data,xmin,ymax,xspacing,yspacing,nlines,ncols,NaN);
++if radaronly,
++	x_m=xmin:xspacing:xmin+ncols*xspacing;
++	y_m=ymax-nlines*yspacing:yspacing:ymax;
++	data_grid=NaN*ones(nlines,ncols);
++else
++	[x_m y_m data_grid]=InterpFromMeshToGrid(elements,x/getfieldvalue(options,'unit',1),y/getfieldvalue(options,'unit',1),...
++		data,xmin,ymax,xspacing,yspacing,nlines,ncols,NaN);
++end
+ 
+ %Process data_grid (For processing, it is better not to have nan)
+ pos=find(isinf(data_grid));
Index: /issm/oecreview/Archive/12321-12677/ISSM-12665-12666.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12665-12666.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12665-12666.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/marshall.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/marshall.m	(revision 12665)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/marshall.m	(revision 12666)
+@@ -30,7 +30,7 @@
+ 
+ 	%Check that current field is an object
+ 	if ~isobject(md.(field))
+-		checkmessage(['field ''' char(field) ''' is not an object']);
++		error(['field ''' char(field) ''' is not an object']);
+ 	end
+ 
+ 	%Marshall current object
Index: /issm/oecreview/Archive/12321-12677/ISSM-12666-12667.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12666-12667.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12666-12667.diff	(revision 12679)
@@ -0,0 +1,54 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/marshall.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/marshall.py	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/marshall.py	(revision 12667)
+@@ -0,0 +1,49 @@
++"""
++MARSHALL - outputs a compatible binary file from @model md, for certain solution type.
++
++    The routine creates a compatible binary file from @model md
++    This binary file will be used for parallel runs in JPL-package
++
++    Usage:
++       marshall(md)
++"""
++
++from WriteData import *
++
++def marshall(md):
++	print "marshalling file '%s.bin'." % md.miscellaneous.name
++
++	#open file for binary writing
++	try:
++		fid=open(md.miscellaneous.name+'.bin','wb');
++	except IOError as e:
++		print "marshall error message: could not open '%s.bin' file for binary writing." % md.miscellaneous.name
++		raise IOError(e)
++
++	#First, write 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=vars(md)
++
++	for field in fields.interkeys():
++
++		#Some properties do not need to be marshalled
++		if field in ['results','radaroverlay','solver','cluster','flaim','private']:
++			continue
++
++		#Check that current field is an object
++		if not hasattr(getattr(md,field),'marshall'):
++			raise TypeError("field '%s' is not an object." % field)
++
++		#Marshall current object
++		#print "marshalling %s ..." % field
++		exec("md.%s.marshall(fid)" % field)
++
++	#close file
++	try:
++		f.close(fid)
++	except IOError as e:
++		print "marshall error message: could not close file '%s.bin'." % md.miscellaneous.name
++		raise IOError(e)
++
Index: /issm/oecreview/Archive/12321-12677/ISSM-12667-12668.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12667-12668.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12667-12668.diff	(revision 12679)
@@ -0,0 +1,35 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/h5py/install.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/h5py/install.sh	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/h5py/install.sh	(revision 12668)
+@@ -0,0 +1,24 @@
++#!/bin/bash
++
++#needed further along
++export HDF5_DIR=$ISSM_DIR/externalpackages/hdf5/install
++
++#Some cleanup
++rm -rf install h5py-2.0.1
++mkdir install
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/h5py-2.0.1.tar.gz' 'h5py-2.0.1.tar.gz'
++
++#Untar 
++tar -zxvf  h5py-2.0.1.tar.gz
++
++#Move h5py to install directory
++rm -rf install/*
++mv h5py-2.0.1/* install/
++rm -rf h5py-2.0.1
++
++#Configure and compile
++cd install
++python setup.py build –hdf5=$ISSM_DIR/externalpackages/hdf5/install
++python setup.py install
+
+Property changes on: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/h5py/install.sh
+___________________________________________________________________
+Added: svn:executable
+## -0,0 +1 ##
++*
Index: /issm/oecreview/Archive/12321-12677/ISSM-12668-12669.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12668-12669.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12668-12669.diff	(revision 12679)
@@ -0,0 +1,61 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12668)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12669)
+@@ -141,9 +141,27 @@
+ macro=StringToEnum('$NAME');
+ END
+ #}}}
++	#Add case to pythonenum file{{{
++	cat <<END > $ISSM_DIR"/src/m/enum/"$(echo $NAMEENUM".py")
++"""
++$(echo $NAMEENUM | awk {'print toupper($1)'}) - Enum of $(echo $NAME)
+ 
++   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=$NAMEENUM()
++"""
++
++def $(echo $NAMEENUM)():
++
++	return StringToEnum('$NAME')
++END
++#}}}
++
+ done
+-#MaximumNumberOfEnums{{{
++#MaximumNumberOfEnums (matlab){{{
+ cat <<END > $ISSM_DIR/src/m/enum/MaximumNumberOfEnums.m
+ function macro=MaximumNumberOfEnums()
+ %$(echo "MaximumNumberOfEnums" | awk {'print toupper($1)'}) - Enum of MaximumNumberOfEnums
+@@ -160,7 +178,27 @@
+ 		| grep "MaximumNumberOfEnums" | awk '{print $1}');
+ END
+ #}}}
++#MaximumNumberOfEnums (python){{{
++cat <<END > $ISSM_DIR/src/m/enum/MaximumNumberOfEnums.py
++"""
++$(echo "MaximumNumberOfEnums" | awk {'print toupper($1)'}) - 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()
++"""
++
++def MaximumNumberOfEnums():
++
++	return $(cat EnumDefinitions.h | grep -e "[0-9]Enum" -e "[a-zA-Z]Enum" | grep -v include \
++		| awk '{ printf "%s %s\n", NR-1, $0 }' \
++		| grep "MaximumNumberOfEnums" | awk '{print $1}')
++END
++#}}}
++
+ #clean up{{{
+ rm temp
+ #}}}
Index: /issm/oecreview/Archive/12321-12677/ISSM-12669-12670.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12669-12670.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12669-12670.diff	(revision 12679)
@@ -0,0 +1,99 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12669)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12670)
+@@ -1,11 +1,12 @@
+ #!/bin/bash
+ #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
++#Get all lines of EnumDefinitions2.h which hold Enum | remove all commas > 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 '{print $1}' > temp
+ 
+ #Removed existing files
+ rm $ISSM_DIR/src/m/enum/*.m
++rm $ISSM_DIR/src/m/enum/*.py
+ rm $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp
+ rm $ISSM_DIR/src/c/modules/StringToEnumx/StringToEnumx.cpp
+ 
+@@ -103,6 +104,18 @@
+ 
+ # go through the lines of temp
+ ENUM=0;
++#Add header to pythonenum file{{{
++cat <<END > $ISSM_DIR/src/m/enum/EnumDefinitions.py
++"""
++
++   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
++
++"""
++
++END
++
+ for NAMEENUM in $(cat temp); do
+ 
+ 	#Get name and enum of the line i
+@@ -142,21 +155,17 @@
+ END
+ #}}}
+ 	#Add case to pythonenum file{{{
+-	cat <<END > $ISSM_DIR"/src/m/enum/"$(echo $NAMEENUM".py")
+-"""
+-$(echo $NAMEENUM | awk {'print toupper($1)'}) - Enum of $(echo $NAME)
++	cat <<END >> $ISSM_DIR/src/m/enum/EnumDefinitions.py
++def $(echo $NAMEENUM)():
++	"""
++	$(echo $NAMEENUM | awk {'print toupper($1)'}) - Enum of $(echo $NAME)
+ 
+-   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=$NAMEENUM()
++	"""
+ 
+-   Usage:
+-      macro=$NAMEENUM()
+-"""
++	return StringToEnum('$NAME')
+ 
+-def $(echo $NAMEENUM)():
+-
+-	return StringToEnum('$NAME')
+ END
+ #}}}
+ 
+@@ -179,23 +188,19 @@
+ END
+ #}}}
+ #MaximumNumberOfEnums (python){{{
+-cat <<END > $ISSM_DIR/src/m/enum/MaximumNumberOfEnums.py
+-"""
+-$(echo "MaximumNumberOfEnums" | awk {'print toupper($1)'}) - Enum of MaximumNumberOfEnums
++cat <<END >> $ISSM_DIR/src/m/enum/EnumDefinitions.py
++def MaximumNumberOfEnums():
++	"""
++	$(echo "MaximumNumberOfEnums" | awk {'print toupper($1)'}) - 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()
++	"""
+ 
+-   Usage:
+-      macro=MaximumNumberOfEnums()
+-"""
+-
+-def MaximumNumberOfEnums():
+-
+ 	return $(cat EnumDefinitions.h | grep -e "[0-9]Enum" -e "[a-zA-Z]Enum" | grep -v include \
+ 		| awk '{ printf "%s %s\n", NR-1, $0 }' \
+ 		| grep "MaximumNumberOfEnums" | awk '{print $1}')
++
+ END
+ #}}}
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12670-12671.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12670-12671.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12670-12671.diff	(revision 12679)
@@ -0,0 +1,12 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12670)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12671)
+@@ -115,6 +115,7 @@
+ """
+ 
+ END
++#}}}
+ 
+ for NAMEENUM in $(cat temp); do
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12671-12672.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12671-12672.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12671-12672.diff	(revision 12679)
@@ -0,0 +1,65 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/vim/addons/vim/syntax/Synchronize.sh
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/vim/addons/vim/syntax/Synchronize.sh	(revision 12671)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/vim/addons/vim/syntax/Synchronize.sh	(revision 12672)
+@@ -5,7 +5,7 @@
+ #Get all lines of EnumDefinitions.h which hold Enum 
+ cat c.vim | sed "/ISSM's Enums begin/,/vim: ts=8/d" > temp
+ echo "\"ISSM's Enums begin" >> temp
+-cat ../../../../../src/c/EnumDefinitions/EnumDefinitions.h | grep -e "[0-9]Enum," -e "[Aa-Zz]Enum," | grep -v StringToEnum | sed -e "s/,//g" | awk '{ printf "syn keyword cConstant " $1 "\n"}' >> temp
++cat ../../../../../src/c/EnumDefinitions/EnumDefinitions.h | grep -e "[0-9]Enum," -e "[aA-zZ]Enum," | grep -v StringToEnum | sed -e "s/,//g" | awk '{ printf "syn keyword cConstant " $1 "\n"}' >> temp
+ echo "\"ISSM's Enums end" >> temp
+ cat c.vim | sed "1,/ISSM's Enums end/d" >> temp
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/vim/addons/vim/syntax/c.vim
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/vim/addons/vim/syntax/c.vim	(revision 12671)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/externalpackages/vim/addons/vim/syntax/c.vim	(revision 12672)
+@@ -544,12 +544,13 @@
+ syn keyword cType CrackedEdge
+ syn keyword cType Mesh
+ syn keyword cType Geometry
+-syn keyword cType QuadTree
++syn keyword cType BamgQuadtree
+ syn keyword cType SetOfE4
+ syn keyword cType Variogram
+ syn keyword cType GaussianVariogram
+ syn keyword cType ExponentialVariogram
+ syn keyword cType SphericalVariogram
++syn keyword cType PowerVariogram
+ syn keyword cType Quadtree
+ syn keyword cType Observation
+ "ISSM's objects end
+@@ -646,6 +647,7 @@
+ syn keyword cConstant MaterialsRheologyNEnum
+ syn keyword cConstant MaterialsRhoIceEnum
+ syn keyword cConstant MaterialsRhoWaterEnum
++syn keyword cConstant MaterialsRhoFreshwaterEnum
+ syn keyword cConstant MaterialsMuWaterEnum
+ syn keyword cConstant MaterialsThermalExchangeVelocityEnum
+ syn keyword cConstant MaterialsThermalconductivityEnum
+@@ -695,6 +697,7 @@
+ syn keyword cConstant PetscProfilingCurrentMemEnum
+ syn keyword cConstant PetscProfilingCurrentFlopsEnum
+ syn keyword cConstant PetscProfilingSolutionTimeEnum
++syn keyword cConstant MaxIterationConvergenceFlagEnum
+ syn keyword cConstant SteadystateMaxiterEnum
+ syn keyword cConstant SteadystateNumRequestedOutputsEnum
+ syn keyword cConstant SteadystateReltolEnum
+@@ -702,6 +705,16 @@
+ syn keyword cConstant SurfaceEnum
+ syn keyword cConstant SurfaceforcingsPrecipitationEnum
+ syn keyword cConstant SurfaceforcingsMassBalanceEnum
++syn keyword cConstant SurfaceforcingsIspddEnum
++syn keyword cConstant SurfaceforcingsIssmbgradientsEnum
++syn keyword cConstant SurfaceforcingsMonthlytemperaturesEnum
++syn keyword cConstant SurfaceforcingsHcEnum
++syn keyword cConstant SurfaceforcingsSmbPosMaxEnum
++syn keyword cConstant SurfaceforcingsSmbPosMinEnum
++syn keyword cConstant SurfaceforcingsAPosEnum
++syn keyword cConstant SurfaceforcingsBPosEnum
++syn keyword cConstant SurfaceforcingsANegEnum
++syn keyword cConstant SurfaceforcingsBNegEnum
+ syn keyword cConstant ThermalMaxiterEnum
+ syn keyword cConstant ThermalPenaltyFactorEnum
+ syn keyword cConstant ThermalPenaltyLockEnum
Index: /issm/oecreview/Archive/12321-12677/ISSM-12672-12673.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12672-12673.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12672-12673.diff	(revision 12679)
@@ -0,0 +1,21 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solve.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solve.m	(revision 12672)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/solve.m	(revision 12673)
+@@ -34,11 +34,11 @@
+ %check model consistency
+ disp('checking model consistency');
+ if (solutionenum == FlaimSolutionEnum)
+-	modelconsistency(true);
+-	md.mesh.checkconsistency(md,solutionenum);
+-	md.flaim.checkconsistency(md,solutionenum);
+-	if ~modelconsistency()
+-		error(' ');
++	md.private.isconsistent=true;
++	md=checkconsistency(md.mesh,md,solutionenum);
++	md=checkconsistency(md.flaim,md,solutionenum);
++	if md.private.isconsistent==false,
++		error('Model not consistent, see messages above');
+ 	end
+ else
+ 	ismodelselfconsistent(md),
Index: /issm/oecreview/Archive/12321-12677/ISSM-12673-12674.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12673-12674.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12673-12674.diff	(revision 12679)
@@ -0,0 +1,13 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/checkfield.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/checkfield.m	(revision 12673)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/checkfield.m	(revision 12674)
+@@ -182,7 +182,7 @@
+ 	elseif size(field,1)==md.mesh.numberofvertices+1
+ 		if any(field(end,:)~=sort(field(end,:))),
+ 			md = checkmessage(md,getfieldvalue(options,'message',...
+-				['field ''' fieldname ''' columns should be chronological']));
++				['field ''' fieldname ''' columns should be sorted chronologically']));
+ 		end
+ 		if any(field(end,1:end-1)==field(end,2:end)),
+ 			md = checkmessage(md,getfieldvalue(options,'message',...
Index: /issm/oecreview/Archive/12321-12677/ISSM-12674-12675.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12674-12675.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12674-12675.diff	(revision 12679)
@@ -0,0 +1,68 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/MatlabFuncs.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/MatlabFuncs.py	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/MatlabFuncs.py	(revision 12675)
+@@ -0,0 +1,28 @@
++def strcmp(str1,str2):
++
++	if str1 == str2:
++		return True
++	else:
++		return False
++
++def strncmp(str1,str2,n):
++
++	if str1[0:n] == str2[0:n]:
++		return True
++	else:
++		return False
++
++def strcmpi(str1,str2):
++
++	if str1.lower() == str2.lower():
++		return True
++	else:
++		return False
++
++def strncmpi(str1,str2,n):
++
++	if str1.lower()[0:n] == str2.lower()[0:n]:
++		return True
++	else:
++		return False
++
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/WriteData.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/WriteData.py	(revision 12674)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/WriteData.py	(revision 12675)
+@@ -1,3 +1,8 @@
++import numpy
++import math
++import struct
++from MatlabFuncs import *
++
+ def WriteData(fid,*args):
+ 	"""
+ 	WRITEDATA - write model field in binary file
+@@ -6,10 +11,6 @@
+        WriteData(fid,*args)
+ 	"""
+ 
+-	import numpy
+-	import math
+-	import struct
+-
+ 	#process options
+ 	options=pairoptions(args)
+ 
+@@ -271,10 +272,3 @@
+ 	return code
+ # }}}
+ 
+-def strcmpi(str1,str2):
+-
+-	if str1.lower() == str2.lower():
+-		return True
+-	else:
+-		return False
+-
Index: /issm/oecreview/Archive/12321-12677/ISSM-12675-12676.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12675-12676.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12675-12676.diff	(revision 12679)
@@ -0,0 +1,152 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/process_solve_options.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/process_solve_options.py	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/process_solve_options.py	(revision 12676)
+@@ -0,0 +1,48 @@
++"""
++DEFAULT_SOLVE_OPTIONS - set up default options for solve phase
++ 
++    Usage:
++       options=process_solve_options(options)
++ 
++    See also: SOLVE
++"""
++
++import os
++
++def process_solve_options(options):
++
++	outoptions={}
++
++	#solution_type: check on this option, error out otherwise
++	solution_type=options.getfieldvalue('solution_type')
++	if solution_type in (DiagnosticSolutionEnum,PrognosticSolutionEnum,ThermalSolutionEnum,\
++			SteadystateSolutionEnum,TransientSolutionEnum,EnthalpySolutionEnum,\
++			BalancethicknessSolutionEnum,BedSlopeSolutionEnum,SurfaceSlopeSolutionEnum,HydrologySolutionEnum,FlaimSolutionEnum):
++		raise ValueError("process_solve_options error message: solution_type '%s' not supported yet!" % EnumToString(solution_type))
++	outoptions['solution_type']=solution_type
++
++	outoptions['upload']=options.getfieldvalue('upload','off')
++	outoptions['batch']=options.getfieldvalue('batch','no')
++	outoptions['loadonly']=options.getfieldvalue('loadonly',False)
++	outoptions['directory']=options.getfieldvalue('directory','')
++
++	#  process qmu arguments
++	outoptions['qmudir']=options.getfieldvalue('qmudir','qmu'+str(os.getpid()))
++	outoptions['qmufile']=options.getfieldvalue('qmufile','qmu')    # qmufile cannot be changed unless ????script.sh is also changed
++	outoptions['overwrite']=options.getfieldvalue('overwrite','n')
++	outoptions['keep']=options.getfieldvalue('keep','n')
++	outoptions['ivar']=options.getfieldvalue('ivar',1)
++	outoptions['iresp']=options.getfieldvalue('iresp',1)
++	outoptions['imethod']=options.getfieldvalue('imethod',1)
++	outoptions['iparams']=options.getfieldvalue('iparams',1)
++	outoptions['runmpi']=options.getfieldvalue('runmpi',False)
++
++	#  process flaim arguments
++	outoptions['fmdir']=options.getfieldvalue('fmdir','fm'+str(os.getpid()))
++	outoptions['overwrite']=options.getfieldvalue('overwrite','n')
++	outoptions['keep']=options.getfieldvalue('keep','y')
++	outoptions['latsgn']=options.getfieldvalue('latsgn',0)
++	outoptions['cmap']=options.getfieldvalue('cmap',None)
++
++	return outoptions
++
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/waitonlock.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/waitonlock.py	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/waitonlock.py	(revision 12676)
+@@ -0,0 +1,65 @@
++"""
++WAITONLOCK - wait for a file
++ 
++    This routine will return when a file named 'filename' is written to disk.
++    If the time limit given in input is exceeded, return 0
++ 
++    Usage:
++       flag=waitonlock(md,executionpath)
++"""
++
++import os
++import socket
++import time
++from MatlabFuncs import *
++
++def waitonlock(md,executionpath,login,port):
++
++	#Get filename (lock file) and options
++	executionpath=md.cluster.executionpath
++	cluster=md.cluster.name
++	login=md.cluster.login
++	port=md.cluster.port
++	timelimit=md.settings.waitonlock
++	filename=os.path.join(executionpath,md.private.runtimename,md.miscellaneous.name+'.lock')
++
++	#waitonlock will work if the lock is on the same machine only: 
++	if not strcmpi(socket.gethostname().lower().split('.')[0],cluster):
++
++		print 'solution launched on remote cluster. log in to detect job completion.'
++		choice=raw_input('Is the job successfully completed? (y/n) ')
++		if not strcmp(choice,'y'): 
++			print 'Results not loaded... exiting' 
++			flag=0
++		else:
++			flag=1
++
++	#job is running on the same machine
++	else:
++
++		if 'interactive' in vars(md.cluster) and md.cluster.interactive:
++			#We are in interactive mode, no need to check for job completion
++			flag=1
++			return flag
++		#initialize time and file presence test flag
++		etime=0
++		ispresent=0
++		print "waiting for '%s' hold on... (Ctrl+C to exit)" % filename
++
++		#loop till file .lock exist or time is up
++		while ispresent==0 and etime<timelimit:
++			ispresent=os.path.exist(filename)
++			time.sleep(1)
++			etime+=1/60
++
++		#build output
++		if etime>timelimit:
++			print 'Time limit exceeded. Increase md.settings.waitonlock'
++			print 'The results must be loaded manually with md=loadresultsfromcluster(md).'
++			raise RuntimeError('waitonlock error message: time limit exceeded.')
++			flag=0
++		else:
++			flag=1
++
++	return flag
++
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/WriteData.py
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/WriteData.py	(revision 12675)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/model/WriteData.py	(revision 12676)
+@@ -1,3 +1,10 @@
++"""
++WRITEDATA - write model field in binary file
++ 
++    Usage:
++       WriteData(fid,*args)
++"""
++
+ import numpy
+ import math
+ import struct
+@@ -4,13 +11,6 @@
+ from MatlabFuncs import *
+ 
+ def WriteData(fid,*args):
+-	"""
+-	WRITEDATA - write model field in binary file
+- 
+-    Usage:
+-       WriteData(fid,*args)
+-	"""
+-
+ 	#process options
+ 	options=pairoptions(args)
+ 
Index: /issm/oecreview/Archive/12321-12677/ISSM-12676-12677.diff
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-12676-12677.diff	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-12676-12677.diff	(revision 12679)
@@ -0,0 +1,688 @@
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/prognostic_core.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/prognostic_core.cpp	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/solutions/prognostic_core.cpp	(revision 12677)
+@@ -16,6 +16,7 @@
+ 	/*parameters: */
+ 	bool save_results;
+ 	bool ispdd;
++	bool issmbgradients;
+ 
+ 	/*activate formulation: */
+ 	femmodel->SetCurrentConfiguration(PrognosticAnalysisEnum);
+@@ -23,12 +24,18 @@
+ 	/*recover parameters: */
+ 	femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
+ 	femmodel->parameters->FindParam(&ispdd,SurfaceforcingsIspddEnum);
++	femmodel->parameters->FindParam(&issmbgradients,SurfaceforcingsIssmbgradientsEnum);
+ 
+ 	if(ispdd){
+ 	  if(VerboseSolution()) _pprintLine_("   call positive degree day module");
+ 	  PositiveDegreeDayx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
+-	}	
++	}
+ 
++	if(issmbgradients){
++	  _printf_(VerboseSolution(),"	call smb gradients module\n");
++	  SmbGradientsx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
++	}
++
+ 	if(VerboseSolution()) _pprintLine_("   call computational core");
+ 	solver_linear(femmodel);
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h	(revision 12677)
+@@ -10,7 +10,7 @@
+ #include "../modules/StringToEnumx/StringToEnumx.h"
+ 
+ enum definitions{
+-	/*Model fields {{{*/
++	/*Model fields {{{1*/
+ 	AutodiffForwardEnum,
+ 	AutodiffIsautodiffEnum, 
+ 	AutodiffReverseEnum,
+@@ -161,7 +161,15 @@
+ 	SurfaceforcingsPrecipitationEnum,
+ 	SurfaceforcingsMassBalanceEnum,
+ 	SurfaceforcingsIspddEnum,
++	SurfaceforcingsIssmbgradientsEnum,
+ 	SurfaceforcingsMonthlytemperaturesEnum,
++	SurfaceforcingsHcEnum,
++	SurfaceforcingsSmbPosMaxEnum,
++	SurfaceforcingsSmbPosMinEnum,
++	SurfaceforcingsAPosEnum,
++	SurfaceforcingsBPosEnum,
++	SurfaceforcingsANegEnum,
++	SurfaceforcingsBNegEnum,
+ 	ThermalMaxiterEnum,
+ 	ThermalPenaltyFactorEnum,
+ 	ThermalPenaltyLockEnum,
+@@ -182,7 +190,7 @@
+ 	TransientNumRequestedOutputsEnum,
+ 	TransientRequestedOutputsEnum,
+ 	/*}}}*/
+-	/*Solutions and Analyses{{{ */
++	/*Solutions and Analyses{{{1 */
+ 	SolutionTypeEnum,
+ 	AnalysisTypeEnum,
+ 	ConfigurationTypeEnum,
+@@ -219,7 +227,7 @@
+ 	ThermalSolutionEnum,
+ 	TransientSolutionEnum,
+ 	/*}}}*/
+-	/*Approximations {{{*/
++	/*Approximations {{{1*/
+ 	ApproximationEnum,
+ 	HutterApproximationEnum,
+ 	MacAyealApproximationEnum,
+@@ -230,7 +238,7 @@
+ 	PattynStokesApproximationEnum,
+ 	StokesApproximationEnum,
+ 	/*}}}*/
+-	/*Datasets {{{*/
++	/*Datasets {{{1*/
+ 	ConstraintsEnum,
+ 	LoadsEnum,
+ 	MaterialsEnum,
+@@ -239,7 +247,7 @@
+ 	VerticesEnum,
+ 	ResultsEnum,
+ 	/*}}}*/
+-	/*Objects {{{*/
++	/*Objects {{{1*/
+ 	BoolInputEnum,
+ 	BoolParamEnum,
+ 	ContourEnum,
+@@ -288,18 +296,18 @@
+ 	TriaP1InputEnum,
+ 	VertexEnum,
+ 	/*}}}*/
+-	/*Fill {{{*/
++	/*Fill {{{1*/
+ 	AirEnum,
+ 	IceEnum,
+ 	MelangeEnum,
+ 	WaterEnum,
+ 	/*}}}*/
+-	/*Rift state {{{*/
++	/*Rift state {{{1*/
+ 	ClosedEnum,
+ 	FreeEnum,
+ 	OpenEnum,
+ 	/*}}}*/
+-	/*Inputs {{{*/
++	/*Inputs {{{1*/
+ 	AdjointpEnum,
+ 	AdjointxEnum,
+ 	AdjointyEnum,
+@@ -387,12 +395,12 @@
+ 	StressTensorzzEnum,
+ 	IceVolumeEnum,
+ 	/*}}}*/
+-	/*Element Interpolations{{{*/
++	/*Element Interpolations{{{1*/
+ 	P0Enum,
+ 	P1Enum,
+ 	P1DGEnum,
+ 	/*}}}*/
+-	/*Results{{{*/
++	/*Results{{{1*/
+ 	SaveResultsEnum,
+ 	BoolElementResultEnum,
+ 	BoolExternalResultEnum,
+@@ -413,7 +421,7 @@
+ 	TriaP1ElementResultEnum,
+ 	WaterColumnOldEnum,
+ 	/*}}}*/
+-	/*Responses{{{*/
++	/*Responses{{{1*/
+ 	MinVelEnum,
+ 	MaxVelEnum,
+ 	MinVxEnum,
+@@ -426,20 +434,20 @@
+ 	MaxVzEnum,
+ 	MaxAbsVzEnum,
+ 	/*}}}*/
+-	/*Convergence{{{*/
++	/*Convergence{{{1*/
+ 	RelativeEnum,
+ 	AbsoluteEnum,
+ 	IncrementalEnum,
+ 	/*}}}*/
+-	/*Grounding Line{{{*/
++	/*Grounding Line{{{1*/
+ 	AgressiveMigrationEnum,
+ 	NoneEnum,
+ 	SoftMigrationEnum,
+ 	/*}}}*/
+-	/*Solver{{{*/
++	/*Solver{{{1*/
+ 	StokesSolverEnum,
+ 	/*}}}*/
+-	/*Parameters{{{*/
++	/*Parameters{{{1*/
+ 	AdjointEnum,
+ 	ColinearEnum,
+ 	ControlSteadyEnum,
+@@ -467,16 +475,16 @@
+ 	SsetEnum,
+ 	VerboseEnum,
+ 	/*}}}*/
+-	/*Interpolation {{{*/
++	/*Interpolation {{{1*/
+ 	TriangleInterpEnum,
+ 	BilinearInterpEnum,
+ 	NearestInterpEnum,
+ 	/*}}}*/
+-	/*Coordinate Systems{{{*/
++	/*Coordinate Systems{{{1*/
+ 	XYEnum,
+ 	XYZPEnum,
+ 	/*}}}*/
+-	/*Options{{{*/
++	/*Options{{{1*/
+ 	OptionEnum,
+ 	OptionCellEnum,
+ 	OptionCharEnum,
+@@ -484,7 +492,7 @@
+ 	OptionDoubleEnum,
+ 	OptionLogicalEnum,
+ 	/*}}}*/
+-	/*Rheology law (move too Material) {{{*/
++	/*Rheology law (move too Material) {{{1*/
+ 	PatersonEnum,
+ 	ArrheniusEnum,
+ 	/*}}}*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp	(revision 12677)
+@@ -65,6 +65,12 @@
+ 		case BasalforcingsMeltingRateCorrectionEnum: scale=yts;break; //m/yr
+ 		case SurfaceforcingsPrecipitationEnum:       scale=yts;break; //m/yr
+ 		case SurfaceforcingsMassBalanceEnum:         scale=yts;break; //m/yr
++		case SurfaceforcingsSmbPosMaxEnum:				scale=yts;break; //m/yr
++		case SurfaceforcingsSmbPosMinEnum:				scale=yts;break; //m/yr
++		case SurfaceforcingsAPosEnum:						scale=yts;break; //m/yr
++		case SurfaceforcingsBPosEnum:						scale=yts;break; //m/yr
++		case SurfaceforcingsANegEnum:						scale=yts;break; //m/yr
++		case SurfaceforcingsBNegEnum:						scale=yts;break; //m/yr
+ 		case MisfitEnum:                             scale=pow(yts,2);break; //(m/yr)^2
+ 		case MassFluxEnum:                           scale=pow((IssmDouble)10,-12)*yts;break; // (GigaTon/year)
+ 		default: scale=1.0; break;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12677)
+@@ -170,7 +170,15 @@
+ 	      else if (strcmp(name,"SurfaceforcingsPrecipitation")==0) return SurfaceforcingsPrecipitationEnum;
+ 	      else if (strcmp(name,"SurfaceforcingsMassBalance")==0) return SurfaceforcingsMassBalanceEnum;
+ 	      else if (strcmp(name,"SurfaceforcingsIspdd")==0) return SurfaceforcingsIspddEnum;
++	      else if (strcmp(name,"SurfaceforcingsIssmbgradients")==0) return SurfaceforcingsIssmbgradientsEnum;
+ 	      else if (strcmp(name,"SurfaceforcingsMonthlytemperatures")==0) return SurfaceforcingsMonthlytemperaturesEnum;
++	      else if (strcmp(name,"SurfaceforcingsHc")==0) return SurfaceforcingsHcEnum;
++	      else if (strcmp(name,"SurfaceforcingsSmbPosMax")==0) return SurfaceforcingsSmbPosMaxEnum;
++	      else if (strcmp(name,"SurfaceforcingsSmbPosMin")==0) return SurfaceforcingsSmbPosMinEnum;
++	      else if (strcmp(name,"SurfaceforcingsAPos")==0) return SurfaceforcingsAPosEnum;
++	      else if (strcmp(name,"SurfaceforcingsBPos")==0) return SurfaceforcingsBPosEnum;
++	      else if (strcmp(name,"SurfaceforcingsANeg")==0) return SurfaceforcingsANegEnum;
++	      else if (strcmp(name,"SurfaceforcingsBNeg")==0) return SurfaceforcingsBNegEnum;
+ 	      else if (strcmp(name,"ThermalMaxiter")==0) return ThermalMaxiterEnum;
+ 	      else if (strcmp(name,"ThermalPenaltyFactor")==0) return ThermalPenaltyFactorEnum;
+ 	      else if (strcmp(name,"ThermalPenaltyLock")==0) return ThermalPenaltyLockEnum;
+@@ -252,7 +260,10 @@
+ 	      else if (strcmp(name,"DoubleMatParam")==0) return DoubleMatParamEnum;
+ 	      else if (strcmp(name,"DoubleParam")==0) return DoubleParamEnum;
+ 	      else if (strcmp(name,"DoubleVecParam")==0) return DoubleVecParamEnum;
+-	      else if (strcmp(name,"Element")==0) return ElementEnum;
++         else stage=3;
++   }
++   if(stage==3){
++	      if (strcmp(name,"Element")==0) return ElementEnum;
+ 	      else if (strcmp(name,"ElementResult")==0) return ElementResultEnum;
+ 	      else if (strcmp(name,"ExternalResult")==0) return ExternalResultEnum;
+ 	      else if (strcmp(name,"FileParam")==0) return FileParamEnum;
+@@ -260,10 +271,7 @@
+ 	      else if (strcmp(name,"Icefront")==0) return IcefrontEnum;
+ 	      else if (strcmp(name,"Input")==0) return InputEnum;
+ 	      else if (strcmp(name,"IntInput")==0) return IntInputEnum;
+-         else stage=3;
+-   }
+-   if(stage==3){
+-	      if (strcmp(name,"IntParam")==0) return IntParamEnum;
++	      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;
+@@ -375,7 +383,10 @@
+ 	      else if (strcmp(name,"ViscousHeating")==0) return ViscousHeatingEnum;
+ 	      else if (strcmp(name,"QmuTemperature")==0) return QmuTemperatureEnum;
+ 	      else if (strcmp(name,"HydrologyWaterVx")==0) return HydrologyWaterVxEnum;
+-	      else if (strcmp(name,"HydrologyWaterVy")==0) return HydrologyWaterVyEnum;
++         else stage=4;
++   }
++   if(stage==4){
++	      if (strcmp(name,"HydrologyWaterVy")==0) return HydrologyWaterVyEnum;
+ 	      else if (strcmp(name,"StressTensor")==0) return StressTensorEnum;
+ 	      else if (strcmp(name,"StressTensorxx")==0) return StressTensorxxEnum;
+ 	      else if (strcmp(name,"StressTensorxy")==0) return StressTensorxyEnum;
+@@ -383,10 +394,7 @@
+ 	      else if (strcmp(name,"StressTensoryy")==0) return StressTensoryyEnum;
+ 	      else if (strcmp(name,"StressTensoryz")==0) return StressTensoryzEnum;
+ 	      else if (strcmp(name,"StressTensorzz")==0) return StressTensorzzEnum;
+-         else stage=4;
+-   }
+-   if(stage==4){
+-	      if (strcmp(name,"IceVolume")==0) return IceVolumeEnum;
++	      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;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12677)
+@@ -166,7 +166,15 @@
+ 		case SurfaceforcingsPrecipitationEnum : return "SurfaceforcingsPrecipitation";
+ 		case SurfaceforcingsMassBalanceEnum : return "SurfaceforcingsMassBalance";
+ 		case SurfaceforcingsIspddEnum : return "SurfaceforcingsIspdd";
++		case SurfaceforcingsIssmbgradientsEnum : return "SurfaceforcingsIssmbgradients";
+ 		case SurfaceforcingsMonthlytemperaturesEnum : return "SurfaceforcingsMonthlytemperatures";
++		case SurfaceforcingsHcEnum : return "SurfaceforcingsHc";
++		case SurfaceforcingsSmbPosMaxEnum : return "SurfaceforcingsSmbPosMax";
++		case SurfaceforcingsSmbPosMinEnum : return "SurfaceforcingsSmbPosMin";
++		case SurfaceforcingsAPosEnum : return "SurfaceforcingsAPos";
++		case SurfaceforcingsBPosEnum : return "SurfaceforcingsBPos";
++		case SurfaceforcingsANegEnum : return "SurfaceforcingsANeg";
++		case SurfaceforcingsBNegEnum : return "SurfaceforcingsBNeg";
+ 		case ThermalMaxiterEnum : return "ThermalMaxiter";
+ 		case ThermalPenaltyFactorEnum : return "ThermalPenaltyFactor";
+ 		case ThermalPenaltyLockEnum : return "ThermalPenaltyLock";
+@@ -466,7 +474,7 @@
+ 
+ 	len=strlen(EnumToStringx(enum_in));
+ 	string=xNew<char>(len+1);
+-	xMemCpy<char>(string,EnumToStringx(enum_in),(len+1));
++	memcpy(string,EnumToStringx(enum_in),(len+1)*sizeof(char));
+ 
+ 	/*Assign output pointer*/
+ 	*pstring=string;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SmbGradientsx/SmbGradientsx.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SmbGradientsx/SmbGradientsx.h	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SmbGradientsx/SmbGradientsx.h	(revision 12677)
+@@ -0,0 +1,14 @@
++/*!\file:  SmbGradientsx.h
++ * \brief header file for degree of freedoms distribution routines.
++ */ 
++
++#ifndef _SMBGRADIENTSX_H
++#define _SMBGRADIENTSX_H
++
++#include "../../Container/Container.h"
++#include "../../objects/objects.h"
++
++/* local prototypes: */
++void SmbGradientsx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters);
++
++#endif  /* _SMBGRADIENTSX_H*/
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SmbGradientsx/SmbGradientsx.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SmbGradientsx/SmbGradientsx.cpp	(revision 0)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/SmbGradientsx/SmbGradientsx.cpp	(revision 12677)
+@@ -0,0 +1,27 @@
++/*!\file SmbGradientsx
++ * \brief: calculates SMB as function of local elevation 
++ */
++
++#include "./SmbGradientsx.h"
++#include "../../shared/shared.h"
++#include "../../include/include.h"
++#include "../../io/io.h"
++#include "../../toolkits/toolkits.h"
++#include "../../EnumDefinitions/EnumDefinitions.h"
++
++void SmbGradientsx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters){
++
++// void SmbGradientsx(hd,agd,ni){
++//    INPUT parameters: ni: working size of arrays
++//    INPUT: surface elevation (m): hd(NA)
++//    OUTPUT: mass-balance (m/yr ice): agd(NA)
++
++  int    i;
++  
++  Element* element = NULL;
++  
++  for(i=0;i<elements->Size();i++){
++    element=(Element*)elements->GetObjectByOffset(i);
++    element->SmbGradients();
++  }
++}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/modules.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/modules.h	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/modules.h	(revision 12677)
+@@ -105,6 +105,7 @@
+ #include "./Responsex/Responsex.h"
+ #include "./RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.h"
+ #include "./Scotchx/Scotchx.h"
++#include "./SmbGradientsx/SmbGradientsx.h"
+ #include "./Solverx/Solverx.h"
+ #include "./SpcNodesx/SpcNodesx.h"
+ #include "./SurfaceAreax/SurfaceAreax.h"
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp	(revision 12677)
+@@ -20,6 +20,7 @@
+ 	int    stabilization;
+ 	bool   dakota_analysis;
+ 	bool   ispdd;
++	bool   issmbgradients;
+ 
+ 	/*Fetch data needed: */
+ 	iomodel->Constant(&dim,MeshDimensionEnum);
+@@ -28,6 +29,7 @@
+ 	iomodel->Constant(&dakota_analysis,QmuIsdakotaEnum);
+ 	iomodel->FetchData(1,MeshElementsEnum);
+ 	iomodel->Constant(&ispdd,SurfaceforcingsIspddEnum);
++	iomodel->Constant(&issmbgradients,SurfaceforcingsIssmbgradientsEnum);
+ 
+ 	/*Update elements: */
+ 	int counter=0;
+@@ -72,6 +74,15 @@
+ 	  iomodel->FetchDataToInput(elements,SurfaceforcingsPrecipitationEnum);
+ 	  iomodel->FetchDataToInput(elements,SurfaceforcingsMonthlytemperaturesEnum);
+ 	}
++	if(issmbgradients){
++	  iomodel->FetchDataToInput(elements,SurfaceforcingsHcEnum);
++	  iomodel->FetchDataToInput(elements,SurfaceforcingsSmbPosMaxEnum);
++	  iomodel->FetchDataToInput(elements,SurfaceforcingsSmbPosMinEnum);
++	  iomodel->FetchDataToInput(elements,SurfaceforcingsAPosEnum);
++	  iomodel->FetchDataToInput(elements,SurfaceforcingsBPosEnum);
++	  iomodel->FetchDataToInput(elements,SurfaceforcingsANegEnum);
++	  iomodel->FetchDataToInput(elements,SurfaceforcingsBNegEnum);
++	}
+ 	else{
+ 		iomodel->FetchDataToInput(elements,SurfaceforcingsMassBalanceEnum);
+ 	}
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 12677)
+@@ -89,6 +89,7 @@
+ 	parameters->AddObject(iomodel->CopyConstantObject(InversionIscontrolEnum));
+ 	parameters->AddObject(iomodel->CopyConstantObject(InversionTaoEnum));
+ 	parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsIspddEnum));
++	parameters->AddObject(iomodel->CopyConstantObject(SurfaceforcingsIssmbgradientsEnum));
+ 
+ 	/*some parameters that did not come with the iomodel: */
+ 	parameters->AddObject(new IntParam(SolutionTypeEnum,solution_type));
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am	(revision 12677)
+@@ -283,6 +283,8 @@
+ 					./modules/SpcNodesx/SpcNodesx.cpp\
+ 					./modules/PositiveDegreeDayx/PositiveDegreeDayx.h\
+ 					./modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp\
++					./modules/SmbGradientsx/SmbGradientsx.h\
++					./modules/SmbGradientsx/SmbGradientsx.cpp\
+ 					./modules/UpdateConstraintsx/UpdateConstraintsx.h\
+ 					./modules/UpdateConstraintsx/UpdateConstraintsx.cpp\
+ 					./modules/MeshPartitionx/MeshPartitionx.cpp\
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Element.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Element.h	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Element.h	(revision 12677)
+@@ -71,6 +71,7 @@
+ 		virtual void   MigrateGroundingLine(IssmDouble* old_floating_ice,IssmDouble* sheet_ungrounding)=0;
+ 		virtual void   PotentialSheetUngrounding(Vector* potential_sheet_ungrounding)=0;
+ 		virtual void   PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm)=0;
++		virtual void   SmbGradients()=0;
+ 		virtual int    UpdatePotentialSheetUngrounding(IssmDouble* potential_sheet_ungrounding,Vector* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf)=0;
+ 		virtual void   ResetCoordinateSystem()=0;
+ 		virtual void   SmearFunction(Vector* smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius)=0;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12677)
+@@ -2368,6 +2368,60 @@
+ 
+ }
+ /*}}}*/
++/*FUNCTION Tria::SmbGradients{{{*/
++void Tria::SmbGradients(void){
++
++	int i;
++
++	// input
++   IssmDouble h[NUMVERTICES];					// ice thickness (m)		
++	IssmDouble s[NUMVERTICES];					// surface elevation (m)
++	IssmDouble a_pos[NUMVERTICES];				// Hs-SMB relation parameter 
++	IssmDouble b_pos[NUMVERTICES];				// Hs-SMB relation parameter
++	IssmDouble a_neg[NUMVERTICES];				// Hs-SMB relation parameter
++	IssmDouble b_neg[NUMVERTICES];				// Hs-SMB relation paremeter
++	IssmDouble Hc[NUMVERTICES];					// elevation of transition between accumulation regime and ablation regime
++	IssmDouble smb_pos_max[NUMVERTICES];		// maximum SMB value in the accumulation regime
++	IssmDouble smb_pos_min[NUMVERTICES];		// minimum SMB value in the accumulation regime
++   IssmDouble rho_water;                   // density of fresh water
++	IssmDouble rho_ice;                     // density of ice
++
++	// output
++	IssmDouble smb[NUMVERTICES];					// surface mass balance (m/yr ice)
++
++	/*Recover SmbGradients*/
++	GetInputListOnVertices(&Hc[0],SurfaceforcingsHcEnum);
++	GetInputListOnVertices(&smb_pos_max[0],SurfaceforcingsSmbPosMaxEnum);
++	GetInputListOnVertices(&smb_pos_min[0],SurfaceforcingsSmbPosMinEnum);
++	GetInputListOnVertices(&a_pos[0],SurfaceforcingsAPosEnum);
++	GetInputListOnVertices(&b_pos[0],SurfaceforcingsBPosEnum);
++	GetInputListOnVertices(&a_neg[0],SurfaceforcingsANegEnum);
++	GetInputListOnVertices(&b_neg[0],SurfaceforcingsBNegEnum);
++	
++   /*Recover surface elevatio at vertices: */
++	GetInputListOnVertices(&h[0],ThicknessEnum);
++	GetInputListOnVertices(&s[0],SurfaceEnum);
++
++   /*Get material parameters :*/
++   rho_ice=matpar->GetRhoIce();
++   rho_water=matpar->GetRhoFreshwater();
++			
++   // loop over all vertices
++   for(i=0;i<NUMVERTICES;i++){
++     if(s[i]>Hc[i]){
++	    smb[i]=a_pos[i]+b_pos[i]*s[i];
++		 if(smb[i]>smb_pos_max[i]){smb[i]=smb_pos_max[i];}
++		 if(smb[i]<smb_pos_min[i]){smb[i]=smb_pos_min[i];}
++	  }
++	  else{
++	    smb[i]=a_neg[i]+b_neg[i]*s[i];
++	  }
++	  smb[i]=smb[i]/rho_ice;      // SMB in m/y ice		
++	}  //end of the loop over the vertices
++	  /*Update inputs*/
++	  this->inputs->AddInput(new TriaP1Input(SurfaceforcingsMassBalanceEnum,&smb[0]));
++}
++/*}}}*/
+ /*FUNCTION Tria::SetCurrentConfiguration {{{*/
+ void  Tria::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, DataSet* nodesin, Materials* materialsin, Parameters* parametersin){
+ 	
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Tria.h	(revision 12677)
+@@ -109,6 +109,7 @@
+ 		void   PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes);
+ 		void   ProcessResultsUnits(void);
+ 		void   ResetCoordinateSystem(void){_error2_("not implemented yet");};
++		void	 SmbGradients();
+ 		IssmDouble SurfaceArea(void);
+ 		void   Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type);
+ 		int    UpdatePotentialSheetUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12677)
+@@ -2737,6 +2737,61 @@
+ 	return tria;
+ }
+ /*}}}*/
++/*FUNCTION Penta::SmbGradients{{{*/
++void Penta::SmbGradients(void){
++
++	int i;
++
++	// input
++   IssmDouble h[NUMVERTICES];					// ice thickness (m)		
++	IssmDouble s[NUMVERTICES];					// surface elevation (m)
++	IssmDouble a_pos[NUMVERTICES];				// Hs-SMB relation parameter 
++	IssmDouble b_pos[NUMVERTICES];				// Hs-SMB relation parameter
++	IssmDouble a_neg[NUMVERTICES];				// Hs-SMB relation parameter
++	IssmDouble b_neg[NUMVERTICES];				// Hs-SMB relation paremeter
++	IssmDouble Hc[NUMVERTICES];					// elevation of transition between accumulation regime and ablation regime
++	IssmDouble smb_pos_max[NUMVERTICES];		// maximum SMB value in the accumulation regime
++	IssmDouble smb_pos_min[NUMVERTICES];		// minimum SMB value in the accumulation regime
++   IssmDouble rho_water;                   // density of fresh water
++	IssmDouble rho_ice;                     // density of ice
++
++	// output
++	IssmDouble smb[NUMVERTICES];					// surface mass balance (m/yr ice)
++
++	/*Recover SmbGradients*/
++	GetInputListOnVertices(&Hc[0],SurfaceforcingsHcEnum);
++	GetInputListOnVertices(&smb_pos_max[0],SurfaceforcingsSmbPosMaxEnum);
++	GetInputListOnVertices(&smb_pos_min[0],SurfaceforcingsSmbPosMinEnum);
++	GetInputListOnVertices(&a_pos[0],SurfaceforcingsAPosEnum);
++	GetInputListOnVertices(&b_pos[0],SurfaceforcingsBPosEnum);
++	GetInputListOnVertices(&a_neg[0],SurfaceforcingsANegEnum);
++	GetInputListOnVertices(&b_neg[0],SurfaceforcingsBNegEnum);
++	
++   /*Recover surface elevatio at vertices: */
++	GetInputListOnVertices(&h[0],ThicknessEnum);
++	GetInputListOnVertices(&s[0],SurfaceEnum);
++
++   /*Get material parameters :*/
++   rho_ice=matpar->GetRhoIce();
++   rho_water=matpar->GetRhoFreshwater();
++			
++   // loop over all vertices
++   for(i=0;i<NUMVERTICES;i++){
++     if(s[i]>Hc[i]){
++	    smb[i]=a_pos[i]+b_pos[i]*s[i];
++		 if(smb[i]>smb_pos_max[i]){smb[i]=smb_pos_max[i];}
++		 if(smb[i]<smb_pos_min[i]){smb[i]=smb_pos_min[i];}
++	  }
++	  else{
++	    smb[i]=a_neg[i]+b_neg[i]*s[i];
++	  }
++	  smb[i]=smb[i]/rho_ice;      // SMB in m/y ice		
++	  
++	}  //end of the loop over the vertices
++	  /*Update inputs*/
++	  this->inputs->AddInput(new PentaP1Input(SurfaceforcingsMassBalanceEnum,&smb[0]));
++}
++/*}}}*/
+ /*FUNCTION Penta::SurfaceArea {{{*/
+ IssmDouble Penta::SurfaceArea(void){
+ 
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.h
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.h	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/objects/Elements/Penta.h	(revision 12677)
+@@ -109,6 +109,7 @@
+ 		void   PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm);
+ 		void   ProcessResultsUnits(void);
+ 		void   ResetCoordinateSystem(void);
++		void   SmbGradients();
+ 		IssmDouble SurfaceArea(void);
+ 		void   Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type);
+ 		int    UpdatePotentialSheetUngrounding(IssmDouble* potential_sheet_ungrounding,Vector* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf);
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/MaximumNumberOfEnums.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/MaximumNumberOfEnums.m	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/enum/MaximumNumberOfEnums.m	(revision 12677)
+@@ -8,4 +8,4 @@
+ %   Usage:
+ %      macro=MaximumNumberOfEnums()
+ 
+-macro=440;
++macro=448;
+Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/surfaceforcings.m
+===================================================================
+--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/surfaceforcings.m	(revision 12676)
++++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/surfaceforcings.m	(revision 12677)
+@@ -8,6 +8,14 @@
+ 		precipitation = NaN;
+ 		mass_balance  = NaN;
+ 		ispdd = 0;
++		issmbgradients = 0;
++	   hc = NaN;
++		smb_pos_max = NaN;
++		smb_pos_min = NaN;
++		a_pos = NaN;
++		b_pos = NaN;
++		a_neg = NaN;
++		b_neg = NaN;
+ 		monthlytemperatures = NaN;
+ 	end
+ 	methods
+@@ -23,14 +31,24 @@
+ 		  
+ 		  %pdd method not used in default mode
+ 		  obj.ispdd=0;
++		  obj.issmbgradients=0;
+ 
+ 		end % }}}
+ 		function md = checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			if ismember(PrognosticAnalysisEnum,analyses),
+ 				md = checkfield(md,'surfaceforcings.ispdd','numel',1,'values',[0 1]);
++				checkfield(md,'surfaceforcings.issmbgradients','numel',1,'values',[0 1]);
+ 				if(obj.ispdd)
+ 					md = checkfield(md,'surfaceforcings.monthlytemperatures','forcing',1,'NaN',1);
++				elseif(obj.issmbgradients)
++					checkfield(md,'surfaceforcings.hc','forcing',1,'NaN',1);
++					checkfield(md,'surfaceforcings.smb_pos_max','forcing',1,'NaN',1);
++					checkfield(md,'surfaceforcings.smb_pos_min','forcing',1,'NaN',1);
++					checkfield(md,'surfaceforcings.a_pos','forcing',1,'NaN',1);
++					checkfield(md,'surfaceforcings.b_pos','forcing',1,'NaN',1);
++					checkfield(md,'surfaceforcings.a_neg','forcing',1,'NaN',1);
++					checkfield(md,'surfaceforcings.b_neg','forcing',1,'NaN',1);
+ 				else
+ 					md = checkfield(md,'surfaceforcings.mass_balance','forcing',1,'NaN',1);
+ 				end
+@@ -46,6 +64,14 @@
+ 			fielddisplay(obj,'mass_balance','surface mass balance [m/yr ice eq]');
+ 			fielddisplay(obj,'ispdd','is pdd activated (0 or 1, default is 0)');
+ 			fielddisplay(obj,'monthlytemperatures','monthly surface temperatures required if pdd is activated');
++			fielddisplay(obj,'issmbgradients','is smb gradients method activated (0 or 1, default is 0)');
++			fielddisplay(obj,'hc',' elevation of intersection between accumulation and ablation regime required if smb gradients is activated');
++			fielddisplay(obj,'smb_pos_max',' maximum value of positive smb required if smb gradients is activated');
++			fielddisplay(obj,'smb_pos_min',' minimum value of positive smb required if smb gradients is activated');
++			fielddisplay(obj,'a_pos',' intercept of hs - smb regression line for accumulation regime required if smb gradients is activated');
++			fielddisplay(obj,'b_pos',' slope of hs - smb regression line for accumulation regime required if smb gradients is activated');
++			fielddisplay(obj,'a_neg',' intercept of hs - smb regression line for ablation regime required if smb gradients is activated');
++			fielddisplay(obj,'b_neg',' slope of hs - smb regression line for ablation regime required if smb gradients is activated');
+ 
+ 		end % }}}
+ 		function marshall(obj,fid) % {{{
+@@ -55,6 +81,16 @@
+ 			if obj.ispdd,
+ 				WriteData(fid,'object',obj,'fieldname','monthlytemperatures','format','DoubleMat','mattype',1);
+ 			end
++			WriteData(fid,'object',obj,'fieldname','issmbgradients','format','Boolean');
++			if obj.issmbgradients,
++				WriteData(fid,'object',obj,'fieldname','hc','format','DoubleMat','mattype',1);
++				WriteData(fid,'object',obj,'fieldname','smb_pos_max','format','DoubleMat','mattype',1);
++				WriteData(fid,'object',obj,'fieldname','smb_pos_min','format','DoubleMat','mattype',1);
++				WriteData(fid,'object',obj,'fieldname','a_pos','format','DoubleMat','mattype',1);
++				WriteData(fid,'object',obj,'fieldname','b_pos','format','DoubleMat','mattype',1);
++				WriteData(fid,'object',obj,'fieldname','a_neg','format','DoubleMat','mattype',1);
++				WriteData(fid,'object',obj,'fieldname','b_neg','format','DoubleMat','mattype',1);
++			end
+ 
+ 		end % }}}
+ 	end
Index: /issm/oecreview/Archive/12321-12677/ISSM-DocReview-12321-12677.tex
===================================================================
--- /issm/oecreview/Archive/12321-12677/ISSM-DocReview-12321-12677.tex	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/ISSM-DocReview-12321-12677.tex	(revision 12679)
@@ -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/12321-12677/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12321-12677/LogNumber.tex	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/LogNumber.tex	(revision 12679)
@@ -0,0 +1,1 @@
+12321-12677
Index: /issm/oecreview/Archive/12321-12677/Makefile
===================================================================
--- /issm/oecreview/Archive/12321-12677/Makefile	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/Makefile	(revision 12679)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12321-12677
+
+
+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/12321-12677/log.tex
===================================================================
--- /issm/oecreview/Archive/12321-12677/log.tex	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/log.tex	(revision 12679)
@@ -0,0 +1,2324 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12321-12322.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/include/types.h\\
+Export determination: 6. \\
+Rationale: switch it based on the configuration\\
+\vspace{3em}
+
+\noindent \textbf{Change \#2} with diff file ISSM-12322-12323.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Contour.h M /issm/trunk-jpl/src/c/objects/DofIndexing.h M /issm/trunk-jpl/src/c/objects/IoModel.h M /issm/trunk-jpl/src/c/objects/Node.h M /issm/trunk-jpl/src/c/objects/OptPars.h M /issm/trunk-jpl/src/c/objects/Patch.h M /issm/trunk-jpl/src/c/objects/Segment.h M /issm/trunk-jpl/src/c/objects/Update.h M /issm/trunk-jpl/src/c/objects/Vertex.h\\
+Export determination: 6. \\
+Rationale: using typedef'ed name\\
+\vspace{3em}
+
+\noindent \textbf{Change \#3} with diff file ISSM-12323-12324.diff: \\
+Function name: \\
+M /issm/trunk-jpl/m4/issm\_options.m4\\
+Export determination: 6. \\
+Rationale: added --with-fortran option to issm\\
+\vspace{3em}
+
+\noindent \textbf{Change \#4} with diff file ISSM-12324-12325.diff: \\
+Function name: \\
+M /issm/trunk-jpl/configure.ac\\
+Export determination: 6. \\
+Rationale: updating configure.ac for merging\\
+\vspace{3em}
+
+\noindent \textbf{Change \#5} with diff file ISSM-12326-12327.diff: \\
+Function name: \\
+M /issm/trunk-jpl M /issm/trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h M /issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp M /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp M /issm/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp M /issm/trunk-jpl/src/c/modules/modules.h M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.h M /issm/trunk-jpl/src/c/objects/Inputs/ControlInput.h M /issm/trunk-jpl/src/c/objects/Inputs/DatasetInput.h M /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.h M /issm/trunk-jpl/src/c/objects/Inputs/Input.h M /issm/trunk-jpl/src/c/objects/Inputs/IntInput.h 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.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/solutions/prognostic\_core.cpp A /issm/trunk-jpl/src/m/classes/clusters/acenet.m (from /issm/trunk/src/m/classes/clusters/acenet.m:12325) M /issm/trunk-jpl/src/m/classes/materials.m M /issm/trunk-jpl/src/m/classes/surfaceforcings.m A /issm/trunk-jpl/src/m/enum/MaterialsRhoFreshwaterEnum.m (from /issm/trunk/src/m/enum/MaterialsRhoFreshwaterEnum.m:12325) A /issm/trunk-jpl/src/m/enum/SurfaceforcingsIspddEnum.m (from /issm/trunk/src/m/enum/SurfaceforcingsIspddEnum.m:12325) A /issm/trunk-jpl/src/m/enum/SurfaceforcingsMonthlytemperaturesEnum.m (from /issm/trunk/src/m/enum/SurfaceforcingsMonthlytemperaturesEnum.m:12325)\\
+Export determination: 6. \\
+Rationale: merged trunk and trunk-jpl\\
+\vspace{3em}
+
+\noindent \textbf{Change \#6} with diff file ISSM-12327-12328.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/model/model.m\\
+Export determination: 6. \\
+Rationale: qmu npart\\
+\vspace{3em}
+
+\noindent \textbf{Change \#7} with diff file ISSM-12328-12329.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp M /issm/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp M /issm/trunk-jpl/src/m/enum/MaximumNumberOfEnums.m\\
+Export determination: 6. \\
+Rationale: Synchronized Enums\\
+\vspace{3em}
+
+\noindent \textbf{Change \#8} with diff file ISSM-12333-12334.diff: \\
+Function name: \\
+M /issm/trunk-jpl\\
+Export determination: 6. \\
+Rationale: Block revision 12332 from being merged into trunk-jpl\\
+\vspace{3em}
+
+\noindent \textbf{Change \#9} with diff file ISSM-12334-12335.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/dox/issm.dox\\
+Export determination: 6. \\
+Rationale: updated code stats\\
+\vspace{3em}
+
+\noindent \textbf{Change \#10} with diff file ISSM-12335-12336.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/model/model.m\\
+Export determination: 6. \\
+Rationale: Model structtomodel updated\\
+\vspace{3em}
+
+\noindent \textbf{Change \#11} with diff file ISSM-12336-12337.diff: \\
+Function name: \\
+M /issm/trunk-jpl\\
+Export determination: 6. \\
+Rationale: merged trunk and trunk-jpl\\
+\vspace{3em}
+
+\noindent \textbf{Change \#12} with diff file ISSM-12338-12339.diff: \\
+Function name: \\
+M /issm/trunk-jpl\\
+Export determination: 6. \\
+Rationale: Block revision 12337 from being merged into trunk-jpl\\
+\vspace{3em}
+
+\noindent \textbf{Change \#13} with diff file ISSM-12339-12340.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Segment.cpp\\
+Export determination: 6. \\
+Rationale: type rename\\
+\vspace{3em}
+
+\noindent \textbf{Change \#14} with diff file ISSM-12340-12341.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Vertex.cpp\\
+Export determination: 6. \\
+Rationale: type rename\\
+\vspace{3em}
+
+\noindent \textbf{Change \#15} with diff file ISSM-12341-12342.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh M /issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp\\
+Export determination: 6. \\
+Rationale: updated Sync script to \#include <cstring>\\
+\vspace{3em}
+
+\noindent \textbf{Change \#16} with diff file ISSM-12342-12343.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh M /issm/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp\\
+Export determination: 6. \\
+Rationale: updated Sync script to \#include <cstring>\\
+\vspace{3em}
+
+\noindent \textbf{Change \#17} with diff file ISSM-12343-12344.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Makefile.am\\
+Export determination: 6. \\
+Rationale: add the new header file\\
+\vspace{3em}
+
+\noindent \textbf{Change \#18} with diff file ISSM-12344-12345.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/shared.h\\
+Export determination: 6. \\
+Rationale: include it like the alloc.h\\
+\vspace{3em}
+
+\noindent \textbf{Change \#19} with diff file ISSM-12345-12346.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Node.cpp\\
+Export determination: 6. \\
+Rationale: rename and try out the xNew/xDelete here to see if it works in the regression test\\
+\vspace{3em}
+
+\noindent \textbf{Change \#20} with diff file ISSM-12350-12351.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Node.cpp\\
+Export determination: 6. \\
+Rationale: replace the other xmallocs for floats\\
+\vspace{3em}
+
+\noindent \textbf{Change \#21} with diff file ISSM-12351-12352.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/clusters/acenet.m M /issm/trunk-jpl/src/m/classes/clusters/castor.m M /issm/trunk-jpl/src/m/classes/clusters/cosmos.m M /issm/trunk-jpl/src/m/classes/clusters/gemini.m 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/classes/clusters/greenplanet.m M /issm/trunk-jpl/src/m/classes/clusters/none.m D /issm/trunk-jpl/src/m/classes/clusters/none.py M /issm/trunk-jpl/src/m/classes/clusters/pfe.m M /issm/trunk-jpl/src/m/classes/clusters/pollux.m M /issm/trunk-jpl/src/m/classes/model/model.m M /issm/trunk-jpl/src/m/classes/pairoptions.m M /issm/trunk-jpl/src/m/model/solve.m D /issm/trunk-jpl/src/m/model/solveparallel.m\\
+Export determination: 6. \\
+Rationale: Simplified BuildQueueingScript interface\\
+\vspace{3em}
+
+\noindent \textbf{Change \#22} with diff file ISSM-12352-12353.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/utils/Basins/basinzoom.m\\
+Export determination: 6. \\
+Rationale: Now in jplsvn\\
+\vspace{3em}
+
+\noindent \textbf{Change \#23} with diff file ISSM-12353-12354.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Alloc/xNewDelete.h\\
+Export determination: 6. \\
+Rationale: add an xNewInit; I am thinking that for performance perhaps these implementations should still be switchable to the C system calls when IssmDouble just is double.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#24} with diff file ISSM-12354-12355.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/DakotaPlugin.cpp\\
+Export determination: 6. \\
+Rationale: rename type and use xNew/xDelete and also one case of xNewInit\\
+\vspace{3em}
+
+\noindent \textbf{Change \#25} with diff file ISSM-12355-12356.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Makefile.am A /issm/trunk-jpl/src/c/shared/MemOps A /issm/trunk-jpl/src/c/shared/MemOps/xMemCpy.h\\
+Export determination: 6. \\
+Rationale: add a memcpy wrapper, here too as for the replacement for calloc it would make sense to preprocess to a version that does use just memcpy to improve performance for the case that IssmDouble is just double.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#26} with diff file ISSM-12356-12357.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Contour.cpp\\
+Export determination: 6. \\
+Rationale: rename to IssmDouble and use the memcpy wrapper\\
+\vspace{3em}
+
+\noindent \textbf{Change \#27} with diff file ISSM-12357-12358.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/shared.h\\
+Export determination: 6. \\
+Rationale: forgot this file for the inclusion of the memcpy wrapper\\
+\vspace{3em}
+
+\noindent \textbf{Change \#28} with diff file ISSM-12360-12361.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/DofIndexing.cpp\\
+Export determination: 6. \\
+Rationale: IssmDouble type change\\
+\vspace{3em}
+
+\noindent \textbf{Change \#29} with diff file ISSM-12361-12362.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/materials.m\\
+Export determination: 6. \\
+Rationale: minor;\\
+\vspace{3em}
+
+\noindent \textbf{Change \#30} with diff file ISSM-12363-12364.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/clusters/acenet.m M /issm/trunk-jpl/src/m/classes/clusters/castor.m M /issm/trunk-jpl/src/m/classes/clusters/cosmos.m M /issm/trunk-jpl/src/m/classes/clusters/gemini.m M /issm/trunk-jpl/src/m/classes/clusters/generic.m M /issm/trunk-jpl/src/m/classes/clusters/greenplanet.m M /issm/trunk-jpl/src/m/classes/clusters/pfe.m M /issm/trunk-jpl/src/m/classes/clusters/pollux.m M /issm/trunk-jpl/src/m/model/loadresultsfromcluster.m M /issm/trunk-jpl/src/m/model/loadresultsfromdisk.m M /issm/trunk-jpl/src/m/model/solve.m\\
+Export determination: 6. \\
+Rationale: Simplifying cluster\\
+\vspace{3em}
+
+\noindent \textbf{Change \#31} with diff file ISSM-12364-12365.diff: \\
+Function name: \\
+M /issm/trunk-jpl/scripts/getloc.sh M /issm/trunk-jpl/src/dox/issm.dox\\
+Export determination: 6. \\
+Rationale: updated line count\\
+\vspace{3em}
+
+\noindent \textbf{Change \#32} with diff file ISSM-12365-12366.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Container/Constraints.cpp M /issm/trunk-jpl/src/c/Container/Constraints.h 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/Elements.cpp M /issm/trunk-jpl/src/c/Container/Elements.h M /issm/trunk-jpl/src/c/Container/Inputs.cpp M /issm/trunk-jpl/src/c/Container/Inputs.h M /issm/trunk-jpl/src/c/Container/Loads.cpp M /issm/trunk-jpl/src/c/Container/Loads.h M /issm/trunk-jpl/src/c/Container/Materials.cpp M /issm/trunk-jpl/src/c/Container/Materials.h M /issm/trunk-jpl/src/c/Container/Nodes.cpp M /issm/trunk-jpl/src/c/Container/Nodes.h M /issm/trunk-jpl/src/c/Container/Options.cpp M /issm/trunk-jpl/src/c/Container/Parameters.cpp M /issm/trunk-jpl/src/c/Container/Parameters.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/Container/Vertices.cpp M /issm/trunk-jpl/src/c/Container/Vertices.h M /issm/trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh M /issm/trunk-jpl/src/c/include/macros.h M /issm/trunk-jpl/src/c/io/io.h M /issm/trunk-jpl/src/c/matlab/include/matlab\_macros.h 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/MatlabMatrixToSeqMat.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.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/WriteMatlabData.cpp M /issm/trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp M /issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp M /issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp M /issm/trunk-jpl/src/c/objects/Bamg/AdjacentTriangle.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgGeom.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp M /issm/trunk-jpl/src/c/objects/Bamg/CrackedEdge.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Curve.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Direction.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Edge.cpp M /issm/trunk-jpl/src/c/objects/Bamg/EigenMetric.cpp M /issm/trunk-jpl/src/c/objects/Bamg/GeomEdge.cpp M /issm/trunk-jpl/src/c/objects/Bamg/GeomSubDomain.cpp M /issm/trunk-jpl/src/c/objects/Bamg/GeomVertex.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Geometry.cpp M /issm/trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Metric.cpp M /issm/trunk-jpl/src/c/objects/Bamg/SetOfE4.cpp M /issm/trunk-jpl/src/c/objects/Bamg/SubDomain.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Triangle.cpp M /issm/trunk-jpl/src/c/objects/Bamg/VertexOnEdge.cpp M /issm/trunk-jpl/src/c/objects/Bamg/VertexOnGeom.cpp M /issm/trunk-jpl/src/c/objects/Bamg/VertexOnVertex.cpp M /issm/trunk-jpl/src/c/objects/Constraints/Constraint.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/DakotaPlugin.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/ElementResult.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/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/PentaHook.cpp M /issm/trunk-jpl/src/c/objects/Elements/PentaHook.h M /issm/trunk-jpl/src/c/objects/Elements/PentaRef.cpp 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/Elements/TriaHook.cpp M /issm/trunk-jpl/src/c/objects/Elements/TriaHook.h M /issm/trunk-jpl/src/c/objects/Elements/TriaRef.cpp 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/FemModel.cpp M /issm/trunk-jpl/src/c/objects/FemModel.h M /issm/trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp M /issm/trunk-jpl/src/c/objects/Gauss/GaussPenta.h M /issm/trunk-jpl/src/c/objects/Gauss/GaussTria.cpp M /issm/trunk-jpl/src/c/objects/Gauss/GaussTria.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/Input.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.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/IoModel.cpp M /issm/trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp M /issm/trunk-jpl/src/c/objects/KML/KMLFileReadUtils.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Attribute.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Attribute.h M /issm/trunk-jpl/src/c/objects/KML/KML\_ColorStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_ColorStyle.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Comment.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Comment.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Container.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Container.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Document.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Document.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Feature.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Feature.h M /issm/trunk-jpl/src/c/objects/KML/KML\_File.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_File.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Folder.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Folder.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Geometry.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Geometry.h M /issm/trunk-jpl/src/c/objects/KML/KML\_GroundOverlay.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_GroundOverlay.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Icon.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Icon.h M /issm/trunk-jpl/src/c/objects/KML/KML\_LatLonBox.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LatLonBox.h M /issm/trunk-jpl/src/c/objects/KML/KML\_LineString.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LineString.h M /issm/trunk-jpl/src/c/objects/KML/KML\_LineStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LineStyle.h M /issm/trunk-jpl/src/c/objects/KML/KML\_LinearRing.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LinearRing.h M /issm/trunk-jpl/src/c/objects/KML/KML\_MultiGeometry.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_MultiGeometry.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Object.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Object.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Overlay.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Overlay.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Placemark.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Placemark.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Point.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Point.h M /issm/trunk-jpl/src/c/objects/KML/KML\_PolyStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_PolyStyle.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Polygon.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Polygon.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Style.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Style.h M /issm/trunk-jpl/src/c/objects/KML/KML\_StyleSelector.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_StyleSelector.h M /issm/trunk-jpl/src/c/objects/KML/KML\_SubStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_SubStyle.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Unknown.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Unknown.h M /issm/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Observation.cpp M /issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp M /issm/trunk-jpl/src/c/objects/Loads/Friction.cpp M /issm/trunk-jpl/src/c/objects/Loads/Friction.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/Load.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/Material.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/ElementMatrix.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementMatrix.h M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.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/Options/Option.cpp M /issm/trunk-jpl/src/c/objects/Options/Option.h M /issm/trunk-jpl/src/c/objects/Options/OptionCell.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionCell.h M /issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp 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.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionLogical.h M /issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionStruct.h M /issm/trunk-jpl/src/c/objects/Options/OptionUtilities.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionUtilities.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.cpp 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/Update.h M /issm/trunk-jpl/src/c/objects/Vertex.cpp M /issm/trunk-jpl/src/c/objects/Vertex.h M /issm/trunk-jpl/src/c/python/include/python\_macros.h 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/shared/Exp/IsInPoly.cpp M /issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp M /issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp M /issm/trunk-jpl/src/c/shared/Numerics/Synchronize.sh M /issm/trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp M /issm/trunk-jpl/src/c/solutions/objectivefunction.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/src/c/toolkits/petsc/patches/NewMat.cpp M /issm/trunk-jpl/src/m/classes/bamggeom.m M /issm/trunk-jpl/src/m/classes/bamgmesh.m M /issm/trunk-jpl/src/m/classes/model/model.m M /issm/trunk-jpl/src/m/classes/model/planet.m M /issm/trunk-jpl/src/m/classes/organizer.m M /issm/trunk-jpl/src/m/classes/plotoptions.m M /issm/trunk-jpl/src/m/classes/solver.m M /issm/trunk-jpl/src/m/classes/verbose.m M /issm/trunk-jpl/src/m/model/WriteData.m M /issm/trunk-jpl/src/m/model/mesh/bamg.m M /issm/trunk-jpl/src/m/model/setmask.m M /issm/trunk-jpl/src/m/model/setmask.py M /issm/trunk-jpl/src/m/qmu/preqmu.m\\
+Export determination: 6. \\
+Rationale: Do not number folds (folding is automated)\\
+\vspace{3em}
+
+\noindent \textbf{Change \#33} with diff file ISSM-12366-12367.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Patch.cpp\\
+Export determination: 6. \\
+Rationale: type rename\\
+\vspace{3em}
+
+\noindent \textbf{Change \#34} with diff file ISSM-12367-12368.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp\\
+Export determination: 6. \\
+Rationale: Added threshold on covariances if h<0.00001\\
+\vspace{3em}
+
+\noindent \textbf{Change \#35} with diff file ISSM-12368-12369.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Container/Observations.cpp\\
+Export determination: 6. \\
+Rationale: counter is now a double\\
+\vspace{3em}
+
+\noindent \textbf{Change \#36} with diff file ISSM-12369-12370.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/clusters/pfe.m\\
+Export determination: 6. \\
+Rationale: updated pfe\\
+\vspace{3em}
+
+\noindent \textbf{Change \#37} with diff file ISSM-12370-12371.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/clusters/acenet.m M /issm/trunk-jpl/src/m/classes/clusters/castor.m M /issm/trunk-jpl/src/m/classes/clusters/generic.m M /issm/trunk-jpl/src/m/classes/clusters/pfe.m\\
+Export determination: 6. \\
+Rationale: Fixed download\\
+\vspace{3em}
+
+\noindent \textbf{Change \#38} with diff file ISSM-12371-12372.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/clusters/acenet.m M /issm/trunk-jpl/src/m/classes/clusters/castor.m M /issm/trunk-jpl/src/m/classes/clusters/cosmos.m M /issm/trunk-jpl/src/m/classes/clusters/gemini.m M /issm/trunk-jpl/src/m/classes/clusters/generic.m M /issm/trunk-jpl/src/m/classes/clusters/greenplanet.m D /issm/trunk-jpl/src/m/classes/clusters/none.m M /issm/trunk-jpl/src/m/classes/clusters/pollux.m\\
+Export determination: 6. \\
+Rationale: Fixed all clusters\\
+\vspace{3em}
+
+\noindent \textbf{Change \#39} with diff file ISSM-12372-12373.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/clusters/castor.m\\
+Export determination: 6. \\
+Rationale: double LaunchQueueJob\\
+\vspace{3em}
+
+\noindent \textbf{Change \#40} with diff file ISSM-12373-12374.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/clusters/pfe.m\\
+Export determination: 6. \\
+Rationale: Added .run\\
+\vspace{3em}
+
+\noindent \textbf{Change \#41} with diff file ISSM-12374-12375.diff: \\
+Function name: \\
+A /issm/trunk-jpl/src/m/model/ProfileValues.m M /issm/trunk-jpl/src/m/model/plot/plot\_manager.m A /issm/trunk-jpl/src/m/model/plot/plot\_profile.m M /issm/trunk-jpl/src/m/model/plot/plotdoc.m\\
+Export determination: 6. \\
+Rationale: Added profile plot\\
+\vspace{3em}
+
+\noindent \textbf{Change \#42} with diff file ISSM-12375-12376.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/ProfileValues.m M /issm/trunk-jpl/src/m/model/plot/plot\_profile.m\\
+Export determination: 6. \\
+Rationale: Fixed plot\_profile\\
+\vspace{3em}
+
+\noindent \textbf{Change \#43} with diff file ISSM-12376-12377.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/plot\_profile.m\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#44} with diff file ISSM-12377-12378.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/io/Disk/diskio.h M /issm/trunk-jpl/src/c/io/io.h M /issm/trunk-jpl/src/c/issm.h 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/modules/Krigingx/pKrigingx.cpp M /issm/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/IoModel.h A /issm/trunk-jpl/src/c/solutions/kriging.cpp\\
+Export determination: 6. \\
+Rationale: Added parallel kriging module\\
+\vspace{3em}
+
+\noindent \textbf{Change \#45} with diff file ISSM-12378-12379.diff: \\
+Function name: \\
+A /issm/trunk-jpl/src/m/utils/DataProcessing/pkriging.m\\
+Export determination: 6. \\
+Rationale: Added parallel kriging module (still debugging)\\
+\vspace{3em}
+
+\noindent \textbf{Change \#46} with diff file ISSM-12379-12380.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/utils/Exp/expcoarsen.m\\
+Export determination: 6. \\
+Rationale: New expread prototype\\
+\vspace{3em}
+
+\noindent \textbf{Change \#47} with diff file ISSM-12380-12381.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/clusters/generic.m\\
+Export determination: 6. \\
+Rationale: Added BuildKrigingQueueScript (temporary)\\
+\vspace{3em}
+
+\noindent \textbf{Change \#48} with diff file ISSM-12381-12382.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/solutions/kriging.cpp M /issm/trunk-jpl/src/m/utils/DataProcessing/pkriging.m\\
+Export determination: 6. \\
+Rationale: Fixed parallel Kriging module\\
+\vspace{3em}
+
+\noindent \textbf{Change \#49} with diff file ISSM-12382-12383.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/IoModel.h M /issm/trunk-jpl/src/c/solutions/kriging.cpp\\
+Export determination: 6. \\
+Rationale: Added read options from binary file\\
+\vspace{3em}
+
+\noindent \textbf{Change \#50} with diff file ISSM-12383-12384.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/pairoptions.m\\
+Export determination: 6. \\
+Rationale: marshalling options\\
+\vspace{3em}
+
+\noindent \textbf{Change \#51} with diff file ISSM-12384-12385.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/utils/DataProcessing/pkriging.m\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#52} with diff file ISSM-12386-12387.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h\\
+Export determination: 6. \\
+Rationale: moved long to int\\
+\vspace{3em}
+
+\noindent \textbf{Change \#53} with diff file ISSM-12387-12388.diff: \\
+Function name: \\
+M /issm/trunk-jpl/configs/config-greenplanet.sh\\
+Export determination: 6. \\
+Rationale: Added tao\\
+\vspace{3em}
+
+\noindent \textbf{Change \#54} with diff file ISSM-12389-12390.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/FemModel.cpp\\
+Export determination: 6. \\
+Rationale: Initialized IOMODEL to NULL\\
+\vspace{3em}
+
+\noindent \textbf{Change \#55} with diff file ISSM-12390-12391.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/applyoptions.m M /issm/trunk-jpl/src/m/model/plot/plot\_overlay.m M /issm/trunk-jpl/src/m/model/plot/plotmodel.m\\
+Export determination: 6. \\
+Rationale: Now we can use non hsv colormaps in overlay plots\\
+\vspace{3em}
+
+\noindent \textbf{Change \#56} with diff file ISSM-12391-12392.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/applyoptions.m A /issm/trunk-jpl/src/m/model/plot/getcolormap.m M /issm/trunk-jpl/src/m/model/plot/plot\_gridded.m M /issm/trunk-jpl/src/m/model/plot/plot\_overlay.m\\
+Export determination: 6. \\
+Rationale: Easier way to handle colormaps\\
+\vspace{3em}
+
+\noindent \textbf{Change \#57} with diff file ISSM-12392-12393.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/plot\_overlay.m\\
+Export determination: 6. \\
+Rationale: Fixed saturation\\
+\vspace{3em}
+
+\noindent \textbf{Change \#58} with diff file ISSM-12393-12394.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/thermal.m\\
+Export determination: 6. \\
+Rationale: better check for spctemperature (enthalpy)\\
+\vspace{3em}
+
+\noindent \textbf{Change \#59} with diff file ISSM-12394-12395.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/plot\_overlay.m\\
+Export determination: 6. \\
+Rationale: Simpler plot\_overlay\\
+\vspace{3em}
+
+\noindent \textbf{Change \#60} with diff file ISSM-12395-12396.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/applyoptions.m A /issm/trunk-jpl/src/m/model/plot/colormaps A /issm/trunk-jpl/src/m/model/plot/colormaps/getcolormap.m A /issm/trunk-jpl/src/m/model/plot/colormaps/haxby.m A /issm/trunk-jpl/src/m/model/plot/colormaps/lbmap.m\\
+Export determination: 6. \\
+Rationale: Added a couple of colormaps\\
+\vspace{3em}
+
+\noindent \textbf{Change \#61} with diff file ISSM-12396-12397.diff: \\
+Function name: \\
+D /issm/trunk-jpl/src/m/model/plot/getcolormap.m\\
+Export determination: 6. \\
+Rationale: Added a couple of colormaps\\
+\vspace{3em}
+
+\noindent \textbf{Change \#62} with diff file ISSM-12397-12398.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp\\
+Export determination: 6. \\
+Rationale: Added support for matlab int16 data\\
+\vspace{3em}
+
+\noindent \textbf{Change \#63} with diff file ISSM-12398-12399.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/colormaps/haxby.m\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#64} with diff file ISSM-12399-12400.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/plot\_overlay.m M /issm/trunk-jpl/src/m/model/plot/subplotmodel.m\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#65} with diff file ISSM-12400-12401.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/plot\_overlay.m\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#66} with diff file ISSM-12401-12402.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/radarpower.m\\
+Export determination: 6. \\
+Rationale: Added support for other MOG images\\
+\vspace{3em}
+
+\noindent \textbf{Change \#67} with diff file ISSM-12402-12403.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/initialization.m\\
+Export determination: 6. \\
+Rationale: check waterfraction if EnthalpySolution requested\\
+\vspace{3em}
+
+\noindent \textbf{Change \#68} with diff file ISSM-12403-12404.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/applyoptions.m\\
+Export determination: 6. \\
+Rationale: Added square option\\
+\vspace{3em}
+
+\noindent \textbf{Change \#69} with diff file ISSM-12404-12405.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/applyoptions.m\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#70} with diff file ISSM-12405-12406.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/applyoptions.m\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#71} with diff file ISSM-12406-12407.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp\\
+Export determination: 6. \\
+Rationale: Fixed folds\\
+\vspace{3em}
+
+\noindent \textbf{Change \#72} with diff file ISSM-12407-12408.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/export\_fig/export\_fig.m M /issm/trunk-jpl/externalpackages/export\_fig/print2array.m M /issm/trunk-jpl/externalpackages/export\_fig/print2eps.m\\
+Export determination: 6. \\
+Rationale: updated export\_fig to newest version\\
+\vspace{3em}
+
+\noindent \textbf{Change \#73} with diff file ISSM-12408-12409.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#74} with diff file ISSM-12409-12410.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp\\
+Export determination: 6. \\
+Rationale: wrapped MPI commands\\
+\vspace{3em}
+
+\noindent \textbf{Change \#75} with diff file ISSM-12410-12411.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Container/Container.h\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#76} with diff file ISSM-12411-12412.diff: \\
+Function name: \\
+M /issm/trunk-jpl/m4/issm\_options.m4\\
+Export determination: 6. \\
+Rationale: Added Kriging swith on/off for compilation\\
+\vspace{3em}
+
+\noindent \textbf{Change \#77} with diff file ISSM-12412-12413.diff: \\
+Function name: \\
+M /issm/trunk-jpl/configs/config-linux64-ad.sh\\
+Export determination: 6. \\
+Rationale: Added without kriging to ad config file\\
+\vspace{3em}
+
+\noindent \textbf{Change \#78} with diff file ISSM-12413-12414.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Makefile.am\\
+Export determination: 6. \\
+Rationale: Switch off kriging compilation if --without-kriging\\
+\vspace{3em}
+
+\noindent \textbf{Change \#79} with diff file ISSM-12414-12415.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/include/types.h\\
+Export determination: 6. \\
+Rationale: distinguish floating point types that have to stay passive but typedef anyway to avoid the suspicion of double instances that have accidentally not been renamed.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#80} with diff file ISSM-12415-12416.diff: \\
+Function name: \\
+M /issm/trunk-jpl/etc/environment.csh M /issm/trunk-jpl/etc/environment\_variables.csh\\
+Export determination: 6. \\
+Rationale: Added GSL to csh\\
+\vspace{3em}
+
+\noindent \textbf{Change \#81} with diff file ISSM-12416-12417.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/IoModel.h\\
+Export determination: 6. \\
+Rationale: keep these strictlt passive - also retain the xmalloc calls given that memory is passed on to Option instances which may also receive such memory from other sections of the code we don't currently convert but all this memory is deleted in the options dtors.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#82} with diff file ISSM-12417-12418.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/Solverx/Solverx.h M /issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp\\
+Export determination: 6. \\
+Rationale: Added simpler gsl slover\\
+\vspace{3em}
+
+\noindent \textbf{Change \#83} with diff file ISSM-12418-12419.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/IoModel.cpp\\
+Export determination: 6. \\
+Rationale: removed printf\\
+\vspace{3em}
+
+\noindent \textbf{Change \#84} with diff file ISSM-12419-12420.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Container/Elements.h M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Observations.h\\
+Export determination: 6. \\
+Rationale: Moved Kriging to method of Observations\\
+\vspace{3em}
+
+\noindent \textbf{Change \#85} with diff file ISSM-12420-12421.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/include/include.h M /issm/trunk-jpl/src/c/shared/shared.h\\
+Export determination: 6. \\
+Rationale: minor cosmetics\\
+\vspace{3em}
+
+\noindent \textbf{Change \#86} with diff file ISSM-12421-12422.diff: \\
+Function name: \\
+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/Krigingx/pKrigingx.cpp\\
+Export determination: 6. \\
+Rationale: Added other interpolation for Kriging\\
+\vspace{3em}
+
+\noindent \textbf{Change \#87} with diff file ISSM-12422-12423.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/modules/Krigingx/pKrigingx.cpp\\
+Export determination: 6. \\
+Rationale: Simpler kriging\\
+\vspace{3em}
+
+\noindent \textbf{Change \#88} with diff file ISSM-12423-12424.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/thermal.m\\
+Export determination: 6. \\
+Rationale: no thermal in 2d\\
+\vspace{3em}
+
+\noindent \textbf{Change \#89} with diff file ISSM-12424-12425.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Gauss/GaussTria.cpp M /issm/trunk-jpl/src/c/objects/Gauss/GaussTria.h M /issm/trunk-jpl/src/c/objects/Loads/Friction.cpp M /issm/trunk-jpl/src/c/objects/Loads/Friction.h M /issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp M /issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.h\\
+Export determination: 6. \\
+Rationale: type renames\\
+\vspace{3em}
+
+\noindent \textbf{Change \#90} with diff file ISSM-12425-12426.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/vim/addons/vim/syntax/c.vim\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#91} with diff file ISSM-12426-12427.diff: \\
+Function name: \\
+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/Input.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\\
+Export determination: 6. \\
+Rationale: currently all data held in "Inputs" classes are not carrying differentiable dependencies (discussed w M. Morlighem)\\
+\vspace{3em}
+
+\noindent \textbf{Change \#92} with diff file ISSM-12427-12428.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/include/typedefs.h M /issm/trunk-jpl/src/c/include/types.h\\
+Export determination: 6. \\
+Rationale: cosmetics: no double blank line, please\\
+\vspace{3em}
+
+\noindent \textbf{Change \#93} with diff file ISSM-12428-12429.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/io/PrintfFunction.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#94} with diff file ISSM-12429-12430.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/toolkits/issm/SeqMat.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqVec.cpp M /issm/trunk-jpl/src/c/toolkits/metis/patches/METIS\_PartMeshNodalPatch.cpp M /issm/trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp M /issm/trunk-jpl/src/c/toolkits/mpi/patches/MPI\_Boundariesfromrange.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#95} with diff file ISSM-12430-12431.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp M /issm/trunk-jpl/src/c/toolkits/mpi/patches/MPI\_Boundariesfromrange.cpp\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#96} with diff file ISSM-12431-12432.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/toolkits/petsc/patches/GetOwnershipBoundariesFromRange.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/MatMultPatch.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/MatPartition.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/MatToSerial.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/petsc/patches/SerialToVec.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/VecMerge.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/VecPartition.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/VecToMPISerial.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/VecTranspose.cpp M /issm/trunk-jpl/src/c/toolkits/plapack/patches/CyclicalFactorization.cpp M /issm/trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp M /issm/trunk-jpl/src/c/toolkits/plapack/patches/PlapackToPetsc.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#97} with diff file ISSM-12432-12433.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.h\\
+Export determination: 6. \\
+Rationale: Added include types otherwise code does not compile:\\
+\vspace{3em}
+
+\noindent \textbf{Change \#98} with diff file ISSM-12433-12434.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Makefile.am D /issm/trunk-jpl/src/c/shared/Dofs\\
+Export determination: 6. \\
+Rationale: Dofs not needed\\
+\vspace{3em}
+
+\noindent \textbf{Change \#99} with diff file ISSM-12434-12435.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp M /issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp M /issm/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#100} with diff file ISSM-12435-12436.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp M /issm/trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp M /issm/trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp M /issm/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp M /issm/trunk-jpl/src/c/shared/Threads/LaunchThread.cpp M /issm/trunk-jpl/src/c/shared/shared.h\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#101} with diff file ISSM-12436-12437.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Alloc/alloc.cpp M /issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp M /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#102} with diff file ISSM-12437-12438.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Elements/GetGlobalDofList.cpp M /issm/trunk-jpl/src/c/shared/Elements/GetLocalDofList.cpp M /issm/trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp M /issm/trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp M /issm/trunk-jpl/src/c/shared/Exceptions/exprintf.cpp M /issm/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp M /issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp M /issm/trunk-jpl/src/c/shared/Numerics/PetscOptionsFromAnalysis.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#103} with diff file ISSM-12438-12439.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Exceptions/exprintf.cpp\\
+Export determination: 6. \\
+Rationale: Back to normal\\
+\vspace{3em}
+
+\noindent \textbf{Change \#104} with diff file ISSM-12439-12440.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp M /issm/trunk-jpl/src/c/solutions/ProcessArguments.cpp M /issm/trunk-jpl/src/c/solutions/control\_core.cpp M /issm/trunk-jpl/src/c/solutions/controlrestart.cpp M /issm/trunk-jpl/src/c/solutions/controltao\_core.cpp M /issm/trunk-jpl/src/c/solutions/diagnostic\_core.cpp M /issm/trunk-jpl/src/c/solutions/gradient\_core.cpp M /issm/trunk-jpl/src/c/solutions/issm.cpp M /issm/trunk-jpl/src/c/solutions/kriging.cpp M /issm/trunk-jpl/src/c/solutions/steadystate\_core.cpp M /issm/trunk-jpl/src/c/solutions/transient\_core.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#105} with diff file ISSM-12440-12441.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp M /issm/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp M /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#106} with diff file ISSM-12441-12442.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp M /issm/trunk-jpl/src/c/objects/Numerics/Vector.cpp M /issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#107} with diff file ISSM-12442-12443.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp M /issm/trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp M /issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp M /issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp M /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LineString.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LineString.h M /issm/trunk-jpl/src/c/objects/KML/KML\_LinearRing.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LinearRing.h\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#108} with diff file ISSM-12443-12444.diff: \\
+Function name: \\
+A /issm/trunk-jpl/src/m/classes/model/model.py (from /issm/trunk-jpl/src/m/classes/model.py:12388) D /issm/trunk-jpl/src/m/classes/model.py\\
+Export determination: 6. \\
+Rationale: Move model.py from classes to classes/model subdirectory.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#109} with diff file ISSM-12444-12445.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp\\
+Export determination: 6. \\
+Rationale: missing include\\
+\vspace{3em}
+
+\noindent \textbf{Change \#110} with diff file ISSM-12445-12446.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#111} with diff file ISSM-12446-12447.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp M /issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp M /issm/trunk-jpl/src/c/objects/DakotaPlugin.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp M /issm/trunk-jpl/src/c/shared/Alloc/xNewDelete.h 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/toolkits/issm/SeqMat.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqVec.cpp\\
+Export determination: 6. \\
+Rationale: implement a templated version to replace xrealloc - as part of this also add the C equivalent of the C++ management routines and use cpp directives to filter ... as part of that since the memset isn't a proper equivalent of a NewInit (with a specific non-null value) I changed the NewInit to NewZeroInit to have a proper wrapper for calloc as used before.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#112} with diff file ISSM-12447-12448.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Alloc/xNewDelete.h M /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp\\
+Export determination: 6. \\
+Rationale: should have read the manual page more carefully the first time around ... need the old size but also handling of the other corner cases.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#113} with diff file ISSM-12448-12449.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Alloc/xNewDelete.h\\
+Export determination: 6. \\
+Rationale: replace NULL, put in some extra comments relating to the manual page; do the new/delete/assignments in all cases of nonzero sizes because the C++ ctor/dtor/assignment operators can have side-effects that likely should reflect the operations and not bypass them.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#114} with diff file ISSM-12449-12450.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/model/model.py\\
+Export determination: 6. \\
+Rationale: model.py: Changed default cluster from 'none' to 'generic'.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#115} with diff file ISSM-12450-12451.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh M /issm/trunk-jpl/src/c/modules/AverageFilterx/AverageFilterx.cpp M /issm/trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp M /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp M /issm/trunk-jpl/src/c/modules/ControlInputGetGradientx/ControlInputGetGradientx.cpp M /issm/trunk-jpl/src/c/modules/ControlInputScaleGradientx/ControlInputScaleGradientx.cpp M /issm/trunk-jpl/src/c/modules/ControlInputSetGradientx/ControlInputSetGradientx.cpp M /issm/trunk-jpl/src/c/modules/CostFunctionx/CostFunctionx.cpp M /issm/trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/DakotaFree.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/DakotaMPI\_Bcast.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp M /issm/trunk-jpl/src/c/modules/ElementConnectivityx/ElementConnectivityx.cpp M /issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp M /issm/trunk-jpl/src/c/modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.cpp M /issm/trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp M /issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp M /issm/trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp M /issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp M /issm/trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp M /issm/trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp M /issm/trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp M /issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp M /issm/trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp M /issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp M /issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp M /issm/trunk-jpl/src/c/modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp M /issm/trunk-jpl/src/c/modules/MeshProfileIntersectionx/MeshSegmentsIntersection.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp M /issm/trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp M /issm/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp M /issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp M /issm/trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp M /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp M /issm/trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp M /issm/trunk-jpl/src/c/modules/Reducevectorgtosx/Reducevectorgtosx.cpp M /issm/trunk-jpl/src/c/modules/SetControlInputsFromVectorx/SetControlInputsFromVectorx.cpp M /issm/trunk-jpl/src/c/modules/Solverx/DofTypesToIndexSet.cpp M /issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp M /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp M /issm/trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp M /issm/trunk-jpl/src/c/modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp M /issm/trunk-jpl/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp M /issm/trunk-jpl/src/c/modules/VecMergex/VecMergex.cpp M /issm/trunk-jpl/src/c/objects/IoModel.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#116} with diff file ISSM-12451-12452.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntVecParam.cpp M /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp M /issm/trunk-jpl/src/c/objects/Params/StringParam.cpp\\
+Export determination: 6. \\
+Rationale: minor bug fix with xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#117} with diff file ISSM-12452-12453.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#118} with diff file ISSM-12453-12454.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\\
+Export determination: 6. \\
+Rationale: minor bug fix with xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#119} with diff file ISSM-12454-12455.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Options/Option.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionCell.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#120} with diff file ISSM-12455-12456.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp M /issm/trunk-jpl/src/c/objects/Gauss/GaussTria.cpp M /issm/trunk-jpl/src/c/objects/Inputs/TransientInput.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Loads/Friction.cpp M /issm/trunk-jpl/src/c/objects/Loads/Icefront.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#121} with diff file ISSM-12456-12457.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Bamg/BamgGeom.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Geometry.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#122} with diff file ISSM-12457-12458.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/DakotaPlugin.cpp M /issm/trunk-jpl/src/c/objects/DofIndexing.cpp M /issm/trunk-jpl/src/c/objects/FemModel.cpp M /issm/trunk-jpl/src/c/objects/Hook.cpp M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/Node.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#123} with diff file ISSM-12458-12459.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/PentaRef.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/Elements/TriaRef.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#124} with diff file ISSM-12459-12460.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Container/DataSet.cpp M /issm/trunk-jpl/src/c/Container/Elements.cpp M /issm/trunk-jpl/src/c/Container/Nodes.cpp M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Options.cpp M /issm/trunk-jpl/src/c/Container/Vertices.cpp\\
+Export determination: 6. \\
+Rationale: changing xmalloc to xNew and xfree to xDelete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#125} with diff file ISSM-12460-12461.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Exceptions/exprintf.cpp\\
+Export determination: 6. \\
+Rationale: Better to use vnprintf\\
+\vspace{3em}
+
+\noindent \textbf{Change \#126} with diff file ISSM-12461-12462.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Exceptions/exprintf.cpp\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#127} with diff file ISSM-12462-12463.diff: \\
+Function name: \\
+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\\
+Export determination: 6. \\
+Rationale: type rename\\
+\vspace{3em}
+
+\noindent \textbf{Change \#128} with diff file ISSM-12463-12464.diff: \\
+Function name: \\
+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/ElementResult.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\\
+Export determination: 6. \\
+Rationale: type rename\\
+\vspace{3em}
+
+\noindent \textbf{Change \#129} with diff file ISSM-12464-12465.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/ncview/install.sh\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#130} with diff file ISSM-12465-12466.diff: \\
+Function name: \\
+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/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\\
+Export determination: 6. \\
+Rationale: all type renamed to passive b/c this is suppose to be output only\\
+\vspace{3em}
+
+\noindent \textbf{Change \#131} with diff file ISSM-12466-12467.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Container/Container.h M /issm/trunk-jpl/src/c/Container/DataSet.cpp M /issm/trunk-jpl/src/c/Container/Elements.cpp M /issm/trunk-jpl/src/c/Container/Inputs.cpp M /issm/trunk-jpl/src/c/Container/Inputs.h 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/Container/Parameters.cpp M /issm/trunk-jpl/src/c/Container/Parameters.h\\
+Export determination: 6. \\
+Rationale: type rename plus one generic include to make the typedef'ed name known\\
+\vspace{3em}
+
+\noindent \textbf{Change \#132} with diff file ISSM-12467-12468.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp\\
+Export determination: 6. \\
+Rationale: \\
+\vspace{3em}
+
+\noindent \textbf{Change \#133} with diff file ISSM-12468-12469.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Container/Observations.h\\
+Export determination: 6. \\
+Rationale: typo and missing include\\
+\vspace{3em}
+
+\noindent \textbf{Change \#134} with diff file ISSM-12469-12470.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh\\
+Export determination: 6. \\
+Rationale: updated install script\\
+\vspace{3em}
+
+\noindent \textbf{Change \#135} with diff file ISSM-12470-12471.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.cpp M /issm/trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.h M /issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp M /issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp M /issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.h M /issm/trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.cpp M /issm/trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.h M /issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp M /issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.h M /issm/trunk-jpl/src/c/modules/InputScalex/InputScalex.cpp M /issm/trunk-jpl/src/c/modules/InputScalex/InputScalex.h M /issm/trunk-jpl/src/c/modules/InputToResultx/InputToResultx.cpp M /issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp M /issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.h M /issm/trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp M /issm/trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.h M /issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp M /issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.h M /issm/trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp M /issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp M /issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.h M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h M /issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp M /issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp M /issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.h M /issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp M /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp M /issm/trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp M /issm/trunk-jpl/src/c/modules/RequestedOutputsx/RequestedOutputsx.cpp M /issm/trunk-jpl/src/c/modules/Responsex/Responsex.cpp M /issm/trunk-jpl/src/c/modules/Responsex/Responsex.h M /issm/trunk-jpl/src/c/modules/Solverx/DofTypesToIndexSet.cpp M /issm/trunk-jpl/src/c/modules/Solverx/Solverx.h M /issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp M /issm/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.cpp M /issm/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.h M /issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp M /issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.h M /issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp M /issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.h M /issm/trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp M /issm/trunk-jpl/src/c/modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp M /issm/trunk-jpl/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp M /issm/trunk-jpl/src/c/modules/VecMergex/VecMergex.cpp\\
+Export determination: 6. \\
+Rationale: type renames\\
+\vspace{3em}
+
+\noindent \textbf{Change \#136} with diff file ISSM-12471-12472.diff: \\
+Function name: \\
+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/PentaRef.cpp M /issm/trunk-jpl/src/c/objects/Elements/PentaRef.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/Elements/TriaRef.cpp M /issm/trunk-jpl/src/c/objects/Elements/TriaRef.h\\
+Export determination: 6. \\
+Rationale: type renames\\
+\vspace{3em}
+
+\noindent \textbf{Change \#137} with diff file ISSM-12472-12473.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Loads/Friction.cpp 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/Load.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/Numerics/ElementMatrix.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementMatrix.h M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.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\\
+Export determination: 6. \\
+Rationale: type renames\\
+\vspace{3em}
+
+\noindent \textbf{Change \#138} with diff file ISSM-12473-12474.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Options/Option.h M /issm/trunk-jpl/src/c/objects/Options/OptionCell.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionCell.h M /issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp 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.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionLogical.h M /issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionStruct.h M /issm/trunk-jpl/src/c/objects/Options/OptionUtilities.cpp\\
+Export determination: 6. \\
+Rationale: type renames\\
+\vspace{3em}
+
+\noindent \textbf{Change \#139} with diff file ISSM-12474-12475.diff: \\
+Function name: \\
+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.cpp 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.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.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.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.h\\
+Export determination: 6. \\
+Rationale: type renames + one type bug fixed in DoubleMatArrayParam.cpp:225/226\\
+\vspace{3em}
+
+\noindent \textbf{Change \#140} with diff file ISSM-12475-12476.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Elements/Arrhenius.cpp M /issm/trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp M /issm/trunk-jpl/src/c/shared/Elements/GetVerticesCoordinates.cpp M /issm/trunk-jpl/src/c/shared/Elements/Paterson.cpp M /issm/trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp M /issm/trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp M /issm/trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp M /issm/trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp M /issm/trunk-jpl/src/c/shared/Elements/elements.h M /issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp M /issm/trunk-jpl/src/c/shared/Matrix/matrix.h\\
+Export determination: 6. \\
+Rationale: type renames\\
+\vspace{3em}
+
+\noindent \textbf{Change \#141} with diff file ISSM-12476-12477.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp M /issm/trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp M /issm/trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp M /issm/trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp M /issm/trunk-jpl/src/c/shared/Numerics/cross.cpp M /issm/trunk-jpl/src/c/shared/Numerics/extrema.cpp M /issm/trunk-jpl/src/c/shared/Numerics/isnan.cpp M /issm/trunk-jpl/src/c/shared/Numerics/isnan.h M /issm/trunk-jpl/src/c/shared/Numerics/numerics.h\\
+Export determination: 6. \\
+Rationale: type renames\\
+\vspace{3em}
+
+\noindent \textbf{Change \#142} with diff file ISSM-12477-12478.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/solutions/control\_core.cpp M /issm/trunk-jpl/src/c/solutions/controlconvergence.cpp M /issm/trunk-jpl/src/c/solutions/controlrestart.cpp M /issm/trunk-jpl/src/c/solutions/controltao\_core.cpp M /issm/trunk-jpl/src/c/solutions/convergence.cpp M /issm/trunk-jpl/src/c/solutions/gradient\_core.cpp M /issm/trunk-jpl/src/c/solutions/hydrology\_core.cpp M /issm/trunk-jpl/src/c/solutions/hydrology\_core\_step.cpp M /issm/trunk-jpl/src/c/solutions/issm.cpp M /issm/trunk-jpl/src/c/solutions/kriging.cpp M /issm/trunk-jpl/src/c/solutions/objectivefunction.cpp M /issm/trunk-jpl/src/c/solutions/solutions.h M /issm/trunk-jpl/src/c/solutions/steadystateconvergence.cpp M /issm/trunk-jpl/src/c/solutions/thermal\_core.cpp M /issm/trunk-jpl/src/c/solutions/transient\_core.cpp M /issm/trunk-jpl/src/c/solvers/solver\_newton.cpp M /issm/trunk-jpl/src/c/solvers/solver\_nonlinear.cpp M /issm/trunk-jpl/src/c/solvers/solver\_thermal\_nonlinear.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/src/c/toolkits/issm/issmtoolkit.h\\
+Export determination: 6. \\
+Rationale: type renames\\
+\vspace{3em}
+
+\noindent \textbf{Change \#143} with diff file ISSM-12478-12479.diff: \\
+Function name: \\
+M /issm/trunk-jpl/configs/config-linux64-ad.sh M /issm/trunk-jpl/src/c/include/types.h\\
+Export determination: 6. \\
+Rationale: enable adolc includes\\
+\vspace{3em}
+
+\noindent \textbf{Change \#144} with diff file ISSM-12479-12480.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp M /issm/trunk-jpl/src/c/shared/Exceptions/exceptions.h\\
+Export determination: 6. \\
+Rationale: should take const string\&\\
+\vspace{3em}
+
+\noindent \textbf{Change \#145} with diff file ISSM-12480-12481.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/include/macros.h\\
+Export determination: 6. \\
+Rationale: introduce an alternative to the \_error\_ macro that uses stream arguments to avoid having to introduce different calls for active floating point variables vs regular passive ones\\
+\vspace{3em}
+
+\noindent \textbf{Change \#146} with diff file ISSM-12481-12482.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Gauss/GaussTria.cpp M /issm/trunk-jpl/src/c/objects/Gauss/GaussTria.h\\
+Export determination: 6. \\
+Rationale: these are supposed to be non-differentiable (confirmed w M. Morlighem)\\
+\vspace{3em}
+
+\noindent \textbf{Change \#147} with diff file ISSM-12482-12483.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Params/BoolParam.h M /issm/trunk-jpl/src/c/objects/Params/IntParam.h\\
+Export determination: 6. \\
+Rationale: casting to bool and int implies non-differentiability\\
+\vspace{3em}
+
+\noindent \textbf{Change \#148} with diff file ISSM-12483-12484.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Loads/Friction.cpp\\
+Export determination: 6. \\
+Rationale: example for replacing \_error\_ with \_error2\_ such that the printing becomes agnostic to the variable type (see e.g. "s" being adouble or double)) and one doesn't have to introduce two different variants to appease the C formatting\\
+\vspace{3em}
+
+\noindent \textbf{Change \#149} with diff file ISSM-12484-12485.diff: \\
+Function name: \\
+A /issm/trunk-jpl/src/android/ISSM\_App A /issm/trunk-jpl/src/android/ISSM\_App/.classpath A /issm/trunk-jpl/src/android/ISSM\_App/.project A /issm/trunk-jpl/src/android/ISSM\_App/AndroidManifest.xml A /issm/trunk-jpl/src/android/ISSM\_App/assets A /issm/trunk-jpl/src/android/ISSM\_App/bin A /issm/trunk-jpl/src/android/ISSM\_App/bin/classes A /issm/trunk-jpl/src/android/ISSM\_App/bin/classes/issm A /issm/trunk-jpl/src/android/ISSM\_App/bin/classes/issm/app A /issm/trunk-jpl/src/android/ISSM\_App/bin/res A /issm/trunk-jpl/src/android/ISSM\_App/bin/res/drawable-hdpi A /issm/trunk-jpl/src/android/ISSM\_App/bin/res/drawable-hdpi/ic\_launcher.png A /issm/trunk-jpl/src/android/ISSM\_App/bin/res/drawable-ldpi A /issm/trunk-jpl/src/android/ISSM\_App/bin/res/drawable-ldpi/ic\_launcher.png A /issm/trunk-jpl/src/android/ISSM\_App/bin/res/drawable-mdpi A /issm/trunk-jpl/src/android/ISSM\_App/bin/res/drawable-mdpi/ic\_launcher.png A /issm/trunk-jpl/src/android/ISSM\_App/bin/res/drawable-xhdpi A /issm/trunk-jpl/src/android/ISSM\_App/bin/res/drawable-xhdpi/ic\_launcher.png A /issm/trunk-jpl/src/android/ISSM\_App/gen A /issm/trunk-jpl/src/android/ISSM\_App/gen/issm A /issm/trunk-jpl/src/android/ISSM\_App/gen/issm/app A /issm/trunk-jpl/src/android/ISSM\_App/gen/issm/app/BuildConfig.java A /issm/trunk-jpl/src/android/ISSM\_App/gen/issm/app/R.java A /issm/trunk-jpl/src/android/ISSM\_App/proguard-project.txt A /issm/trunk-jpl/src/android/ISSM\_App/project.properties A /issm/trunk-jpl/src/android/ISSM\_App/res A /issm/trunk-jpl/src/android/ISSM\_App/res/drawable-hdpi A /issm/trunk-jpl/src/android/ISSM\_App/res/drawable-hdpi/ic\_launcher.png A /issm/trunk-jpl/src/android/ISSM\_App/res/drawable-ldpi A /issm/trunk-jpl/src/android/ISSM\_App/res/drawable-ldpi/ic\_launcher.png A /issm/trunk-jpl/src/android/ISSM\_App/res/drawable-mdpi A /issm/trunk-jpl/src/android/ISSM\_App/res/drawable-mdpi/ic\_launcher.png A /issm/trunk-jpl/src/android/ISSM\_App/res/drawable-xhdpi A /issm/trunk-jpl/src/android/ISSM\_App/res/drawable-xhdpi/ic\_launcher.png A /issm/trunk-jpl/src/android/ISSM\_App/res/layout A /issm/trunk-jpl/src/android/ISSM\_App/res/layout/main.xml A /issm/trunk-jpl/src/android/ISSM\_App/res/values A /issm/trunk-jpl/src/android/ISSM\_App/res/values/strings.xml A /issm/trunk-jpl/src/android/ISSM\_App/src A /issm/trunk-jpl/src/android/ISSM\_App/src/issm A /issm/trunk-jpl/src/android/ISSM\_App/src/issm/app A /issm/trunk-jpl/src/android/ISSM\_App/src/issm/app/ISSM\_AppActivity.java\\
+Export determination: 6. \\
+Rationale: Added the ISSM\_App Android project directory.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#150} with diff file ISSM-12485-12486.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/include/macros.h\\
+Export determination: 6. \\
+Rationale: should have the INTEL\_WIN variant similar to the old \_error\_ I presume\\
+\vspace{3em}
+
+\noindent \textbf{Change \#151} with diff file ISSM-12486-12487.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/include/macros.h\\
+Export determination: 6. \\
+Rationale: macros to replace printf calls using stream syntax to avoid variants imposed by the C formatting related to the type of the printed variables\\
+\vspace{3em}
+
+\noindent \textbf{Change \#152} with diff file ISSM-12487-12488.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Contour.cpp\\
+Export determination: 6. \\
+Rationale: first use of macro replacing printf to see if it impacts the regression test check\\
+\vspace{3em}
+
+\noindent \textbf{Change \#153} with diff file ISSM-12488-12489.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp\\
+Export determination: 6. \\
+Rationale: minor fix\\
+\vspace{3em}
+
+\noindent \textbf{Change \#154} with diff file ISSM-12489-12490.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/utils/Miscellaneous/issmdoc.m\\
+Export determination: 6. \\
+Rationale: updated with new names\\
+\vspace{3em}
+
+\noindent \textbf{Change \#155} with diff file ISSM-12490-12491.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/include/macros.h\\
+Export determination: 6. \\
+Rationale: added iostream - may be I got this in through some other path in gcc 4.5.1 but it is not included when using 4.1.2\\
+\vspace{3em}
+
+\noindent \textbf{Change \#156} with diff file ISSM-12491-12492.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Contour.cpp\\
+Export determination: 6. \\
+Rationale: include iostream for cout\\
+\vspace{3em}
+
+\noindent \textbf{Change \#157} with diff file ISSM-12492-12493.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Contour.cpp\\
+Export determination: 6. \\
+Rationale: removed iostream, I did not see previous commit...\\
+\vspace{3em}
+
+\noindent \textbf{Change \#158} with diff file ISSM-12493-12494.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Container/DataSet.cpp M /issm/trunk-jpl/src/c/Container/Elements.cpp M /issm/trunk-jpl/src/c/Container/Inputs.cpp M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Options.cpp M /issm/trunk-jpl/src/c/Container/Parameters.cpp M /issm/trunk-jpl/src/c/include/macros.h M /issm/trunk-jpl/src/c/io/Disk/pfclose.cpp M /issm/trunk-jpl/src/c/io/Disk/pfopen.cpp 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/MatlabMatrixToDoubleMatrix.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp M /issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp M /issm/trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp M /issm/trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp M /issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp M /issm/trunk-jpl/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp M /issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp M /issm/trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp M /issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp M /issm/trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp M /issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp M /issm/trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp M /issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp M /issm/trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp M /issm/trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp M /issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp M /issm/trunk-jpl/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp M /issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp M /issm/trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp M /issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp M /issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp M /issm/trunk-jpl/src/c/modules/Responsex/Responsex.cpp M /issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp M /issm/trunk-jpl/src/c/modules/Solverx/Solverx.cpp M /issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp M /issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp M /issm/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp M /issm/trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Edge.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Geometry.cpp M /issm/trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Metric.cpp M /issm/trunk-jpl/src/c/objects/Bamg/SetOfE4.cpp M /issm/trunk-jpl/src/c/objects/Bamg/SubDomain.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Triangle.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp M /issm/trunk-jpl/src/c/objects/DofIndexing.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/PentaRef.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/Elements/TriaRef.cpp M /issm/trunk-jpl/src/c/objects/FemModel.cpp M /issm/trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp M /issm/trunk-jpl/src/c/objects/Gauss/GaussTria.cpp M /issm/trunk-jpl/src/c/objects/Hook.cpp M /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/ControlInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/IntInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp M /issm/trunk-jpl/src/c/objects/Inputs/TransientInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_ColorStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Container.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Document.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Feature.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_File.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Folder.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Geometry.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_GroundOverlay.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Icon.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LatLonBox.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LineString.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LineStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LinearRing.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_MultiGeometry.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Object.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Overlay.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Placemark.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Point.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_PolyStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Polygon.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Style.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_StyleSelector.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_SubStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Unknown.cpp M /issm/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp M /issm/trunk-jpl/src/c/objects/Loads/Icefront.cpp M /issm/trunk-jpl/src/c/objects/Loads/Numericalflux.cpp M /issm/trunk-jpl/src/c/objects/Loads/Pengrid.cpp M /issm/trunk-jpl/src/c/objects/Loads/Penpair.cpp M /issm/trunk-jpl/src/c/objects/Loads/Riftfront.cpp M /issm/trunk-jpl/src/c/objects/Materials/Matice.cpp M /issm/trunk-jpl/src/c/objects/Node.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionUtilities.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/python/io/CheckNumPythonArguments.cpp M /issm/trunk-jpl/src/c/python/io/FetchPythonData.cpp M /issm/trunk-jpl/src/c/shared/Alloc/alloc.cpp M /issm/trunk-jpl/src/c/shared/Elements/CoordinateSystemTransform.cpp M /issm/trunk-jpl/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp M /issm/trunk-jpl/src/c/shared/Elements/TransformLoadVectorCoord.cpp M /issm/trunk-jpl/src/c/shared/Elements/TransformSolutionCoord.cpp M /issm/trunk-jpl/src/c/shared/Elements/TransformStiffnessMatrixCoord.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/Matrix/MatrixUtils.cpp M /issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp M /issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp M /issm/trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp M /issm/trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp M /issm/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp M /issm/trunk-jpl/src/c/shared/String/DescriptorIndex.cpp M /issm/trunk-jpl/src/c/shared/Threads/LaunchThread.cpp M /issm/trunk-jpl/src/c/solutions/AdjointCorePointerFromSolutionEnum.cpp M /issm/trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp M /issm/trunk-jpl/src/c/solutions/CorePointerFromSolutionEnum.cpp M /issm/trunk-jpl/src/c/solutions/ProcessArguments.cpp M /issm/trunk-jpl/src/c/solutions/WriteLockFile.cpp M /issm/trunk-jpl/src/c/solutions/controltao\_core.cpp M /issm/trunk-jpl/src/c/solutions/convergence.cpp M /issm/trunk-jpl/src/c/solutions/gradient\_core.cpp M /issm/trunk-jpl/src/c/solutions/issm.cpp M /issm/trunk-jpl/src/c/solutions/kriging.cpp M /issm/trunk-jpl/src/c/solutions/objectivefunction.cpp M /issm/trunk-jpl/src/c/solutions/steadystate\_core.cpp M /issm/trunk-jpl/src/c/solutions/transient\_core.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqMat.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqVec.cpp M /issm/trunk-jpl/src/c/toolkits/metis/patches/METIS\_PartMeshNodalPatch.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscInsertMode.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscMatrixType.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/ISSMToPetscNormMode.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/MatInvert.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/MatPartition.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/VecMerge.cpp M /issm/trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp\\
+Export determination: 6. \\
+Rationale: replaced all \_error\_ to \_error2\_\\
+\vspace{3em}
+
+\noindent \textbf{Change \#159} with diff file ISSM-12494-12495.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/io/Disk/pfclose.cpp M /issm/trunk-jpl/src/c/io/Disk/pfopen.cpp M /issm/trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp M /issm/trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp M /issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp M /issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp M /issm/trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp M /issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp M /issm/trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp M /issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h M /issm/trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.h M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp M /issm/trunk-jpl/src/c/objects/DofIndexing.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/PentaRef.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/Hook.cpp M /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.h M /issm/trunk-jpl/src/c/objects/Inputs/ControlInput.h M /issm/trunk-jpl/src/c/objects/Inputs/DatasetInput.h M /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.h M /issm/trunk-jpl/src/c/objects/Inputs/IntInput.h M /issm/trunk-jpl/src/c/objects/Inputs/PentaP1Input.h M /issm/trunk-jpl/src/c/objects/Inputs/TransientInput.h M /issm/trunk-jpl/src/c/objects/Inputs/TriaP1Input.h M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Attribute.h M /issm/trunk-jpl/src/c/objects/KML/KML\_ColorStyle.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Comment.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Container.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Document.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Feature.h M /issm/trunk-jpl/src/c/objects/KML/KML\_File.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Folder.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Geometry.h M /issm/trunk-jpl/src/c/objects/KML/KML\_GroundOverlay.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Icon.h M /issm/trunk-jpl/src/c/objects/KML/KML\_LatLonBox.h M /issm/trunk-jpl/src/c/objects/KML/KML\_LineString.h M /issm/trunk-jpl/src/c/objects/KML/KML\_LineStyle.h M /issm/trunk-jpl/src/c/objects/KML/KML\_LinearRing.h M /issm/trunk-jpl/src/c/objects/KML/KML\_MultiGeometry.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Object.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Overlay.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Placemark.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Point.h M /issm/trunk-jpl/src/c/objects/KML/KML\_PolyStyle.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Polygon.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Style.h M /issm/trunk-jpl/src/c/objects/KML/KML\_StyleSelector.h M /issm/trunk-jpl/src/c/objects/KML/KML\_SubStyle.h M /issm/trunk-jpl/src/c/objects/KML/KML\_Unknown.h M /issm/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.h M /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.h M /issm/trunk-jpl/src/c/objects/Kriging/Observation.h M /issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.h M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h M /issm/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.h M /issm/trunk-jpl/src/c/objects/Loads/Icefront.h M /issm/trunk-jpl/src/c/objects/Loads/Numericalflux.h M /issm/trunk-jpl/src/c/objects/Loads/Pengrid.h 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/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/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.h M /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.h M /issm/trunk-jpl/src/c/objects/Params/FileParam.h M /issm/trunk-jpl/src/c/objects/Params/IntMatParam.h M /issm/trunk-jpl/src/c/objects/Params/IntParam.h M /issm/trunk-jpl/src/c/objects/Params/IntVecParam.h M /issm/trunk-jpl/src/c/objects/Params/MatrixParam.h M /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.h M /issm/trunk-jpl/src/c/objects/Params/StringParam.h M /issm/trunk-jpl/src/c/objects/Params/VectorParam.h 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/Numerics/GaussPoints.cpp M /issm/trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp M /issm/trunk-jpl/src/c/shared/String/DescriptorIndex.cpp M /issm/trunk-jpl/src/c/solutions/AnalysisConfiguration.cpp M /issm/trunk-jpl/src/c/solutions/CorePointerFromSolutionEnum.cpp M /issm/trunk-jpl/src/c/solutions/WriteLockFile.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp\\
+Export determination: 6. \\
+Rationale: replaced all \_error\_ to \_error2\_\\
+\vspace{3em}
+
+\noindent \textbf{Change \#160} with diff file ISSM-12495-12496.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Container/DataSet.cpp M /issm/trunk-jpl/src/c/Container/Inputs.cpp M /issm/trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/DescriptorIndex.cpp M /issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp M /issm/trunk-jpl/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp M /issm/trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp M /issm/trunk-jpl/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateDataSets.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp M /issm/trunk-jpl/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp M /issm/trunk-jpl/src/c/modules/Responsex/Responsex.cpp M /issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp M /issm/trunk-jpl/src/c/objects/DofIndexing.cpp M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/Hook.cpp M /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/IntInput.cpp M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/Loads/Riftfront.cpp M /issm/trunk-jpl/src/c/objects/Materials/Matice.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp M /issm/trunk-jpl/src/c/shared/Alloc/alloc.cpp M /issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp M /issm/trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp M /issm/trunk-jpl/src/c/shared/Numerics/Synchronize.sh M /issm/trunk-jpl/src/c/shared/Numerics/UnitConversion.cpp M /issm/trunk-jpl/src/c/shared/String/DescriptorIndex.cpp M /issm/trunk-jpl/src/c/shared/Threads/LaunchThread.cpp M /issm/trunk-jpl/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#161} with diff file ISSM-12496-12497.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/EnumToString/EnumToString.cpp M /issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp M /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp M /issm/trunk-jpl/src/modules/Scotch/Scotch.cpp M /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp M /issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp\\
+Export determination: 6. \\
+Rationale: cosmetics\\
+\vspace{3em}
+
+\noindent \textbf{Change \#162} with diff file ISSM-12497-12498.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp M /issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp M /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp M /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp M /issm/trunk-jpl/src/modules/EnumToString/EnumToString.cpp M /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp M /issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp M /issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.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/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.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/Kriging/Kriging.cpp M /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp M /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp M /issm/trunk-jpl/src/modules/Scotch/Scotch.cpp M /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp M /issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp M /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp M /issm/trunk-jpl/src/modules/matlab/Makefile.am\\
+Export determination: 6. \\
+Rationale: moved \_error\_ to \_error2\_ and added circular dependencies in Makefile.am to resolve all symbols\\
+\vspace{3em}
+
+\noindent \textbf{Change \#163} with diff file ISSM-12498-12499.diff: \\
+Function name: \\
+M /issm/trunk-jpl/m4/issm\_options.m4\\
+Export determination: 6. \\
+Rationale: added circular dependencies in Makefile.am to resolve all symbols of mex modules\\
+\vspace{3em}
+
+\noindent \textbf{Change \#164} with diff file ISSM-12499-12500.diff: \\
+Function name: \\
+A /issm/trunk-jpl/externalpackages/triangle/install-discover.sh\\
+Export determination: 6. \\
+Rationale: add install for discover\\
+\vspace{3em}
+
+\noindent \textbf{Change \#165} with diff file ISSM-12500-12501.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Exceptions/exprintf.cpp\\
+Export determination: 6. \\
+Rationale: Final xmalloc\\
+\vspace{3em}
+
+\noindent \textbf{Change \#166} with diff file ISSM-12501-12502.diff: \\
+Function name: \\
+A /issm/trunk-jpl/src/m/classes/clusters/discover.m\\
+Export determination: 6. \\
+Rationale: add discover cluster\\
+\vspace{3em}
+
+\noindent \textbf{Change \#167} with diff file ISSM-12502-12503.diff: \\
+Function name: \\
+M /issm/trunk-jpl/configs/config-discover.sh M /issm/trunk-jpl/externalpackages/matlab/install.sh\\
+Export determination: 6. \\
+Rationale: fix config\\
+\vspace{3em}
+
+\noindent \textbf{Change \#168} with diff file ISSM-12503-12504.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/android/android-sdk/install.sh\\
+Export determination: 6. \\
+Rationale: Minor revision of Android-SDK install script.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#169} with diff file ISSM-12504-12505.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/matlab/install.sh\\
+Export determination: 6. \\
+Rationale: oops, this should not change\\
+\vspace{3em}
+
+\noindent \textbf{Change \#170} with diff file ISSM-12505-12506.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp\\
+Export determination: 6. \\
+Rationale: test for Jean\\
+\vspace{3em}
+
+\noindent \textbf{Change \#171} with diff file ISSM-12506-12507.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/include/macros.h\\
+Export determination: 6. \\
+Rationale: Fixing \_error2\_ and PrintString macros (did not like std::ends)\\
+\vspace{3em}
+
+\noindent \textbf{Change \#172} with diff file ISSM-12507-12508.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/include/macros.h M /issm/trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp M /issm/trunk-jpl/src/c/shared/Elements/elements.h M /issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp M /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp\\
+Export determination: 6. \\
+Rationale: Changing some printf to \_printLine\_\\
+\vspace{3em}
+
+\noindent \textbf{Change \#173} with diff file ISSM-12508-12509.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Hook.cpp\\
+Export determination: 6. \\
+Rationale: replaced all printf to \_printString and \_printLine\\
+\vspace{3em}
+
+\noindent \textbf{Change \#174} with diff file ISSM-12509-12510.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Bamg/BamgVertex.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Edge.cpp M /issm/trunk-jpl/src/c/objects/Bamg/EigenMetric.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Geometry.cpp M /issm/trunk-jpl/src/c/objects/Bamg/ListofIntersectionTriangles.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Metric.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Triangle.cpp\\
+Export determination: 6. \\
+Rationale: replaced all printf to \_printString and \_printLine\\
+\vspace{3em}
+
+\noindent \textbf{Change \#175} with diff file ISSM-12510-12511.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#176} with diff file ISSM-12511-12512.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/io/PrintfFunction.cpp M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp M /issm/trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.cpp M /issm/trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp M /issm/trunk-jpl/src/c/modules/Chacox/Chacox.cpp M /issm/trunk-jpl/src/c/modules/Chacox/input\_parse.cpp M /issm/trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp M /issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp M /issm/trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp M /issm/trunk-jpl/src/c/objects/DofIndexing.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp M /issm/trunk-jpl/src/c/objects/FemModel.cpp M /issm/trunk-jpl/src/c/objects/Gauss/GaussPenta.cpp M /issm/trunk-jpl/src/c/objects/Gauss/GaussTria.cpp M /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/ControlInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/IntInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp M /issm/trunk-jpl/src/c/objects/Inputs/TransientInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Observation.cpp M /issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp M /issm/trunk-jpl/src/c/objects/Loads/Friction.cpp M /issm/trunk-jpl/src/c/objects/Loads/Icefront.cpp M /issm/trunk-jpl/src/c/objects/Loads/Numericalflux.cpp M /issm/trunk-jpl/src/c/objects/Loads/Pengrid.cpp M /issm/trunk-jpl/src/c/objects/Loads/Penpair.cpp M /issm/trunk-jpl/src/c/objects/Loads/Riftfront.cpp M /issm/trunk-jpl/src/c/objects/Materials/Matice.cpp M /issm/trunk-jpl/src/c/objects/Materials/Matpar.cpp M /issm/trunk-jpl/src/c/objects/Node.cpp M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp M /issm/trunk-jpl/src/c/objects/Params/BoolParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.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/objects/Params/FileParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntVecParam.cpp M /issm/trunk-jpl/src/c/objects/Params/MatrixParam.cpp M /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp M /issm/trunk-jpl/src/c/objects/Params/StringParam.cpp M /issm/trunk-jpl/src/c/objects/Params/VectorParam.cpp M /issm/trunk-jpl/src/c/objects/Segment.cpp M /issm/trunk-jpl/src/c/objects/Vertex.cpp M /issm/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqMat.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqVec.cpp\\
+Export determination: 6. \\
+Rationale: replaced all printf to \_printString and \_printLine\\
+\vspace{3em}
+
+\noindent \textbf{Change \#177} with diff file ISSM-12512-12513.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/include/macros.h M /issm/trunk-jpl/src/c/io/PrintfFunction.cpp M /issm/trunk-jpl/src/c/io/io.h M /issm/trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LatLonBox.cpp M /issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp M /issm/trunk-jpl/src/c/solutions/issm.cpp\\
+Export determination: 6. \\
+Rationale: Starting to replace \_printf by \_pprintString\\
+\vspace{3em}
+
+\noindent \textbf{Change \#178} with diff file ISSM-12513-12514.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/include/macros.h M /issm/trunk-jpl/src/c/io/PrintfFunction.cpp M /issm/trunk-jpl/src/c/io/io.h M /issm/trunk-jpl/src/c/objects/KML/KML\_GroundOverlay.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LatLonBox.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp M /issm/trunk-jpl/src/c/solutions/controltao\_core.cpp\\
+Export determination: 6. \\
+Rationale: Starting to replace \_printf by \_pprintString\\
+\vspace{3em}
+
+\noindent \textbf{Change \#179} with diff file ISSM-12514-12515.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/KML/KML\_GroundOverlay.cpp\\
+Export determination: 6. \\
+Rationale: Starting to replace \_printf by \_pprintString\\
+\vspace{3em}
+
+\noindent \textbf{Change \#180} with diff file ISSM-12515-12516.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Container/DataSet.cpp M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp M /issm/trunk-jpl/src/c/modules/ConfigureObjectsx/ConfigureObjectsx.cpp M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/ConstraintsStatex.cpp M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp M /issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp M /issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp M /issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp M /issm/trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp M /issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp M /issm/trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp M /issm/trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp M /issm/trunk-jpl/src/c/modules/Ll2xyx/Ll2xyx.cpp M /issm/trunk-jpl/src/c/modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp M /issm/trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp M /issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp M /issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp M /issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp M /issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp M /issm/trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp M /issm/trunk-jpl/src/c/modules/Xy2llx/Xy2llx.cpp M /issm/trunk-jpl/src/c/objects/FemModel.cpp M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Attribute.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_ColorStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Comment.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Container.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Document.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Feature.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_File.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Folder.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Icon.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LineString.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LineStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LinearRing.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_MultiGeometry.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Object.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Overlay.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Placemark.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Point.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_PolyStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Polygon.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Style.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Unknown.cpp M /issm/trunk-jpl/src/c/objects/Options/Option.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionCell.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp M /issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp M /issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp M /issm/trunk-jpl/src/c/solutions/ResetBoundaryConditions.cpp M /issm/trunk-jpl/src/c/solutions/adjointbalancethickness\_core.cpp M /issm/trunk-jpl/src/c/solutions/adjointdiagnostic\_core.cpp M /issm/trunk-jpl/src/c/solutions/balancethickness\_core.cpp M /issm/trunk-jpl/src/c/solutions/bedslope\_core.cpp M /issm/trunk-jpl/src/c/solutions/control\_core.cpp M /issm/trunk-jpl/src/c/solutions/controlconvergence.cpp M /issm/trunk-jpl/src/c/solutions/controltao\_core.cpp M /issm/trunk-jpl/src/c/solutions/convergence.cpp M /issm/trunk-jpl/src/c/solutions/diagnostic\_core.cpp M /issm/trunk-jpl/src/c/solutions/enthalpy\_core.cpp M /issm/trunk-jpl/src/c/solutions/gradient\_core.cpp M /issm/trunk-jpl/src/c/solutions/hydrology\_core.cpp M /issm/trunk-jpl/src/c/solutions/hydrology\_core\_step.cpp M /issm/trunk-jpl/src/c/solutions/issm.cpp M /issm/trunk-jpl/src/c/solutions/kriging.cpp M /issm/trunk-jpl/src/c/solutions/prognostic\_core.cpp M /issm/trunk-jpl/src/c/solutions/steadystate\_core.cpp M /issm/trunk-jpl/src/c/solutions/surfaceslope\_core.cpp M /issm/trunk-jpl/src/c/solutions/thermal\_core.cpp M /issm/trunk-jpl/src/c/solutions/transient\_core.cpp M /issm/trunk-jpl/src/c/solvers/solver\_newton.cpp M /issm/trunk-jpl/src/c/solvers/solver\_nonlinear.cpp M /issm/trunk-jpl/src/c/solvers/solver\_stokescoupling\_nonlinear.cpp M /issm/trunk-jpl/src/c/solvers/solver\_thermal\_nonlinear.cpp\\
+Export determination: 6. \\
+Rationale: Starting to replace \_printf by \_pprintString\\
+\vspace{3em}
+
+\noindent \textbf{Change \#181} with diff file ISSM-12516-12517.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp M /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp M /issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp M /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp M /issm/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp M /issm/trunk-jpl/src/modules/EnumToString/EnumToString.cpp M /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp M /issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp M /issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp M /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp M /issm/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp M /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp M /issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.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/Kriging/Kriging.cpp M /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp M /issm/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp M /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp M /issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp M /issm/trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp M /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp\\
+Export determination: 6. \\
+Rationale: Starting to replace \_printf by \_pprintString\\
+\vspace{3em}
+
+\noindent \textbf{Change \#182} with diff file ISSM-12517-12518.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/modules/AverageFilter/AverageFilter.cpp M /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp M /issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp 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/Exp2Kml/Exp2Kml.cpp M /issm/trunk-jpl/src/modules/HoleFiller/HoleFiller.cpp M /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp M /issm/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.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/MeshPartition/MeshPartition.cpp M /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp M /issm/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.cpp M /issm/trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp M /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp M /issm/trunk-jpl/src/modules/TriMesh/TriMesh.cpp M /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp M /issm/trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp M /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp\\
+Export determination: 6. \\
+Rationale: no more printf\\
+\vspace{3em}
+
+\noindent \textbf{Change \#183} with diff file ISSM-12518-12519.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp M /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp M /issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp M /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp M /issm/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp M /issm/trunk-jpl/src/modules/EnumToString/EnumToString.cpp M /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp M /issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp M /issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp M /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp M /issm/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp M /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp M /issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.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/Kriging/Kriging.cpp M /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp M /issm/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp M /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp M /issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp M /issm/trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp M /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp\\
+Export determination: 6. \\
+Rationale: cosmetics\\
+\vspace{3em}
+
+\noindent \textbf{Change \#184} with diff file ISSM-12519-12520.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Container/DataSet.cpp M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp M /issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp M /issm/trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp M /issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp M /issm/trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp M /issm/trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp M /issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Object.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Unknown.cpp M /issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp M /issm/trunk-jpl/src/c/solutions/controltao\_core.cpp M /issm/trunk-jpl/src/c/solutions/convergence.cpp M /issm/trunk-jpl/src/c/solutions/issm.cpp M /issm/trunk-jpl/src/c/solutions/kriging.cpp M /issm/trunk-jpl/src/c/solvers/solver\_newton.cpp M /issm/trunk-jpl/src/c/solvers/solver\_nonlinear.cpp M /issm/trunk-jpl/src/c/solvers/solver\_stokescoupling\_nonlinear.cpp M /issm/trunk-jpl/src/c/solvers/solver\_thermal\_nonlinear.cpp\\
+Export determination: 6. \\
+Rationale: cosmetics\\
+\vspace{3em}
+
+\noindent \textbf{Change \#185} with diff file ISSM-12520-12521.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/SpawnCoreParallel.cpp M /issm/trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp M /issm/trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp M /issm/trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp M /issm/trunk-jpl/src/c/objects/Hook.cpp M /issm/trunk-jpl/src/c/objects/KML/KMLFileReadUtils.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Attribute.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_ColorStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Comment.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Container.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Document.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Feature.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_File.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Folder.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Icon.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LineString.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LineStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_LinearRing.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_MultiGeometry.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Object.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Overlay.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Placemark.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Point.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_PolyStyle.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Polygon.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Style.cpp M /issm/trunk-jpl/src/c/objects/KML/KML\_Unknown.cpp M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp M /issm/trunk-jpl/src/c/objects/Options/Option.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionCell.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntVecParam.cpp M /issm/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp M /issm/trunk-jpl/src/c/solutions/ResetBoundaryConditions.cpp M /issm/trunk-jpl/src/c/solutions/adjointbalancethickness\_core.cpp M /issm/trunk-jpl/src/c/solutions/adjointdiagnostic\_core.cpp M /issm/trunk-jpl/src/c/solutions/bedslope\_core.cpp M /issm/trunk-jpl/src/c/solutions/control\_core.cpp M /issm/trunk-jpl/src/c/solutions/controltao\_core.cpp M /issm/trunk-jpl/src/c/solutions/convergence.cpp M /issm/trunk-jpl/src/c/solutions/diagnostic\_core.cpp M /issm/trunk-jpl/src/c/solutions/steadystate\_core.cpp M /issm/trunk-jpl/src/c/solutions/surfaceslope\_core.cpp M /issm/trunk-jpl/src/c/solvers/solver\_thermal\_nonlinear.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqMat.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqVec.cpp M /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp M /issm/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp\\
+Export determination: 6. \\
+Rationale: cosmetics\\
+\vspace{3em}
+
+\noindent \textbf{Change \#186} with diff file ISSM-12521-12522.diff: \\
+Function name: \\
+A /issm/trunk-jpl/externalpackages/aspell A /issm/trunk-jpl/externalpackages/aspell/install.sh\\
+Export determination: 6. \\
+Rationale: aspell package, to spell-check latex files\\
+\vspace{3em}
+
+\noindent \textbf{Change \#187} with diff file ISSM-12522-12523.diff: \\
+Function name: \\
+A /issm/trunk-jpl/externalpackages/aspell/aspell5-en-6.0-0.tar.gz M /issm/trunk-jpl/externalpackages/aspell/install.sh\\
+Export determination: 6. \\
+Rationale: won't download properly\\
+\vspace{3em}
+
+\noindent \textbf{Change \#188} with diff file ISSM-12523-12524.diff: \\
+Function name: \\
+D /issm/trunk-jpl/externalpackages/aspell/aspell5-en-6.0-0.tar.gz A /issm/trunk-jpl/externalpackages/aspell/aspell5-en-6.0.0.tar.gz M /issm/trunk-jpl/externalpackages/aspell/install.sh\\
+Export determination: 6. \\
+Rationale: Mixed up\\
+\vspace{3em}
+
+\noindent \textbf{Change \#189} with diff file ISSM-12524-12525.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/aspell/aspell5-en-6.0.0.tar.gz\\
+Export determination: 6. \\
+Rationale: rearranged names\\
+\vspace{3em}
+
+\noindent \textbf{Change \#190} with diff file ISSM-12525-12526.diff: \\
+Function name: \\
+D /issm/trunk-jpl/externalpackages/aspell/aspell5-en-6.0.0.tar.gz M /issm/trunk-jpl/externalpackages/aspell/install.sh\\
+Export determination: 6. \\
+Rationale: mods\\
+\vspace{3em}
+
+\noindent \textbf{Change \#191} with diff file ISSM-12526-12527.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#192} with diff file ISSM-12527-12528.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Numerics/isnan.cpp M /issm/trunk-jpl/src/c/shared/Numerics/isnan.h\\
+Export determination: 6. \\
+Rationale: templatized isnan\\
+\vspace{3em}
+
+\noindent \textbf{Change \#193} with diff file ISSM-12528-12529.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp\\
+Export determination: 6. \\
+Rationale: example use of templatized isnan\\
+\vspace{3em}
+
+\noindent \textbf{Change \#194} with diff file ISSM-12529-12530.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp M /issm/trunk-jpl/src/c/modules/Gradjx/Gradjx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dxt.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp M /issm/trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Geometry.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/IntInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp M /issm/trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp M /issm/trunk-jpl/src/c/objects/Loads/Friction.cpp M /issm/trunk-jpl/src/c/objects/Loads/Numericalflux.cpp M /issm/trunk-jpl/src/c/objects/Node.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementMatrix.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp M /issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptimalSearch.cpp M /issm/trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp M /issm/trunk-jpl/src/c/shared/Numerics/isnan.cpp M /issm/trunk-jpl/src/c/solutions/controlconvergence.cpp M /issm/trunk-jpl/src/c/solutions/convergence.cpp M /issm/trunk-jpl/src/c/solutions/gradient\_core.cpp\\
+Export determination: 6. \\
+Rationale: replaced all isnan by template xIsnan\\
+\vspace{3em}
+
+\noindent \textbf{Change \#195} with diff file ISSM-12530-12531.diff: \\
+Function name: \\
+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/Input.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\\
+Export determination: 6. \\
+Rationale: in the first round the assumption was made that the inputs remain passive but in the second round after discussion with M. Morlighem all inputs were consistently made active with the exception of the xyz\_list arguments\\
+\vspace{3em}
+
+\noindent \textbf{Change \#196} with diff file ISSM-12531-12532.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Params/BoolParam.h\\
+Export determination: 6. \\
+Rationale: do not allow double or int as intput\\
+\vspace{3em}
+
+\noindent \textbf{Change \#197} with diff file ISSM-12532-12533.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Params/IntParam.h\\
+Export determination: 6. \\
+Rationale: do not allow double or int as intput\\
+\vspace{3em}
+
+\noindent \textbf{Change \#198} with diff file ISSM-12533-12534.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Params/BoolParam.h M /issm/trunk-jpl/src/c/objects/Params/IntParam.h\\
+Export determination: 6. \\
+Rationale: make interface consistently active\\
+\vspace{3em}
+
+\noindent \textbf{Change \#199} with diff file ISSM-12534-12535.diff: \\
+Function name: \\
+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/objects/Options/OptionUtilities.cpp\\
+Export determination: 6. \\
+Rationale: make consistently active\\
+\vspace{3em}
+
+\noindent \textbf{Change \#200} with diff file ISSM-12535-12536.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Node.cpp\\
+Export determination: 6. \\
+Rationale: deal with explicit or implicit casting to non-floating point types\\
+\vspace{3em}
+
+\noindent \textbf{Change \#201} with diff file ISSM-12536-12537.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh\\
+Export determination: 6. \\
+Rationale: updated install script for OSX 10.6\\
+\vspace{3em}
+
+\noindent \textbf{Change \#202} with diff file ISSM-12537-12538.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh\\
+Export determination: 6. \\
+Rationale: updated scipy/numpy install script for OSX 10.6\\
+\vspace{3em}
+
+\noindent \textbf{Change \#203} with diff file ISSM-12538-12539.diff: \\
+Function name: \\
+M /issm/trunk-jpl/test/Archives/Archive306.mat M /issm/trunk-jpl/test/Archives/Archive312.mat\\
+Export determination: 6. \\
+Rationale: updated archive for SIA SSA coupling\\
+\vspace{3em}
+
+\noindent \textbf{Change \#204} with diff file ISSM-12539-12540.diff: \\
+Function name: \\
+A /issm/trunk-jpl/configs/config-macosx-snowleopard-bothapis.sh A /issm/trunk-jpl/configs/config-macosx-snowleopard-python.sh\\
+Export determination: 6. \\
+Rationale: configure scripts for python issm framework on OSX 10.6\\
+\vspace{3em}
+
+\noindent \textbf{Change \#205} with diff file ISSM-12540-12541.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/scipy/README\\
+Export determination: 6. \\
+Rationale: updated readme for scipy/numpy install\\
+\vspace{3em}
+
+\noindent \textbf{Change \#206} with diff file ISSM-12541-12542.diff: \\
+Function name: \\
+M /issm/trunk-jpl/configs/config-macosx-snowleopard-python.sh A /issm/trunk-jpl/configs/config-macosx64-chris.sh\\
+Export determination: 6. \\
+Rationale: config scripts, debugging python compilation\\
+\vspace{3em}
+
+\noindent \textbf{Change \#207} with diff file ISSM-12542-12543.diff: \\
+Function name: \\
+M /issm/trunk-jpl/test/Archives/Archive306.mat M /issm/trunk-jpl/test/Archives/Archive312.mat\\
+Export determination: 6. \\
+Rationale: wrong matlab version\\
+\vspace{3em}
+
+\noindent \textbf{Change \#208} with diff file ISSM-12543-12544.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/io/PrintfFunction.cpp M /issm/trunk-jpl/src/c/shared/Numerics/isnan.h\\
+Export determination: 6. \\
+Rationale: isnan.cpp not needed anymore\\
+\vspace{3em}
+
+\noindent \textbf{Change \#209} with diff file ISSM-12544-12545.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/collapse.m\\
+Export determination: 6. \\
+Rationale: minor collapse missing fields\\
+\vspace{3em}
+
+\noindent \textbf{Change \#210} with diff file ISSM-12545-12546.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Numerics/isnan.h\\
+Export determination: 6. \\
+Rationale: missing include cmath\\
+\vspace{3em}
+
+\noindent \textbf{Change \#211} with diff file ISSM-12546-12547.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Numerics/numerics.h A /issm/trunk-jpl/src/c/shared/Numerics/recast.h\\
+Export determination: 6. \\
+Rationale: add casting mechanism that makes the switch from double to adouble for IssmDouble transparent\\
+\vspace{3em}
+
+\noindent \textbf{Change \#212} with diff file ISSM-12547-12548.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp\\
+Export determination: 6. \\
+Rationale: use of generic casting\\
+\vspace{3em}
+
+\noindent \textbf{Change \#213} with diff file ISSM-12548-12549.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp\\
+Export determination: 6. \\
+Rationale: conversion for booleans is not meaningfull (per M. Morglighem)\\
+\vspace{3em}
+
+\noindent \textbf{Change \#214} with diff file ISSM-12549-12550.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Node.cpp\\
+Export determination: 6. \\
+Rationale: drop the ifndefs again and use the cleaner solution with the reCast function template\\
+\vspace{3em}
+
+\noindent \textbf{Change \#215} with diff file ISSM-12550-12551.diff: \\
+Function name: \\
+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.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/Input.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\\
+Export determination: 6. \\
+Rationale: turns out xyz\_list can't be passive either\\
+\vspace{3em}
+
+\noindent \textbf{Change \#216} with diff file ISSM-12551-12552.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp\\
+Export determination: 6. \\
+Rationale: another reCast and need to wrap case branch in {} to avoid compiler error about jumping across the variable initializarion on line 1613\\
+\vspace{3em}
+
+\noindent \textbf{Change \#217} with diff file ISSM-12552-12553.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/IoModel.h\\
+Export determination: 6. \\
+Rationale: move declarationst to active except for arguments to fread.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#218} with diff file ISSM-12553-12554.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp\\
+Export determination: 6. \\
+Rationale: recast - the calls with the second template argument imply a conversion from a temporary ("adub") to a complete active variable (adouble) which one would not get otherwise and consequently could not call getValue (in the template definition).\\
+\vspace{3em}
+
+\noindent \textbf{Change \#219} with diff file ISSM-12554-12555.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.h\\
+Export determination: 6. \\
+Rationale: applying constrains to bool does not makes (checked w M. Morlighem); use reCast;\\
+\vspace{3em}
+
+\noindent \textbf{Change \#220} with diff file ISSM-12555-12556.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Inputs/IntInput.cpp\\
+Export determination: 6. \\
+Rationale: reCast\\
+\vspace{3em}
+
+\noindent \textbf{Change \#221} with diff file ISSM-12556-12557.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Materials/Matice.cpp\\
+Export determination: 6. \\
+Rationale: need {} to avoid jumping over initialized variables\\
+\vspace{3em}
+
+\noindent \textbf{Change \#222} with diff file ISSM-12557-12558.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Loads/Icefront.cpp M /issm/trunk-jpl/src/c/objects/Loads/Numericalflux.cpp M /issm/trunk-jpl/src/c/objects/Materials/Matice.cpp\\
+Export determination: 6. \\
+Rationale: use reCast\\
+\vspace{3em}
+
+\noindent \textbf{Change \#223} with diff file ISSM-12558-12559.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp\\
+Export determination: 6. \\
+Rationale: not sure what to do with the amatrix member ...\\
+\vspace{3em}
+
+\noindent \textbf{Change \#224} with diff file ISSM-12559-12560.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Params/IntVecParam.cpp\\
+Export determination: 6. \\
+Rationale: reCast\\
+\vspace{3em}
+
+\noindent \textbf{Change \#225} with diff file ISSM-12560-12561.diff: \\
+Function name: \\
+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/ElementResult.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\\
+Export determination: 6. \\
+Rationale: according to M. Morlighem all Results should be passive and the idea is to pass in active values to the constructors and in the constructor reCast and drop the derivatives under the assumption that cost functions etc. are computed before the results are formed so that the adjoint has the dependency it needs. The current problem is that the Results also call unit conversions which is an active method and therefore should not be applied to passive data. A solution for the latter is needed.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#226} with diff file ISSM-12561-12562.diff: \\
+Function name: \\
+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/ElementResult.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\\
+Export determination: 6. \\
+Rationale: undo previous change per changed advise from M. Morlighem\\
+\vspace{3em}
+
+\noindent \textbf{Change \#227} with diff file ISSM-12562-12563.diff: \\
+Function name: \\
+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/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\\
+Export determination: 6. \\
+Rationale: \\
+\vspace{3em}
+
+\noindent \textbf{Change \#228} with diff file ISSM-12564-12565.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp\\
+Export determination: 6. \\
+Rationale: reCast\\
+\vspace{3em}
+
+\noindent \textbf{Change \#229} with diff file ISSM-12565-12566.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp M /issm/trunk-jpl/src/c/shared/Numerics/IsInputConverged.cpp\\
+Export determination: 6. \\
+Rationale: reCast\\
+\vspace{3em}
+
+\noindent \textbf{Change \#230} with diff file ISSM-12566-12567.diff: \\
+Function name: \\
+M /issm/trunk-jpl/etc/environment.csh M /issm/trunk-jpl/etc/environment\_variables.csh\\
+Export determination: 6. \\
+Rationale: Added mercurial to csh\\
+\vspace{3em}
+
+\noindent \textbf{Change \#231} with diff file ISSM-12567-12568.diff: \\
+Function name: \\
+A /issm/trunk-jpl/externalpackages/petsc/install-dev-pleiades.sh\\
+Export determination: 6. \\
+Rationale: Added install-dev-pleiades.sh\\
+\vspace{3em}
+
+\noindent \textbf{Change \#232} with diff file ISSM-12568-12569.diff: \\
+Function name: \\
+M /issm/trunk-jpl/m4/issm\_options.m4\\
+Export determination: 6. \\
+Rationale: Added some options for petsc solvers (prometeus, spai, spooles, superlu etc)\\
+\vspace{3em}
+
+\noindent \textbf{Change \#233} with diff file ISSM-12569-12570.diff: \\
+Function name: \\
+A /issm/trunk-jpl/configs/config-linux64-astrid-petscdev.sh\\
+Export determination: 6. \\
+Rationale: Added configuration file for petsc dev\\
+\vspace{3em}
+
+\noindent \textbf{Change \#234} with diff file ISSM-12570-12571.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/utils/Exp/expll2xy.m M /issm/trunk-jpl/src/m/utils/Exp/expxy2ll.m\\
+Export determination: 6. \\
+Rationale: update call to expread\\
+\vspace{3em}
+
+\noindent \textbf{Change \#235} with diff file ISSM-12571-12572.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp\\
+Export determination: 6. \\
+Rationale: reCast\\
+\vspace{3em}
+
+\noindent \textbf{Change \#236} with diff file ISSM-12572-12573.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/ComputeBasalStressx/ComputeBasalStressx.cpp M /issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp M /issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp M /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionUtilities.cpp\\
+Export determination: 6. \\
+Rationale: reCast\\
+\vspace{3em}
+
+\noindent \textbf{Change \#237} with diff file ISSM-12573-12574.diff: \\
+Function name: \\
+M /issm/trunk-jpl/etc/environment.csh M /issm/trunk-jpl/etc/environment\_variables.csh\\
+Export determination: 6. \\
+Rationale: Added cmake\\
+\vspace{3em}
+
+\noindent \textbf{Change \#238} with diff file ISSM-12574-12575.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/Loads/Numericalflux.cpp\\
+Export determination: 6. \\
+Rationale: edges now do not hold NaN anymore but -1, no more cast from double to int in edges\\
+\vspace{3em}
+
+\noindent \textbf{Change \#239} with diff file ISSM-12575-12576.diff: \\
+Function name: \\
+A /issm/trunk-jpl/externalpackages/esmf A /issm/trunk-jpl/externalpackages/esmf/install.sh\\
+Export determination: 6. \\
+Rationale: esmf compliance package\\
+\vspace{3em}
+
+\noindent \textbf{Change \#240} with diff file ISSM-12576-12577.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/modelextract.m\\
+Export determination: 6. \\
+Rationale: Fixed modelextract for edges\\
+\vspace{3em}
+
+\noindent \textbf{Change \#241} with diff file ISSM-12577-12578.diff: \\
+Function name: \\
+A /issm/trunk-jpl/externalpackages/esmf/doc A /issm/trunk-jpl/externalpackages/esmf/doc/ESMF\_refdoc.pdf A /issm/trunk-jpl/externalpackages/esmf/doc/ESMF\_usrdoc.pdf M /issm/trunk-jpl/externalpackages/esmf/install.sh\\
+Export determination: 6. \\
+Rationale: documentation for esmf\\
+\vspace{3em}
+
+\noindent \textbf{Change \#242} with diff file ISSM-12578-12579.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp\\
+Export determination: 6. \\
+Rationale: filter out the part that needs to be wrapped anyway\\
+\vspace{3em}
+
+\noindent \textbf{Change \#243} with diff file ISSM-12579-12580.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/android/android-ndk/install.sh M /issm/trunk-jpl/externalpackages/android/android-sdk/install.sh A /issm/trunk-jpl/externalpackages/android/android\_variables.sh D /issm/trunk-jpl/externalpackages/gsl/install-android-4.0.sh A /issm/trunk-jpl/externalpackages/gsl/install-android.sh (from /issm/trunk-jpl/externalpackages/gsl/install-android-4.0.sh:12578) D /issm/trunk-jpl/externalpackages/triangle/configs/android/android-4.0 A /issm/trunk-jpl/externalpackages/triangle/configs/android/configure.make (from /issm/trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make:12578) D /issm/trunk-jpl/externalpackages/triangle/install-android-4.0.sh A /issm/trunk-jpl/externalpackages/triangle/install-android.sh (from /issm/trunk-jpl/externalpackages/triangle/install-android-4.0.sh:12578)\\
+Export determination: 6. \\
+Rationale: Revised installation scripts and added an android\_variables.sh script.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#244} with diff file ISSM-12580-12581.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp\\
+Export determination: 6. \\
+Rationale: recast\\
+\vspace{3em}
+
+\noindent \textbf{Change \#245} with diff file ISSM-12581-12582.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Elements/elements.h\\
+Export determination: 6. \\
+Rationale: passivate\\
+\vspace{3em}
+
+\noindent \textbf{Change \#246} with diff file ISSM-12582-12583.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.h M /issm/trunk-jpl/src/c/objects/Numerics/Vector.h\\
+Export determination: 6. \\
+Rationale: obsoleted by the include in types.h\\
+\vspace{3em}
+
+\noindent \textbf{Change \#247} with diff file ISSM-12583-12584.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/shared/Numerics/isnan.cpp M /issm/trunk-jpl/src/c/shared/Numerics/isnan.h\\
+Export determination: 6. \\
+Rationale: the specialized function template needs to be moved to the cpp file or else we get multiple definitions at link time; the "INTEL\_WIN" version in the isnan.cpp file was obsolete\\
+\vspace{3em}
+
+\noindent \textbf{Change \#248} with diff file ISSM-12584-12585.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Makefile.am\\
+Export determination: 6. \\
+Rationale: readd isnan.cpp and the ADOLCLIB\\
+\vspace{3em}
+
+\noindent \textbf{Change \#249} with diff file ISSM-12585-12586.diff: \\
+Function name: \\
+M /issm/trunk-jpl/m4/issm\_options.m4 M /issm/trunk-jpl/src/c/include/types.h\\
+Export determination: 6. \\
+Rationale: drop the extraneous part of the include path and do the include properly with the adolc directory prefixed. With this changeset the issm.exe compiles/links without errors using --with-adolc-dir in the configure\\
+\vspace{3em}
+
+\noindent \textbf{Change \#250} with diff file ISSM-12586-12587.diff: \\
+Function name: \\
+R /issm/trunk-jpl/externalpackages/triangle/install-android.sh M /issm/trunk-jpl/scripts/automakererun.sh\\
+Export determination: 6. \\
+Rationale: Modified automakererun.sh to take advantage of excisting Autools functionality.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#251} with diff file ISSM-12587-12588.diff: \\
+Function name: \\
+M /issm/trunk-jpl/configs/config-arm-linux.sh M /issm/trunk-jpl/m4/issm\_options.m4\\
+Export determination: 6. \\
+Rationale: Minor modifications to configure script(Android).\\
+\vspace{3em}
+
+\noindent \textbf{Change \#252} with diff file ISSM-12588-12589.diff: \\
+Function name: \\
+A /issm/trunk-jpl/externalpackages/adolc/install-macosx64.sh M /issm/trunk-jpl/externalpackages/adolc/install.sh\\
+Export determination: 6. \\
+Rationale: Fixed macosx64 install.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#253} with diff file ISSM-12589-12590.diff: \\
+Function name: \\
+M /issm/trunk-jpl/etc/environment.sh\\
+Export determination: 6. \\
+Rationale: Added path to python library\\
+\vspace{3em}
+
+\noindent \textbf{Change \#254} with diff file ISSM-12590-12591.diff: \\
+Function name: \\
+M /issm/trunk-jpl/m4/issm\_options.m4\\
+Export determination: 6. \\
+Rationale: Different flags according to different platforms for python linking\\
+\vspace{3em}
+
+\noindent \textbf{Change \#255} with diff file ISSM-12591-12592.diff: \\
+Function name: \\
+A /issm/trunk-jpl/configs/config-linux64-astrid-python.sh\\
+Export determination: 6. \\
+Rationale: python configuration file for astrid linux64\\
+\vspace{3em}
+
+\noindent \textbf{Change \#256} with diff file ISSM-12592-12593.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/modules/python/Makefile.am\\
+Export determination: 6. \\
+Rationale: Added delocalization (fPIC) for python code\\
+\vspace{3em}
+
+\noindent \textbf{Change \#257} with diff file ISSM-12593-12594.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/python/install-linux64-astrid.sh\\
+Export determination: 6. \\
+Rationale: enable shared libraries, which triggers the fPIC flag\\
+\vspace{3em}
+
+\noindent \textbf{Change \#258} with diff file ISSM-12594-12595.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp\\
+Export determination: 6. \\
+Rationale: Added support for uint8\\
+\vspace{3em}
+
+\noindent \textbf{Change \#259} with diff file ISSM-12595-12596.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp\\
+Export determination: 6. \\
+Rationale: Fixing initialization of string options\\
+\vspace{3em}
+
+\noindent \textbf{Change \#260} with diff file ISSM-12596-12597.diff: \\
+Function name: \\
+M /issm/trunk-jpl/m4/issm\_options.m4\\
+Export determination: 6. \\
+Rationale: cosmetics\\
+\vspace{3em}
+
+\noindent \textbf{Change \#261} with diff file ISSM-12597-12598.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Makefile.am\\
+Export determination: 6. \\
+Rationale: Adding support for SPAI, spooles, superlu, pastix and prometheus\\
+\vspace{3em}
+
+\noindent \textbf{Change \#262} with diff file ISSM-12599-12600.diff: \\
+Function name: \\
+M /issm/trunk-jpl/configs/config-arm-linux.sh M /issm/trunk-jpl/externalpackages/android/android-ndk/install.sh M /issm/trunk-jpl/externalpackages/android/android\_variables.sh M /issm/trunk-jpl/m4/issm\_options.m4\\
+Export determination: 6. \\
+Rationale: Removed Android-specific vendor options.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#263} with diff file ISSM-12600-12601.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.cpp M /issm/trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.h M /issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.h M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp M /issm/trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.h M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.h\\
+Export determination: 6. \\
+Rationale: Simplified InterpFromMeshToMesh2dx by adding options, and index is now always int\\
+\vspace{3em}
+
+\noindent \textbf{Change \#264} with diff file ISSM-12601-12602.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp M /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp M /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h M /issm/trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp\\
+Export determination: 6. \\
+Rationale: Simplified InterpFromMeshToMesh2dx by adding options, and index is now always int\\
+\vspace{3em}
+
+\noindent \textbf{Change \#265} with diff file ISSM-12602-12603.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/plot\_profile.m M /issm/trunk-jpl/src/m/model/plot/plotmodel.m\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#266} with diff file ISSM-12603-12604.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/plot\_profile.m\\
+Export determination: 6. \\
+Rationale: fixed plot\_profile for 2 profiles\\
+\vspace{3em}
+
+\noindent \textbf{Change \#267} with diff file ISSM-12604-12605.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp\\
+Export determination: 6. \\
+Rationale: only interpolate for points that are inside the model domain\\
+\vspace{3em}
+
+\noindent \textbf{Change \#268} with diff file ISSM-12605-12606.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/averaging.m\\
+Export determination: 6. \\
+Rationale: added possibility to average on 1 layer for 3d meshes\\
+\vspace{3em}
+
+\noindent \textbf{Change \#269} with diff file ISSM-12606-12607.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/plot\_overlay.m\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#270} with diff file ISSM-12607-12608.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/android/android-sdk/install.sh M /issm/trunk-jpl/externalpackages/android/android\_variables.sh M /issm/trunk-jpl/externalpackages/gsl/install-android.sh\\
+Export determination: 6. \\
+Rationale: Changes to Android SDK and GSL install scripts.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#271} with diff file ISSM-12608-12609.diff: \\
+Function name: \\
+A /issm/trunk-jpl/configs/config-pleiades-petscdev.sh\\
+Export determination: 6. \\
+Rationale: Config script for PETSc-dev on Pleiades\\
+\vspace{3em}
+
+\noindent \textbf{Change \#272} with diff file ISSM-12609-12610.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/petsc/install-dev-pleiades.sh\\
+Export determination: 6. \\
+Rationale: PETSc dev install for Pleiades. Follow steps 1-3. Steps maybe a bit redundant but it works so far\\
+\vspace{3em}
+
+\noindent \textbf{Change \#273} with diff file ISSM-12610-12611.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/Makefile.am\\
+Export determination: 6. \\
+Rationale: updated library loads\\
+\vspace{3em}
+
+\noindent \textbf{Change \#274} with diff file ISSM-12611-12612.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/modules/matlab/Makefile.am\\
+Export determination: 6. \\
+Rationale: included missing libs for petsc-dev\\
+\vspace{3em}
+
+\noindent \textbf{Change \#275} with diff file ISSM-12612-12613.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/contourenvelope.m M /issm/trunk-jpl/src/m/model/modelextract.m\\
+Export determination: 6. \\
+Rationale: changes modelextract and contourenvelope for 3d meshes (problem when redoing BC after extraction)\\
+\vspace{3em}
+
+\noindent \textbf{Change \#276} with diff file ISSM-12613-12614.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/utils/Numerics/cfl\_step.m\\
+Export determination: 6. \\
+Rationale: minor cfl\_step use\\
+\vspace{3em}
+
+\noindent \textbf{Change \#277} with diff file ISSM-12615-12616.diff: \\
+Function name: \\
+D /issm/trunk-jpl/src/android/HelloWorldProject\\
+Export determination: 6. \\
+Rationale: Removing HelloWorldProject from repository as it is no longer useful.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#278} with diff file ISSM-12616-12617.diff: \\
+Function name: \\
+M /issm/trunk-jpl/startup.py\\
+Export determination: 6. \\
+Rationale: default cluster changed to none to generic\\
+\vspace{3em}
+
+\noindent \textbf{Change \#279} with diff file ISSM-12617-12618.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/utils/Exp/manipulation/cutarea.m\\
+Export determination: 6. \\
+Rationale: Fixed bug with closed\\
+\vspace{3em}
+
+\noindent \textbf{Change \#280} with diff file ISSM-12618-12619.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/regionaltransient2d.m\\
+Export determination: 6. \\
+Rationale: debug regional extract routine\\
+\vspace{3em}
+
+\noindent \textbf{Change \#281} with diff file ISSM-12619-12620.diff: \\
+Function name: \\
+D /issm/trunk-jpl/test/Archives/Archive268.mat A /issm/trunk-jpl/test/Archives/Archive270.mat (from /issm/trunk-jpl/test/Archives/Archive268.mat:12618) M /issm/trunk-jpl/test/NightlyRun/IdToName.m M /issm/trunk-jpl/test/NightlyRun/dak.m D /issm/trunk-jpl/test/NightlyRun/test268.m A /issm/trunk-jpl/test/NightlyRun/test270.m (from /issm/trunk-jpl/test/NightlyRun/test268.m:12618)\\
+Export determination: 6. \\
+Rationale: test268->test270\\
+\vspace{3em}
+
+\noindent \textbf{Change \#282} with diff file ISSM-12620-12621.diff: \\
+Function name: \\
+A /issm/trunk-jpl/test/Archives/Archive268.mat M /issm/trunk-jpl/test/Archives/Archive270.mat A /issm/trunk-jpl/test/Archives/Archive436.mat D /issm/trunk-jpl/test/NightlyRun/dak.m A /issm/trunk-jpl/test/NightlyRun/test268.m A /issm/trunk-jpl/test/NightlyRun/test436.m\\
+Export determination: 6. \\
+Rationale: restore removed dakota tests\\
+\vspace{3em}
+
+\noindent \textbf{Change \#283} with diff file ISSM-12621-12622.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/clusters/discover.m\\
+Export determination: 6. \\
+Rationale: update to check nodes\\
+\vspace{3em}
+
+\noindent \textbf{Change \#284} with diff file ISSM-12622-12623.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/petsc/install-3.2-discover.sh\\
+Export determination: 6. \\
+Rationale: link discover with impi\\
+\vspace{3em}
+
+\noindent \textbf{Change \#285} with diff file ISSM-12623-12624.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/dakota/install-discover.sh\\
+Export determination: 6. \\
+Rationale: link discover with impi\\
+\vspace{3em}
+
+\noindent \textbf{Change \#286} with diff file ISSM-12624-12625.diff: \\
+Function name: \\
+M /issm/trunk-jpl/m4/issm\_options.m4\\
+Export determination: 6. \\
+Rationale: add discover options for libs\\
+\vspace{3em}
+
+\noindent \textbf{Change \#287} with diff file ISSM-12625-12626.diff: \\
+Function name: \\
+M /issm/trunk-jpl/configs/config-discover.sh\\
+Export determination: 6. \\
+Rationale: update config\\
+\vspace{3em}
+
+\noindent \textbf{Change \#288} with diff file ISSM-12626-12627.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh\\
+Export determination: 6. \\
+Rationale: added scipy and numpy tests to install script to verify success of installation\\
+\vspace{3em}
+
+\noindent \textbf{Change \#289} with diff file ISSM-12627-12628.diff: \\
+Function name: \\
+M /issm/trunk-jpl/configs/config-discover.sh\\
+Export determination: 6. \\
+Rationale: include chaco\\
+\vspace{3em}
+
+\noindent \textbf{Change \#290} with diff file ISSM-12629-12630.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/python/install-linux64-astrid.sh\\
+Export determination: 6. \\
+Rationale: Fixed relative directories in install-linux64-astrid.sh.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#291} with diff file ISSM-12631-12632.diff: \\
+Function name: \\
+M /issm/trunk-jpl/test/NightlyRun/IdFromString.m A /issm/trunk-jpl/test/NightlyRun/IdFromString.py A /issm/trunk-jpl/test/NightlyRun/IdToName.py M /issm/trunk-jpl/test/NightlyRun/runme.m A /issm/trunk-jpl/test/NightlyRun/runme.py M /issm/trunk-jpl/test/NightlyRun/test102.py\\
+Export determination: 6. \\
+Rationale: Preliminary python versions of runme, IdToName, and IdFromString.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#292} with diff file ISSM-12632-12633.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/SectionValues.m\\
+Export determination: 6. \\
+Rationale: cosmetics\\
+\vspace{3em}
+
+\noindent \textbf{Change \#293} with diff file ISSM-12633-12634.diff: \\
+Function name: \\
+A /issm/trunk-jpl/externalpackages/android/doc A /issm/trunk-jpl/externalpackages/android/doc/Android.tex A /issm/trunk-jpl/externalpackages/android/doc/ISSMlogo.pdf A /issm/trunk-jpl/externalpackages/android/doc/Makefile A /issm/trunk-jpl/externalpackages/android/doc/android-hub.jpg A /issm/trunk-jpl/externalpackages/android/doc/build-simplified.png\\
+Export determination: 6. \\
+Rationale: Added Android documentation.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#294} with diff file ISSM-12634-12635.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/solutions/convergence.cpp\\
+Export determination: 6. \\
+Rationale: Fixed format\\
+\vspace{3em}
+
+\noindent \textbf{Change \#295} with diff file ISSM-12635-12636.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/solutions/transient\_core.cpp\\
+Export determination: 6. \\
+Rationale: string formating\\
+\vspace{3em}
+
+\noindent \textbf{Change \#296} with diff file ISSM-12636-12637.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp\\
+Export determination: 6. \\
+Rationale: Fixed default value (not initialized)\\
+\vspace{3em}
+
+\noindent \textbf{Change \#297} with diff file ISSM-12637-12638.diff: \\
+Function name: \\
+A /issm/trunk-jpl/src/m/utils/Cluster/parallelrange.py\\
+Export determination: 6. \\
+Rationale: Python version of parallelrange.py.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#298} with diff file ISSM-12638-12639.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/utils/Cluster/parallelrange.py\\
+Export determination: 6. \\
+Rationale: Remove print statements.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#299} with diff file ISSM-12639-12640.diff: \\
+Function name: \\
+M /issm/trunk-jpl/test/NightlyRun/runme.py\\
+Export determination: 6. \\
+Rationale: Working version of runme.py.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#300} with diff file ISSM-12642-12643.diff: \\
+Function name: \\
+M /issm/trunk-jpl/m4/issm\_options.m4\\
+Export determination: 6. \\
+Rationale: Fixed warnings in case VENDOR is undefined\\
+\vspace{3em}
+
+\noindent \textbf{Change \#301} with diff file ISSM-12644-12645.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp\\
+Export determination: 6. \\
+Rationale: added transient spc for enthalpy (need to be improved to use iomodelcreateconstraints)\\
+\vspace{3em}
+
+\noindent \textbf{Change \#302} with diff file ISSM-12645-12646.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/solvers/stokesoptions.m\\
+Export determination: 6. \\
+Rationale: Fixed minor error/typo\\
+\vspace{3em}
+
+\noindent \textbf{Change \#303} with diff file ISSM-12646-12647.diff: \\
+Function name: \\
+A /issm/trunk-jpl/externalpackages/hdf5 A /issm/trunk-jpl/externalpackages/hdf5/install.sh\\
+Export determination: 6. \\
+Rationale: hdf5 install directory\\
+\vspace{3em}
+
+\noindent \textbf{Change \#304} with diff file ISSM-12647-12648.diff: \\
+Function name: \\
+A /issm/trunk-jpl/test/Archives/Archive999.hdf5 A /issm/trunk-jpl/test/NightlyRun/test999.py\\
+Export determination: 6. \\
+Rationale: Added dummy test999.py and Archive999.hdf5 for runme.py.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#305} with diff file ISSM-12648-12649.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/organizer.m\\
+Export determination: 6. \\
+Rationale: can now save and load matlab objects that are not structures\\
+\vspace{3em}
+
+\noindent \textbf{Change \#306} with diff file ISSM-12649-12650.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/utils/Model/loadmodel.m\\
+Export determination: 6. \\
+Rationale: Fixed extension that might or might not be provided\\
+\vspace{3em}
+
+\noindent \textbf{Change \#307} with diff file ISSM-12650-12651.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/utils/Geometry/find\_point.m\\
+Export determination: 6. \\
+Rationale: return only the first occurence\\
+\vspace{3em}
+
+\noindent \textbf{Change \#308} with diff file ISSM-12651-12652.diff: \\
+Function name: \\
+A /issm/trunk-jpl/test/Archives/Archive999.nc M /issm/trunk-jpl/test/NightlyRun/runme.py\\
+Export determination: 6. \\
+Rationale: Conversion of runme.py from hdf5 to netcdf (along with other cosmetic changes).\\
+\vspace{3em}
+
+\noindent \textbf{Change \#309} with diff file ISSM-12652-12653.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/utils/Cluster/parallelrange.py M /issm/trunk-jpl/test/NightlyRun/IdFromString.py M /issm/trunk-jpl/test/NightlyRun/IdToName.py\\
+Export determination: 6. \\
+Rationale: Changes to python doc strings.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#310} with diff file ISSM-12653-12654.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/netcdf/install.sh\\
+Export determination: 6. \\
+Rationale: netcdf version 4.2. needs hdf5 and zlib in working order, as well as doxygen\\
+\vspace{3em}
+
+\noindent \textbf{Change \#311} with diff file ISSM-12654-12655.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp\\
+Export determination: 6. \\
+Rationale: Removed commented line and misleading comments\\
+\vspace{3em}
+
+\noindent \textbf{Change \#312} with diff file ISSM-12655-12656.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/solutions/issm.cpp\\
+Export determination: 6. \\
+Rationale: Added PETSc profiling. Timing is redundant with MPI timing...may remove at some point if 'extra' features from PETSc with this are not used.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#313} with diff file ISSM-12656-12657.diff: \\
+Function name: \\
+A /issm/trunk-jpl/externalpackages/netcdf-python A /issm/trunk-jpl/externalpackages/netcdf-python/install.sh\\
+Export determination: 6. \\
+Rationale: netcdf python bindings\\
+\vspace{3em}
+
+\noindent \textbf{Change \#314} with diff file ISSM-12657-12658.diff: \\
+Function name: \\
+M /issm/trunk-jpl/startup.py\\
+Export determination: 6. \\
+Rationale: skip .svn directories in os.walk call\\
+\vspace{3em}
+
+\noindent \textbf{Change \#315} with diff file ISSM-12658-12659.diff: \\
+Function name: \\
+M /issm/trunk-jpl/test/NightlyRun/runme.py\\
+Export determination: 6. \\
+Rationale: Modified runme.py to read PYTHONSTARTUP if executed outside of python.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#316} with diff file ISSM-12660-12661.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/pairoptions.py M /issm/trunk-jpl/src/m/model/WriteData.m A /issm/trunk-jpl/src/m/model/WriteData.py\\
+Export determination: 6. \\
+Rationale: Python versions of WriteData and pairoptions.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#317} with diff file ISSM-12661-12662.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/pairoptions.py\\
+Export determination: 6. \\
+Rationale: Get a little fancy.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#318} with diff file ISSM-12662-12663.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/utils/DataProcessing/pkriging.m M /issm/trunk-jpl/src/m/utils/consistency/checkfield.m D /issm/trunk-jpl/src/m/utils/consistency/checkmessage.m D /issm/trunk-jpl/src/m/utils/consistency/modelconsistency.m\\
+Export determination: 6. \\
+Rationale: ismodelselfconsistant now uses a model field instead of a persistent variable\\
+\vspace{3em}
+
+\noindent \textbf{Change \#319} with diff file ISSM-12663-12664.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/classes/autodiff.m M /issm/trunk-jpl/src/m/classes/balancethickness.m M /issm/trunk-jpl/src/m/classes/basalforcings.m M /issm/trunk-jpl/src/m/classes/clusters/acenet.m M /issm/trunk-jpl/src/m/classes/clusters/castor.m M /issm/trunk-jpl/src/m/classes/clusters/cosmos.m M /issm/trunk-jpl/src/m/classes/clusters/discover.m M /issm/trunk-jpl/src/m/classes/clusters/gemini.m M /issm/trunk-jpl/src/m/classes/clusters/generic.m M /issm/trunk-jpl/src/m/classes/clusters/greenplanet.m M /issm/trunk-jpl/src/m/classes/clusters/pfe.m M /issm/trunk-jpl/src/m/classes/clusters/pollux.m M /issm/trunk-jpl/src/m/classes/constants.m M /issm/trunk-jpl/src/m/classes/diagnostic.m M /issm/trunk-jpl/src/m/classes/flaim.m M /issm/trunk-jpl/src/m/classes/flowequation.m M /issm/trunk-jpl/src/m/classes/friction.m M /issm/trunk-jpl/src/m/classes/geometry.m M /issm/trunk-jpl/src/m/classes/groundingline.m M /issm/trunk-jpl/src/m/classes/hydrology.m M /issm/trunk-jpl/src/m/classes/initialization.m M /issm/trunk-jpl/src/m/classes/inversion.m M /issm/trunk-jpl/src/m/classes/mask.m M /issm/trunk-jpl/src/m/classes/materials.m M /issm/trunk-jpl/src/m/classes/mesh.m M /issm/trunk-jpl/src/m/classes/miscellaneous.m M /issm/trunk-jpl/src/m/classes/model/model.m M /issm/trunk-jpl/src/m/classes/private.m M /issm/trunk-jpl/src/m/classes/prognostic.m M /issm/trunk-jpl/src/m/classes/qmu.m M /issm/trunk-jpl/src/m/classes/rifts.m M /issm/trunk-jpl/src/m/classes/settings.m M /issm/trunk-jpl/src/m/classes/solver.m M /issm/trunk-jpl/src/m/classes/steadystate.m M /issm/trunk-jpl/src/m/classes/surfaceforcings.m M /issm/trunk-jpl/src/m/classes/thermal.m M /issm/trunk-jpl/src/m/classes/timestepping.m M /issm/trunk-jpl/src/m/classes/transient.m M /issm/trunk-jpl/src/m/classes/verbose.m\\
+Export determination: 6. \\
+Rationale: ismodelselfconsistant now uses a model field instead of a persistent variable\\
+\vspace{3em}
+
+\noindent \textbf{Change \#320} with diff file ISSM-12664-12665.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/ismodelselfconsistent.m\\
+Export determination: 6. \\
+Rationale: ismodelselfconsistant now uses a model field instead of a persistent variable\\
+\vspace{3em}
+
+\noindent \textbf{Change \#321} with diff file ISSM-12665-12666.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/plot/plot\_overlay.m\\
+Export determination: 6. \\
+Rationale: minor for radaronly\\
+\vspace{3em}
+
+\noindent \textbf{Change \#322} with diff file ISSM-12666-12667.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/marshall.m\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#323} with diff file ISSM-12667-12668.diff: \\
+Function name: \\
+A /issm/trunk-jpl/src/m/model/marshall.py\\
+Export determination: 6. \\
+Rationale: Preliminary python version of marshall.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#324} with diff file ISSM-12668-12669.diff: \\
+Function name: \\
+A /issm/trunk-jpl/externalpackages/h5py A /issm/trunk-jpl/externalpackages/h5py/install.sh\\
+Export determination: 6. \\
+Rationale: h5py package\\
+\vspace{3em}
+
+\noindent \textbf{Change \#325} with diff file ISSM-12669-12670.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh\\
+Export determination: 6. \\
+Rationale: Modified Synchronize.sh to write python enum files.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#326} with diff file ISSM-12670-12671.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh\\
+Export determination: 6. \\
+Rationale: Modified Synchronize.sh to combine all enums for python into EnumDefinitions.py.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#327} with diff file ISSM-12671-12672.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh\\
+Export determination: 6. \\
+Rationale: closing folds\\
+\vspace{3em}
+
+\noindent \textbf{Change \#328} with diff file ISSM-12672-12673.diff: \\
+Function name: \\
+M /issm/trunk-jpl/externalpackages/vim/addons/vim/syntax/Synchronize.sh M /issm/trunk-jpl/externalpackages/vim/addons/vim/syntax/c.vim\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#329} with diff file ISSM-12673-12674.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/solve.m\\
+Export determination: 6. \\
+Rationale: update flaim consistency checking\\
+\vspace{3em}
+
+\noindent \textbf{Change \#330} with diff file ISSM-12674-12675.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/utils/consistency/checkfield.m\\
+Export determination: 6. \\
+Rationale: minor\\
+\vspace{3em}
+
+\noindent \textbf{Change \#331} with diff file ISSM-12675-12676.diff: \\
+Function name: \\
+A /issm/trunk-jpl/src/m/model/MatlabFuncs.py M /issm/trunk-jpl/src/m/model/WriteData.py\\
+Export determination: 6. \\
+Rationale: Separated python versions of various matlab functions into separate file.\\
+\vspace{3em}
+
+\noindent \textbf{Change \#332} with diff file ISSM-12676-12677.diff: \\
+Function name: \\
+M /issm/trunk-jpl/src/m/model/WriteData.py A /issm/trunk-jpl/src/m/model/process\_solve\_options.py A /issm/trunk-jpl/src/m/model/waitonlock.py\\
+Export determination: 6. \\
+Rationale: Preliminary python versions of process\_solve\_options and waitonlock (in preparation for solve).\\
+\vspace{3em}
+
Index: /issm/oecreview/Archive/12321-12677/r1.tex
===================================================================
--- /issm/oecreview/Archive/12321-12677/r1.tex	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/r1.tex	(revision 12679)
@@ -0,0 +1,1 @@
+12321
Index: /issm/oecreview/Archive/12321-12677/r2.tex
===================================================================
--- /issm/oecreview/Archive/12321-12677/r2.tex	(revision 12679)
+++ /issm/oecreview/Archive/12321-12677/r2.tex	(revision 12679)
@@ -0,0 +1,1 @@
+12677
