Index: issm/trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.cpp	(revision 12470)
@@ -10,5 +10,5 @@
 #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;
Index: issm/trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.h
===================================================================
--- issm/trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/CreateJacobianMatrixx/CreateJacobianMatrixx.h	(revision 12470)
@@ -10,5 +10,5 @@
 
 /* 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: issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12470)
@@ -467,5 +467,5 @@
 	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*/
Index: issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 12470)
@@ -41,8 +41,8 @@
 }
 
-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: */
Index: issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.h
===================================================================
--- issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.h	(revision 12470)
@@ -10,5 +10,5 @@
 /* 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: issm/trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.cpp	(revision 12470)
@@ -9,5 +9,5 @@
 #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/trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.h
===================================================================
--- issm/trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/InputArtificialNoisex/InputArtificialNoisex.h	(revision 12470)
@@ -10,5 +10,5 @@
 
 /* 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: issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12470)
@@ -9,5 +9,5 @@
 #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:*/
@@ -16,9 +16,9 @@
 	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: */
@@ -37,5 +37,5 @@
 
 	/*Free ressources:*/
-	xDelete<double>(eps);
+	xDelete<IssmDouble>(eps);
 
 	/*return: */
Index: issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.h
===================================================================
--- issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.h	(revision 12470)
@@ -8,5 +8,5 @@
 
 /* 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: issm/trunk-jpl/src/c/modules/InputScalex/InputScalex.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/InputScalex/InputScalex.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/InputScalex/InputScalex.cpp	(revision 12470)
@@ -9,5 +9,5 @@
 #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:*/
Index: issm/trunk-jpl/src/c/modules/InputScalex/InputScalex.h
===================================================================
--- issm/trunk-jpl/src/c/modules/InputScalex/InputScalex.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/InputScalex/InputScalex.h	(revision 12470)
@@ -9,5 +9,5 @@
 
 /* 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: issm/trunk-jpl/src/c/modules/InputToResultx/InputToResultx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/InputToResultx/InputToResultx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/InputToResultx/InputToResultx.cpp	(revision 12470)
@@ -13,5 +13,5 @@
 	/*intermediary:*/
 	int      step;
-	double   time;
+	IssmDouble   time;
 	Element *element = NULL;
 
Index: issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp	(revision 12470)
@@ -49,5 +49,5 @@
 	}
 }
-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: issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.h
===================================================================
--- issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.h	(revision 12470)
@@ -12,5 +12,5 @@
 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: issm/trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.cpp	(revision 12470)
@@ -11,5 +11,5 @@
 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: */
@@ -20,9 +20,9 @@
 
 	/*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*/
Index: issm/trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.h
===================================================================
--- issm/trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/InputUpdateFromSolutionx/InputUpdateFromSolutionx.h	(revision 12470)
@@ -11,9 +11,9 @@
 /* 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: issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp	(revision 12470)
@@ -11,5 +11,5 @@
 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();
@@ -18,9 +18,9 @@
 
 	/*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: issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.h
===================================================================
--- issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.h	(revision 12470)
@@ -11,5 +11,5 @@
 /* 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: issm/trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 12470)
@@ -22,6 +22,6 @@
 	int     counter;
 	int     nods;
-	double* times=NULL;
-	double* values=NULL;
+	IssmDouble* times=NULL;
+	IssmDouble* values=NULL;
 	bool    spcpresent=false;
 	int     count=0;
@@ -29,5 +29,5 @@
 
 	/*variables being fetched: */
-	double *doublevector  = NULL;
+	IssmDouble *IssmDoublevector  = NULL;
 	int     M,N;
 
@@ -38,9 +38,9 @@
 	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?:*/
@@ -55,7 +55,7 @@
 			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++;
 				}
@@ -69,7 +69,7 @@
 
 		/*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: */
@@ -83,8 +83,8 @@
 
 				/*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
 				}
@@ -94,5 +94,5 @@
 					count++;
 				}
-				xDelete<double>(values);
+				xDelete<IssmDouble>(values);
 			}
 		}
@@ -103,6 +103,6 @@
 
 	/*Free ressources:*/
-	xDelete<double>(doublevector);
-	xDelete<double>(times);
-	xDelete<double>(values);
+	xDelete<IssmDouble>(IssmDoublevector);
+	xDelete<IssmDouble>(times);
+	xDelete<IssmDouble>(values);
 }
Index: issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 12470)
@@ -9,6 +9,6 @@
 #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;
Index: issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.h
===================================================================
--- issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.h	(revision 12470)
@@ -6,7 +6,9 @@
 #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: issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 12470)
@@ -23,5 +23,5 @@
 	int    numberofelements;
 	int    numberofvertices;
-	double* elements=NULL;
+	IssmDouble* elements=NULL;
 
 	/*output*/
Index: issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp	(revision 12470)
@@ -24,5 +24,5 @@
 	int         numoutputs;
 	Parameters *parameters       = NULL;
-	double     *requestedoutputs = NULL;
+	IssmDouble     *requestedoutputs = NULL;
 	
 	if(*pparameters)return; //do not create parameters twice!
@@ -105,13 +105,13 @@
 	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: */
Index: issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateSingleNodeToElementConnectivity.cpp	(revision 12470)
@@ -23,5 +23,5 @@
 	int    numberofelements;
 	int    numberofvertices;
-	double* elements=NULL;
+	IssmDouble* elements=NULL;
 
 	/*output*/
Index: issm/trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp	(revision 12470)
@@ -7,5 +7,5 @@
 #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,
Index: issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 12470)
@@ -42,8 +42,8 @@
 	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: */
@@ -76,6 +76,6 @@
 
 	/*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: */
@@ -87,5 +87,5 @@
 			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); 
 	}
 
@@ -119,5 +119,5 @@
 	}//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:
@@ -130,5 +130,5 @@
 		}
 	}
-	xDelete<double>(vertex_pairing);
+	xDelete<IssmDouble>(vertex_pairing);
 	iomodel->FetchData(&vertex_pairing,&numvertex_pairing,NULL,PrognosticVertexPairingEnum);
 	for(i=0;i<numvertex_pairing;i++){
@@ -137,5 +137,5 @@
 		}
 	}
-	xDelete<double>(vertex_pairing);
+	xDelete<IssmDouble>(vertex_pairing);
 
 	/*Free ressources:*/
Index: issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h
===================================================================
--- issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h	(revision 12470)
@@ -108,5 +108,5 @@
 
 /*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: issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp	(revision 12470)
@@ -71,9 +71,9 @@
 	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: */
@@ -158,6 +158,6 @@
 
 	/*Free data: */
-	xDelete<double>(elements);
-	xDelete<double>(edges);
+	xDelete<IssmDouble>(elements);
+	xDelete<IssmDouble>(edges);
 
 	/*Assign output pointers:*/
Index: issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp	(revision 12470)
@@ -61,6 +61,6 @@
 
 	/*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);
@@ -90,6 +90,6 @@
 
 	/*free ressources: */
-	xDelete<double>(vertex_pairing);
-	xDelete<double>(nodeonbed);
+	xDelete<IssmDouble>(vertex_pairing);
+	xDelete<IssmDouble>(nodeonbed);
 
 	/*Assign output pointer: */
Index: issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp	(revision 12470)
@@ -10,5 +10,5 @@
 #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;
@@ -16,5 +16,5 @@
 	int index;
 	Element* element=NULL;
-	double value;
+	IssmDouble value;
 	int found;
 	int sumfound;
Index: issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.h
===================================================================
--- issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.h	(revision 12470)
@@ -10,5 +10,5 @@
 
 /* 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: issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12470)
@@ -27,5 +27,5 @@
 
 	/*intermediary: */
-	double* analyses=NULL;
+	IssmPDouble* analyses=NULL;
 	char** strings=NULL;
 	int numanalyses;
@@ -48,5 +48,5 @@
 
 		/*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; 
@@ -71,5 +71,5 @@
 				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;
@@ -78,9 +78,9 @@
 					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," ");
@@ -98,5 +98,5 @@
 	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);
 	}
@@ -124,5 +124,5 @@
 	for(i=0;i<numanalyses;i++) xDelete<char>(strings[i]);
 	xDelete<char*>(strings);
-	xDelete<double>(analyses);
+	xDelete<IssmPDouble>(analyses);
 	return;
 }
Index: issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12470)
@@ -23,23 +23,23 @@
 
   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)
@@ -106,6 +106,6 @@
   }
   /*free ressouces: */
-  xDelete<double>(pdds);
-  xDelete<double>(pds);
+  xDelete<IssmDouble>(pdds);
+  xDelete<IssmDouble>(pds);
   
 }
Index: issm/trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp	(revision 12470)
@@ -15,5 +15,5 @@
 	int configuration_type;
 	int fsize;
-	double* ug_serial=NULL;
+	IssmDouble* ug_serial=NULL;
 
 	/*first figure out fsize: */
@@ -51,5 +51,5 @@
 
 	/*Free ressources:*/
-	xDelete<double>(ug_serial);
+	xDelete<IssmDouble>(ug_serial);
 
 	/*Assign output pointers:*/
Index: issm/trunk-jpl/src/c/modules/RequestedOutputsx/RequestedOutputsx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/RequestedOutputsx/RequestedOutputsx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/RequestedOutputsx/RequestedOutputsx.cpp	(revision 12470)
@@ -13,6 +13,6 @@
 	int      output_enum;
 	int      step;
-	double   time;
-	double   output_value;
+	IssmDouble   time;
+	IssmDouble   output_value;
 	Element *element      = NULL;
 
Index: issm/trunk-jpl/src/c/modules/Responsex/Responsex.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/Responsex/Responsex.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/Responsex/Responsex.cpp	(revision 12470)
@@ -16,5 +16,5 @@
 #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: issm/trunk-jpl/src/c/modules/Responsex/Responsex.h
===================================================================
--- issm/trunk-jpl/src/c/modules/Responsex/Responsex.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/Responsex/Responsex.h	(revision 12470)
@@ -9,5 +9,5 @@
 #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: issm/trunk-jpl/src/c/modules/Solverx/DofTypesToIndexSet.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/Solverx/DofTypesToIndexSet.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/Solverx/DofTypesToIndexSet.cpp	(revision 12470)
@@ -20,5 +20,5 @@
 
 	int         start,end;
-	double*     df_local=NULL;
+	IssmDouble*     df_local=NULL;
 	int         df_local_size;
 	int         i;
Index: issm/trunk-jpl/src/c/modules/Solverx/Solverx.h
===================================================================
--- issm/trunk-jpl/src/c/modules/Solverx/Solverx.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/Solverx/Solverx.h	(revision 12470)
@@ -24,5 +24,5 @@
 #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
 
Index: issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp	(revision 12470)
@@ -21,5 +21,5 @@
 	int M,N,N2,s;
 	SeqVec *uf = NULL;
-	double *x  = NULL;
+	IssmDouble *x  = NULL;
 
 	Kff->GetSize(&M,&N);
@@ -35,5 +35,5 @@
 	*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: */
@@ -45,6 +45,6 @@
 
 	/*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: */
@@ -62,9 +62,9 @@
 
 	/*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);
Index: issm/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.cpp	(revision 12470)
@@ -11,5 +11,5 @@
 #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*/
@@ -18,6 +18,6 @@
 
 	/*output: */
-	double S=0;
-	double S_sum;
+	IssmDouble S=0;
+	IssmDouble S_sum;
 	
 	/*Compute gradients: */
Index: issm/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.h
===================================================================
--- issm/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.h	(revision 12470)
@@ -10,5 +10,5 @@
 
 /* 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: issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.cpp	(revision 12470)
@@ -10,5 +10,5 @@
 #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: */
@@ -25,5 +25,5 @@
 	Vector*    pf   = NULL;
 	Vector*    df=NULL;
-	double kmax = 0;
+	IssmDouble kmax = 0;
 
 	/*Display message*/
Index: issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.h
===================================================================
--- issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/SystemMatricesx/SystemMatricesx.h	(revision 12470)
@@ -10,5 +10,5 @@
 
 /* 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);
 
Index: issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp	(revision 12470)
@@ -10,15 +10,15 @@
 #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): */
Index: issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.h
===================================================================
--- issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.h	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.h	(revision 12470)
@@ -9,5 +9,5 @@
 
 /* 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: issm/trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/UpdateConstraintsx/UpdateConstraintsx.cpp	(revision 12470)
@@ -14,5 +14,5 @@
 void UpdateConstraintsx(Nodes* nodes,Constraints* constraints,Parameters* parameters){
 
-	double time;
+	IssmDouble time;
 	int    analysis_type;
 
Index: issm/trunk-jpl/src/c/modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.cpp	(revision 12470)
@@ -13,5 +13,5 @@
 	
 	int configuration_type;
-	double* yg_serial=NULL;
+	IssmDouble* yg_serial=NULL;
 
 	/*Get current configuration*/
@@ -34,4 +34,4 @@
 
 	/*Free ressources:*/
-	xDelete<double>(yg_serial);
+	xDelete<IssmDouble>(yg_serial);
 }
Index: issm/trunk-jpl/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/UpdateVertexPositionsx/UpdateVertexPositionsx.cpp	(revision 12470)
@@ -15,6 +15,6 @@
 	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: */
@@ -38,6 +38,6 @@
 
 	/*Free ressources:*/
-	xDelete<double>(thickness);
-	xDelete<double>(bed);
+	xDelete<IssmDouble>(thickness);
+	xDelete<IssmDouble>(bed);
 	xdelete(&vz);
 	return 1;
Index: issm/trunk-jpl/src/c/modules/VecMergex/VecMergex.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/VecMergex/VecMergex.cpp	(revision 12468)
+++ issm/trunk-jpl/src/c/modules/VecMergex/VecMergex.cpp	(revision 12470)
@@ -15,5 +15,5 @@
 	int i;
 	int configuration_type;
-	double* uf_serial=NULL;
+	IssmDouble* uf_serial=NULL;
 
 	/*retrieve parameters: */
@@ -41,5 +41,5 @@
 	}
 	/*Free ressources:*/
-	xDelete<double>(uf_serial);
+	xDelete<IssmDouble>(uf_serial);
 
 	/*Assemble vector: */
