Index: /issm/trunk/src/c/io/FetchData.cpp
===================================================================
--- /issm/trunk/src/c/io/FetchData.cpp	(revision 7739)
+++ /issm/trunk/src/c/io/FetchData.cpp	(revision 7740)
@@ -24,5 +24,5 @@
 
 	/*First, check that our reference is a double, otherwise, error out: */
-	if (mxIsDouble(dataref)){
+	if (mxIsClass(dataref,"double")){
 			
 		/*We need to copy the data pointed by dataref, so that our dataset is not actually a pointer!:*/
@@ -61,5 +61,5 @@
 		outmatrix=NULL;
 	}
-	else if (mxIsDouble(dataref) ){
+	else if (mxIsClass(dataref,"double") ){
 
 		/*Check dataref is not pointing to NaN: */
@@ -100,5 +100,5 @@
 		outmatrix=NULL;
 	}
-	else if (mxIsDouble(dataref) ){
+	else if (mxIsClass(dataref,"double") ){
 
 		/*Check dataref is not pointing to NaN: */
@@ -142,5 +142,5 @@
 		outmatrix=NULL;
 	}
-	else if (mxIsDouble(dataref) ){
+	else if (mxIsClass(dataref,"double") ){
 
 		/*Check dataref is not pointing to NaN: */
@@ -177,5 +177,5 @@
 	int dummy=0;
 
-	if (mxIsDouble(dataref) ){
+	if (mxIsClass(dataref,"double") ){
 
 		/*Check dataref is not pointing to NaN: */
@@ -209,5 +209,5 @@
 		outvector=NULL;
 	}
-	else if (mxIsDouble(dataref) ){
+	else if (mxIsClass(dataref,"double") ){
 
 		/*Convert matlab vector to double*  vector: */
@@ -238,5 +238,5 @@
 		outvector=NULL;
 	}
-	else if (mxIsDouble(dataref) ){
+	else if (mxIsClass(dataref,"double") ){
 
 		/*Convert matlab vector to double*  vector: */
@@ -270,5 +270,5 @@
 		outvector=NULL;
 	}
-	else if (mxIsDouble(dataref) ){
+	else if (mxIsClass(dataref,"double") ){
 
 		/*Convert matlab vector to double*  vector: */
@@ -302,5 +302,5 @@
 		outvector=NULL;
 	}
-	else if (mxIsDouble(dataref) ){
+	else if (mxIsClass(dataref,"double") ){
 
 		/*Convert matlab vector to double*  vector: */
@@ -331,5 +331,5 @@
 		vector=NULL;
 	}
-	else if (mxIsDouble(dataref) ){
+	else if (mxIsClass(dataref,"double") ){
 
 		/*Convert matlab vector to petsc vector: */
@@ -352,5 +352,5 @@
 
 	/*Ok, the string should be coming directly from the matlab workspace: */
-	if (!mxIsChar(dataref)){
+	if (!mxIsClass(dataref,"char")){
 		_error_("input data_type is not a string!");
 	}
@@ -373,5 +373,5 @@
 	double scalar;
 
-	if (!mxIsDouble(dataref)){
+	if (!mxIsClass(dataref,"double")){
 		_error_("input data_type is not a double!");
 	}
@@ -390,5 +390,5 @@
 	int integer;
 
-	if (!mxIsDouble(dataref)){
+	if (!mxIsClass(dataref,"double")){
 		_error_("input data_type is not a scalar!");
 	}
Index: /issm/trunk/src/c/io/FetchParams.cpp
===================================================================
--- /issm/trunk/src/c/io/FetchParams.cpp	(revision 7739)
+++ /issm/trunk/src/c/io/FetchParams.cpp	(revision 7740)
@@ -58,5 +58,5 @@
 		
 		/*Check type of field: */
-		if (mxIsDouble(pfield)){
+		if (mxIsClass(pfield,"double")){
 			
 			/*could be  DOUBLE, DOUBLEVEC or DOUBLEMAT, depends on dimensions: */
@@ -100,5 +100,5 @@
 
 		}
-		else if (mxIsChar(pfield)){
+		else if (mxIsClass(pfield,"char")){
 			/* we have a string parameter:*/
 			
@@ -115,10 +115,10 @@
 			xfree((void**)&string);
 		}
-		else if (mxIsCell(pfield)){
+		else if (mxIsClass(pfield,"cell")){
 
 			/*This can be a string array, or a matrix array. Check the first 
 			 *element type to decide: */
 			pfield2=mxGetCell(pfield,0);
-			if (mxIsChar(pfield2)){
+			if (mxIsClass(pfield2,"char")){
 				
 				/*string array: */
Index: /issm/trunk/src/c/io/OptionParse.cpp
===================================================================
--- /issm/trunk/src/c/io/OptionParse.cpp	(revision 7739)
+++ /issm/trunk/src/c/io/OptionParse.cpp	(revision 7740)
@@ -22,14 +22,9 @@
 
 	/*parse the value according to the matlab data type  */
-	if      (mxIsDouble(prhs[0]))
-		oobject=(Option*)OptionDoubleParse(name,prhs);
-	else if (mxIsLogical(prhs[0]))
-		oobject=(Option*)OptionLogicalParse(name,prhs);
-	else if (mxIsChar(prhs[0]))
-		oobject=(Option*)OptionCharParse(name,prhs);
-	else if (mxIsStruct(prhs[0]))
-		oobject=(Option*)OptionStructParse(name,prhs);
-	else if (mxIsCell(prhs[0]))
-		oobject=(Option*)OptionCellParse(name,prhs);
+	if     (mxIsClass(prhs[0],"double"))  oobject=(Option*)OptionDoubleParse(name,prhs);
+	else if(mxIsClass(prhs[0],"logical")) oobject=(Option*)OptionLogicalParse(name,prhs);
+	else if(mxIsClass(prhs[0],"char"))    oobject=(Option*)OptionCharParse(name,prhs);
+	else if(mxIsClass(prhs[0],"struct"))  oobject=(Option*)OptionStructParse(name,prhs);
+	else if(mxIsClass(prhs[0],"cell"))    oobject=(Option*)OptionCellParse(name,prhs);
 	else {
 		_printf_(true,"  Converting value of option \"%s\" from unrecognized class \"%s\" to class \"%s\".\n",name,mxGetClassName(prhs[0]),"struct");
@@ -55,5 +50,5 @@
 
 	/*check and parse the value  */
-	if (!mxIsDouble(prhs[0])){
+	if (!mxIsClass(prhs[0],"double")){
 		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",odouble->name,"double",odouble->name,mxGetClassName(prhs[0]));
 	}
@@ -86,5 +81,5 @@
 
 	/*check and parse the value  */
-	if (!mxIsLogical(prhs[0])){
+	if (!mxIsClass(prhs[0],"logical")){
 		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ological->name,"logical",ological->name,mxGetClassName(prhs[0]));
 	}
@@ -121,5 +116,5 @@
 
 	/*check and parse the value  */
-	if (!mxIsChar(prhs[0])){
+	if (!mxIsClass(prhs[0],"char")){
 		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ochar->name,"char",ochar->name,mxGetClassName(prhs[0]));
 	}
@@ -156,5 +151,5 @@
 
 	/*check and parse the value  */
-	if (!mxIsStruct(prhs[0])){
+	if (!mxIsClass(prhs[0],"struct")){
 		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ostruct->name,"struct",ostruct->name,mxGetClassName(prhs[0]));
 	}
@@ -203,5 +198,5 @@
 
 	/*check and parse the value  */
-	if (!mxIsCell(prhs[0])){
+	if (!mxIsClass(prhs[0],"cell")){
 		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ocell->name,"cell",ocell->name,mxGetClassName(prhs[0]));
 	}
