Index: /issm/trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp	(revision 14886)
+++ /issm/trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp	(revision 14887)
@@ -23,5 +23,5 @@
 class Parameters;
 
-void DenseGslSolve(/*output*/ IssmDouble** px,/*stiffness matrix:*/ IssmDouble* Kff, int Kff_M, int Kff_N, /*right hand side load vector: */ IssmDouble* pf, int pf_M, Parameters* parameters){
+void DenseGslSolve(/*output*/ IssmPDouble** px,/*stiffness matrix:*/ IssmPDouble* Kff, int Kff_M, int Kff_N, /*right hand side load vector: */ IssmPDouble* pf, int pf_M, Parameters* parameters){ /*{{{*/
 
 	/*Intermediary: */
@@ -30,29 +30,9 @@
 	if(Kff_M!=Kff_N)_error_("Stiffness matrix should be square!");
 
-	#ifdef _HAVE_ADOLC_
-	ensureContiguousLocations(Kff_N);
-	#endif
-	IssmDouble *x  = xNew<IssmDouble>(Kff_N);
-
-	#ifdef _HAVE_ADOLC_
-	SolverxSeq(x,Kff,pf,Kff_N,parameters);
-	#else
+	IssmPDouble *x  = xNew<IssmPDouble>(Kff_N);
 	SolverxSeq(x,Kff,pf,Kff_N);
-	#endif
 
 	/*allocate output pointers: */
 	*px=x;
-}
-
-void SolverxSeq(IssmPDouble **pX, IssmPDouble *A, IssmPDouble *B,int n){ /*{{{*/
-
-	/*Allocate output*/
-	double* X = xNew<double>(n); 
-
-	/*Solve*/
-	SolverxSeq(X,A,B,n);
-
-	/*Assign output pointer*/
-	*pX=X;
 }
 /*}}}*/
@@ -220,4 +200,20 @@
 }
 /*}}}*/
+void DenseGslSolve(/*output*/ IssmDouble** px,/*stiffness matrix:*/ IssmDouble* Kff, int Kff_M, int Kff_N, /*right hand side load vector: */ IssmDouble* pf, int pf_M, Parameters* parameters){ /*{{{*/
+
+	/*Intermediary: */
+
+	if(Kff_N!=pf_M)_error_("Right hand side vector of size " << pf_M << ", when matrix is of size " << Kff_M << "-" << Kff_N << " !");
+	if(Kff_M!=Kff_N)_error_("Stiffness matrix should be square!");
+
+	ensureContiguousLocations(Kff_N);
+	IssmDouble *x  = xNew<IssmDouble>(Kff_N);
+
+	SolverxSeq(x,Kff,pf,Kff_N,parameters);
+
+	/*allocate output pointers: */
+	*px=x;
+}
+/*}}}*/
 void SolverxSeq(IssmDouble *X,IssmDouble *A,IssmDouble *B,int n, Parameters* parameters){/*{{{*/
 	// pack inputs to conform to the EDF-prescribed interface
@@ -240,2 +236,3 @@
 /*}}}*/
 #endif
+
Index: /issm/trunk-jpl/src/c/toolkits/gsl/gslincludes.h
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/gsl/gslincludes.h	(revision 14886)
+++ /issm/trunk-jpl/src/c/toolkits/gsl/gslincludes.h	(revision 14887)
@@ -22,5 +22,4 @@
 void DenseGslSolve(IssmDouble** px, IssmDouble* Kff,int Kff_M, int Kff_N, IssmDouble* pf, int pf_M, Parameters* parameters);
 
-void SolverxSeq(IssmPDouble **pX, IssmPDouble *A, IssmPDouble *B,int n);
 void SolverxSeq(IssmPDouble *X, IssmPDouble *A, IssmPDouble *B,int n);
 
