Index: /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 11510)
+++ /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 11510)
@@ -0,0 +1,21 @@
+/*!\file PositiveDegreeDayx
+ * \brief: create system matrices (stiffness matrix, loads vector)
+ */
+
+#include "./PositiveDegreeDayx.h"
+#include "../../shared/shared.h"
+#include "../../include/include.h"
+#include "../../io/io.h"
+#include "../../toolkits/toolkits.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+
+void PositiveDegreeDayx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters){
+	
+	Element* element = NULL;
+
+	for(int i=0;i<elements->Size();i++){
+		element=(Element*)elements->GetObjectByOffset(i);
+		element->PositiveDegreeDay();
+	}
+
+}
Index: /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.h
===================================================================
--- /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.h	(revision 11510)
+++ /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.h	(revision 11510)
@@ -0,0 +1,14 @@
+/*!\file:  PositiveDegreeDayx.h
+ * \brief header file for degree of freedoms distribution routines.
+ */ 
+
+#ifndef _POSITIVEDEGREEDAYX_H
+#define _POSITIVEDEGREEDAYX_H
+
+#include "../../Container/Container.h"
+#include "../../objects/objects.h"
+
+/* local prototypes: */
+void PositiveDegreeDayx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters);
+
+#endif  /* _POSITIVEDEGREEDAYX_H*/
Index: /issm/trunk-jpl/src/c/solutions/controltao_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 11509)
+++ /issm/trunk-jpl/src/c/solutions/controltao_core.cpp	(revision 11510)
@@ -18,4 +18,5 @@
 /*Local prototype*/
 int FormFunctionGradient(TaoSolver tao,Vec,double*,Vec,void*);
+int IssmMonitor(TaoSolver,void *);
 typedef struct {
 	FemModel* femmodel;
@@ -53,5 +54,4 @@
 	_printf_(VerboseControl(),"%s\n","   Initializing the Toolkit for Advanced Optimization (TAO)");
 	TaoCreate(PETSC_COMM_WORLD,&tao);
-	PetscOptionsSetValue("-tao_monitor","");
 	TaoSetFromOptions(tao);
 	TaoSetType(tao,"tao_blmvm");
@@ -60,4 +60,5 @@
 
 	/*Prepare all TAO parameters*/
+	TaoSetMonitor(tao,IssmMonitor,NULL,NULL);
 	TaoSetMaximumFunctionEvaluations(tao,maxiter);
 	TaoSetMaximumIterations(tao,nsteps);
@@ -143,4 +144,14 @@
 	return 0;
 }
+int IssmMonitor(TaoSolver tao, void *userCtx){
+
+	AppCtx *user = (AppCtx *)userCtx;
+	int     its;
+	double  f,gnorm,cnorm,xdiff;
+
+	TaoGetSolutionStatus(tao, &its, &f, &gnorm, &cnorm, &xdiff, NULL);
+	printf("Iteration %3i: Function value: %12.7g, Residual: %g\n",its,f,gnorm);
+	return 0;
+}
 
 #else
