Index: issm/trunk-jpl/src/c/Makefile.am
===================================================================
--- issm/trunk-jpl/src/c/Makefile.am	(revision 15050)
+++ issm/trunk-jpl/src/c/Makefile.am	(revision 15051)
@@ -128,8 +128,4 @@
 					./classes/matrix/ElementVector.h\
 					./classes/matrix/ElementVector.cpp\
-					./classes/toolkits/toolkitobjects.h\
-					./classes/toolkits/Matrix.h\
-					./classes/toolkits/Vector.h\
-					./classes/toolkits/Solver.h\
 					./classes/Params/Parameters.h\
 					./classes/Params/Parameters.cpp\
@@ -233,4 +229,8 @@
 					./toolkits/ToolkitOptions.cpp\
 					./toolkits/triangle/triangleincludes.h\
+					./toolkits/objects/toolkitobjects.h\
+					./toolkits/objects/Matrix.h\
+					./toolkits/objects/Vector.h\
+					./toolkits/objects/Solver.h\
 					./toolkitsenums.h\
 					./toolkits.h\
Index: issm/trunk-jpl/src/c/classes/Elements/Elements.cpp
===================================================================
--- issm/trunk-jpl/src/c/classes/Elements/Elements.cpp	(revision 15050)
+++ issm/trunk-jpl/src/c/classes/Elements/Elements.cpp	(revision 15051)
@@ -17,5 +17,5 @@
 #include "../ExternalResults/GenericExternalResult.h"
 #include "../Patch.h"
-#include "../toolkits/toolkitobjects.h"
+#include "../../toolkits/toolkits.h"
 #include "../../shared/shared.h"
 
Index: issm/trunk-jpl/src/c/classes/classes.h
===================================================================
--- issm/trunk-jpl/src/c/classes/classes.h	(revision 15050)
+++ issm/trunk-jpl/src/c/classes/classes.h	(revision 15051)
@@ -140,7 +140,4 @@
 #include "./matrix/matrixobjects.h"
 
-/*toolkit objects: */
-#include "./toolkits/toolkitobjects.h"
-
 /*bamg: */
 #include "./bamg/bamgobjects.h"
Index: issm/trunk-jpl/src/c/modules/Solverx/Solverx.h
===================================================================
--- issm/trunk-jpl/src/c/modules/Solverx/Solverx.h	(revision 15050)
+++ issm/trunk-jpl/src/c/modules/Solverx/Solverx.h	(revision 15051)
@@ -12,5 +12,5 @@
 #endif
 
-#include "../../classes/toolkits/toolkitobjects.h"
+#include "../../toolkits/toolkits.h"
 
 /* local prototypes: */
Index: issm/trunk-jpl/src/c/toolkits/objects/Matrix.h
===================================================================
--- issm/trunk-jpl/src/c/toolkits/objects/Matrix.h	(revision 15051)
+++ issm/trunk-jpl/src/c/toolkits/objects/Matrix.h	(revision 15051)
@@ -0,0 +1,329 @@
+/*!\file:  Matrix.h
+ * \brief wrapper to matrix objects. The goal is to control which API (PETSc,Scalpack, Plapack?) 
+ * implements our underlying matrix format.
+ */ 
+
+#ifndef _MATRIX_H_
+#define _MATRIX_H_
+
+/*Headers:*/
+/*{{{*/
+#ifdef HAVE_CONFIG_H
+	#include <config.h>
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+#include <cstring>
+#include "../../shared/Enum/Enum.h"
+#include "../issm/issmtoolkit.h"
+/*}}}*/
+
+enum matrixtype { PetscMatType, IssmMatType };
+
+template <class doubletype> class Vector;
+
+template <class doubletype> 
+class Matrix{
+
+	public:
+
+		int       type;
+		#ifdef _HAVE_PETSC_
+		PetscMat              *pmatrix;
+		#endif
+		IssmMat<doubletype>   *imatrix;
+
+		/*Matrix constructors, destructors*/
+		/*FUNCTION Matrix(){{{*/
+		Matrix(){
+			InitCheckAndSetType();
+		}
+		/*}}}*/
+		/*FUNCTION Matrix(int M,int N){{{*/
+		Matrix(int M,int N){
+
+			InitCheckAndSetType();
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				this->pmatrix=new PetscMat(M,N);
+				#endif
+			}
+			else{
+				this->imatrix=new IssmMat<doubletype>(M,N);
+			}
+
+		}
+		/*}}}*/
+		/*FUNCTION Matrix(int m,int n,int M,int N,int* d_nnz,int* o_nnz){{{*/
+		Matrix(int m,int n,int M,int N,int* d_nnz,int* o_nnz){
+
+			InitCheckAndSetType();
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				this->pmatrix=new PetscMat(m,n,M,N,d_nnz,o_nnz);
+				#endif
+			}
+			else{
+				this->imatrix=new IssmMat<doubletype>(m,n,M,N,d_nnz,o_nnz);
+			}
+
+		}
+		/*}}}*/
+		/*FUNCTION Matrix(int M,int N,IssmDouble sparsity){{{*/
+		Matrix(int M,int N,double sparsity){
+
+			InitCheckAndSetType();
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				this->pmatrix=new PetscMat(M,N,sparsity);
+				#endif
+			}
+			else{
+				this->imatrix=new IssmMat<doubletype>(M,N,sparsity);
+			}
+		}
+		/*}}}*/
+		/*FUNCTION Matrix(IssmDouble* serial_mat, int M,int N,IssmDouble sparsity){{{*/
+		Matrix(IssmPDouble* serial_mat,int M,int N,IssmPDouble sparsity){
+
+			InitCheckAndSetType();
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				this->pmatrix=new PetscMat(serial_mat,M,N,sparsity);
+				#endif
+			}
+			else{
+				this->imatrix=new IssmMat<doubletype>(serial_mat,M,N,sparsity);
+			}
+
+		}
+		/*}}}*/
+		/*FUNCTION Matrix(int M,int N,int connectivity,int numberofdofspernode){{{*/
+		Matrix(int M,int N,int connectivity,int numberofdofspernode){
+
+			InitCheckAndSetType();
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				this->pmatrix=new PetscMat(M,N,connectivity,numberofdofspernode);
+				#endif
+			}
+			else{
+				this->imatrix=new IssmMat<doubletype>(M,N,connectivity,numberofdofspernode);
+			}
+
+		}
+		/*}}}*/
+		/*FUNCTION ~Matrix(){{{*/
+		~Matrix(){
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				delete this->pmatrix;
+				#endif
+			}
+			else delete this->imatrix;
+
+		}
+		/*}}}*/
+		/*FUNCTION InitCheckAndSetType(){{{*/
+		void InitCheckAndSetType(void){
+
+			char* toolkittype=NULL;
+
+			#ifdef _HAVE_PETSC_
+			pmatrix=NULL;
+			#endif
+			imatrix=NULL;
+
+			/*retrieve toolkittype: */
+			toolkittype=ToolkitOptions::GetToolkitType();
+
+			/*set matrix type: */
+			if (strcmp(toolkittype,"petsc")==0){
+				#ifdef _HAVE_PETSC_
+				type=PetscMatType; 
+				#else
+				_error_("cannot create petsc matrix without PETSC compiled!");
+				#endif
+			}
+			else if(strcmp(toolkittype,"issm")==0){
+				/*let this choice stand:*/
+				type=IssmMatType;
+			}
+			else _error_("unknow toolkit type ");
+
+			/*Free ressources: */
+			xDelete<char>(toolkittype);
+		}
+		/*}}}*/
+
+		/*Matrix specific routines:*/
+		/*FUNCTION Echo{{{*/
+		void Echo(void){
+			_assert_(this);
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				this->pmatrix->Echo();
+				#endif
+			}
+			else{
+				this->imatrix->Echo();
+			}
+
+		}
+		/*}}}*/
+		/*FUNCTION AllocationInfo{{{*/
+		void AllocationInfo(void){
+			_assert_(this);
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				this->pmatrix->AllocationInfo();
+				#endif
+			}
+			else{
+				this->imatrix->AllocationInfo();
+			}
+		}/*}}}*/
+		/*FUNCTION Assemble{{{*/
+		void Assemble(void){
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				this->pmatrix->Assemble();
+				#endif
+			}
+			else{
+				this->imatrix->Assemble();
+			}
+		}
+		/*}}}*/
+		/*FUNCTION Norm{{{*/
+		IssmDouble Norm(NormMode norm_type){
+
+			IssmDouble norm=0;
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				norm=this->pmatrix->Norm(norm_type);
+				#endif
+			}
+			else{
+				norm=this->imatrix->Norm(norm_type);
+			}
+
+			return norm;
+		}
+		/*}}}*/
+		/*FUNCTION GetSize{{{*/
+		void GetSize(int* pM,int* pN){
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				this->pmatrix->GetSize(pM,pN);
+				#endif
+			}
+			else{
+				this->imatrix->GetSize(pM,pN);
+			}
+
+		}
+		/*}}}*/
+		/*FUNCTION GetLocalSize{{{*/
+		void GetLocalSize(int* pM,int* pN){
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				this->pmatrix->GetLocalSize(pM,pN);
+				#endif
+			}
+			else{
+				this->imatrix->GetLocalSize(pM,pN);
+			}
+
+		}
+		/*}}}*/
+		/*FUNCTION MatMult{{{*/
+		void MatMult(Vector<doubletype>* X,Vector<doubletype>* AX){
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				this->pmatrix->MatMult(X->pvector,AX->pvector);
+				#endif
+			}
+			else{
+				this->imatrix->MatMult(X->ivector,AX->ivector);
+			}
+
+		}
+		/*}}}*/
+		/*FUNCTION Duplicate{{{*/
+		Matrix<doubletype>* Duplicate(void){
+
+			Matrix<doubletype>* output=new Matrix<doubletype>();
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				output->pmatrix=this->pmatrix->Duplicate();
+				#endif
+			}
+			else{
+				output->imatrix=this->imatrix->Duplicate();
+			}
+
+			return output;
+		}
+		/*}}}*/
+		/*FUNCTION ToSerial{{{*/
+		doubletype* ToSerial(void){
+
+			doubletype* output=NULL;
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				output=this->pmatrix->ToSerial();
+				#endif
+			}
+			else{
+				output=this->imatrix->ToSerial();
+			}
+
+			return output;
+		}
+		/*}}}*/
+		/*FUNCTION SetValues{{{*/
+		void SetValues(int m,int* idxm,int n,int* idxn,IssmDouble* values,InsMode mode){
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				this->pmatrix->SetValues(m,idxm,n,idxn,values,mode);
+				#endif
+			}
+			else{
+				this->imatrix->SetValues(m,idxm,n,idxn,values,mode);
+			}
+		}
+		/*}}}*/
+		/*FUNCTION Convert{{{*/
+		void Convert(MatrixType newtype){
+
+			if(type==PetscMatType){
+				#ifdef _HAVE_PETSC_
+				this->pmatrix->Convert(newtype);
+				#endif
+			}
+			else{
+				this->imatrix->Convert(newtype);
+			}
+
+		}
+		/*}}}*/
+
+};
+
+#endif //#ifndef _MATRIX_H_
Index: issm/trunk-jpl/src/c/toolkits/objects/Solver.h
===================================================================
--- issm/trunk-jpl/src/c/toolkits/objects/Solver.h	(revision 15051)
+++ issm/trunk-jpl/src/c/toolkits/objects/Solver.h	(revision 15051)
@@ -0,0 +1,85 @@
+/*!\file:  Solver.h
+ */ 
+
+#ifndef _SOLVER_CLASS_H_
+#define _SOLVER_CLASS_H_
+
+/*Headers:*/
+#ifdef HAVE_CONFIG_H
+	#include <config.h>
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+#include "./Matrix.h"
+#include "./Vector.h"
+#include "../issm/issmtoolkit.h"
+class Parameters;
+
+template <class doubletype> 
+class Solver{
+
+	private:
+		Matrix<doubletype>* Kff;
+		Vector<doubletype>* pf;
+		Vector<doubletype>* uf0;
+		Vector<doubletype>* df;
+		Parameters* parameters;
+
+	public:
+		/*Constructors, destructors:*/
+		Solver(){/*{{{*/
+		}
+		/*}}}*/
+		Solver(Matrix<doubletype>* Kff_in, Vector<doubletype>* pf_in, Vector<doubletype>* uf0_in,Vector<doubletype>* df_in, Parameters* parameters_in){/*{{{*/
+
+			/*In debugging mode, check that stiffness matrix and load vectors are not NULL (they can be empty)*/
+			_assert_(Kff_in);
+			_assert_(pf_in);
+
+			/*initialize fields: */
+			this->Kff=Kff_in;
+			this->pf=pf_in;
+			this->uf0=uf0_in;
+			this->df=df_in;
+			this->parameters=parameters_in;
+		}
+		/*}}}*/
+		~Solver(){/*{{{*/
+		}
+		/*}}}*/
+
+		/*Methods: */
+		Vector<doubletype>* Solve(void){ /*{{{*/
+
+			/*output: */
+			Vector<doubletype>* uf=NULL;
+
+			/*Initialize vector: */
+			uf=new Vector<doubletype>();
+
+			/*According to matrix type, use specific solvers: */
+			switch(Kff->type){
+				#ifdef _HAVE_PETSC_
+				case PetscMatType:{
+					PetscVec* uf0_vector = NULL;
+					PetscVec* df_vector  = NULL;
+					if(uf0) uf0_vector = uf0->pvector;
+					if(df)  df_vector  = df->pvector;
+					PetscSolve(&uf->pvector,Kff->pmatrix,pf->pvector,uf0_vector,df_vector,parameters);
+					break;
+								  }
+				#endif
+				case IssmMatType:{
+					IssmSolve(&uf->ivector,Kff->imatrix,pf->ivector,parameters);
+					break;
+								 }
+				default:
+					_error_("Matrix type: " << Kff->type << " not supported yet!");
+			}
+
+			/*allocate output pointer: */
+			return uf;
+		}
+		/*}}}*/
+};
+#endif //#ifndef _SOLVER_H_
Index: issm/trunk-jpl/src/c/toolkits/objects/Vector.h
===================================================================
--- issm/trunk-jpl/src/c/toolkits/objects/Vector.h	(revision 15051)
+++ issm/trunk-jpl/src/c/toolkits/objects/Vector.h	(revision 15051)
@@ -0,0 +1,357 @@
+/*!\file:  Vector.h
+ * \brief wrapper to vector objects. The goal is to control which API (PETSc,Scalpack, Plapack?) 
+ * implements our underlying vector format.
+ */ 
+
+#ifndef _VECTOR_H_
+#define _VECTOR_H_
+
+/*Headers:*/
+/*{{{*/
+#ifdef HAVE_CONFIG_H
+	#include <config.h>
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+#include <cstring>
+#include "../../shared/Enum/Enum.h"
+#include "../issm/issmtoolkit.h"
+/*}}}*/
+
+enum vectortype { PetscVecType, IssmVecType };
+
+template <class doubletype> 
+class Vector{
+
+	public:
+
+		int  type;
+		#ifdef _HAVE_PETSC_
+		PetscVec* pvector;
+		#endif
+		IssmVec<doubletype>* ivector; 
+
+		/*Vector constructors, destructors */
+		Vector(){ /*{{{*/
+
+			InitCheckAndSetType();
+		}
+		/*}}}*/
+		Vector(int M,bool fromlocalsize=false){ /*{{{*/
+
+			InitCheckAndSetType();
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector=new PetscVec(M,fromlocalsize);
+				#endif
+			}
+			else this->ivector=new IssmVec<doubletype>(M,fromlocalsize);
+
+		}
+		/*}}}*/
+		Vector(int m,int M){ /*{{{*/
+
+			InitCheckAndSetType();
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+					this->pvector=new PetscVec(m,M);
+				 #endif
+			}
+			else this->ivector=new IssmVec<doubletype>(m,M);
+		}
+		/*}}}*/
+		Vector(doubletype* serial_vec,int M){ /*{{{*/
+
+			InitCheckAndSetType();
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector=new PetscVec(serial_vec,M);
+				#endif
+			}
+			else this->ivector=new IssmVec<doubletype>(serial_vec,M);
+		}
+		/*}}}*/
+		~Vector(){ /*{{{*/
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				delete this->pvector;
+				#endif
+			}
+			else delete this->ivector;
+		}
+		/*}}}*/
+		#ifdef _HAVE_PETSC_
+		Vector(Vec petsc_vector){ /*{{{*/
+
+			this->type=PetscVecType;
+			this->ivector=NULL;
+			this->pvector=new PetscVec(petsc_vector);
+
+		}
+		/*}}}*/
+		#endif
+		void InitCheckAndSetType(void){ /*{{{*/
+
+			char* toolkittype=NULL;
+
+			#ifdef _HAVE_PETSC_
+			pvector=NULL;
+			#endif
+			ivector=NULL;
+
+			/*retrieve toolkittype: */
+			toolkittype=ToolkitOptions::GetToolkitType();
+
+			/*set vector type: */
+			if (strcmp(toolkittype,"petsc")==0){
+				#ifdef _HAVE_PETSC_
+				type=PetscVecType; 
+				#else
+				_error_("cannot create petsc vector without PETSC compiled!");
+				#endif
+			}
+			else if(strcmp(toolkittype,"issm")==0){
+				/*let this choice stand:*/
+				type=IssmVecType;
+			}
+			else _error_("unknow toolkit type ");
+
+			/*Free ressources: */
+			xDelete<char>(toolkittype);
+		}
+		/*}}}*/
+
+		/*Vector specific routines*/
+		/*FUNCTION Echo{{{*/
+		void Echo(void){_assert_(this);
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector->Echo();
+				#endif
+			}
+			else this->ivector->Echo();
+
+		}
+		/*}}}*/
+		/*FUNCTION Assemble{{{*/
+		void Assemble(void){_assert_(this);
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector->Assemble();
+				#endif
+			}
+			else this->ivector->Assemble();
+
+		}
+		/*}}}*/
+		/*FUNCTION SetValues{{{*/
+		void SetValues(int ssize, int* list, doubletype* values, InsMode mode){ _assert_(this);
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector->SetValues(ssize,list,values,mode);
+				#endif
+			}
+			else this->ivector->SetValues(ssize,list,values,mode);
+
+		}
+		/*}}}*/
+		/*FUNCTION SetValue{{{*/
+		void SetValue(int dof, doubletype value, InsMode mode){_assert_(this);
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector->SetValue(dof,value,mode);
+				#endif
+			}
+			else this->ivector->SetValue(dof,value,mode);
+
+		}
+		/*}}}*/
+		/*FUNCTION GetValue{{{*/
+		void GetValue(doubletype* pvalue,int dof){_assert_(this);
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector->GetValue(pvalue,dof);
+				#endif
+			}
+			else this->ivector->GetValue(pvalue,dof);
+
+		}
+		/*}}}*/
+		/*FUNCTION GetSize{{{*/
+		void GetSize(int* pM){_assert_(this);
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector->GetSize(pM);
+				#endif
+			}
+			else this->ivector->GetSize(pM);
+
+		}
+		/*}}}*/
+		/*FUNCTION IsEmpty{{{*/
+		bool IsEmpty(void){
+			int M;
+
+			_assert_(this);
+			this->GetSize(&M);
+
+			if(M==0) 
+				return true;
+			else
+				return false;
+		}
+		/*}}}*/
+		/*FUNCTION GetLocalSize{{{*/
+		void GetLocalSize(int* pM){_assert_(this);
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector->GetLocalSize(pM);
+				#endif
+			}
+			else this->ivector->GetLocalSize(pM);
+
+		}
+		/*}}}*/
+		/*FUNCTION Duplicate{{{*/
+		Vector<doubletype>* Duplicate(void){_assert_(this);
+
+			Vector<doubletype>* output=NULL;
+
+			output=new Vector<doubletype>();
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				output->pvector=this->pvector->Duplicate();
+				#endif
+			}
+			else output->ivector=this->ivector->Duplicate();
+
+			return output;
+
+		}
+		/*}}}*/
+		/*FUNCTION Set{{{*/
+		void Set(doubletype value){_assert_(this);
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector->Set(value);
+				#endif
+			}
+			else this->ivector->Set(value);
+
+		}
+		/*}}}*/
+		/*FUNCTION AXPY{{{*/
+		void AXPY(Vector* X, doubletype a){_assert_(this);
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector->AXPY(X->pvector,a);
+				#endif
+			}
+			else this->ivector->AXPY(X->ivector,a);
+
+		}
+		/*}}}*/
+		/*FUNCTION AYPX{{{*/
+		void AYPX(Vector* X, doubletype a){_assert_(this);
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector->AYPX(X->pvector,a);
+				#endif
+			}
+			else this->ivector->AYPX(X->ivector,a);
+		}
+		/*}}}*/
+		/*FUNCTION ToMPISerial{{{*/
+		doubletype* ToMPISerial(void){
+
+			doubletype* vec_serial=NULL;
+
+			_assert_(this);
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				vec_serial=this->pvector->ToMPISerial();
+				#endif
+			}
+			else vec_serial=this->ivector->ToMPISerial();
+
+			return vec_serial;
+
+		}
+		/*}}}*/
+		/*FUNCTION Copy{{{*/
+		void Copy(Vector* to){_assert_(this);
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector->Copy(to->pvector);
+				#endif
+			}
+			else this->ivector->Copy(to->ivector);
+		}
+		/*}}}*/
+		/*FUNCTION Norm{{{*/
+		doubletype Norm(NormMode norm_type){_assert_(this);
+
+			doubletype norm=0;
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				norm=this->pvector->Norm(norm_type);
+				#endif
+			}
+			else norm=this->ivector->Norm(norm_type);
+			return norm;
+		}
+		/*}}}*/
+		/*FUNCTION Scale{{{*/
+		void Scale(doubletype scale_factor){_assert_(this);
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector->Scale(scale_factor);
+				#endif
+			}
+			else this->ivector->Scale(scale_factor);
+		}
+		/*}}}*/
+		/*FUNCTION Dot{{{*/
+		doubletype Dot(Vector* vector){_assert_(this);
+
+			doubletype dot;
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				dot=this->pvector->Dot(vector->pvector);
+				#endif
+			}
+			else dot=this->ivector->Dot(vector->ivector);
+			return dot;
+		}
+		/*}}}*/
+		/*FUNCTION PointwiseDivide{{{*/
+		void PointwiseDivide(Vector* x,Vector* y){_assert_(this);
+
+			if(type==PetscVecType){
+				#ifdef _HAVE_PETSC_
+				this->pvector->PointwiseDivide(x->pvector,y->pvector);
+				#endif
+			}
+			else this->ivector->PointwiseDivide(x->ivector,y->ivector);
+		}
+		/*}}}*/
+};
+#endif //#ifndef _VECTOR_H_
Index: issm/trunk-jpl/src/c/toolkits/objects/toolkitobjects.h
===================================================================
--- issm/trunk-jpl/src/c/toolkits/objects/toolkitobjects.h	(revision 15051)
+++ issm/trunk-jpl/src/c/toolkits/objects/toolkitobjects.h	(revision 15051)
@@ -0,0 +1,13 @@
+
+/*!\file:  toolkitobjects.h
+ * \brief wrappers to toolkits
+ */ 
+
+#ifndef _TOOLKIT_OBJECTS_H_
+#define _TOOLKIT_OBJECTS_H_
+
+#include "./Vector.h"
+#include "./Matrix.h"
+#include "./Solver.h"
+
+#endif
Index: issm/trunk-jpl/src/c/toolkits/toolkits.h
===================================================================
--- issm/trunk-jpl/src/c/toolkits/toolkits.h	(revision 15050)
+++ issm/trunk-jpl/src/c/toolkits/toolkits.h	(revision 15051)
@@ -29,4 +29,5 @@
 
 #include "./triangle/triangleincludes.h"
+#include "./objects/toolkitobjects.h"
 #include "./toolkitsenums.h"
 #include "./issm/issmtoolkit.h"
