Index: issm/trunk-jpl/src/c/classes/Constraints/Constraint.h
===================================================================
--- issm/trunk-jpl/src/c/classes/Constraints/Constraint.h	(revision 22199)
+++ issm/trunk-jpl/src/c/classes/Constraints/Constraint.h	(revision 22200)
@@ -24,4 +24,5 @@
 		virtual bool InAnalysis(int analysis_type)=0;
 		virtual void PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters)=0;
+		virtual void InputUpdateFromVectorDakota(IssmDouble* vector,Nodes* nodes,int name,int type) = 0;
 
 };
Index: issm/trunk-jpl/src/c/classes/Constraints/SpcDynamic.h
===================================================================
--- issm/trunk-jpl/src/c/classes/Constraints/SpcDynamic.h	(revision 22199)
+++ issm/trunk-jpl/src/c/classes/Constraints/SpcDynamic.h	(revision 22200)
@@ -42,4 +42,5 @@
 		bool InAnalysis(int analysis_type);
 		void PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters){_error_("not implemented yet");};
+		void InputUpdateFromVectorDakota(IssmDouble* vector,Nodes* nodes,int name,int type){_error_("not implemented yet");};
 
 		/*SpcDynamic management*/
Index: issm/trunk-jpl/src/c/classes/Constraints/SpcStatic.cpp
===================================================================
--- issm/trunk-jpl/src/c/classes/Constraints/SpcStatic.cpp	(revision 22199)
+++ issm/trunk-jpl/src/c/classes/Constraints/SpcStatic.cpp	(revision 22200)
@@ -100,8 +100,6 @@
 void SpcStatic::ConstrainNode(Nodes* nodes,Parameters* parameters){/*{{{*/
 
-	Node* node=NULL;
-
 	/*Chase through nodes and find the node to which this SpcStatic applys: */
-	node=(Node*)nodes->GetObjectById(NULL,nodeid);
+	Node* node=(Node*)nodes->GetObjectById(NULL,nodeid);
 
 	/*Apply constraint: */
@@ -114,4 +112,17 @@
 	if (in_analysis_type==this->analysis_type) return true;
 	else return false;
+}
+/*}}}*/
+void SpcStatic::InputUpdateFromVectorDakota(IssmDouble* vector,Nodes* nodes,int name,int type){/*{{{*/
+
+	/*Chase through nodes and find the node to which this SpcStatic applys: */
+	Node* node=(Node*)nodes->GetObjectById(NULL,nodeid);
+
+	/*Apply constraint: */
+	if(node){ //in case the spc is dealing with a node on another cpu
+		int sid = node->Sid();
+		this->value = vector[sid];
+		_assert_(!xIsNan<IssmDouble>(this->value)); 
+	}
 }
 /*}}}*/
Index: issm/trunk-jpl/src/c/classes/Constraints/SpcStatic.h
===================================================================
--- issm/trunk-jpl/src/c/classes/Constraints/SpcStatic.h	(revision 22199)
+++ issm/trunk-jpl/src/c/classes/Constraints/SpcStatic.h	(revision 22200)
@@ -38,7 +38,8 @@
 		/*Constraint virtual functions definitions: {{{*/
 		void ActivatePenaltyMethod(void);
-		void   ConstrainNode(Nodes* nodes,Parameters* parameters);
-		bool   InAnalysis(int analysis_type);
-		void   PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters){_error_("not implemented yet");};
+		void ConstrainNode(Nodes* nodes,Parameters* parameters);
+		bool InAnalysis(int analysis_type);
+		void PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters){_error_("not implemented yet");};
+		void InputUpdateFromVectorDakota(IssmDouble* vector,Nodes* nodes,int name,int type);
 		/*}}}*/
 		/*SpcStatic management:{{{ */
Index: issm/trunk-jpl/src/c/classes/Constraints/SpcTransient.h
===================================================================
--- issm/trunk-jpl/src/c/classes/Constraints/SpcTransient.h	(revision 22199)
+++ issm/trunk-jpl/src/c/classes/Constraints/SpcTransient.h	(revision 22200)
@@ -43,4 +43,5 @@
 		bool   InAnalysis(int analysis_type);
 		void   PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters);
+		void InputUpdateFromVectorDakota(IssmDouble* vector,Nodes* nodes,int name,int type){_error_("not implemented yet");};
 		/*}}}*/
 		/*SpcTransient management:{{{ */
Index: issm/trunk-jpl/src/c/classes/Elements/Element.cpp
===================================================================
--- issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 22199)
+++ issm/trunk-jpl/src/c/classes/Elements/Element.cpp	(revision 22200)
@@ -1792,5 +1792,6 @@
 				name==DeviatoricStresseffectiveEnum ||
 				name==VxAverageEnum ||
-				name==VyAverageEnum
+				name==VyAverageEnum ||
+				name==BalancethicknessSpcthicknessEnum
 
 				) {
Index: issm/trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp	(revision 22199)
+++ issm/trunk-jpl/src/c/modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp	(revision 22200)
@@ -18,18 +18,20 @@
 void InputUpdateFromVectorDakotax(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->InputUpdateFromVectorDakota(vector,name,type);
 	}
-	for(i=0;i<femmodel->loads->Size();i++){
+	for(int i=0;i<femmodel->loads->Size();i++){
 		Load* load=(Load*)femmodel->loads->GetObjectByOffset(i);
 		load->InputUpdateFromVectorDakota(vector,name,type);
 	}
-	for(i=0;i<femmodel->materials->Size();i++){
+	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/shared/Enum/EnumDefinitions.h
===================================================================
--- issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 22199)
+++ issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h	(revision 22200)
@@ -378,4 +378,5 @@
 	TransientNumRequestedOutputsEnum,
 	TransientRequestedOutputsEnum,
+	BalancethicknessSpcthicknessEnum,
 	BalancethicknessApparentMassbalanceEnum,
 	BalancethicknessDiffusionCoefficientEnum,
Index: issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp
===================================================================
--- issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 22199)
+++ issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp	(revision 22200)
@@ -384,4 +384,5 @@
 		case TransientNumRequestedOutputsEnum : return "TransientNumRequestedOutputs";
 		case TransientRequestedOutputsEnum : return "TransientRequestedOutputs";
+		case BalancethicknessSpcthicknessEnum : return "BalancethicknessSpcthickness";
 		case BalancethicknessApparentMassbalanceEnum : return "BalancethicknessApparentMassbalance";
 		case BalancethicknessDiffusionCoefficientEnum : return "BalancethicknessDiffusionCoefficient";
Index: issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp
===================================================================
--- issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 22199)
+++ issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp	(revision 22200)
@@ -393,4 +393,5 @@
 	      else if (strcmp(name,"TransientNumRequestedOutputs")==0) return TransientNumRequestedOutputsEnum;
 	      else if (strcmp(name,"TransientRequestedOutputs")==0) return TransientRequestedOutputsEnum;
+	      else if (strcmp(name,"BalancethicknessSpcthickness")==0) return BalancethicknessSpcthicknessEnum;
 	      else if (strcmp(name,"BalancethicknessApparentMassbalance")==0) return BalancethicknessApparentMassbalanceEnum;
 	      else if (strcmp(name,"BalancethicknessDiffusionCoefficient")==0) return BalancethicknessDiffusionCoefficientEnum;
@@ -505,9 +506,9 @@
 	      else if (strcmp(name,"SmbBMax")==0) return SmbBMaxEnum;
 	      else if (strcmp(name,"SmbBMin")==0) return SmbBMinEnum;
-	      else if (strcmp(name,"Adjointp")==0) return AdjointpEnum;
          else stage=5;
    }
    if(stage==5){
-	      if (strcmp(name,"Adjointx")==0) return AdjointxEnum;
+	      if (strcmp(name,"Adjointp")==0) return AdjointpEnum;
+	      else if (strcmp(name,"Adjointx")==0) return AdjointxEnum;
 	      else if (strcmp(name,"Adjointy")==0) return AdjointyEnum;
 	      else if (strcmp(name,"Adjointz")==0) return AdjointzEnum;
@@ -628,9 +629,9 @@
 	      else if (strcmp(name,"Outputdefinition9")==0) return Outputdefinition9Enum;
 	      else if (strcmp(name,"Outputdefinition10")==0) return Outputdefinition10Enum;
-	      else if (strcmp(name,"Outputdefinition11")==0) return Outputdefinition11Enum;
          else stage=6;
    }
    if(stage==6){
-	      if (strcmp(name,"Outputdefinition12")==0) return Outputdefinition12Enum;
+	      if (strcmp(name,"Outputdefinition11")==0) return Outputdefinition11Enum;
+	      else if (strcmp(name,"Outputdefinition12")==0) return Outputdefinition12Enum;
 	      else if (strcmp(name,"Outputdefinition13")==0) return Outputdefinition13Enum;
 	      else if (strcmp(name,"Outputdefinition14")==0) return Outputdefinition14Enum;
@@ -751,9 +752,9 @@
 	      else if (strcmp(name,"Gradient3")==0) return Gradient3Enum;
 	      else if (strcmp(name,"Gradient")==0) return GradientEnum;
-	      else if (strcmp(name,"GroundinglineMigration")==0) return GroundinglineMigrationEnum;
          else stage=7;
    }
    if(stage==7){
-	      if (strcmp(name,"Gset")==0) return GsetEnum;
+	      if (strcmp(name,"GroundinglineMigration")==0) return GroundinglineMigrationEnum;
+	      else if (strcmp(name,"Gset")==0) return GsetEnum;
 	      else if (strcmp(name,"Index")==0) return IndexEnum;
 	      else if (strcmp(name,"Indexed")==0) return IndexedEnum;
@@ -874,9 +875,9 @@
 	      else if (strcmp(name,"AmrGroundingLineDistance")==0) return AmrGroundingLineDistanceEnum;
 	      else if (strcmp(name,"AmrIceFrontResolution")==0) return AmrIceFrontResolutionEnum;
-	      else if (strcmp(name,"AmrIceFrontDistance")==0) return AmrIceFrontDistanceEnum;
          else stage=8;
    }
    if(stage==8){
-	      if (strcmp(name,"AmrThicknessErrorResolution")==0) return AmrThicknessErrorResolutionEnum;
+	      if (strcmp(name,"AmrIceFrontDistance")==0) return AmrIceFrontDistanceEnum;
+	      else if (strcmp(name,"AmrThicknessErrorResolution")==0) return AmrThicknessErrorResolutionEnum;
 	      else if (strcmp(name,"AmrThicknessErrorThreshold")==0) return AmrThicknessErrorThresholdEnum;
 	      else if (strcmp(name,"AmrDeviatoricErrorResolution")==0) return AmrDeviatoricErrorResolutionEnum;
@@ -997,9 +998,9 @@
 	      else if (strcmp(name,"GiaSolution")==0) return GiaSolutionEnum;
 	      else if (strcmp(name,"GiaIvinsAnalysis")==0) return GiaIvinsAnalysisEnum;
-	      else if (strcmp(name,"EsaSolution")==0) return EsaSolutionEnum;
          else stage=9;
    }
    if(stage==9){
-	      if (strcmp(name,"EsaAnalysis")==0) return EsaAnalysisEnum;
+	      if (strcmp(name,"EsaSolution")==0) return EsaSolutionEnum;
+	      else if (strcmp(name,"EsaAnalysis")==0) return EsaAnalysisEnum;
 	      else if (strcmp(name,"LoveSolution")==0) return LoveSolutionEnum;
 	      else if (strcmp(name,"LoveAnalysis")==0) return LoveAnalysisEnum;
