Index: /issm/trunk-jpl/src/c/objects/Params/BoolParam.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12474)
@@ -46,10 +46,10 @@
 		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));}
@@ -58,9 +58,9 @@
 		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));}
@@ -68,5 +68,5 @@
 		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);
 		
Index: /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12474)
@@ -26,9 +26,9 @@
 }
 /*}}}*/
-/*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;
 
@@ -36,5 +36,5 @@
 	M=in_M;
 	if(M){
-		array=xNew<double*>(M);
+		array=xNew<IssmDouble*>(M);
 		mdim_array=xNew<int>(M);
 		ndim_array=xNew<int>(M);
@@ -48,6 +48,6 @@
 
 			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{
@@ -68,5 +68,5 @@
 
 	int i;
-	double* matrix=NULL;
+	IssmDouble* matrix=NULL;
 
 	xDelete<int>(mdim_array);
@@ -75,8 +75,8 @@
 	for(i=0;i<M;i++){
 		matrix=array[i];
-		xDelete<double>(matrix);
-	}
-	
-	xDelete<double*>(array);
+		xDelete<IssmDouble>(matrix);
+	}
+	
+	xDelete<IssmDouble*>(array);
 	return;
 }
@@ -99,5 +99,5 @@
 	int i,j,k;
 	int m,n;
-	double* matrix=NULL;
+	IssmDouble* matrix=NULL;
 	
 	printf("DoubleMatArrayParam:\n");
@@ -143,13 +143,13 @@
 
 /*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;
@@ -159,10 +159,10 @@
 	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++){
@@ -172,6 +172,6 @@
 
 			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{
@@ -201,10 +201,10 @@
 }
 /*}}}*/
-/*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: */
@@ -213,16 +213,16 @@
 	for(i=0;i<M;i++){
 		matrix=array[i];
-		xDelete<double>(matrix);
-	}
-	xDelete<double*>(array);
+		xDelete<IssmDouble>(matrix);
+	}
+	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++){
@@ -231,6 +231,6 @@
 		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;
@@ -243,5 +243,5 @@
 	/*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];
Index: /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h	(revision 12474)
@@ -24,5 +24,5 @@
 	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
@@ -32,5 +32,5 @@
 		/*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();
 		/*}}}*/
@@ -49,10 +49,10 @@
 		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));}
@@ -61,9 +61,9 @@
 		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));}
@@ -71,5 +71,5 @@
 		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);
 
Index: /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12474)
@@ -27,5 +27,5 @@
 /*}}}*/
 /*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;
@@ -33,11 +33,11 @@
 	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;
 }
@@ -94,15 +94,15 @@
 
 /*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;
 }
 /*}}}*/
@@ -118,11 +118,11 @@
 /*}}}*/
 /*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;
@@ -138,5 +138,5 @@
 /*diverse: */
 /*FUNCTION DoubleMatParam::GetPointer{{{*/
-double* DoubleMatParam::GetPointer(void){
+IssmDouble* DoubleMatParam::GetPointer(void){
 	return this->value;
 }
Index: /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.h	(revision 12474)
@@ -24,5 +24,5 @@
 	protected: 
 		int enum_type;
-		double* value;
+		IssmDouble* value;
 		int M;
 		int N;
@@ -48,10 +48,10 @@
 		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));}
@@ -60,9 +60,9 @@
 		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));};
@@ -70,7 +70,7 @@
 		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: /issm/trunk-jpl/src/c/objects/Params/DoubleParam.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12474)
@@ -100,12 +100,12 @@
 }
 /*}}}*/
-/*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));
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/objects/Params/DoubleParam.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/DoubleParam.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/DoubleParam.h	(revision 12474)
@@ -47,21 +47,21 @@
 		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));}
@@ -69,5 +69,5 @@
 		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);
 
Index: /issm/trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.cpp	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.cpp	(revision 12474)
@@ -21,5 +21,5 @@
 
 /*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: /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12474)
@@ -27,16 +27,16 @@
 /*}}}*/
 /*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;
 }
@@ -91,21 +91,21 @@
 
 /*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;
@@ -113,11 +113,11 @@
 	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;
 }
 /*}}}*/
@@ -133,11 +133,11 @@
 /*}}}*/
 /*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: /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.h	(revision 12474)
@@ -47,10 +47,10 @@
 		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));}
@@ -59,9 +59,9 @@
 		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));}
@@ -69,5 +69,5 @@
 		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);
 		
Index: /issm/trunk-jpl/src/c/objects/Params/FileParam.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/FileParam.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/FileParam.h	(revision 12474)
@@ -43,13 +43,13 @@
 		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));}
@@ -58,9 +58,9 @@
 		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));}
@@ -68,5 +68,5 @@
 		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);
 
Index: /issm/trunk-jpl/src/c/objects/Params/IntMatParam.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12474)
@@ -34,5 +34,5 @@
 
 	value=xNew<int>(M*N);
-	memcpy(value,in_value,M*N*sizeof(int));
+	xMemCpy<int>(value,in_value,M*N);
 }
 /*}}}*/
@@ -99,5 +99,5 @@
 
 	output=xNew<int>(M*N);
-	memcpy(output,value,M*N*sizeof(int));
+	xMemCpy<int>(output,value,M*N);
 
 	/*Assign output pointers:*/
@@ -119,5 +119,5 @@
 
 	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;
Index: /issm/trunk-jpl/src/c/objects/Params/IntMatParam.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/IntMatParam.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/IntMatParam.h	(revision 12474)
@@ -48,10 +48,10 @@
 		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));}
@@ -60,9 +60,9 @@
 		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);
@@ -70,5 +70,5 @@
 		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);
 
Index: /issm/trunk-jpl/src/c/objects/Params/IntParam.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12474)
@@ -47,10 +47,10 @@
 		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));}
@@ -61,13 +61,13 @@
 		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);
 
Index: /issm/trunk-jpl/src/c/objects/Params/IntVecParam.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12474)
@@ -34,11 +34,11 @@
 	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;
@@ -113,5 +113,5 @@
 	if(M){
 		output=xNew<int>(M);
-		memcpy(output,values,M*sizeof(int));
+		xMemCpy<int>(output,values,M);
 	}
 
@@ -134,5 +134,5 @@
 	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: /issm/trunk-jpl/src/c/objects/Params/IntVecParam.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/IntVecParam.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/IntVecParam.h	(revision 12474)
@@ -31,5 +31,5 @@
 		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();
 		/*}}}*/
@@ -48,10 +48,10 @@
 		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));}
@@ -60,9 +60,9 @@
 		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));}
@@ -70,5 +70,5 @@
 		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);
 		
Index: /issm/trunk-jpl/src/c/objects/Params/MatrixParam.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/MatrixParam.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/MatrixParam.h	(revision 12474)
@@ -47,10 +47,10 @@
 		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);
@@ -59,9 +59,9 @@
 		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));}
@@ -69,5 +69,5 @@
 		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);
 
Index: /issm/trunk-jpl/src/c/objects/Params/Param.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/Param.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/Param.h	(revision 12474)
@@ -31,10 +31,10 @@
 		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;
@@ -43,9 +43,9 @@
 		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;
@@ -53,5 +53,5 @@
 		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: /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12474)
@@ -41,5 +41,5 @@
 			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;
 		}
@@ -127,5 +127,5 @@
 
 			string2=xNew<char>(stringsize);
-			memcpy(string2,string,stringsize*sizeof(char));
+			xMemCpy<char>(string2,string,stringsize);
 
 			outstrings[i]=string2;
@@ -167,5 +167,5 @@
 
 		string2=xNew<char>(stringsize);
-		memcpy(string2,string,stringsize*sizeof(char));
+		xMemCpy<char>(string2,string,stringsize);
 
 		this->value[i]=string2;
Index: /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.h	(revision 12474)
@@ -49,10 +49,10 @@
 		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));}
@@ -61,9 +61,9 @@
 		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));}
@@ -71,5 +71,5 @@
 		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);
 
Index: /issm/trunk-jpl/src/c/objects/Params/StringParam.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12474)
@@ -31,5 +31,5 @@
 	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));
 
 	
@@ -89,5 +89,5 @@
 
 	outstring=xNew<char>(stringsize);
-	memcpy(outstring,this->value,stringsize*sizeof(char));
+	xMemCpy<char>(outstring,this->value,stringsize);
 
 	*pstring=outstring;
@@ -111,5 +111,5 @@
 	stringsize=strlen(string)+1;
 	this->value=xNew<char>(stringsize);
-	memcpy(this->value,string,stringsize*sizeof(char));
+	xMemCpy<char>(this->value,string,stringsize);
 
 }
Index: /issm/trunk-jpl/src/c/objects/Params/StringParam.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/StringParam.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/StringParam.h	(revision 12474)
@@ -47,10 +47,10 @@
 		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));}
@@ -59,9 +59,9 @@
 		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));}
@@ -69,5 +69,5 @@
 		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);
 
Index: /issm/trunk-jpl/src/c/objects/Params/VectorParam.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Params/VectorParam.h	(revision 12473)
+++ /issm/trunk-jpl/src/c/objects/Params/VectorParam.h	(revision 12474)
@@ -47,10 +47,10 @@
 		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);
@@ -59,9 +59,9 @@
 		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));}
@@ -69,5 +69,5 @@
 		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);
 
