Index: /issm/trunk-jpl/src/c/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/c/Makefile.am	(revision 13599)
+++ /issm/trunk-jpl/src/c/Makefile.am	(revision 13600)
@@ -756,5 +756,4 @@
 					./toolkits/petsc/patches/SolverEnum.h\
 					./toolkits/petsc/patches/petscpatches.h\
-					./toolkits/petsc/patches/VecTranspose.cpp\
 					./toolkits/petsc/patches/VecToMPISerial.cpp\
 					./toolkits/petsc/patches/MatToSerial.cpp\
@@ -764,5 +763,4 @@
 					./toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp\
 					./toolkits/petsc/patches/NewMat.cpp\
-					./toolkits/petsc/patches/SerialToVec.cpp\
 					./toolkits/petsc/patches/VecFree.cpp\
 					./toolkits/petsc/patches/PetscMatrixToDoubleMatrix.cpp\
@@ -771,5 +769,4 @@
 					./toolkits/petsc/patches/KSPFree.cpp\
 					./toolkits/petsc/patches/MatFree.cpp\
-					./toolkits/petsc/patches/VecPartition.cpp\
 					./toolkits/petsc/patches/MatMultPatch.cpp\
 					./toolkits/petsc/patches/ISSMToPetscMatrixType.cpp\
Index: sm/trunk-jpl/src/c/toolkits/petsc/patches/SerialToVec.cpp
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/petsc/patches/SerialToVec.cpp	(revision 13599)
+++ 	(revision )
@@ -1,60 +1,0 @@
-/* \file SerialToVec.cpp
- * \brief: convert a serial vector on all cpus into a parallel vector
- */
-
-#ifdef HAVE_CONFIG_H
-	#include <config.h>
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-/*Petsc includes: */
-#include "petscmat.h"
-#include "petscvec.h"
-#include "petscksp.h"
-
-#include "../../../shared/shared.h"
-
-Vec  SerialToVec(double* vector,int vector_size){
-
-	int i;
-
-	/*output: */
-	Vec outvector=NULL;
-
-	/*petsc indices: */
-	int* idxn=NULL;
-	double* values=NULL;
-	int lower_row,upper_row,range;
-	
-		
-	/*Create parallel vector: */
-	outvector=NewVec(vector_size,MPI_COMM_WORLD);
-
-	/*plug values from local vector into new parallel vector: */
-	VecGetOwnershipRange(outvector,&lower_row,&upper_row);
-	upper_row--;
-	range=upper_row-lower_row+1;    
-
-	if (range){
-		idxn=xNew<int>(range); 
-		values=xNew<double>(range);
-		for (i=0;i<range;i++){
-			idxn[i]=lower_row+i;
-			values[i]=vector[idxn[i]];
-		}
-
-		VecSetValues(outvector,range,idxn,values,INSERT_VALUES);
-	}
-
-
-	/*Assemble vector: */
-	VecAssemblyBegin(outvector);
-	VecAssemblyEnd(outvector);
-
-	/*Free ressources:*/
-	xDelete<int>(idxn);
-	xDelete<double>(values);
-
-	return outvector;
-}
Index: sm/trunk-jpl/src/c/toolkits/petsc/patches/VecPartition.cpp
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/petsc/patches/VecPartition.cpp	(revision 13599)
+++ 	(revision )
@@ -1,118 +1,0 @@
-/*!\file:  VecPartition.cpp
- * \brief  partition vector according to a node set
- */ 
-
-#ifdef HAVE_CONFIG_H
-	#include <config.h>
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-/*Petsc includes: */
-#include "petscmat.h"
-#include "petscvec.h"
-#include "petscksp.h"
-
-#include "../../../shared/shared.h"
-
-void VecPartition(Vec* poutvector,Vec vectorA, double* row_partition_vector, int row_partition_vector_size,bool kffpartition){
-
-		
-	int i;
-	
-	/*Petsc matrix*/
-	int* node_rows=NULL;
-	double* values=NULL;
-	int count;
-	int lower_row,upper_row,range;
-
-	/*Input*/
-	int MA; //Vector dimension
-
-	/*output*/
-	Vec outvector=NULL;
-
-	
-	/*Get size of input vector: */
-	VecGetSize(vectorA,&MA);
-	
-    /*Condense out*/
-
-    /*If the partitioning row vector has a 0 dimension, we return a NILL vector*/
-    if (row_partition_vector_size==0){
-		VecCreate(PETSC_COMM_WORLD,&outvector);   
-		VecSetSizes(outvector,PETSC_DECIDE,0);
-		VecSetFromOptions(outvector);
-		
-		VecAssemblyBegin(outvector);
-		VecAssemblyEnd(outvector);
-	}
-	else{
-		/*Locally get values and build a new vector which is a subvector*/
-		
-		VecGetOwnershipRange(vectorA,&lower_row,&upper_row);
-		upper_row--;
-		range=upper_row-lower_row+1;
-
-		if (range){
-			node_rows=xNew<int>(range); //this is the maximum number of rows one node can extract.
-		
-			count=0;
-			for (i=0;i<row_partition_vector_size;i++){
-				if ( ((int)(*(row_partition_vector+i))>=(lower_row+1)) && ((int)(*(row_partition_vector+i))<=(upper_row+1)) ){
-					*(node_rows+count)=(int)*(row_partition_vector+i)-1;
-					count++;
-				}
-			}
-		}
-		else{
-			count=0;
-		}
-					
-     	if (count){
-			values=xNew<double>(count); //holder for the values to be extracted from vectorA
-		}
-		else{
-			xDelete<int>(node_rows); //count=0 means no values was condensed out for this node. null node_rows for use in VecGetValues.
-			values=NULL;
-		}
-
-		if (count){
-			VecGetValues(vectorA,count,node_rows,values);
-		}
-		
-		/*Ok, each node now have count values corresponding to the node_rows extracted values from vectorA.
-		 * From count and values, create a new vector*/
-		VecCreate(PETSC_COMM_WORLD,&outvector);
-		VecSetSizes(outvector,count,PETSC_DECIDE);
-		VecSetFromOptions(outvector);
-		VecGetOwnershipRange(outvector,&lower_row,&upper_row);
-
-		/*build new node_rows index.*/
-		if (count){
-			for (i=0;i<count;i++){
-				*(node_rows+i)=lower_row+i;
-			}
-		}
-		
-		/* outvector should not be partitioned like it was previously, but according to row_partition_vector_size, this in case we 
-		 * are running with the special kffpartition schema: */
-		if(kffpartition){
-			VecFree(&outvector);
-			outvector=NewVec(row_partition_vector_size,MPI_COMM_WORLD);
-		}
-
-		if (count){
-			VecSetValues(outvector,count,node_rows,values,INSERT_VALUES);
-		}
-		
-		/*Assemble vector*/
-		VecAssemblyBegin(outvector);
-		VecAssemblyEnd(outvector);
-	}
-	
-	/*Assign output pointers:*/
-	*poutvector=outvector;
-	xDelete<int>(node_rows);
-	xDelete<double>(values);
-}
Index: sm/trunk-jpl/src/c/toolkits/petsc/patches/VecTranspose.cpp
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/petsc/patches/VecTranspose.cpp	(revision 13599)
+++ 	(revision )
@@ -1,66 +1,0 @@
-/*! \file VecTranspose.cpp
- *  \brief: transpose of a petsc vector
- */
-
-#include "./petscpatches.h"
-#include "../../../shared/shared.h"
-
-int VecTranspose(Vec* ptvector,Vec vector){
-
-	int i;
-	int size;
-	int lower_row,upper_row,range;
-	
-	int* idxm=NULL;
-	double* values=NULL;
-
-	int* tidxm=NULL;
-	double* tvalues=NULL;
-	
-	/*output: */
-	Vec tvector=NULL;
-
-	/*Get size of input vector: */
-	VecGetSize(vector,&size);
-	
-	/*Create new vector of same size: */
-	tvector=NewVec(size,MPI_COMM_WORLD);
-
-	/*Extract values locally from input vector: */
-	VecGetOwnershipRange(vector,&lower_row,&upper_row);
-	upper_row--;
-	range=upper_row-lower_row+1;    
-
-	if (range){
-		idxm=xNew<int>(range); 
-		tidxm=xNew<int>(range); 
-		for (i=0;i<range;i++){
-			*(idxm+i)=lower_row+i;
-		} 
-		values=xNew<double>(range);
-		tvalues=xNew<double>(range);
-		
-		VecGetValues(vector,range,idxm,values);
-		
-		/*Transfer values into tidxm, and idxm into tvalues: */
-		for (i=0;i<range;i++){
-			tidxm[i]=(int)values[i];
-			tvalues[i]=(double)idxm[i];
-		}
-		VecSetValues(tvector,range,tidxm,tvalues,INSERT_VALUES);
-	}
-
-	/*Assemble: */
-	VecAssemblyBegin(tvector);
-	VecAssemblyEnd(tvector);
-
-	/*Free ressources: */
-	xDelete<int>(idxm);
-	xDelete<double>(values);
-	xDelete<int>(tidxm);
-	xDelete<double>(tvalues);
-
-	/*Assign output pointers: */
-	*ptvector=tvector;
-	return 1;
-}
Index: /issm/trunk-jpl/src/c/toolkits/petsc/patches/petscpatches.h
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/petsc/patches/petscpatches.h	(revision 13599)
+++ /issm/trunk-jpl/src/c/toolkits/petsc/patches/petscpatches.h	(revision 13600)
@@ -22,5 +22,4 @@
 Mat NewMat(int M,int N,int connectivity,int numberofdofspernode, COMM comm);
 
-int VecTranspose(Vec* tvector,Vec vector);
 int VecToMPISerial(double** pgathered_vector, Vec vector,COMM comm);
 void MatFree(Mat* pmat);
@@ -28,5 +27,4 @@
 void VecFree(Vec* pvec);
 void KSPFree(KSP* pksp);
-void VecPartition(Vec* poutvector,Vec vectorA, double* row_partition_vector, int row_partition_vector_size,bool kffpartitioning);
 int MatPartition(Mat* poutmatrix,Mat matrixA,double* row_partition_vector,int row_partition_vector_size ,
 		double* col_partition_vector,int col_partition_vector_size);
