Index: /issm/trunk-jpl/src/c/classes/Elements/Element.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Element.h	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Elements/Element.h	(revision 23524)
@@ -3,5 +3,5 @@
  * This class is a place holder for the Tria and the Penta elements.
  * It is derived from Element, so DataSets can contain them.
- */
+*/
 
 #ifndef _ELEMENT_H_
@@ -12,5 +12,4 @@
 #include "../../datastructures/datastructures.h"
 #include "../../toolkits/toolkits.h"
-#include "../Update.h"
 class DataSet;
 class Parameters;
@@ -27,4 +26,5 @@
 class Inputs;
 class Input;
+class IoModel;
 class Gauss;
 class ElementVector;
@@ -35,5 +35,5 @@
 /*}}}*/
 
-class Element: public Object,public Update{
+class Element: public Object{
 
 	public:
@@ -131,4 +131,5 @@
 		void               InputUpdateFromConstant(int constant, int name);
 		void               InputUpdateFromConstant(bool constant, int name);
+
 		bool               IsFloating();
 		bool               IsIceInElement();
@@ -189,4 +190,5 @@
 		void               ViscousHeatingCreateInput(void);
 
+
 		/*Virtual functions*/
 		virtual void       AddBasalInput(int input_enum, IssmDouble* values, int interpolation_enum)=0;
@@ -240,4 +242,10 @@
 		virtual void       InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solution,int inputenum)=0;
 		virtual void       InputUpdateFromSolutionOneDof(IssmDouble* solution,int inputenum)=0;
+		#ifdef _HAVE_DAKOTA_
+		virtual void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int rows, int ncols, int name, int type)=0;
+		virtual void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type)=0;
+		#endif
+		virtual void  InputUpdateFromIoModel(int index, IoModel* iomodel)=0;
+		virtual void  InputUpdateFromVector(IssmDouble* vector, int name, int type)=0;
 		virtual bool       IsFaceOnBoundary(void)=0;
 		virtual bool       IsIcefront(void)=0;
Index: /issm/trunk-jpl/src/c/classes/Loads/Load.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Loads/Load.h	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Loads/Load.h	(revision 23524)
@@ -19,7 +19,6 @@
 class Parameters;
 #include "../../datastructures/datastructures.h"
-#include "../Update.h"
 
-class Load: public Object,public Update{
+class Load: public Object{
 
 	public: 
Index: /issm/trunk-jpl/src/c/classes/Loads/Loads.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Loads/Loads.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Loads/Loads.cpp	(revision 23524)
@@ -16,4 +16,7 @@
 
 #include "../../shared/io/Comm/IssmComm.h"
+#include "../../shared/Numerics/recast.h"
+#include "../../shared/Enum/EnumDefinitions.h"
+#include "../../shared/Exceptions/exceptions.h"
 #include "./Loads.h"
 #include "./Load.h"
Index: /issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Loads/Pengrid.cpp	(revision 23524)
@@ -355,37 +355,4 @@
 /*}}}*/
 
-/*Update virtual functions definitions:*/
-void  Pengrid::InputUpdateFromConstant(IssmDouble constant, int name){/*{{{*/
-	/*Nothing*/
-}
-/*}}}*/
-void  Pengrid::InputUpdateFromConstant(int constant, int name){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void  Pengrid::InputUpdateFromConstant(bool constant, int name){/*{{{*/
-
-	switch(name){
-
-		case ResetPenaltiesEnum:
-			if (constant) zigzag_counter=0;
-			return;
-
-	}
-}
-/*}}}*/
-void  Pengrid::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void  Pengrid::InputUpdateFromVector(IssmDouble* vector, int name, int type){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void  Pengrid::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-
 /*Pengrid management:*/
 void           Pengrid::ConstraintActivate(int* punstable){/*{{{*/
@@ -693,2 +660,7 @@
 }
 /*}}}*/
+void           Pengrid::ResetZigzagCounter(){/*{{{*/
+
+	zigzag_counter=0;
+}
+/*}}}*/
Index: /issm/trunk-jpl/src/c/classes/Loads/Pengrid.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Loads/Pengrid.h	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Loads/Pengrid.h	(revision 23524)
@@ -57,13 +57,4 @@
 		int   ObjectEnum();
 		/*}}}*/
-		/*Update virtual functions resolution: {{{*/
-		void  InputUpdateFromConstant(IssmDouble constant, int name);
-		void  InputUpdateFromConstant(int constant, int name);
-		void  InputUpdateFromConstant(bool constant, int name);
-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
-		void  InputUpdateFromMatrixDakota(IssmDouble* matrix ,int nrows, int ncols, int name, int type);
-		void  InputUpdateFromVector(IssmDouble* vector, int name, int type);
-		void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
-		/*}}}*/
 		/*Load virtual functions definitions: {{{*/
 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
@@ -94,4 +85,5 @@
 		ElementVector* PenaltyCreatePVectorThermal(IssmDouble kmax);
 		void  ResetConstraint(void);
+		void  ResetZigzagCounter(void);
 		/*}}}*/
 
Index: /issm/trunk-jpl/src/c/classes/Materials/Material.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Material.h	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Materials/Material.h	(revision 23524)
@@ -11,5 +11,5 @@
 template <class doubletype> class Vector;
 #include "../../datastructures/datastructures.h"
-#include "../Update.h"
+#include "../../toolkits/toolkits.h"
 class Element;
 class Elements;
@@ -18,9 +18,8 @@
 /*}}}*/
 
-class Material: public Object,public Update{
+class Material: public Object{
 
 	public: 
 		virtual ~Material(){};
-		/*WARNING: input should not be public but it is an easy way to update B from T (using UpdateFromSolution) from Pentas*/
 
 		/*Numerics*/
Index: /issm/trunk-jpl/src/c/classes/Materials/Matestar.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Matestar.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Materials/Matestar.cpp	(revision 23524)
@@ -370,28 +370,4 @@
 }
 /*}}}*/
-void  Matestar::InputUpdateFromConstant(IssmDouble constant, int name){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void  Matestar::InputUpdateFromConstant(int constant, int name){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void  Matestar::InputUpdateFromConstant(bool constant, int name){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void  Matestar::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols,int name, int type){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void  Matestar::InputUpdateFromVector(IssmDouble* vector, int name, int type){/*{{{*/
-
-}
-/*}}}*/
-void  Matestar::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){/*{{{*/
-
-}
-/*}}}*/
 bool Matestar::IsDamage(){/*{{{*/
 
Index: /issm/trunk-jpl/src/c/classes/Materials/Matestar.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Matestar.h	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Materials/Matestar.h	(revision 23524)
@@ -44,13 +44,4 @@
 		int   ObjectEnum();
 		/*}}}*/
-		/*Update virtual funictions definitions: {{{*/
-		void  InputUpdateFromConstant(IssmDouble constant, int name);
-		void  InputUpdateFromConstant(int constant, int name);
-		void  InputUpdateFromConstant(bool constant, int name);
-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented");};
-		void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrow, int ncols, int name, int type);
-		void  InputUpdateFromVector(IssmDouble* vector, int name, int type);
-		void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
-		/*}}}*/
 		/*Material virtual functions resolution: {{{*/
 		void   Configure(Elements* elements);
Index: /issm/trunk-jpl/src/c/classes/Materials/Matice.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Matice.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Materials/Matice.cpp	(revision 23524)
@@ -654,28 +654,4 @@
 }
 /*}}}*/
-void  Matice::InputUpdateFromConstant(IssmDouble constant, int name){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void  Matice::InputUpdateFromConstant(int constant, int name){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void  Matice::InputUpdateFromConstant(bool constant, int name){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void  Matice::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols,int name, int type){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void  Matice::InputUpdateFromVector(IssmDouble* vector, int name, int type){/*{{{*/
-
-}
-/*}}}*/
-void  Matice::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){/*{{{*/
-
-}
-/*}}}*/
 void  Matice::ResetHooks(){/*{{{*/
 
Index: /issm/trunk-jpl/src/c/classes/Materials/Matice.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Matice.h	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Materials/Matice.h	(revision 23524)
@@ -48,13 +48,4 @@
 		int   ObjectEnum();
 		/*}}}*/
-		/*Update virtual funictions definitions: {{{*/
-		void  InputUpdateFromConstant(IssmDouble constant, int name);
-		void  InputUpdateFromConstant(int constant, int name);
-		void  InputUpdateFromConstant(bool constant, int name);
-		void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented");};
-		void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrow, int ncols, int name, int type);
-		void  InputUpdateFromVector(IssmDouble* vector, int name, int type);
-		void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
-		/*}}}*/
 		/*Material virtual functions resolution: {{{*/
 		void   Configure(Elements* elements);
Index: /issm/trunk-jpl/src/c/classes/Materials/Matlitho.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Matlitho.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Materials/Matlitho.cpp	(revision 23524)
@@ -182,6 +182,4 @@
 /*}}}*/
 
-/*Update virtual functions definitions:*/
-
 /*Matlitho management: */
 void       Matlitho::Configure(Elements* elementsin){/*{{{*/
Index: /issm/trunk-jpl/src/c/classes/Materials/Matlitho.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Matlitho.h	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Materials/Matlitho.h	(revision 23524)
@@ -39,13 +39,4 @@
 		void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);
 		int     ObjectEnum();
-		/*}}}*/
-		/*Update virtual functions resolution: {{{*/
-		void   InputUpdateFromConstant(IssmDouble constant, int name){_error_("not implemented");};
-		void   InputUpdateFromConstant(int constant, int name){_error_("not implemented");};
-		void   InputUpdateFromConstant(bool constant, int name){_error_("not implemented");};
-		void   InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented");};
-		void   InputUpdateFromMatrixDakota(IssmDouble* matrix,int nrows,int ncols, int name, int type){_error_("not implemented");};
-		void   InputUpdateFromVector(IssmDouble* vector, int name, int type){_error_("not implemented");};
-		void   InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error_("not implemented");};
 		/*}}}*/
 		/*Material virtual functions resolution: {{{*/
Index: /issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp	(revision 23524)
@@ -529,24 +529,4 @@
 }
 /*}}}*/
-void   Matpar::InputUpdateFromConstant(int constant, int name){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void   Matpar::InputUpdateFromConstant(bool constant, int name){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void  Matpar::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols,int name, int type){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void   Matpar::InputUpdateFromVector(IssmDouble* vector, int name, int type){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
-void   Matpar::InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){/*{{{*/
-	/*Nothing updated yet*/
-}
-/*}}}*/
 
 /*Matpar management: */
Index: /issm/trunk-jpl/src/c/classes/Materials/Matpar.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Materials/Matpar.h	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Materials/Matpar.h	(revision 23524)
@@ -77,13 +77,4 @@
 		int     ObjectEnum();
 		/*}}}*/
-		/*Update virtual functions resolution: {{{*/
-		void   InputUpdateFromConstant(IssmDouble constant, int name);
-		void   InputUpdateFromConstant(int constant, int name);
-		void   InputUpdateFromConstant(bool constant, int name);
-		void   InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented");};
-		void   InputUpdateFromMatrixDakota(IssmDouble* matrix,int nrows,int ncols, int name, int type);
-		void   InputUpdateFromVector(IssmDouble* vector, int name, int type);
-		void   InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
-		/*}}}*/
 		/*Material virtual functions resolution: {{{*/
 		Material*  copy2(Element* element){_error_("not implemented");};
@@ -131,4 +122,5 @@
 		void       ThermalToEnthalpy(IssmDouble* penthalpy,IssmDouble temperature,IssmDouble waterfraction,IssmDouble pressure);
 		IssmDouble TMeltingPoint(IssmDouble pressure);
+		void       InputUpdateFromConstant(IssmDouble constant, int name);
 		/*}}}*/
 
Index: /issm/trunk-jpl/src/c/classes/Node.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Node.h	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/Node.h	(revision 23524)
@@ -11,5 +11,4 @@
 #include "../shared/shared.h"
 #include "./DofIndexing.h"
-#include "./Update.h"
 class  Inputs;
 class  Hook;
Index: sm/trunk-jpl/src/c/classes/Update.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Update.h	(revision 23523)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*!\file: Update.h: abstract class used by some objects to update their properties
- * \brief prototypes for Update.h
- */ 
-
-#ifndef _UPDATE_H_
-#define  _UPDATE_H_
-
-/*Headers:*/
-#include "../shared/shared.h"
-class IoModel;
-
-class Update{
-
-	public:
-
-		virtual void  InputUpdateFromConstant(IssmDouble constant, int name)=0;
-		virtual void  InputUpdateFromConstant(int constant, int name)=0;
-		virtual void  InputUpdateFromConstant(bool constant, int name)=0;
-		#ifdef _HAVE_DAKOTA_
-		virtual void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int rows, int ncols, int name, int type)=0;
-		virtual void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type)=0;
-		#endif
-		virtual void  InputUpdateFromIoModel(int index, IoModel* iomodel)=0;
-		virtual void  InputUpdateFromVector(IssmDouble* vector, int name, int type)=0;
-
-};
-
-#endif //ifndef _UPDATE_H_
Index: /issm/trunk-jpl/src/c/classes/classes.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/classes.h	(revision 23523)
+++ /issm/trunk-jpl/src/c/classes/classes.h	(revision 23524)
@@ -131,5 +131,4 @@
 #include "./DofIndexing.h"
 #include "./IoModel.h"
-#include "./Update.h"
 #include "./FemModel.h"
 #include "./GiaDeflectionCoreArgs.h"
Index: /issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/modules/InputUpdateFromConstantx/InputUpdateFromConstantx.cpp	(revision 23524)
@@ -18,12 +18,9 @@
 	}
 
-	for(i=0;i<femmodel->loads->Size();i++){
-		Load* load=(Load*)femmodel->loads->GetObjectByOffset(i);
-		load->InputUpdateFromConstant(constant,name);
-	}
-
 	for(i=0;i<femmodel->materials->Size();i++){
 		Material* material=(Material*)femmodel->materials->GetObjectByOffset(i);
-		material->InputUpdateFromConstant(constant,name);
+		if(material->ObjectEnum()==MatparEnum){
+			((Matpar*)material)->InputUpdateFromConstant(constant,name);
+		}
 	}
 }
@@ -38,13 +35,9 @@
 		element->InputUpdateFromConstant(constant,name);
 	}
-
-	for(i=0;i<femmodel->loads->Size();i++){
-		Load* load=(Load*)femmodel->loads->GetObjectByOffset(i);
-		load->InputUpdateFromConstant(constant,name);
-	}
-
 	for(i=0;i<femmodel->materials->Size();i++){
 		Material* material=(Material*)femmodel->materials->GetObjectByOffset(i);
-		material->InputUpdateFromConstant(constant,name);
+		if(material->ObjectEnum()==MatparEnum){
+			((Matpar*)material)->InputUpdateFromConstant(constant,name);
+		}
 	}
 }
@@ -59,13 +52,9 @@
 		element->InputUpdateFromConstant(constant,name);
 	}
-
-	for(i=0;i<femmodel->loads->Size();i++){
-		Load* load=(Load*)femmodel->loads->GetObjectByOffset(i);
-		load->InputUpdateFromConstant(constant,name);
-	}
-
 	for(i=0;i<femmodel->materials->Size();i++){
 		Material* material=(Material*)femmodel->materials->GetObjectByOffset(i);
-		material->InputUpdateFromConstant(constant,name);
+		if(material->ObjectEnum()==MatparEnum){
+			((Matpar*)material)->InputUpdateFromConstant(constant,name);
+		}
 	}
 
@@ -73,9 +62,8 @@
 void InputUpdateFromConstantx(Elements* elements,IssmDouble constant, int name){
 
-	int i;
 	if(VerboseModule()) _printf0_("   Input updates from constant\n");
 
 	/*Elements and loads drive the update: */
-	for(i=0;i<elements->Size();i++){
+	for(int i=0;i<elements->Size();i++){
 		Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
 		element->InputUpdateFromConstant(constant,name);
Index: /issm/trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp	(revision 23524)
@@ -23,15 +23,3 @@
 		element->InputUpdateFromVectorDakota(vector,name,type);
 	}
-	for(int i=0;i<femmodel->loads->Size();i++){
-		Load* load=(Load*)femmodel->loads->GetObjectByOffset(i);
-		load->InputUpdateFromVectorDakota(vector,name,type);
-	}
-	for(int i=0;i<femmodel->materials->Size();i++){
-		Material* material=(Material*)femmodel->materials->GetObjectByOffset(i);
-		material->InputUpdateFromVectorDakota(vector,name,type);
-	}
-	for(int i=0;i<femmodel->constraints->Size();i++){
-		Constraint* constraint=(Constraint*)femmodel->constraints->GetObjectByOffset(i);
-		constraint->InputUpdateFromVectorDakota(vector,femmodel->nodes,name,type);
-	}
 }
Index: /issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/modules/InputUpdateFromVectorx/InputUpdateFromVectorx.cpp	(revision 23524)
@@ -16,18 +16,8 @@
 void InputUpdateFromVectorx(FemModel* femmodel,IssmDouble* vector, int name, int type){
 
-	int i;
-
 	/*Update elements, nodes, loads and materials from inputs: */
-	for(i=0;i<femmodel->elements->Size();i++){
+	for(int i=0;i<femmodel->elements->Size();i++){
 		Element* element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i));
 		element->InputUpdateFromVector(vector,name,type);
 	}
-	for(i=0;i<femmodel->loads->Size();i++){
-		Load* load=(Load*)femmodel->loads->GetObjectByOffset(i);
-		load->InputUpdateFromVector(vector,name,type);
-	}
-	for(i=0;i<femmodel->materials->Size();i++){
-		Material* material=(Material*)femmodel->materials->GetObjectByOffset(i);
-		material->InputUpdateFromVector(vector,name,type);
-	}
 }
Index: /issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp	(revision 23524)
@@ -38,2 +38,21 @@
 	}
 }
+void ResetZigzagCounterx(FemModel* femmodel){
+
+	/*Display message*/
+	if(VerboseModule()) _printf0_("   Resetting penalties\n");
+
+	/*Deal with rift first*/
+	if(RiftIsPresent(femmodel->loads,femmodel->analysis_type_list[femmodel->analysis_counter])){
+		_error_("rift constraints reset not supported yet!");
+	}
+
+	/*Reset pengrid to inactive mode*/
+	for(int i=0;i<femmodel->loads->Size();i++){
+		Load* load=(Load*)femmodel->loads->GetObjectByOffset(i);
+		if(load->ObjectEnum()==PengridEnum){
+			Pengrid* pengrid=(Pengrid*)load;
+			pengrid->ResetZigzagCounter();
+		}
+	}
+}
Index: /issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.h
===================================================================
--- /issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.h	(revision 23523)
+++ /issm/trunk-jpl/src/c/modules/ResetConstraintsx/ResetConstraintsx.h	(revision 23524)
@@ -10,4 +10,5 @@
 /* local prototypes: */
 void ResetConstraintsx(FemModel* femmodel);
+void ResetZigzagCounterx(FemModel* femmodel);
 
 #endif  /* _RESETCONSTRAINTSX_H */
Index: /issm/trunk-jpl/src/c/modules/SetActiveNodesLSMx/SetActiveNodesLSMx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/SetActiveNodesLSMx/SetActiveNodesLSMx.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/modules/SetActiveNodesLSMx/SetActiveNodesLSMx.cpp	(revision 23524)
@@ -77,10 +77,6 @@
 	/*Assemble vector and serialize */
 	vec_mask_ice->Assemble();
-	IssmDouble* mask_ice=vec_mask_ice->ToMPISerial();
-	InputUpdateFromVectorx(femmodel,mask_ice,IceMaskNodeActivationEnum,VertexSIdEnum);
-
-	/*Clean up and return*/
+	InputUpdateFromVectorx(femmodel,vec_mask_ice,IceMaskNodeActivationEnum,VertexSIdEnum);
 	delete vec_mask_ice;
-	xDelete<IssmDouble>(mask_ice);
 }/*}}}*/
 void GetMaskOfIceVerticesLSMx(FemModel* femmodel){/*{{{*/
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 23523)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 23524)
@@ -1070,5 +1070,4 @@
 	RegionaloutputEnum,
 	RegularEnum,
-	ResetPenaltiesEnum,
 	RiftfrontEnum,
 	ScaledEnum,
Index: /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 23524)
@@ -1074,5 +1074,4 @@
 		case RegionaloutputEnum : return "Regionaloutput";
 		case RegularEnum : return "Regular";
-		case ResetPenaltiesEnum : return "ResetPenalties";
 		case RiftfrontEnum : return "Riftfront";
 		case ScaledEnum : return "Scaled";
Index: /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 23524)
@@ -1098,5 +1098,4 @@
 	      else if (strcmp(name,"Regionaloutput")==0) return RegionaloutputEnum;
 	      else if (strcmp(name,"Regular")==0) return RegularEnum;
-	      else if (strcmp(name,"ResetPenalties")==0) return ResetPenaltiesEnum;
 	      else if (strcmp(name,"Riftfront")==0) return RiftfrontEnum;
 	      else if (strcmp(name,"Scaled")==0) return ScaledEnum;
@@ -1121,9 +1120,9 @@
 	      else if (strcmp(name,"SIAApproximation")==0) return SIAApproximationEnum;
 	      else if (strcmp(name,"SigmaVM")==0) return SigmaVMEnum;
+	      else if (strcmp(name,"SmbAnalysis")==0) return SmbAnalysisEnum;
          else stage=10;
    }
    if(stage==10){
-	      if (strcmp(name,"SmbAnalysis")==0) return SmbAnalysisEnum;
-	      else if (strcmp(name,"SMBcomponents")==0) return SMBcomponentsEnum;
+	      if (strcmp(name,"SMBcomponents")==0) return SMBcomponentsEnum;
 	      else if (strcmp(name,"SMBd18opdd")==0) return SMBd18opddEnum;
 	      else if (strcmp(name,"SmbDesfac")==0) return SmbDesfacEnum;
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp	(revision 23524)
@@ -84,5 +84,5 @@
 		/*Loop on sediment layer to deal with transfer and head value*/
 		femmodel->SetCurrentConfiguration(HydrologyDCInefficientAnalysisEnum);
-		InputUpdateFromConstantx(femmodel,true,ResetPenaltiesEnum);
+		ResetZigzagCounterx(femmodel);
 		InputUpdateFromConstantx(femmodel,false,ConvergedEnum);
 		femmodel->UpdateConstraintsx();
@@ -161,5 +161,5 @@
 			femmodel->HydrologyEPLupdateDomainx(&ThickCount);
 			inefanalysis->ElementizeEplMask(femmodel);
-			InputUpdateFromConstantx(femmodel,true,ResetPenaltiesEnum);
+			ResetZigzagCounterx(femmodel);
 			InputUpdateFromConstantx(femmodel,false,ConvergedEnum);
 
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_thermal_nonlinear.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_thermal_nonlinear.cpp	(revision 23523)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_thermal_nonlinear.cpp	(revision 23524)
@@ -56,5 +56,5 @@
 	else{
 		femmodel->parameters->FindParam(&thermal_penalty_threshold,ThermalPenaltyThresholdEnum);
-		InputUpdateFromConstantx(femmodel,true,ResetPenaltiesEnum);
+		ResetZigzagCounterx(femmodel);
 		femmodel->UpdateConstraintsx();
 	}
