Index: /issm/trunk-jpl/src/c/classes/Options/OptionUtilities.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Options/OptionUtilities.cpp	(revision 22075)
+++ /issm/trunk-jpl/src/c/classes/Options/OptionUtilities.cpp	(revision 22076)
@@ -15,84 +15,4 @@
 /*}}}*/
 
-int ColumnWiseDimsFromIndex(int* dims,int index,int* size,int ndims){/*{{{*/
-
-	int   i;
-	int   aprod=1;
-
-	/*check for index too large  */
-	for (i=0;i<ndims;i++) aprod*=size[i];
-	if (index >= aprod) _error_("Index " << index << " exceeds number of elements " << aprod << ".");
-
-	/*calculate the dimensions (being careful of integer division)  */
-	for (i=ndims-1; i>=0; i--) {
-		aprod=reCast<int>(((IssmPDouble)aprod+0.5)/(IssmPDouble)size[i]);
-		dims[i]=(int)floor(((IssmPDouble)index+0.5)/(IssmPDouble)aprod);
-		index-=dims[i]*aprod;
-	}
-
-	return(0);
-}/*}}}*/
-int IndexFromColumnWiseDims(int* dims, int* size, int ndims) {/*{{{*/
-
-	int   i;
-	int   index=0;
-
-	/*check for any dimension too large  */
-	for (i=0;i<ndims;i++){
-		if (dims[i] >= size[i]) _error_("Dimension " << i << " of " << dims[i] << " exceeds size of " << size[i] << ".");
-	}
-
-	/*calculate the index  */
-	for (i=ndims-1; i>=0; i--){
-		index*=size[i];
-		index+=dims[i];
-	}
-
-	return(index);
-}/*}}}*/
-int IndexFromRowWiseDims(int* dims, int* size, int ndims) {/*{{{*/
-
-	int   i;
-	int   index=0;
-
-	/*check for any dimension too large  */
-	for (i=0; i<ndims; i++){
-		if (dims[i] >= size[i]) _error_("Dimension " << i << " of " << dims[i] << " exceeds size of " << size[i] << ".");
-	}
-
-	/*calculate the index  */
-	for (i=0; i<ndims; i++) {
-		index*=size[i];
-		index+=dims[i];
-	}
-
-	return(index);
-}/*}}}*/
-int RowWiseDimsFromIndex(int* dims, int index, int* size, int ndims) {/*{{{*/
-
-	int   i;
-	int   aprod=1;
-
-	/*check for index too large  */
-	for (i=0; i<ndims; i++) aprod*=size[i];
-	if (index >= aprod) _error_("Index " << index << " exceeds number of elements " << aprod << ".");
-
-	/*calculate the dimensions (being careful of integer division)  */
-	for (i=0; i<ndims; i++) {
-		aprod=(int)(((IssmPDouble)aprod+0.5)/(IssmPDouble)size[i]);
-		dims[i]=(int)floor(((IssmPDouble)index+0.5)/(IssmPDouble)aprod);
-		index-=dims[i]*aprod;
-	}
-
-	return(0);
-}/*}}}*/
-int StringFromDims(char* cstr, int* dims, int ndims) {/*{{{*/
-
-	sprintf(&cstr[0],"[");
-	for(int i=0; i<ndims-1; i++) sprintf(&cstr[strlen(cstr)],"%d,",dims[i]);
-	sprintf(&cstr[strlen(cstr)],"%d]",dims[ndims-1]);
-
-	return(0);
-}/*}}}*/
 int StringFromSize(char* cstr, int* size, int ndims) {/*{{{*/
 
Index: /issm/trunk-jpl/src/c/classes/Options/OptionUtilities.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Options/OptionUtilities.h	(revision 22075)
+++ /issm/trunk-jpl/src/c/classes/Options/OptionUtilities.h	(revision 22076)
@@ -13,9 +13,4 @@
 /*}}}*/
 
-int ColumnWiseDimsFromIndex(int* dims, int index, int* size, int ndims);
-int IndexFromColumnWiseDims(int* dims, int* size, int ndims);
-int IndexFromRowWiseDims(int* dims, int* size, int ndims);
-int RowWiseDimsFromIndex(int* dims, int index, int* size, int ndims);
-int StringFromDims(char* cstr, int* dims, int ndims);
 int StringFromSize(char* cstr, int* size, int ndims);
 
Index: /issm/trunk-jpl/src/c/classes/Options/Options.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Options/Options.h	(revision 22075)
+++ /issm/trunk-jpl/src/c/classes/Options/Options.h	(revision 22076)
@@ -7,8 +7,4 @@
 #include "./GenericOption.h"
 
-/*!\brief Declaration of Options class. 
- * 
- * Declaration of Options class.  Options are vector lists (Containers) of Option objects.
- */ 
 class Options: public DataSet{
 
@@ -20,5 +16,5 @@
 
 		/*numerics*/
-		int  AddOption(Option* in_oobject);
+		int     AddOption(Option* in_oobject);
 		Option* GetOption(const char* name);
 
@@ -31,20 +27,4 @@
 			if(genericoption){
 				genericoption->Get(pvalue);
-			}
-			/*Else, the Option does not exist, no default provided*/
-			else{
-				_error_("option of name \"" << name << "\" not found, and no default value has been provided");
-			}
-		}
-		/*}}}*/
-		template <class OptionType> void Get(OptionType* pvalue,int* pnumel, const char* name){ /*{{{*/
-
-			/*Get option*/
-			GenericOption<OptionType>* genericoption=xDynamicCast<GenericOption<OptionType>*>(GetOption(name));
-
-			/*If the pointer is not NULL, the option has been found*/
-			if(genericoption){
-				genericoption->Get(pvalue);
-				*pnumel=genericoption->NumEl();
 			}
 			/*Else, the Option does not exist, no default provided*/
@@ -65,19 +45,4 @@
 			else{
 				if(GetOption(name)) _printf_("WARNING: option "<<name<<" found but fetched format not consistent, defaulting...\n");
-				*pvalue=default_value;
-			}
-		}
-		/*}}}*/
-		template <class OptionType> void Get(OptionType* pvalue,int* pnumel, const char* name,OptionType default_value){ /*{{{*/
-
-			/*Get option*/
-			GenericOption<OptionType>* genericoption=xDynamicCast<GenericOption<OptionType>*>(GetOption(name));
-
-			/*If the pointer is not NULL, the option has been found*/
-			if(genericoption){
-				genericoption->Get(pvalue);
-				*pnumel=genericoption->NumEl();
-			}
-			else{
 				*pvalue=default_value;
 			}
Index: /issm/trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp
===================================================================
--- /issm/trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp	(revision 22075)
+++ /issm/trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp	(revision 22076)
@@ -88,5 +88,6 @@
 			}
 			/*Convert matlab n-dim array to double* matrix: */
-			MatlabNArrayToNArray(&outmatrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
+			_error_("not supported");
+			//MatlabNArrayToNArray(&outmatrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
 		}
 	}
@@ -223,5 +224,6 @@
 
 			/*Convert matlab n-dim array to bool* matrix: */
-			MatlabNArrayToNArray(&outmatrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
+			_error_("not supported");
+			//MatlabNArrayToNArray(&outmatrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
 		}
 	}
@@ -238,5 +240,6 @@
 
 			/*Convert matlab n-dim array to double* matrix: */
-			MatlabNArrayToNArray(&doublematrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
+			_error_("not supported");
+			//MatlabNArrayToNArray(&doublematrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
 
 			/*Convert double matrix into bool matrix: */
@@ -416,5 +419,6 @@
 
 		/*Convert matlab n-dim array to char* matrix: */
-		MatlabNArrayToNArray(&outmatrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
+		_error_("not supported");
+		//MatlabNArrayToNArray(&outmatrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
 	}
 	else{
@@ -757,240 +761,4 @@
 	return 1;
 }/*}}}*/
-/*FUNCTION MatlabNArrayToNArray(double** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){{{*/
-int MatlabNArrayToNArray(double** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){
-
-	int  i,j,rows,cols;
-	int  numel,ndims;
-	int *size,*dims;
-	double* mxmatrix_ptr=NULL;
-	const mwSize* ipt=NULL;
-
-	/*output: */
-	double* matrix=NULL;
-
-	/*matlab indices: */
-	mwIndex *ir    = NULL;
-	mwIndex *jc    = NULL;
-	double  *pr    = NULL;
-	int      count;
-
-	/*get Matlab matrix information: */
-	numel=mxGetNumberOfElements(mxmatrix);
-	ndims=mxGetNumberOfDimensions(mxmatrix);
-	ipt  =mxGetDimensions(mxmatrix);
-	size =xNew<int>(ndims);
-	for (i=0;i<ndims;i++) size[i]=(int)ipt[i];
-
-	/*Ok, first check if we are dealing with a sparse or full matrix: */
-	if (mxIsSparse(mxmatrix)){
-
-		/*Dealing with sparse matrix: recover size first: */
-		rows = mxGetM(mxmatrix);
-		cols = mxGetN(mxmatrix);
-
-		matrix=xNewZeroInit<double>(rows*cols);
-
-		/*Now, get ir,jc and pr: */
-		ir = mxGetIr(mxmatrix);
-		jc = mxGetJc(mxmatrix);
-		pr = mxGetPr(mxmatrix);
-
-		/*Now, start inserting data into double* matrix: */
-		count=0;
-		for(i=0;i<cols;i++){
-			for(j=0;j<(jc[i+1]-jc[i]);j++){
-				*(matrix+rows*ir[count]+i)=pr[count];
-				count++;
-			}
-		}
-
-	}
-	else{
-
-		/*Dealing with dense matrix: recover pointer and size: */
-		mxmatrix_ptr=(double*)mxGetPr(mxmatrix);
-
-		/*Create serial matrix: */
-		matrix=xNewZeroInit<double>(numel);
-
-		dims=xNew<int>(ndims);
-		for(i=0;i<numel;i++){
-			ColumnWiseDimsFromIndex(dims,i,size,ndims);
-			j = IndexFromRowWiseDims(dims,size,ndims);
-			matrix[j]=(double)mxmatrix_ptr[i];
-		}
-		xDelete<int>(dims);
-	}
-
-	/*Assign output pointer: */
-	*pmatrix       = matrix;
-	*pmatrix_numel = numel;
-	*pmatrix_ndims = ndims;
-	*pmatrix_size  = size;
-
-	return 1;
-}
-/*}}}*/
-/*FUNCTION MatlabNArrayToNArray(bool** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){{{*/
-int MatlabNArrayToNArray(bool** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){
-
-	int  i,j,rows,cols;
-	int  numel,ndims;
-	int *size,*dims;
-	bool* mxmatrix_ptr=NULL;
-	const mwSize* ipt=NULL;
-
-	/*output: */
-	bool* matrix=NULL;
-
-	/*matlab indices: */
-	mwIndex *ir    = NULL;
-	mwIndex *jc    = NULL;
-	bool    *pm    = NULL;
-	int      count;
-
-	/*get Matlab matrix information: */
-	numel = mxGetNumberOfElements(mxmatrix);
-	ndims = mxGetNumberOfDimensions(mxmatrix);
-	ipt   = mxGetDimensions(mxmatrix);
-	size  = xNew<int>(ndims);
-	for (i=0;i<ndims;i++) size[i]=(int)ipt[i];
-
-	/*Ok, first check if we are dealing with a sparse or full matrix: */
-	if (mxIsSparse(mxmatrix)){
-
-		/*Dealing with sparse matrix: recover size first: */
-		rows=mxGetM(mxmatrix);
-		cols=mxGetN(mxmatrix);
-		matrix=xNewZeroInit<bool>(rows*cols);
-
-		/*Now, get ir,jc and pm: */
-		ir=mxGetIr(mxmatrix);
-		jc=mxGetJc(mxmatrix);
-		pm=(bool*)mxGetData(mxmatrix);
-
-		/*Now, start inserting data into bool* matrix: */
-		count=0;
-		for(i=0;i<cols;i++){
-			for(j=0;j<(jc[i+1]-jc[i]);j++){
-				matrix[rows*ir[count]+i]=pm[count];
-				count++;
-			}
-		}
-	}
-	else{
-
-		/*Dealing with dense matrix: recover pointer and size: */
-		mxmatrix_ptr=(bool*)mxGetData(mxmatrix);
-
-		/*Create serial matrix: */
-		matrix=xNew<bool>(numel);
-		dims=xNew<int>(ndims);
-		for(i=0;i<numel;i++){
-			ColumnWiseDimsFromIndex(dims,i,size,ndims);
-			j=IndexFromRowWiseDims(dims,size,ndims);
-			matrix[j]=(bool)mxmatrix_ptr[i];
-		}
-		xDelete<int>(dims);
-	}
-
-	/*Assign output pointer: */
-	*pmatrix       = matrix;
-	*pmatrix_numel = numel;
-	*pmatrix_ndims = ndims;
-	*pmatrix_size  = size;
-
-	return 1;
-}
-/*}}}*/
-/*FUNCTION MatlabNArrayToNArray(char** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){{{*/
-int MatlabNArrayToNArray(char** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){
-
-	int           i,j,rows,cols;
-	int           numel,ndims;
-	int          *size , *dims;
-	mxChar       *mxmatrix_ptr = NULL;
-	const mwSize *ipt          = NULL;
-
-	/*output: */
-	char* matrix=NULL;
-
-	/*matlab indices: */
-	mwIndex *ir    = NULL;
-	mwIndex *jc    = NULL;
-	char    *pm    = NULL;
-	int      count;
-
-	/*get Matlab matrix information: */
-	numel = mxGetNumberOfElements(mxmatrix);
-	ndims = mxGetNumberOfDimensions(mxmatrix);
-	ipt   = mxGetDimensions(mxmatrix);
-	size  = xNew<int>(ndims);
-	for (i=0;i<ndims;i++) size[i]=(int)ipt[i];
-
-	/*Ok, first check if we are dealing with a sparse or full matrix: */
-	if (mxIsSparse(mxmatrix)){
-
-		/*Dealing with sparse matrix: recover size first: */
-		rows = mxGetM(mxmatrix);
-		cols = mxGetN(mxmatrix);
-		matrix=xNew<char>(rows*cols);
-
-		/*Now, get ir,jc and pm: */
-		ir = mxGetIr(mxmatrix);
-		jc = mxGetJc(mxmatrix);
-		pm = (char*)mxGetData(mxmatrix);
-
-		/*Now, start inserting data into char* matrix: */
-		count=0;
-		for(i=0;i<cols;i++){
-			for(j=0;j<(jc[i+1]-jc[i]);j++){
-				matrix[rows*ir[count]+i]=(char)pm[count];
-				count++;
-			}
-		}
-	}
-	else{
-		/*Dealing with dense matrix: recover pointer and size: */
-		mxmatrix_ptr=mxGetChars(mxmatrix);
-
-		/*Create serial matrix: */
-		matrix=xNew<char>(numel+1);
-		matrix[numel]='\0';
-
-		/*looping code adapted from Matlab example explore.c: */
-		int elements_per_page = size[0] * size[1];
-		/* total_number_of_pages = size[2] x size[3] x ... x size[N-1] */
-		int total_number_of_pages = 1;
-		for (i=2; i<ndims; i++) {
-			total_number_of_pages *= size[i];
-		}
-
-		i=0;
-		for (int page=0; page < total_number_of_pages; page++) {
-			int row;
-			/* On each page, walk through each row. */
-			for (row=0; row<size[0]; row++)  {
-				int column;
-				j = (page * elements_per_page) + row;
-
-				/* Walk along each column in the current row. */
-				for (column=0; column<size[1]; column++) {
-					*(matrix+i++)=(char)*(mxmatrix_ptr+j);
-					j += size[0];
-				}
-			}
-		}
-	}
-
-	/*Assign output pointer: */
-	*pmatrix       = matrix;
-	*pmatrix_numel = numel;
-	*pmatrix_ndims = ndims;
-	*pmatrix_size  = size;
-
-	return 1;
-}
-/*}}}*/
 /*FUNCTION mxGetAssignedField{{{*/
 mxArray* mxGetAssignedField(const mxArray* pmxa_array,int number,const char* field){
Index: /issm/trunk-jpl/src/wrappers/matlab/io/matlabio.h
===================================================================
--- /issm/trunk-jpl/src/wrappers/matlab/io/matlabio.h	(revision 22075)
+++ /issm/trunk-jpl/src/wrappers/matlab/io/matlabio.h	(revision 22076)
@@ -71,7 +71,4 @@
 /*Matlab to double* routines: */
 int MatlabMatrixToDoubleMatrix(double** pmatrix,int* pmatrix_rows,int* pmatrix_cols,const mxArray* mxmatrix);
-int MatlabNArrayToNArray(double** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix);
-int MatlabNArrayToNArray(bool** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix);
-int MatlabNArrayToNArray(char** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix);
 
 /*Print*/
