Index: /issm/trunk/src/c/Makefile.am
===================================================================
--- /issm/trunk/src/c/Makefile.am	(revision 8912)
+++ /issm/trunk/src/c/Makefile.am	(revision 8913)
@@ -406,5 +406,4 @@
 					./io/Disk/pfopen.cpp\
 					./io/Disk/pfclose.cpp\
-					./io/Disk/FetchData.cpp\
 					./io/Matlab/matlabio.h\
 					./io/Matlab/WriteMatlabData.cpp\
@@ -1080,5 +1079,4 @@
 					./io/Disk/pfopen.cpp\
 					./io/Disk/pfclose.cpp\
-					./io/Disk/FetchData.cpp\
 					./io/Matlab/matlabio.h\
 					./io/Matlab/WriteMatlabData.cpp\
Index: sm/trunk/src/c/io/Disk/FetchData.cpp
===================================================================
--- /issm/trunk/src/c/io/Disk/FetchData.cpp	(revision 8912)
+++ 	(revision )
@@ -1,137 +1,0 @@
-/*\file FetchData.cpp:
- * \brief: general I/O interface to fetch data.
- */
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "../../shared/shared.h"
-#include "../../include/include.h"
-
-#if defined(_HAVE_PETSC_)
-/*FUNCTION FetchData(double** pmatrix, int* pM,int* pN,FILE* fid){{{1*/
-void FetchData(double** pmatrix, int* pM,int* pN,FILE* fid){
-
-	extern int my_rank;
-	extern int num_procs;
-
-	/*output: */
-	int M,N;
-	double* matrix=NULL;
-	
-	/*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */
-	/*numberofelements: */
-	if(my_rank==0){  
-		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
-	}
-
-	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	if(my_rank==0){  
-		if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
-	}
-	MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	/*Now allocate matrix: */
-	if(M*N){
-		matrix=(double*)xmalloc(M*N*sizeof(double));
-
-		/*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 ");
-		}
-		
-		MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
-	}
-
-
-	/*Assign output pointers: */
-	*pmatrix=matrix;
-	if (pM)*pM=M;
-	if (pN)*pN=N;
-
-}
-/*}}}*/
-/*FUNCTION FetchData(char** pstring,FILE* fid){{{1*/
-void FetchData(char** pstring,FILE* fid){
-
-	extern int my_rank;
-	extern int num_procs;
-
-	/*output: */
-	char* string=NULL;
-	int   string_size;
-
-	/*We have to read a string from disk. First read the dimensions of the string, then the string: */
-	if(my_rank==0){  
-		if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
-	}
-
-	MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	/*Now allocate string: */
-	if(string_size){
-		string=(char*)xmalloc((string_size+1)*sizeof(char));
-		string[string_size]='\0';
-
-		/*Read string on node 0, then broadcast: */
-		if(my_rank==0){  
-			if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
-		}
-		MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
-	}
-	else{
-		string=(char*)xmalloc(sizeof(char));
-		string[0]='\0';
-	}
-
-
-	/*Assign output pointers: */
-	*pstring=string;
-}
-/*}}}*/
-/*FUNCTION FetchData(double* pscalar,FILE* fid){{{1*/
-void FetchData(double* pscalar,FILE* fid){
-
-	extern int my_rank;
-	extern int num_procs;
-
-	/*output: */
-	double   scalar;
-
-	/*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 ");
-	}
-	MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
-
-	/*Assign output pointers: */
-	*pscalar=scalar;
-		 
-}
-/*}}}*/
-/*FUNCTION FetchData(int* pinteger,FILE* fid){{{1*/
-void FetchData(int* pinteger,FILE* fid){
-
-	extern int my_rank;
-	extern int num_procs;
-
-	/*output: */
-	int   integer;
-
-	/*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */
-	if(my_rank==0){  
-		if(fread(&integer,sizeof(int),1,fid)!=1) _error_(" could not read integer ");
-	}
-
-	MPI_Bcast(&integer,1,MPI_INT,0,MPI_COMM_WORLD); 
-
-	/*Assign output pointers: */
-	*pinteger=integer;
-
-}
-/*}}}*/
-#endif
Index: /issm/trunk/src/c/io/Disk/IoModelFetchData.cpp
===================================================================
--- /issm/trunk/src/c/io/Disk/IoModelFetchData.cpp	(revision 8912)
+++ /issm/trunk/src/c/io/Disk/IoModelFetchData.cpp	(revision 8913)
@@ -15,4 +15,11 @@
 /*FUNCTION IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,char* data_name){{{1*/
 void  IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,char* data_name){
+
+	extern int my_rank;
+	extern int num_procs;
+
+	/*output: */
+	int M,N;
+	double* matrix=NULL;
 	
 	FILE* fid=NULL;
@@ -22,5 +29,34 @@
 	
 	/*Now fetch: */
-	FetchData(pmatrix,pM,pN,fid);
+
+	/*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */
+	/*numberofelements: */
+	if(my_rank==0){  
+		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
+	}
+
+	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	if(my_rank==0){  
+		if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
+	}
+	MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	/*Now allocate matrix: */
+	if(M*N){
+		matrix=(double*)xmalloc(M*N*sizeof(double));
+
+		/*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 ");
+		}
+		
+		MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+	}
+
+	/*Assign output pointers: */
+	*pmatrix=matrix;
+	if (pM)*pM=M;
+	if (pN)*pN=N;
 
 }
@@ -29,5 +65,11 @@
 void  IoModelFetchData(char** pstring,FILE* model_handle,char* data_name){
 
-	FILE* fid=NULL;
+	extern int my_rank;
+	extern int num_procs;
+	FILE* fid=NULL;
+
+	/*output: */
+	char* string=NULL;
+	int   string_size;
 	
 	/*Set file pointer to beginning of the data: */
@@ -35,5 +77,31 @@
 	
 	/*Now fetch: */
-	FetchData(pstring,fid);
+	
+	/*We have to read a string from disk. First read the dimensions of the string, then the string: */
+	if(my_rank==0){  
+		if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
+	}
+
+	MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	/*Now allocate string: */
+	if(string_size){
+		string=(char*)xmalloc((string_size+1)*sizeof(char));
+		string[string_size]='\0';
+
+		/*Read string on node 0, then broadcast: */
+		if(my_rank==0){  
+			if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
+		}
+		MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
+	}
+	else{
+		string=(char*)xmalloc(sizeof(char));
+		string[0]='\0';
+	}
+
+
+	/*Assign output pointers: */
+	*pstring=string;
 }
 /*}}}*/
@@ -41,11 +109,24 @@
 void  IoModelFetchData(double* pscalar,FILE* model_handle,char* data_name){
 
-	FILE* fid=NULL;
-	
-	/*Set file pointer to beginning of the data: */
-	fid=SetFilePointerToData(model_handle,data_name);
-	
-	/*Now fetch: */
-	FetchData(pscalar,fid);
+
+	extern int my_rank;
+	extern int num_procs;
+	FILE* fid=NULL;
+
+	/*output: */
+	double   scalar;
+	
+	/*Set file pointer to beginning of the data: */
+	fid=SetFilePointerToData(model_handle,data_name);
+	
+	/*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 ");
+	}
+	MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+
+	/*Assign output pointers: */
+	*pscalar=scalar;
+		 
 }
 /*}}}*/
@@ -53,11 +134,24 @@
 void  IoModelFetchData(int* pinteger,FILE* model_handle,char* data_name){
 
-	FILE* fid=NULL;
-	
-	/*Set file pointer to beginning of the data: */
-	fid=SetFilePointerToData(model_handle,data_name);
-	
-	/*Now fetch: */
-	FetchData(pinteger,fid);
+	extern int my_rank;
+	extern int num_procs;
+	FILE* fid=NULL;
+
+	/*output: */
+	int   integer;
+	
+	/*Set file pointer to beginning of the data: */
+	fid=SetFilePointerToData(model_handle,data_name);
+	
+	/*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */
+	if(my_rank==0){  
+		if(fread(&integer,sizeof(int),1,fid)!=1) _error_(" could not read integer ");
+	}
+
+	MPI_Bcast(&integer,1,MPI_INT,0,MPI_COMM_WORLD); 
+
+	/*Assign output pointers: */
+	*pinteger=integer;
+
 }
 /*}}}*/
Index: /issm/trunk/src/c/io/Disk/diskio.h
===================================================================
--- /issm/trunk/src/c/io/Disk/diskio.h	(revision 8912)
+++ /issm/trunk/src/c/io/Disk/diskio.h	(revision 8913)
@@ -16,9 +16,4 @@
 void  pfclose(FILE* fid,char* filename);
 
-void  FetchData(double** pmatrix, int* pM,int* pN,FILE* fid);
-void  FetchData(char** pstring,FILE* fid);
-void  FetchData(double* pscalar,FILE* fid);
-void  FetchData(int* pinteger,FILE* fid);
-
 void  IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,char* data_name);
 void  IoModelFetchData(char** pstring,FILE* model_handle,char* data_name);
