Index: /issm/trunk-jpl/src/c/objects/IoModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/IoModel.cpp	(revision 12415)
+++ /issm/trunk-jpl/src/c/objects/IoModel.cpp	(revision 12416)
@@ -50,8 +50,8 @@
 	/*Initialize and read constants:*/
 	this->constants=new Parameters();
-	this->FetchConstants(); /*this routine goes through the input file, and fetches bools, ints, doubles and strings only, nothing memory intensive*/
+	this->FetchConstants(); /*this routine goes through the input file, and fetches bools, ints, IssmPDoubles and strings only, nothing memory intensive*/
 
 	/*Initialize data: */
-	this->data=(double**)xmalloc(MaximumNumberOfEnums*sizeof(double*));
+	this->data=(IssmPDouble**)xmalloc(MaximumNumberOfEnums*sizeof(IssmPDouble*));
 	for(int i=0;i<MaximumNumberOfEnums;i++) this->data[i]=NULL;
 	
@@ -152,6 +152,6 @@
 }
 /*}}}*/
-/*FUNCTION IoModel::Constant(double* poutput,int constant_enum){{{*/
-void IoModel::Constant(double* poutput,int constant_enum){
+/*FUNCTION IoModel::Constant(IssmPDouble* poutput,int constant_enum){{{*/
+void IoModel::Constant(IssmPDouble* poutput,int constant_enum){
 
 	_assert_(constant_enum>=0);
@@ -183,5 +183,5 @@
 /*}}}*/
 /*FUNCTION IoModel::Data{{{*/
-double* IoModel::Data(int data_enum){
+IssmPDouble* IoModel::Data(int data_enum){
 
 	_assert_(data_enum<MaximumNumberOfEnums);
@@ -223,5 +223,5 @@
 	int  booleanint=0;
 	int  integer=0;
-	double scalar=0;
+	IssmPDouble scalar=0;
 	char* string=NULL;
 	int   string_size;
@@ -237,5 +237,5 @@
 		fseek(this->fid,0,SEEK_SET);
 
-		/*Now march through file looking for the correct data identifiers (bool,int,double or string): */
+		/*Now march through file looking for the correct data identifiers (bool,int,IssmPDouble or string): */
 		for(;;){
 			if(fread(&record_enum,sizeof(int),1,this->fid)==0){
@@ -288,5 +288,5 @@
 					case 3:
 						/*Read the scalar and broadcast it to other cpus:*/
-						if(fread(&scalar,sizeof(double),1,this->fid)!=1) _error_(" could not read scalar ");
+						if(fread(&scalar,sizeof(IssmPDouble),1,this->fid)!=1) _error_(" could not read scalar ");
 						#ifdef _HAVE_MPI_
 						MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
@@ -499,6 +499,6 @@
 }
 /*}}}*/
-/*FUNCTION IoModel::FetchData(double*   pscalar,int data_enum){{{*/
-void  IoModel::FetchData(double* pscalar,int data_enum){
+/*FUNCTION IoModel::FetchData(IssmPDouble*   pscalar,int data_enum){{{*/
+void  IoModel::FetchData(IssmPDouble* pscalar,int data_enum){
 
 
@@ -508,5 +508,5 @@
 
 	/*output: */
-	double   scalar;
+	IssmPDouble   scalar;
 	int      code;
 	
@@ -514,9 +514,9 @@
 	fid=this->SetFilePointerToData(&code,NULL,data_enum);
 	
-	if(code!=3)_error_("expecting a double for enum %s",EnumToStringx(data_enum));
+	if(code!=3)_error_("expecting a IssmPDouble for enum %s",EnumToStringx(data_enum));
 	
 	/*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */
 	if(my_rank==0){
-		if(fread(&scalar,sizeof(double),1,fid)!=1)_error_(" could not read scalar ");
+		if(fread(&scalar,sizeof(IssmPDouble),1,fid)!=1)_error_(" could not read scalar ");
 	}
 	#ifdef _HAVE_MPI_
@@ -589,5 +589,5 @@
 	/*output: */
 	int M,N;
-	double* matrix=NULL;
+	IssmPDouble* matrix=NULL;
 	int*    integer_matrix=NULL;
 	int code=0;
@@ -598,5 +598,5 @@
 	fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
 
-	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a double, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
+	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmPDouble, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
 	
 	/*Now fetch: */
@@ -621,9 +621,9 @@
 	/*Now allocate matrix: */
 	if(M*N){
-		matrix=(double*)xmalloc(M*N*sizeof(double));
+		matrix=(IssmPDouble*)xmalloc(M*N*sizeof(IssmPDouble));
 
 		/*Read matrix on node 0, then broadcast: */
 		if(my_rank==0){  
-			if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+			if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
 		}
 		
@@ -655,6 +655,6 @@
 }
 /*}}}*/
-/*FUNCTION IoModel::FetchData(double**  pdoublematrix,int* pM,int* pN,int data_enum){{{*/
-void  IoModel::FetchData(double** pmatrix,int* pM,int* pN,int data_enum){
+/*FUNCTION IoModel::FetchData(IssmPDouble**  pIssmPDoublematrix,int* pM,int* pN,int data_enum){{{*/
+void  IoModel::FetchData(IssmPDouble** pmatrix,int* pM,int* pN,int data_enum){
 
 	extern int my_rank;
@@ -663,5 +663,5 @@
 	/*output: */
 	int M,N;
-	double* matrix=NULL;
+	IssmPDouble* matrix=NULL;
 	int code=0;
 	int vector_type=0;
@@ -669,5 +669,5 @@
 	/*Set file pointer to beginning of the data: */
 	fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
-	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a double, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
+	if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmPDouble, integer or boolean matrix for enum %s",EnumToStringx(data_enum));
 	
 	/*Now fetch: */
@@ -691,9 +691,9 @@
 	/*Now allocate matrix: */
 	if(M*N){
-		matrix=(double*)xmalloc(M*N*sizeof(double));
+		matrix=(IssmPDouble*)xmalloc(M*N*sizeof(IssmPDouble));
 
 		/*Read matrix on node 0, then broadcast: */
 		if(my_rank==0){  
-			if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+			if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
 		}
 		#ifdef _HAVE_MPI_
@@ -778,6 +778,6 @@
 }
 /*}}}*/
-/*FUNCTION IoModel::FetchData(double*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{*/
-void  IoModel::FetchData(double*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){
+/*FUNCTION IoModel::FetchData(IssmPDouble*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{*/
+void  IoModel::FetchData(IssmPDouble*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){
 
 	int i;
@@ -787,5 +787,5 @@
 
 	/*output: */
-	double** matrices=NULL;
+	IssmPDouble** matrices=NULL;
 	int*     mdims=NULL;
 	int*     ndims=NULL;
@@ -794,10 +794,10 @@
 	/*intermediary: */
 	int     M, N;
-	double *matrix = NULL;
+	IssmPDouble *matrix = NULL;
 	int     code;
 	
 	/*Set file pointer to beginning of the data: */
 	fid=this->SetFilePointerToData(&code,NULL,data_enum);
-	if(code!=8)_error_("expecting a double mat array for enum %s",EnumToStringx(data_enum));
+	if(code!=8)_error_("expecting a IssmPDouble mat array for enum %s",EnumToStringx(data_enum));
 	
 	/*Now fetch: */
@@ -812,5 +812,5 @@
 
 		/*Allocate matrices :*/
-		matrices=(double**)xmalloc(numrecords*sizeof(double*));
+		matrices=(IssmPDouble**)xmalloc(numrecords*sizeof(IssmPDouble*));
 		mdims=(int*)xmalloc(numrecords*sizeof(int));
 		ndims=(int*)xmalloc(numrecords*sizeof(int));
@@ -841,9 +841,9 @@
 			/*Now allocate matrix: */
 			if(M*N){
-				matrix=(double*)xmalloc(M*N*sizeof(double));
+				matrix=(IssmPDouble*)xmalloc(M*N*sizeof(IssmPDouble));
 
 				/*Read matrix on node 0, then broadcast: */
 				if(my_rank==0){  
-					if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+					if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
 				}
 
@@ -885,7 +885,7 @@
 	fid=this->SetFilePointerToData(&code,NULL,index+1);
 	switch(code){
-		case 3: {//double
-			  double *value = NULL;
-			  value=(double*)xmalloc(1*sizeof(double));
+		case 3: {//IssmPDouble
+			  IssmPDouble *value = NULL;
+			  value=(IssmPDouble*)xmalloc(1*sizeof(IssmPDouble));
 			  FetchData(value,index+1);
 			  _printf_(true,"value = %g\n",*value);
@@ -923,10 +923,10 @@
 	va_list ap;
 	int     dataenum;
-	double* matrix=NULL;
+	IssmPDouble* matrix=NULL;
 	int     M,N;
 	int     i;
 
 	/*Go through the entire list of enums and fetch the corresponding data. Add it to the iomodel->data dataset. Everything
-	 *we fetch is a double* : */
+	 *we fetch is a IssmPDouble* : */
 	
 	va_start(ap,num);
@@ -954,5 +954,5 @@
 /*}}}*/
 /*FUNCTION IoModel::FetchDataToInput{{{*/
-void IoModel::FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum,double default_value){
+void IoModel::FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum,IssmPDouble default_value){
 
 	/*intermediary: */
@@ -973,7 +973,7 @@
 	bool    boolean;
 	int     integer;
-	double  scalar;
+	IssmPDouble  scalar;
 	char   *string        = NULL;
-	double *doublevector  = NULL;
+	IssmPDouble *IssmPDoublevector  = NULL;
 	int     M,N;
 
@@ -993,5 +993,5 @@
 				if(this->my_elements[i]){
 					Element* element=(Element*)elements->GetObjectByOffset(counter);
-					element->InputCreate((double)boolean,vector_enum,code); 
+					element->InputCreate((IssmPDouble)boolean,vector_enum,code); 
 					counter++;
 				}
@@ -1006,13 +1006,13 @@
 				if(this->my_elements[i]){
 					Element* element=(Element*)elements->GetObjectByOffset(counter);
-					element->InputCreate((double)integer,vector_enum,code); 
+					element->InputCreate((IssmPDouble)integer,vector_enum,code); 
 					counter++;
 				}
 			}
 			break; /*}}}*/
-		case 3: //double constant.  {{{
+		case 3: //IssmPDouble constant.  {{{
 			this->FetchData(&scalar,vector_enum);
 
-			/*Add double constant input to all elements: */
+			/*Add IssmPDouble constant input to all elements: */
 			counter=0;
 			for (i=0;i<numberofelements;i++){
@@ -1027,7 +1027,7 @@
 
 			/*Fetch vector:*/
-			this->FetchData(&doublevector,&M,&N,vector_enum); //we still have a doublevector, because it might include times in transient mode
+			this->FetchData(&IssmPDoublevector,&M,&N,vector_enum); //we still have a IssmPDoublevector, because it might include times in transient mode
 			/*Check we got something, otherwise fetch default: */
-			if(doublevector){ 
+			if(IssmPDoublevector){ 
 				defaulting=false;  //we are not defaulting, because  we do have a vector
 			}
@@ -1036,6 +1036,6 @@
 				if(default_vector_enum!=NoneEnum){
 					/*yes. fetch it: */
-					this->FetchData(&doublevector,&M,&N,default_vector_enum);
-					if(doublevector){
+					this->FetchData(&IssmPDoublevector,&M,&N,default_vector_enum);
+					if(IssmPDoublevector){
 						defaulting=false;  //we are not defaulting, because  we do have a vector
 					}
@@ -1057,5 +1057,5 @@
 					Element* element=(Element*)elements->GetObjectByOffset(counter);
 					if(defaulting) element->InputCreate(default_value,vector_enum,code); 
-					else           element->InputCreate(doublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
+					else           element->InputCreate(IssmPDoublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
 					counter++;
 				}
@@ -1065,7 +1065,7 @@
 
 			/*Fetch vector:*/
-			this->FetchData(&doublevector,&M,&N,vector_enum); //we still have a doublevector, because it might include times in transient mode
+			this->FetchData(&IssmPDoublevector,&M,&N,vector_enum); //we still have a IssmPDoublevector, because it might include times in transient mode
 			/*Check we got something, otherwise fetch default: */
-			if(doublevector){ 
+			if(IssmPDoublevector){ 
 				defaulting=false;  //we are not defaulting, because  we do have a vector
 			}
@@ -1074,6 +1074,6 @@
 				if(default_vector_enum!=NoneEnum){
 					/*yes. fetch it: */
-					this->FetchData(&doublevector,&M,&N,default_vector_enum);
-					if(doublevector){
+					this->FetchData(&IssmPDoublevector,&M,&N,default_vector_enum);
+					if(IssmPDoublevector){
 						defaulting=false;  //we are not defaulting, because  we do have a vector
 					}
@@ -1095,15 +1095,15 @@
 					Element* element=(Element*)elements->GetObjectByOffset(counter);
 					if(defaulting) element->InputCreate(default_value,vector_enum,code); 
-					else           element->InputCreate(doublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
+					else           element->InputCreate(IssmPDoublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
 					counter++;
 				}
 			}
 			break; /*}}}*/
-		case 7: //double vector{{{
+		case 7: //IssmPDouble vector{{{
 
 			/*Fetch vector:*/
-			this->FetchData(&doublevector,&M,&N,vector_enum);
+			this->FetchData(&IssmPDoublevector,&M,&N,vector_enum);
 			/*Check we got something, otherwise fetch default: */
-			if(doublevector){ 
+			if(IssmPDoublevector){ 
 				defaulting=false;  //we are not defaulting, because  we do have a vector
 			}
@@ -1112,6 +1112,6 @@
 				if(default_vector_enum!=NoneEnum){
 					/*yes. fetch it: */
-					this->FetchData(&doublevector,&M,&N,default_vector_enum);
-					if(doublevector){
+					this->FetchData(&IssmPDoublevector,&M,&N,default_vector_enum);
+					if(IssmPDoublevector){
 						defaulting=false;  //we are not defaulting, because  we do have a vector
 					}
@@ -1133,5 +1133,5 @@
 					Element* element=(Element*)elements->GetObjectByOffset(counter);
 					if(defaulting) element->InputCreate(default_value,vector_enum,code); 
-					else           element->InputCreate(doublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
+					else           element->InputCreate(IssmPDoublevector,i,this,M,N,vector_layout,vector_enum,code);//we need i to index into elements.
 					counter++;
 				}
@@ -1145,5 +1145,5 @@
 	}
 	/*Free ressources:*/
-	xfree((void**)&doublevector);
+	xfree((void**)&IssmPDoublevector);
 	xfree((void**)&string);
 }
Index: /issm/trunk-jpl/src/c/objects/IoModel.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/IoModel.h	(revision 12415)
+++ /issm/trunk-jpl/src/c/objects/IoModel.h	(revision 12416)
@@ -18,6 +18,6 @@
 
 	private: 
-		IssmDouble     **data;        //this dataset holds temporary data, memory intensive.
-		Parameters  *constants;   //this dataset holds all IssmDouble, int, bool and char *parameters read in from the input file.*
+		IssmPDouble **data;        //this dataset holds temporary data, memory intensive.
+		Parameters  *constants;   //this dataset holds all IssmPDouble, int, bool and char *parameters read in from the input file.*
 
 	public:
@@ -44,21 +44,21 @@
 		void        Constant(bool *poutput,int constant_enum);
 		void        Constant(int *poutput,int constant_enum);
-		void        Constant(IssmDouble *poutput,int constant_enum);
+		void        Constant(IssmPDouble *poutput,int constant_enum);
 		void        Constant(char **poutput,int constant_enum);
 		Param      *CopyConstantObject(int constant_enum);
-		IssmDouble *Data(int dataenum);
+		IssmPDouble *Data(int dataenum);
 		void        DeleteData(int num,...);
 		void        FetchConstants(void);
 		void        FetchData(bool* pboolean,int data_enum);
 		void        FetchData(int* pinteger,int data_enum);
-		void        FetchData(IssmDouble* pscalar,int data_enum);
+		void        FetchData(IssmPDouble* pscalar,int data_enum);
 		void        FetchData(char** pstring,int data_enum);
 		void        FetchData(int** pmatrix,int* pM,int* pN,int data_enum);
-		void        FetchData(IssmDouble**  pscalarmatrix,int* pM,int* pN,int data_enum);
+		void        FetchData(IssmPDouble**  pscalarmatrix,int* pM,int* pN,int data_enum);
 		void        FetchData(char***   pstringarray,int* pnumstrings,int data_enum);
-		void        FetchData(IssmDouble*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
+		void        FetchData(IssmPDouble*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
 		void        FetchData(Option **poption,int data_enum);
 		void        FetchData(int num,...);
-		void        FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum=NoneEnum,IssmDouble default_value=0);
+		void        FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum=NoneEnum,IssmPDouble default_value=0);
 		void        LastIndex(int *pindex);
 		FILE*       SetFilePointerToData(int* pcode,int* pvector_type, int data_enum);
