Index: sm/trunk/src/c/Reduceloadfromgtofx/Reduceloadfromgtofx.cpp.petsc2
===================================================================
--- /issm/trunk/src/c/Reduceloadfromgtofx/Reduceloadfromgtofx.cpp.petsc2	(revision 3226)
+++ 	(revision )
@@ -1,86 +1,0 @@
-/*!\file Reduceloadfromgtofx
- * \brief reduce loads from g set to f set 
- */
-
-#include "./Reduceloadfromgtofx.h"
-
-#undef __FUNCT__ 
-#define __FUNCT__ "Reduceloadfromgtofx"
-
-void	Reduceloadfromgtofx( Vec* ppf, Vec pg, Mat G_mn, Mat Kfs, Vec y_s, NodeSets* nodesets){
-
-	/*output: */
-	Vec pf=NULL;
-
-	/*intermediary*/
-	Vec pn=NULL;
-	Vec pm=NULL;
-	Mat tG_mn=NULL;
-	int tG_mnm,tG_mnn;
-	Vec tG_mnpm=NULL;
-	Vec Kfsy_s=NULL;
-	int Kfsm,Kfsn;
-	PetscScalar a;
-	
-
-	if(!pg){
-		pf=NULL;
-	}
-	else{
-
-		/* Reduce pg to pn:*/
-		if (nodesets->GetMSize()){
-
-			VecPartition(&pn, pg, nodesets->GetPV_N(), nodesets->GetNSize());
-			VecPartition(&pm, pg, nodesets->GetPV_M(), nodesets->GetMSize());
-		
-			/*Create G_mn'*/
-			MatTranspose(G_mn,&tG_mn);  
-
-			/*Create G_mn' * pm*/
-			MatGetLocalSize(tG_mn,&tG_mnm,&tG_mnn);
-			tG_mnpm=NewVecFromLocalSize(tG_mnm);
-			MatMultPatch(tG_mn,pm,tG_mnpm);
-
-			/*add pn to G_mn' * pm*/ 
-			a=1;
-			VecAXPY(pn,a,tG_mnpm);  
-		}
-		else{
-			VecDuplicate(pg,&pn);  
-			VecCopy(pg,pn);  
-		}
-		
-		/*% Reduce pn to pf:*/
-
-		if (nodesets->GetSSize()){
-
-			VecPartition(&pf, pn, nodesets->GetPV_F(),nodesets->GetFSize());
-
-			/*pf = pf - Kfs * y_s;*/
-			MatGetLocalSize(Kfs,&Kfsm,&Kfsn);
-			Kfsy_s=NewVecFromLocalSize(Kfsm);
-			MatMultPatch(Kfs,y_s,Kfsy_s);
-
-			a=-1;
-			VecAXPY(pf,a,Kfsy_s);  
-		}
-		else{
-			/*pf=pn*/
-			VecDuplicate(pn,&pf);  
-			VecCopy(pn,pf);  
-		}
-	}
-	
-	
-	/*Assign correct pointer*/
-	*ppf=pf;
-
-	/*Free ressources and return*/
-	VecFree(&pn);
-	VecFree(&pm);
-	MatFree(&tG_mn);
-	VecFree(&tG_mnpm);
-	VecFree(&Kfsy_s);
-
-}
Index: sm/trunk/src/c/Reduceloadfromgtofx/Reduceloadfromgtofx.cpp.petsc3
===================================================================
--- /issm/trunk/src/c/Reduceloadfromgtofx/Reduceloadfromgtofx.cpp.petsc3	(revision 3226)
+++ 	(revision )
@@ -1,86 +1,0 @@
-/*!\file Reduceloadfromgtofx
- * \brief reduce loads from g set to f set 
- */
-
-#include "./Reduceloadfromgtofx.h"
-
-#undef __FUNCT__ 
-#define __FUNCT__ "Reduceloadfromgtofx"
-
-void	Reduceloadfromgtofx( Vec* ppf, Vec pg, Mat G_mn, Mat Kfs, Vec y_s, NodeSets* nodesets){
-
-	/*output: */
-	Vec pf=NULL;
-
-	/*intermediary*/
-	Vec pn=NULL;
-	Vec pm=NULL;
-	Mat tG_mn=NULL;
-	int tG_mnm,tG_mnn;
-	Vec tG_mnpm=NULL;
-	Vec Kfsy_s=NULL;
-	int Kfsm,Kfsn;
-	PetscScalar a;
-	
-
-	if(!pg){
-		pf=NULL;
-	}
-	else{
-
-		/* Reduce pg to pn:*/
-		if (nodesets->GetMSize()){
-
-			VecPartition(&pn, pg, nodesets->GetPV_N(), nodesets->GetNSize());
-			VecPartition(&pm, pg, nodesets->GetPV_M(), nodesets->GetMSize());
-		
-			/*Create G_mn'*/
-			MatTranspose(G_mn,MAT_INITIAL_MATRIX,&tG_mn);  
-
-			/*Create G_mn' * pm*/
-			MatGetLocalSize(tG_mn,&tG_mnm,&tG_mnn);
-			tG_mnpm=NewVecFromLocalSize(tG_mnm);
-			MatMultPatch(tG_mn,pm,tG_mnpm);
-
-			/*add pn to G_mn' * pm*/ 
-			a=1;
-			VecAXPY(pn,a,tG_mnpm);  
-		}
-		else{
-			VecDuplicate(pg,&pn);  
-			VecCopy(pg,pn);  
-		}
-		
-		/*% Reduce pn to pf:*/
-
-		if (nodesets->GetSSize()){
-
-			VecPartition(&pf, pn, nodesets->GetPV_F(),nodesets->GetFSize());
-
-			/*pf = pf - Kfs * y_s;*/
-			MatGetLocalSize(Kfs,&Kfsm,&Kfsn);
-			Kfsy_s=NewVecFromLocalSize(Kfsm);
-			MatMultPatch(Kfs,y_s,Kfsy_s);
-
-			a=-1;
-			VecAXPY(pf,a,Kfsy_s);  
-		}
-		else{
-			/*pf=pn*/
-			VecDuplicate(pn,&pf);  
-			VecCopy(pn,pf);  
-		}
-	}
-	
-	
-	/*Assign correct pointer*/
-	*ppf=pf;
-
-	/*Free ressources and return*/
-	VecFree(&pn);
-	VecFree(&pm);
-	MatFree(&tG_mn);
-	VecFree(&tG_mnpm);
-	VecFree(&Kfsy_s);
-
-}
Index: sm/trunk/src/c/Reducematrixfromgtofx/Reducematrixfromgton.cpp.petsc2
===================================================================
--- /issm/trunk/src/c/Reducematrixfromgtofx/Reducematrixfromgton.cpp.petsc2	(revision 3226)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*!\file: Reducematrixfromgton
- * \brief
- */ 
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#undef __FUNCT__ 
-#define __FUNCT__ "Reducematrixfromgton"
-
-#include "../toolkits/toolkits.h"
-
-
-void  Reducematrixfromgton(Mat* pKnn,Mat Kgg,Mat Gmn,double* pv_m,int msize, double* pv_n,int nsize,int flag){
-
-
-	/*output: */
-	Mat Knn=NULL;
-
-	/*intermediary: */
-	Mat Kmm=NULL;
-	Mat Kmn=NULL;
-	Mat Knm=NULL;
-	Mat KnmGmn=NULL;
-	Mat KmmGmn=NULL;
-	Mat tGmn=NULL;
-	Mat tGmnKmn=NULL;
-	PetscScalar a=1;
-
-	if (msize){
-		
-		/*Partition K_gg*/
-		MatPartition(&Kmm, Kgg, pv_m,msize,pv_m,msize); 
-		MatPartition(&Kmn, Kgg, pv_m,msize,pv_n,nsize); 
-		MatPartition(&Knm, Kgg, pv_n,nsize,pv_m,msize); 
-		MatPartition(&Knn, Kgg, pv_n,nsize,pv_n,nsize);
-	
-		/*Reduce K_gg to K_nn*/
-		//K_nn = K_nn + K_nm * G_mn;
-		MatMatMult(Knm,Gmn,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&KnmGmn);
-		MatAXPY(Knn,a,KnmGmn,DIFFERENT_NONZERO_PATTERN);
-
-		if (flag!=1){
-			//K_mn = K_mn + K_mm * G_mn;
-			MatMatMult(Kmm,Gmn,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&KmmGmn);
-			MatAXPY(Kmn,a,KmmGmn,DIFFERENT_NONZERO_PATTERN);
-			
-			//K_nn = K_nn + G_mn' * K_mn;
-			MatTranspose(Gmn,&tGmn);
-			MatMatMult(tGmn,Kmn,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&tGmnKmn);
-			MatAXPY(Knn,a,tGmnKmn,DIFFERENT_NONZERO_PATTERN);
-		}
-	}
-	else{
-		/*msize=0 just return input*/
-		MatDuplicate(Kgg,MAT_COPY_VALUES,&Knn);
-	}	
-
-	/*Free ressources:*/
-	MatFree(&Kmm);
-	MatFree(&Kmn);
-	MatFree(&Knm);
-	MatFree(&KnmGmn);
-	MatFree(&KmmGmn);
-	MatFree(&tGmn);
-	MatFree(&tGmnKmn);
-	
-	/*Assign output pointers:*/
-	*pKnn=Knn;
-}
Index: sm/trunk/src/c/Reducematrixfromgtofx/Reducematrixfromgton.cpp.petsc3
===================================================================
--- /issm/trunk/src/c/Reducematrixfromgtofx/Reducematrixfromgton.cpp.petsc3	(revision 3226)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*!\file: Reducematrixfromgton
- * \brief
- */ 
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#undef __FUNCT__ 
-#define __FUNCT__ "Reducematrixfromgton"
-
-#include "../toolkits/toolkits.h"
-
-
-void  Reducematrixfromgton(Mat* pKnn,Mat Kgg,Mat Gmn,double* pv_m,int msize, double* pv_n,int nsize,int flag){
-
-
-	/*output: */
-	Mat Knn=NULL;
-
-	/*intermediary: */
-	Mat Kmm=NULL;
-	Mat Kmn=NULL;
-	Mat Knm=NULL;
-	Mat KnmGmn=NULL;
-	Mat KmmGmn=NULL;
-	Mat tGmn=NULL;
-	Mat tGmnKmn=NULL;
-	PetscScalar a=1;
-
-	if (msize){
-		
-		/*Partition K_gg*/
-		MatPartition(&Kmm, Kgg, pv_m,msize,pv_m,msize); 
-		MatPartition(&Kmn, Kgg, pv_m,msize,pv_n,nsize); 
-		MatPartition(&Knm, Kgg, pv_n,nsize,pv_m,msize); 
-		MatPartition(&Knn, Kgg, pv_n,nsize,pv_n,nsize);
-	
-		/*Reduce K_gg to K_nn*/
-		//K_nn = K_nn + K_nm * G_mn;
-		MatMatMult(Knm,Gmn,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&KnmGmn);
-		MatAXPY(Knn,a,KnmGmn,DIFFERENT_NONZERO_PATTERN);
-
-		if (flag!=1){
-			//K_mn = K_mn + K_mm * G_mn;
-			MatMatMult(Kmm,Gmn,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&KmmGmn);
-			MatAXPY(Kmn,a,KmmGmn,DIFFERENT_NONZERO_PATTERN);
-			
-			//K_nn = K_nn + G_mn' * K_mn;
-			MatTranspose(Gmn,MAT_INITIAL_MATRIX,&tGmn);
-			MatMatMult(tGmn,Kmn,MAT_INITIAL_MATRIX,PETSC_DEFAULT,&tGmnKmn);
-			MatAXPY(Knn,a,tGmnKmn,DIFFERENT_NONZERO_PATTERN);
-		}
-	}
-	else{
-		/*msize=0 just return input*/
-		MatDuplicate(Kgg,MAT_COPY_VALUES,&Knn);
-	}	
-
-	/*Free ressources:*/
-	MatFree(&Kmm);
-	MatFree(&Kmn);
-	MatFree(&Knm);
-	MatFree(&KnmGmn);
-	MatFree(&KmmGmn);
-	MatFree(&tGmn);
-	MatFree(&tGmnKmn);
-	
-	/*Assign output pointers:*/
-	*pKnn=Knn;
-}
Index: sm/trunk/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp.petsc2
===================================================================
--- /issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp.petsc2	(revision 3226)
+++ 	(revision )
@@ -1,122 +1,0 @@
-/*!\file PetscOptionsDetermineSolverType.cpp
- * \brief: 	Petsc comes with a wide array of solvers, some of them considered external (externally linked libraries). 
-	To activate these solvers, Petsc uses the Options database, which is set at the command line prompt 
-	when launching a Petsc executable (option -mat_type EXTERNALMATRIXTYPE). 
-	
-	We do not use this feature, because once the jpl-package server is launched, we cannot go back and modify 
-	the command line arguments. We rely therefore on the use of the options_string sent from the Solver_client 
-	module to the server Solver/ module. On the server side, we receive this options_string and plug it into the 
-	options database using the routine PetscOptionsInsertMultipleSTring. Once this is done, the KSP (Petsc solver) 
-	object registers these options and selects the correct solution method.  
-
-	Now, for external solvers, this does not work, because the choice of external solver needs to be done when launching
-	the Petsc executable ( this way, every matrix created conforms to the external package, and the solver then 
-	knows what to do directly by looking at the type of input matrix ). To circumvent this problem, we 
-	still use the options_string sent by the Solver_client, and we look for the -mat_type option. If we find 
-	a -mat_type option with an argument relating to an external solver, we then convert the solver matrix  
-	to the external type, and the KSP object then knows what to do. 
-
-	This routine parses the options_string and returns the type of external solver being used as an enum. If there is no 
-	external solver used, we return a default enum.
-
-	Note: figure out if first and second should be xfreed.
- */
-
-#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 "./petscpatches.h"
-
-#include "../../../shared/shared.h"
-
-#undef __FUNCT__
-#define __FUNCT__ "PetscOptionsDetermineSolverType"
-
-void PetscOptionsDetermineSolverType(int* psolver_type,char* options_string){
-
-
-	/*The list of options is going to be pairs of the type "-option option_value"*/
-	PetscToken *token=NULL;
-	char* first=NULL;
-	char* second=NULL;
-	size_t len;
-	int ignore_second;
-	int first_token=1;
-
-	/*output: */
-	int solver_type=PETSCPACKAGE;
-
-
-	PetscTokenCreate(options_string,' ',&token);
-	for (;;){
-		
-
-		/*Read next tokens*/
-		if(first_token){
-			PetscTokenFind(token,&first);
-		}
-		PetscTokenFind(token,&second);
-		
-		if (!first){
-			/*We are at the end of options*/
-			break;
-		}
-		if(!second){
-			/*We have no second value, end the token analysis.*/
-			if(first[0]!='-'){
-				/*This is not good, the option does not have '-'! Get out*/
-				throw ErrorException(__FUNCT__,exprintf("%s%s%s","Option ",first," should be preceded by '-'!"));
-			}
-			break;
-		}
-		else{
-			/*Ok, we have a second token coming in. Is it another option, or 'first' option's value?*/
-			if (second[0]=='-'){
-				/*Second is another option, ignore it and prepare next loop step*/
-				first=second;
-				first_token=0;
-			}
-			else{
-				/*Second is 'first' option's value*/
-				PetscStrlen(second,&len);
-				while (len > 0 && (second[len-1] == ' ' || second[len-1] == 'n')) {
-					len--; second[len] = 0;
-				}
-				/*We now have a pair first and second. Check whether first is equal to -mat_type. If so, check 
-				 * the second argument for the name of the external package desired.*/
-				if (strcmp(first,"-mat_type")==0){
-					if (strcmp(second,"aijmumps")==0){
-						solver_type=MUMPSPACKAGE_LU;
-					}
-					if (strcmp(second,"sbaijmumps")==0){
-						solver_type=MUMPSPACKAGE_CHOL;
-					}
-					if (strcmp(second,"aijspooles")==0){
-						solver_type=SPOOLESPACKAGE_LU;
-					}
-					if (strcmp(second,"sbaijspooles")==0){
-						solver_type=SPOOLESPACKAGE_CHOL;
-					}
-					if (strcmp(second,"superlu_dist")==0){
-						solver_type=SUPERLUDISTPACKAGE;
-					}
-				}
-				
-				first_token=1;
-			}
-		}
-	}
-
-	PetscTokenDestroy(token);
-
-	/*Assign output: */
-	*psolver_type=solver_type;
-}
Index: sm/trunk/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp.petsc3
===================================================================
--- /issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp.petsc3	(revision 3226)
+++ 	(revision )
@@ -1,122 +1,0 @@
-/*!\file PetscOptionsDetermineSolverType.cpp
- * \brief: 	Petsc comes with a wide array of solvers, some of them considered external (externally linked libraries). 
-	To activate these solvers, Petsc uses the Options database, which is set at the command line prompt 
-	when launching a Petsc executable (option -mat_type EXTERNALMATRIXTYPE). 
-	
-	We do not use this feature, because once the jpl-package server is launched, we cannot go back and modify 
-	the command line arguments. We rely therefore on the use of the options_string sent from the Solver_client 
-	module to the server Solver/ module. On the server side, we receive this options_string and plug it into the 
-	options database using the routine PetscOptionsInsertMultipleSTring. Once this is done, the KSP (Petsc solver) 
-	object registers these options and selects the correct solution method.  
-
-	Now, for external solvers, this does not work, because the choice of external solver needs to be done when launching
-	the Petsc executable ( this way, every matrix created conforms to the external package, and the solver then 
-	knows what to do directly by looking at the type of input matrix ). To circumvent this problem, we 
-	still use the options_string sent by the Solver_client, and we look for the -mat_type option. If we find 
-	a -mat_type option with an argument relating to an external solver, we then convert the solver matrix  
-	to the external type, and the KSP object then knows what to do. 
-
-	This routine parses the options_string and returns the type of external solver being used as an enum. If there is no 
-	external solver used, we return a default enum.
-
-	Note: figure out if first and second should be xfreed.
- */
-
-#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 "./petscpatches.h"
-
-#include "../../../shared/shared.h"
-
-#undef __FUNCT__
-#define __FUNCT__ "PetscOptionsDetermineSolverType"
-
-void PetscOptionsDetermineSolverType(int* psolver_type,char* options_string){
-
-
-	/*The list of options is going to be pairs of the type "-option option_value"*/
-	PetscToken token=NULL;
-	char* first=NULL;
-	char* second=NULL;
-	size_t len;
-	int ignore_second;
-	int first_token=1;
-
-	/*output: */
-	int solver_type=PETSCPACKAGE;
-
-
-	PetscTokenCreate(options_string,' ',&token);
-	for (;;){
-		
-
-		/*Read next tokens*/
-		if(first_token){
-			PetscTokenFind(token,&first);
-		}
-		PetscTokenFind(token,&second);
-		
-		if (!first){
-			/*We are at the end of options*/
-			break;
-		}
-		if(!second){
-			/*We have no second value, end the token analysis.*/
-			if(first[0]!='-'){
-				/*This is not good, the option does not have '-'! Get out*/
-				throw ErrorException(__FUNCT__,exprintf("%s%s%s","Option ",first," should be preceded by '-'!"));
-			}
-			break;
-		}
-		else{
-			/*Ok, we have a second token coming in. Is it another option, or 'first' option's value?*/
-			if (second[0]=='-'){
-				/*Second is another option, ignore it and prepare next loop step*/
-				first=second;
-				first_token=0;
-			}
-			else{
-				/*Second is 'first' option's value*/
-				PetscStrlen(second,&len);
-				while (len > 0 && (second[len-1] == ' ' || second[len-1] == 'n')) {
-					len--; second[len] = 0;
-				}
-				/*We now have a pair first and second. Check whether first is equal to -mat_type. If so, check 
-				 * the second argument for the name of the external package desired.*/
-				if (strcmp(first,"-mat_type")==0){
-					if (strcmp(second,"aijmumps")==0){
-						solver_type=MUMPSPACKAGE_LU;
-					}
-					if (strcmp(second,"sbaijmumps")==0){
-						solver_type=MUMPSPACKAGE_CHOL;
-					}
-					if (strcmp(second,"aijspooles")==0){
-						solver_type=SPOOLESPACKAGE_LU;
-					}
-					if (strcmp(second,"sbaijspooles")==0){
-						solver_type=SPOOLESPACKAGE_CHOL;
-					}
-					if (strcmp(second,"superlu_dist")==0){
-						solver_type=SUPERLUDISTPACKAGE;
-					}
-				}
-				
-				first_token=1;
-			}
-		}
-	}
-
-	PetscTokenDestroy(token);
-
-	/*Assign output: */
-	*psolver_type=solver_type;
-}
Index: sm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp.petsc2
===================================================================
--- /issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp.petsc2	(revision 3226)
+++ 	(revision )
@@ -1,91 +1,0 @@
-/*!\file PetscOptionsInsertMultipleString.cpp
- * \brief: create distributed Petsc 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 "./petscpatches.h"
-
-#undef __FUNCT__
-#define __FUNCT__ "PetscOptionsInsertMultipleString"
-
-#include "../../../shared/shared.h"
-
-void PetscOptionsInsertMultipleString(char* options_string){
-
-
-	/*The list of options is going to be pairs of the type "-option option_value"*/
-	PetscToken *token=NULL;
-	char* first=NULL;
-	char* second=NULL;
-	char* final=NULL;
-	size_t len;
-	int ignore_second;
-	int first_token=1;
-
-
-	PetscTokenCreate(options_string,' ',&token);
-	for (;;){
-		
-
-		/*Read next tokens*/
-		if(first_token){
-			PetscTokenFind(token,&first);
-		}
-		PetscTokenFind(token,&second);
-		
-		if (!first){
-			/*We are at the end of options*/
-			break;
-		}
-		if(!second){
-			/*We have no second value, just take first
-			 * and set the option, then end the token analysis.*/
-			if(first[0]!='-'){
-				/*This is not good, the option does not have '-'! Get out*/
-				throw ErrorException(__FUNCT__,exprintf("%s%s%s","Option ",first," should be preceded by '-'!"));
-			}
-			/*Reduce first to bare option value*/
-			PetscStrlen(first,&len);
-			while (len > 0 && (first[len-1] == ' ' || first[len-1] == 'n')) {
-				len--; first[len] = 0;
-			}
-			PetscOptionsSetValue(first,second);
-			break;
-		}
-		else{
-			/*Ok, we have a second token coming in. Is it another option, or 'first' option's value?*/
-			if (second[0]=='-'){
-				/*Second is another option, ignore it*/
-				PetscStrlen(first,&len);
-				while (len > 0 && (first[len-1] == ' ' || first[len-1] == 'n')) {
-					len--; first[len] = 0;
-				}
-				PetscOptionsSetValue(first,NULL);
-				/*Preparing next loop step*/
-				first=second;
-				first_token=0;
-			}
-			else{
-				/*Second is 'first' option's value*/
-				PetscStrlen(second,&len);
-				while (len > 0 && (second[len-1] == ' ' || second[len-1] == 'n')) {
-					len--; second[len] = 0;
-				}
-				PetscOptionsSetValue(first,second);
-				first_token=1;
-			}
-		}
-	}
-
-	PetscTokenDestroy(token);
-}
Index: sm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp.petsc3
===================================================================
--- /issm/trunk/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp.petsc3	(revision 3226)
+++ 	(revision )
@@ -1,91 +1,0 @@
-/*!\file PetscOptionsInsertMultipleString.cpp
- * \brief: create distributed Petsc 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 "./petscpatches.h"
-
-#undef __FUNCT__
-#define __FUNCT__ "PetscOptionsInsertMultipleString"
-
-#include "../../../shared/shared.h"
-
-void PetscOptionsInsertMultipleString(char* options_string){
-
-
-	/*The list of options is going to be pairs of the type "-option option_value"*/
-	PetscToken token=NULL;
-	char* first=NULL;
-	char* second=NULL;
-	char* final=NULL;
-	size_t len;
-	int ignore_second;
-	int first_token=1;
-
-
-	PetscTokenCreate(options_string,' ',&token);
-	for (;;){
-		
-
-		/*Read next tokens*/
-		if(first_token){
-			PetscTokenFind(token,&first);
-		}
-		PetscTokenFind(token,&second);
-		
-		if (!first){
-			/*We are at the end of options*/
-			break;
-		}
-		if(!second){
-			/*We have no second value, just take first
-			 * and set the option, then end the token analysis.*/
-			if(first[0]!='-'){
-				/*This is not good, the option does not have '-'! Get out*/
-				throw ErrorException(__FUNCT__,exprintf("%s%s%s","Option ",first," should be preceded by '-'!"));
-			}
-			/*Reduce first to bare option value*/
-			PetscStrlen(first,&len);
-			while (len > 0 && (first[len-1] == ' ' || first[len-1] == 'n')) {
-				len--; first[len] = 0;
-			}
-			PetscOptionsSetValue(first,second);
-			break;
-		}
-		else{
-			/*Ok, we have a second token coming in. Is it another option, or 'first' option's value?*/
-			if (second[0]=='-'){
-				/*Second is another option, ignore it*/
-				PetscStrlen(first,&len);
-				while (len > 0 && (first[len-1] == ' ' || first[len-1] == 'n')) {
-					len--; first[len] = 0;
-				}
-				PetscOptionsSetValue(first,NULL);
-				/*Preparing next loop step*/
-				first=second;
-				first_token=0;
-			}
-			else{
-				/*Second is 'first' option's value*/
-				PetscStrlen(second,&len);
-				while (len > 0 && (second[len-1] == ' ' || second[len-1] == 'n')) {
-					len--; second[len] = 0;
-				}
-				PetscOptionsSetValue(first,second);
-				first_token=1;
-			}
-		}
-	}
-
-	PetscTokenDestroy(token);
-}
