Index: issm/trunk/src/c/modules/InputConvergencex/InputConvergencex.cpp
===================================================================
--- issm/trunk/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 4779)
+++ issm/trunk/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 4780)
@@ -11,12 +11,12 @@
 
 	/*intermediary:*/
+	int         i;
+	int         converged = 1;
+	int         node_converged=1;
+	double     *eps       = NULL;
 	extern int  my_rank;
-	int      i;
-	bool     converged      = true;
-	bool     node_converged = true;
-	double  *eps            = NULL;
-	int      rank_allowed;
-	Element *element        = NULL;
-	int      verbose        = 0;
+	int         rank_allowed;
+	Element*    element=NULL;
+	int         verbose=0;
 
 	/*retrieve parameters: */
@@ -57,4 +57,7 @@
 
 	/*return: */
-	return converged;
+	if (converged){
+		return true;}
+	else{
+		return false;}
 }
Index: issm/trunk/src/c/objects/Elements/Beam.cpp
===================================================================
--- issm/trunk/src/c/objects/Elements/Beam.cpp	(revision 4779)
+++ issm/trunk/src/c/objects/Elements/Beam.cpp	(revision 4780)
@@ -405,10 +405,10 @@
 /*}}}*/
 /*FUNCTION Beam::InputConvergence{{{1*/
-void  Beam::InputConvergence(bool* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){
+void  Beam::InputConvergence(int* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){
 
 	int     i;
 	Input** new_inputs=NULL;
 	Input** old_inputs=NULL;
-	bool    converged=true;
+	int     converged=1;
 
 	new_inputs=(Input**)xmalloc(num_enums/2*sizeof(Input*)); //half the enums are for the new inputs
@@ -425,6 +425,10 @@
 	for(i=0;i<num_criterionenums;i++){
 		IsInputConverged(eps+i,new_inputs,old_inputs,num_enums/2,criterionenums[i]);
-		if(eps[i]>criterionvalues[i]) converged=false; 
-	}
+		if(eps[i]>criterionvalues[i]) converged=0; 
+	}
+
+	/*clean up*/
+	xfree((void**)&new_inputs);
+	xfree((void**)&old_inputs);
 
 	/*Assign output pointers:*/
Index: issm/trunk/src/c/objects/Elements/Beam.h
===================================================================
--- issm/trunk/src/c/objects/Elements/Beam.h	(revision 4779)
+++ issm/trunk/src/c/objects/Elements/Beam.h	(revision 4780)
@@ -84,5 +84,5 @@
 		void	   InputAXPY(int YEnum, double scalar, int XEnum);
 		void	   InputControlConstrain(int control_type,double cm_min, double cm_max);
-		void	   InputConvergence(bool* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums);
+		void	   InputConvergence(int* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums);
 		void     InputDepthAverageAtBase(int enum_type,int average_enum_type){ISSMERROR("not implemented yet");}
 		void	   InputDuplicate(int original_enum,int new_enum);
Index: issm/trunk/src/c/objects/Elements/Element.h
===================================================================
--- issm/trunk/src/c/objects/Elements/Element.h	(revision 4779)
+++ issm/trunk/src/c/objects/Elements/Element.h	(revision 4780)
@@ -72,5 +72,5 @@
 		virtual void   InputAXPY(int YEnum, double scalar, int XEnum)=0;
 		virtual void   InputControlConstrain(int control_type,double cm_min, double cm_max)=0;
-		virtual void   InputConvergence(bool* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums)=0;
+		virtual void   InputConvergence(int* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums)=0;
 
 		/*Implementation: */
Index: issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 4779)
+++ issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 4780)
@@ -1074,10 +1074,10 @@
 /*}}}*/
 /*FUNCTION Penta::InputConvergence{{{1*/
-void  Penta::InputConvergence(bool* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){
+void  Penta::InputConvergence(int* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){
 
 	int     i;
 	Input** new_inputs=NULL;
 	Input** old_inputs=NULL;
-	bool    converged=true;
+	int     converged=1;
 
 	new_inputs=(Input**)xmalloc(num_enums/2*sizeof(Input*)); //half the enums are for the new inputs
@@ -1094,6 +1094,10 @@
 	for(i=0;i<num_criterionenums;i++){
 		IsInputConverged(eps+i,new_inputs,old_inputs,num_enums/2,criterionenums[i]);
-		if(eps[i]>criterionvalues[i]) converged=false; 
-	}
+		if(eps[i]>criterionvalues[i]) converged=0; 
+	}
+
+	/*clean up*/
+	xfree((void**)&new_inputs);
+	xfree((void**)&old_inputs);
 
 	/*Assign output pointers:*/
Index: issm/trunk/src/c/objects/Elements/Penta.h
===================================================================
--- issm/trunk/src/c/objects/Elements/Penta.h	(revision 4779)
+++ issm/trunk/src/c/objects/Elements/Penta.h	(revision 4780)
@@ -87,5 +87,5 @@
 		void   InputAXPY(int YEnum, double scalar, int XEnum);
 		void   InputControlConstrain(int control_type,double cm_min, double cm_max);
-		void   InputConvergence(bool* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums);
+		void   InputConvergence(int* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums);
 		void   InputDepthAverageAtBase(int enum_type,int average_enum_type);
 		void   InputDuplicate(int original_enum,int new_enum);
Index: issm/trunk/src/c/objects/Elements/Sing.cpp
===================================================================
--- issm/trunk/src/c/objects/Elements/Sing.cpp	(revision 4779)
+++ issm/trunk/src/c/objects/Elements/Sing.cpp	(revision 4780)
@@ -374,10 +374,10 @@
 /*}}}*/
 /*FUNCTION Sing::InputConvergence{{{1*/
-void  Sing::InputConvergence(bool* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){
+void  Sing::InputConvergence(int* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){
 
 	int i;
 	Input** new_inputs=NULL;
 	Input** old_inputs=NULL;
-	bool    converged=true;
+	int     converged=1;
 
 	new_inputs=(Input**)xmalloc(num_enums/2*sizeof(Input*)); //half the enums are for the new inputs
@@ -394,6 +394,10 @@
 	for(i=0;i<num_criterionenums;i++){
 		IsInputConverged(eps+i,new_inputs,old_inputs,num_enums/2,criterionenums[i]);
-		if(eps[i]>criterionvalues[i]) converged=false; 
-	}
+		if(eps[i]>criterionvalues[i]) converged=0; 
+	}
+
+	/*clean up*/
+	xfree((void**)&new_inputs);
+	xfree((void**)&old_inputs);
 
 	/*Assign output pointers:*/
Index: issm/trunk/src/c/objects/Elements/Sing.h
===================================================================
--- issm/trunk/src/c/objects/Elements/Sing.h	(revision 4779)
+++ issm/trunk/src/c/objects/Elements/Sing.h	(revision 4780)
@@ -84,5 +84,5 @@
 		void   InputAXPY(int YEnum, double scalar, int XEnum);
 		void   InputControlConstrain(int control_type,double cm_min, double cm_max);
-		void   InputConvergence(bool* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums);
+		void   InputConvergence(int* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums);
 		void   InputDepthAverageAtBase(int enum_type,int average_enum_type){ISSMERROR("not implemented yet");}
 		void   InputDuplicate(int original_enum,int new_enum);
Index: issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 4779)
+++ issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 4780)
@@ -1453,10 +1453,10 @@
 /*}}}*/
 /*FUNCTION Tria::InputConvergence{{{1*/
-void  Tria::InputConvergence(bool* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){
+void  Tria::InputConvergence(int* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums){
 
 	int i;
 	Input** new_inputs=NULL;
 	Input** old_inputs=NULL;
-	bool     converged=true;
+	int     converged=1;
 
 	new_inputs=(Input**)xmalloc(num_enums/2*sizeof(Input*)); //half the enums are for the new inputs
@@ -1473,6 +1473,10 @@
 	for(i=0;i<num_criterionenums;i++){
 		IsInputConverged(eps+i,new_inputs,old_inputs,num_enums/2,criterionenums[i]);
-		if(eps[i]>criterionvalues[i]) converged=false; 
-	}
+		if(eps[i]>criterionvalues[i]) converged=0; 
+	}
+
+	/*clean up*/
+	xfree((void**)&new_inputs);
+	xfree((void**)&old_inputs);
 
 	/*Assign output pointers:*/
Index: issm/trunk/src/c/objects/Elements/Tria.h
===================================================================
--- issm/trunk/src/c/objects/Elements/Tria.h	(revision 4779)
+++ issm/trunk/src/c/objects/Elements/Tria.h	(revision 4780)
@@ -84,5 +84,5 @@
 		void   InputAXPY(int YEnum, double scalar, int XEnum);
 		void   InputControlConstrain(int control_type,double cm_min, double cm_max);
-		void   InputConvergence(bool* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums);
+		void   InputConvergence(int* pconverged,double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums);
 		void   InputDepthAverageAtBase(int enum_type,int average_enum_type);
 		void   InputDuplicate(int original_enum,int new_enum);
