Index: /issm/trunk-jpl/src/c/objects/Options/Option.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/Option.h	(revision 12472)
+++ /issm/trunk-jpl/src/c/objects/Options/Option.h	(revision 12473)
@@ -43,9 +43,9 @@
 		virtual int*  Size()=0;
 		virtual void  Get(int* pvalue)=0;
-		virtual void  Get(double* pvalue)=0;
+		virtual void  Get(IssmPDouble* pvalue)=0;
 		virtual void  Get(bool* pvalue)=0;
 		virtual void  Get(char** pvalue)=0;
 		virtual void  Get(char*** ppvalue,int *pnumel)=0;
-		virtual void  Get(double** pvalue,int *pnumel)=0;
+		virtual void  Get(IssmPDouble** pvalue,int *pnumel)=0;
 		virtual void  Get(Options** pvalue)=0;
 		virtual void  Get(Options*** ppvalue,int *pnumel)=0;
Index: /issm/trunk-jpl/src/c/objects/Options/OptionCell.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12472)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionCell.cpp	(revision 12473)
@@ -78,5 +78,5 @@
 	Option::DeepEcho(indent);
 
-	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
+	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
 	strcat(indent2,"  ");
 
Index: /issm/trunk-jpl/src/c/objects/Options/OptionCell.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12472)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12473)
@@ -40,9 +40,9 @@
 		int*  Size();
 		void  Get(int* pvalue){_error_("An OptionCell object cannot return a int");};
-		void  Get(double* pvalue){_error_("An OptionCell object cannot return a double");};
+		void  Get(IssmPDouble* pvalue){_error_("An OptionCell object cannot return a IssmPDouble");};
 		void  Get(bool* pvalue){  _error_("An OptionCell object cannot return a bool");};
 		void  Get(char** pvalue){ _error_("An OptionCell object cannot return a string");};
 		void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionCell object cannot return a string vec");};
-		void  Get(double** pvalue,int *pnumel){ _error_("An OptionCell object cannot return a double vec");};
+		void  Get(IssmPDouble** pvalue,int *pnumel){ _error_("An OptionCell object cannot return a IssmPDouble vec");};
 		void  Get(Options** pvalue);
 		void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionCell object cannot return an Options DataSet vec");};
Index: /issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12472)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionChar.cpp	(revision 12473)
@@ -82,5 +82,5 @@
 	Option::DeepEcho(indent);
 
-	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
+	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
 	strcat(indent2,"  ");
 
@@ -139,5 +139,5 @@
 
 	outstring=xNew<char>(stringsize);
-	memcpy(outstring,this->values,stringsize*sizeof(char));
+	xMemCpy<char>(outstring,this->values,stringsize);
 
 	*pvalue=outstring;
@@ -165,5 +165,5 @@
 	for (i=0; i<nstr; i++) {
 		outstring=xNew<char>(stringsize);
-		memcpy(outstring,&(this->values[ipt]),(stringsize-1)*sizeof(char));
+		xMemCpy<char>(outstring,&(this->values[ipt]),(stringsize-1));
 		outstring[stringsize-1]='\0';
 		(*ppvalue)[i]=outstring;
Index: /issm/trunk-jpl/src/c/objects/Options/OptionChar.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12472)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12473)
@@ -40,9 +40,9 @@
 		int*  Size();
 		void  Get(int* pvalue){_error_("An OptionChar object cannot return a int");};
-		void  Get(double* pvalue){_error_("An OptionChar object cannot return a double");};
+		void  Get(IssmPDouble* pvalue){_error_("An OptionChar object cannot return a IssmPDouble");};
 		void  Get(bool* pvalue){  _error_("An OptionChar object cannot return a bool");};
 		void  Get(char** pvalue);
 		void  Get(char*** ppvalue,int *pnumel);
-		void  Get(double** pvalue,int *pnumel){ _error_("An OptionChar object cannot return a double vec");};
+		void  Get(IssmPDouble** pvalue,int *pnumel){ _error_("An OptionChar object cannot return a IssmPDouble vec");};
 		void  Get(Options** pvalue){ _error_("An OptionChar object cannot return an Options DataSet");};
 		void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionChar object cannot return an Options DataSet vec");};
Index: /issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12472)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12473)
@@ -1,4 +1,4 @@
 /*!\file OptionDouble.cpp
- * \brief: implementation of the optionsdouble object
+ * \brief: implementation of the optionsIssmPDouble object
  */
 
@@ -31,5 +31,5 @@
 OptionDouble::~OptionDouble(){
 
-	if (values) xDelete<double>(values);
+	if (values) xDelete<IssmPDouble>(values);
 
 }
@@ -50,5 +50,5 @@
 		else {
 			StringFromSize(cstr,size,ndims);
-			_printf_(flag,"        values: %s %s\n" ,cstr,"double");
+			_printf_(flag,"        values: %s %s\n" ,cstr,"IssmPDouble");
 		}
 	}
@@ -78,5 +78,5 @@
 	Option::DeepEcho(indent);
 
-	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
+	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
 	strcat(indent2,"  ");
 
@@ -132,10 +132,10 @@
 }
 /*}}}*/
-/*FUNCTION OptionDouble::Get(double* pvalue) {{{*/
-void OptionDouble::Get(double* pvalue){
+/*FUNCTION OptionDouble::Get(IssmPDouble* pvalue) {{{*/
+void OptionDouble::Get(IssmPDouble* pvalue){
 
 	/*We should first check that the size is one*/
 	if(this->NumEl()!=1){
-		_error_("option \"%s\" has %i elements and cannot return a single double",this->name,this->NumEl());
+		_error_("option \"%s\" has %i elements and cannot return a single IssmPDouble",this->name,this->NumEl());
 	}
 
@@ -144,14 +144,14 @@
 }
 /*}}}*/
-/*FUNCTION OptionDouble::Get(double** pvalue,int* numel) {{{*/
-void OptionDouble::Get(double** pvalue,int* numel){
+/*FUNCTION OptionDouble::Get(IssmPDouble** pvalue,int* numel) {{{*/
+void OptionDouble::Get(IssmPDouble** pvalue,int* numel){
 
 	/*We should first check that the size is at least one*/
 	if(this->NumEl()<=0){
-		_error_("option \"%s\" is empty and cannot return a double vector",this->name);
+		_error_("option \"%s\" is empty and cannot return a IssmPDouble vector",this->name);
 	}
 
 	/*Copy vector*/
-	double* outvalue=xNew<double>(this->NumEl());
+	IssmPDouble* outvalue=xNew<IssmPDouble>(this->NumEl());
 	for(int i=0;i<this->NumEl();i++) outvalue[i]=this->values[i];
 
Index: /issm/trunk-jpl/src/c/objects/Options/OptionDouble.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12472)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12473)
@@ -1,4 +1,4 @@
 /*! \file OptionDouble.h 
- *  \brief: header file for optiondouble object
+ *  \brief: header file for optionIssmPDouble object
  */
 
@@ -18,5 +18,5 @@
 	public:
 
-		double* values;
+		IssmPDouble* values;
 
 		/*OptionDouble constructors, destructors {{{*/
@@ -40,9 +40,9 @@
 		int*  Size();
 		void  Get(int* pvalue);
-		void  Get(double* pvalue);
+		void  Get(IssmPDouble* pvalue);
 		void  Get(bool* pvalue){  _error_("An OptionDouble object cannot return a bool");};
 		void  Get(char** pvalue){ _error_("An OptionDouble object cannot return a string");};
 		void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionDouble object cannot return a string vec");};
-		void  Get(double** pvalue,int* pnumel);
+		void  Get(IssmPDouble** pvalue,int* pnumel);
 		void  Get(Options** pvalue){ _error_("An OptionDouble object cannot return an Options DataSet");};
 		void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionDouble object cannot return an Options DataSet vec");};
Index: /issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12472)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionLogical.cpp	(revision 12473)
@@ -78,5 +78,5 @@
 	Option::DeepEcho(indent);
 
-	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
+	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
 	strcat(indent2,"  ");
 
Index: /issm/trunk-jpl/src/c/objects/Options/OptionLogical.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12472)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12473)
@@ -40,9 +40,9 @@
 		int*  Size();
 		void  Get(int* pvalue){_error_("An OptionLogical object cannot return a int");};
-		void  Get(double* pvalue){_error_("An OptionLogical object cannot return a double");};
+		void  Get(IssmPDouble* pvalue){_error_("An OptionLogical object cannot return a IssmPDouble");};
 		void  Get(bool* pvalue);
 		void  Get(char** pvalue){ _error_("An OptionLogical object cannot return a string");};
 		void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionLogical object cannot return a string vec");};
-		void  Get(double** pvalue,int *pnumel){ _error_("An OptionLogical object cannot return a double vec");};
+		void  Get(IssmPDouble** pvalue,int *pnumel){ _error_("An OptionLogical object cannot return a IssmPDouble vec");};
 		void  Get(Options** pvalue){ _error_("An OptionLogical object cannot return an Options DataSet");};
 		void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionLogical object cannot return an Options DataSet vec");};
Index: /issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12472)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionStruct.cpp	(revision 12473)
@@ -83,5 +83,5 @@
 	Option::DeepEcho(indent);
 
-	memcpy(indent2,indent,(strlen(indent)+1)*sizeof(char));
+	xMemCpy<char>(indent2,indent,(strlen(indent)+1));
 	strcat(indent2,"  ");
 
Index: /issm/trunk-jpl/src/c/objects/Options/OptionStruct.h
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12472)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12473)
@@ -40,9 +40,9 @@
 		int*  Size();
 		void  Get(int* pvalue){_error_("An OptionStruct object cannot return a int");};
-		void  Get(double* pvalue){_error_("An OptionStruct object cannot return a double");};
+		void  Get(IssmPDouble* pvalue){_error_("An OptionStruct object cannot return a IssmPDouble");};
 		void  Get(bool* pvalue){  _error_("An OptionStruct object cannot return a bool");};
 		void  Get(char** pvalue){ _error_("An OptionStruct object cannot return a string");};
 		void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionStruct object cannot return a string vec");};
-		void  Get(double** pvalue,int *pnumel){ _error_("An OptionStruct object cannot return a double vec");};
+		void  Get(IssmPDouble** pvalue,int *pnumel){ _error_("An OptionStruct object cannot return a IssmPDouble vec");};
 		void  Get(Options** pvalue);
 		void  Get(Options*** ppvalue,int *pnumel);
Index: /issm/trunk-jpl/src/c/objects/Options/OptionUtilities.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Options/OptionUtilities.cpp	(revision 12472)
+++ /issm/trunk-jpl/src/c/objects/Options/OptionUtilities.cpp	(revision 12473)
@@ -31,6 +31,6 @@
 	/*calculate the dimensions (being careful of integer division)  */
 	for (i=ndims-1; i>=0; i--) {
-		aprod=(int)(((double)aprod+0.5)/(double)size[i]);
-		dims[i]=(int)floor(((double)index+0.5)/(double)aprod);
+		aprod=(int)(((IssmPDouble)aprod+0.5)/(IssmPDouble)size[i]);
+		dims[i]=(int)floor(((IssmPDouble)index+0.5)/(IssmPDouble)aprod);
 		index-=dims[i]*aprod;
 	}
@@ -69,6 +69,6 @@
 	/*calculate the dimensions (being careful of integer division)  */
 	for (i=0; i<ndims; i++) {
-		aprod=(int)(((double)aprod+0.5)/(double)size[i]);
-		dims[i]=(int)floor(((double)index+0.5)/(double)aprod);
+		aprod=(int)(((IssmPDouble)aprod+0.5)/(IssmPDouble)size[i]);
+		dims[i]=(int)floor(((IssmPDouble)index+0.5)/(IssmPDouble)aprod);
 		index-=dims[i]*aprod;
 	}
