Index: ../trunk-jpl/src/c/classes/Constraints/SpcDynamic.h
===================================================================
--- ../trunk-jpl/src/c/classes/Constraints/SpcDynamic.h	(revision 18930)
+++ ../trunk-jpl/src/c/classes/Constraints/SpcDynamic.h	(revision 18931)
@@ -29,21 +29,21 @@
 		~SpcDynamic();
 
 		/*Object virtual functions definitions*/
+		Object *copy();
+		void    DeepEcho();
 		void    Echo();
-		void    DeepEcho();
 		int     Id();
 		int     ObjectEnum();
-		Object *copy();
 
 		/*Constraint virtual functions definitions*/
+		void ActivatePenaltyMethod(void);
 		void ConstrainNode(Nodes* nodes,Parameters* parameters);
 		bool InAnalysis(int analysis_type);
-		void ActivatePenaltyMethod(void);
 		void PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters){_error_("not implemented yet");};
 
 		/*SpcDynamic management*/
+		int        GetDof();
 		int        GetNodeId();
-		int        GetDof();
 		IssmDouble GetValue();
 		void       SetDynamicConstraint(Nodes  *nodes,IssmDouble *yg_serial);
 
Index: ../trunk-jpl/src/c/classes/Constraints/SpcTransient.h
===================================================================
--- ../trunk-jpl/src/c/classes/Constraints/SpcTransient.h	(revision 18930)
+++ ../trunk-jpl/src/c/classes/Constraints/SpcTransient.h	(revision 18931)
@@ -30,21 +30,21 @@
 		~SpcTransient();
 		/*}}}*/
 		/*Object virtual functions definitions:{{{ */
-		void  Echo();
-		void  DeepEcho();
-		int   Id(); 
-		int   ObjectEnum();
 		Object* copy();
+		void    DeepEcho();
+		void    Echo();
+		int     Id(); 
+		int     ObjectEnum();
 		/*}}}*/
 		/*Constraint virtual functions definitions: {{{*/
-		void ActivatePenaltyMethod(void);
+		void   ActivatePenaltyMethod(void);
 		void   ConstrainNode(Nodes* nodes,Parameters* parameters);
 		bool   InAnalysis(int analysis_type);
 		void   PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters);
 		/*}}}*/
 		/*SpcTransient management:{{{ */
-		int    GetNodeId();
-		int    GetDof();
+		int        GetDof();
+		int        GetNodeId();
 		IssmDouble GetValue();
 		/*}}}*/
 
Index: ../trunk-jpl/src/c/classes/Constraints/Constraints.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/Constraints/Constraints.cpp	(revision 18930)
+++ ../trunk-jpl/src/c/classes/Constraints/Constraints.cpp	(revision 18931)
@@ -19,8 +19,19 @@
 /*}}}*/
 
 /*Numerics: */
-int Constraints::NumberOfConstraints(void){/*{{{*/
+void Constraints::ActivatePenaltyMethod(int in_analysis){/*{{{*/
 
+	for(int i=0;i<this->Size();i++){
+		Constraint* constraint=(Constraint*)this->GetObjectByOffset(i);
+		if(constraint->InAnalysis(in_analysis)){
+			constraint->ActivatePenaltyMethod();
+		}
+	}
+
+}
+/*}}}*/
+int  Constraints::NumberOfConstraints(void){/*{{{*/
+
 	int localconstraints;
 	int numberofconstraints;
 
@@ -34,14 +45,3 @@
 	return numberofconstraints;
 }
 /*}}}*/
-void Constraints::ActivatePenaltyMethod(int in_analysis){/*{{{*/
-
-	for(int i=0;i<this->Size();i++){
-		Constraint* constraint=(Constraint*)this->GetObjectByOffset(i);
-		if(constraint->InAnalysis(in_analysis)){
-			constraint->ActivatePenaltyMethod();
-		}
-	}
-
-}
-/*}}}*/
Index: ../trunk-jpl/src/c/classes/Constraints/Constraint.h
===================================================================
--- ../trunk-jpl/src/c/classes/Constraints/Constraint.h	(revision 18930)
+++ ../trunk-jpl/src/c/classes/Constraints/Constraint.h	(revision 18931)
@@ -19,10 +19,10 @@
 	public: 
 
 		virtual      ~Constraint(){};
+		virtual void ActivatePenaltyMethod(void)=0;
 		virtual void ConstrainNode(Nodes* nodes,Parameters* parameters)=0;
+		virtual bool InAnalysis(int analysis_type)=0;
 		virtual void PenaltyDofAndValue(int* dof,IssmDouble* value,Nodes* nodes,Parameters* parameters)=0;
-		virtual bool InAnalysis(int analysis_type)=0;
-		virtual void ActivatePenaltyMethod(void)=0;
 
 };
 #endif
Index: ../trunk-jpl/src/c/classes/Constraints/SpcDynamic.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/Constraints/SpcDynamic.cpp	(revision 18930)
+++ ../trunk-jpl/src/c/classes/Constraints/SpcDynamic.cpp	(revision 18931)
@@ -36,8 +36,28 @@
 /*}}}*/
 
 /*Object virtual functions definitions:*/
-void SpcDynamic::Echo(void){/*{{{*/
+Object* SpcDynamic::copy() {/*{{{*/
 
+	SpcDynamic* spcdyn = new SpcDynamic(*this); 
+
+	spcdyn->sid=this->sid;
+	spcdyn->nodeid=this->nodeid;
+	spcdyn->dof=this->dof;
+	spcdyn->value=this->value;
+	spcdyn->analysis_type=this->analysis_type;
+	spcdyn->isset=this->isset;
+
+	return (Object*) spcdyn;
+}
+/*}}}*/
+void    SpcDynamic::DeepEcho(void){/*{{{*/
+
+	this->Echo();
+	return;
+}		
+/*}}}*/
+void    SpcDynamic::Echo(void){/*{{{*/
+
 	_printf_("SpcDynamic:\n");
 	_printf_("   sid: " << sid << "\n");
 	_printf_("   nodeid: " << nodeid << "\n");
@@ -48,45 +68,20 @@
 	return;
 }
 /*}}}*/
-void SpcDynamic::DeepEcho(void){/*{{{*/
-
-	this->Echo();
-	return;
-}		
+int     SpcDynamic::Id(void){ return sid; }/*{{{*/
 /*}}}*/
-int SpcDynamic::Id(void){ return sid; }/*{{{*/
-/*}}}*/
-int SpcDynamic::ObjectEnum(void){/*{{{*/
+int     SpcDynamic::ObjectEnum(void){/*{{{*/
 
 	return SpcDynamicEnum;
 
 }
 /*}}}*/
-Object* SpcDynamic::copy() {/*{{{*/
 
-	SpcDynamic* spcdyn = new SpcDynamic(*this); 
-
-	spcdyn->sid=this->sid;
-	spcdyn->nodeid=this->nodeid;
-	spcdyn->dof=this->dof;
-	spcdyn->value=this->value;
-	spcdyn->analysis_type=this->analysis_type;
-	spcdyn->isset=this->isset;
-
-	return (Object*) spcdyn;
-}
-/*}}}*/
-
 /*Constraint virtual functions definitions: */
 void SpcDynamic::ActivatePenaltyMethod(void){/*{{{*/
 	this->penalty = true;
 }
 /*}}}*/
-bool SpcDynamic::InAnalysis(int in_analysis_type){/*{{{*/
-	if (in_analysis_type==this->analysis_type) return true;
-	else return false;
-}
-/*}}}*/
 void SpcDynamic::ConstrainNode(Nodes* nodes,Parameters* parameters){/*{{{*/
 
 	Node* node=NULL;
@@ -102,13 +97,18 @@
 	}
 }
 /*}}}*/
+bool SpcDynamic::InAnalysis(int in_analysis_type){/*{{{*/
+	if (in_analysis_type==this->analysis_type) return true;
+	else return false;
+}
+/*}}}*/
 
 /*SpcDynamic functions*/
-int SpcDynamic::GetDof(){/*{{{*/
+int        SpcDynamic::GetDof(){/*{{{*/
 	return dof;
 }
 /*}}}*/
-int   SpcDynamic::GetNodeId(){/*{{{*/
+int        SpcDynamic::GetNodeId(){/*{{{*/
 
 	return nodeid;
 }
@@ -119,7 +119,7 @@
 	return value;
 }
 /*}}}*/
-void SpcDynamic::SetDynamicConstraint(Nodes* nodes,IssmDouble* yg_serial){/*{{{*/
+void       SpcDynamic::SetDynamicConstraint(Nodes* nodes,IssmDouble* yg_serial){/*{{{*/
 
 	int pos;
 
Index: ../trunk-jpl/src/c/classes/Constraints/Constraints.h
===================================================================
--- ../trunk-jpl/src/c/classes/Constraints/Constraints.h	(revision 18930)
+++ ../trunk-jpl/src/c/classes/Constraints/Constraints.h	(revision 18931)
@@ -26,8 +26,8 @@
 		/*}}}*/
 
 		/*numerics*/
+		void ActivatePenaltyMethod(int in_analysis);
 		int  NumberOfConstraints(void);
-		void ActivatePenaltyMethod(int in_analysis);
 
 };
 
Index: ../trunk-jpl/src/c/classes/Constraints/SpcStatic.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/Constraints/SpcStatic.cpp	(revision 18930)
+++ ../trunk-jpl/src/c/classes/Constraints/SpcStatic.cpp	(revision 18931)
@@ -35,8 +35,21 @@
 /*}}}*/
 
 /*Object virtual functions definitions:*/
-void SpcStatic::Echo(void){/*{{{*/
+Object* SpcStatic::copy() {/*{{{*/
+	
+	SpcStatic* spcstat = new SpcStatic(*this); 
 
+	spcstat->sid=this->sid;
+	spcstat->nodeid=this->nodeid;
+	spcstat->dof=this->dof;
+	spcstat->value=this->value;
+	spcstat->analysis_type=this->analysis_type;
+
+	return (Object*) spcstat;
+}
+/*}}}*/
+void    SpcStatic::DeepEcho(void){/*{{{*/
+
 	_printf_("SpcStatic:\n");
 	_printf_("   sid: " << sid << "\n");
 	_printf_("   nodeid: " << nodeid << "\n");
@@ -44,9 +57,9 @@
 	_printf_("   value: " << value << "\n");
 	_printf_("   analysis_type: " << EnumToStringx(analysis_type) << "\n");
 	return;
-}
+}		
 /*}}}*/
-void SpcStatic::DeepEcho(void){/*{{{*/
+void    SpcStatic::Echo(void){/*{{{*/
 
 	_printf_("SpcStatic:\n");
 	_printf_("   sid: " << sid << "\n");
@@ -55,40 +68,22 @@
 	_printf_("   value: " << value << "\n");
 	_printf_("   analysis_type: " << EnumToStringx(analysis_type) << "\n");
 	return;
-}		
+}
 /*}}}*/
-int SpcStatic::Id(void){ return sid; }/*{{{*/
+int     SpcStatic::Id(void){ return sid; }/*{{{*/
 /*}}}*/
-int SpcStatic::ObjectEnum(void){/*{{{*/
+int     SpcStatic::ObjectEnum(void){/*{{{*/
 
 	return SpcStaticEnum;
 
 }
 /*}}}*/
-Object* SpcStatic::copy() {/*{{{*/
-	
-	SpcStatic* spcstat = new SpcStatic(*this); 
 
-	spcstat->sid=this->sid;
-	spcstat->nodeid=this->nodeid;
-	spcstat->dof=this->dof;
-	spcstat->value=this->value;
-	spcstat->analysis_type=this->analysis_type;
-
-	return (Object*) spcstat;
-}
-/*}}}*/
-
 /*Constraint virtual functions definitions: */
 void SpcStatic::ActivatePenaltyMethod(void){/*{{{*/
 	   this->penalty = true;
 }
 /*}}}*/
-bool SpcStatic::InAnalysis(int in_analysis_type){/*{{{*/
-	if (in_analysis_type==this->analysis_type) return true;
-	else return false;
-}
-/*}}}*/
 void SpcStatic::ConstrainNode(Nodes* nodes,Parameters* parameters){/*{{{*/
 
 	Node* node=NULL;
@@ -102,13 +97,18 @@
 	}
 }
 /*}}}*/
+bool SpcStatic::InAnalysis(int in_analysis_type){/*{{{*/
+	if (in_analysis_type==this->analysis_type) return true;
+	else return false;
+}
+/*}}}*/
 
 /*SpcStatic functions*/
-int SpcStatic::GetDof(){/*{{{*/
+int        SpcStatic::GetDof(){/*{{{*/
 	return dof;
 }
 /*}}}*/
-int   SpcStatic::GetNodeId(){/*{{{*/
+int        SpcStatic::GetNodeId(){/*{{{*/
 
 	return nodeid;
 }
Index: ../trunk-jpl/src/c/classes/Constraints/SpcTransient.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/Constraints/SpcTransient.cpp	(revision 18930)
+++ ../trunk-jpl/src/c/classes/Constraints/SpcTransient.cpp	(revision 18931)
@@ -50,7 +50,15 @@
 /*}}}*/
 
 /*Object virtual functions definitions:*/
-void SpcTransient::Echo(void){/*{{{*/
+Object* SpcTransient::copy() {/*{{{*/
+	return new SpcTransient(sid,nodeid,dof,nsteps,times,values,analysis_type);
+}
+/*}}}*/
+void    SpcTransient::DeepEcho(void){/*{{{*/
+	this->Echo();
+}		
+/*}}}*/
+void    SpcTransient::Echo(void){/*{{{*/
 
 	int i;
 	_printf_("SpcTransient:\n");
@@ -66,36 +74,22 @@
 	return;
 }
 /*}}}*/
-void SpcTransient::DeepEcho(void){/*{{{*/
-	this->Echo();
-}		
-/*}}}*/
-int  SpcTransient::Id(void){/*{{{*/
+int     SpcTransient::Id(void){/*{{{*/
 	return sid;
 }
 /*}}}*/
-int SpcTransient::ObjectEnum(void){/*{{{*/
+int     SpcTransient::ObjectEnum(void){/*{{{*/
 
 	return SpcTransientEnum;
 
 }
 /*}}}*/
-Object* SpcTransient::copy() {/*{{{*/
-	return new SpcTransient(sid,nodeid,dof,nsteps,times,values,analysis_type);
-}
-/*}}}*/
 
 /*Constraint virtual functions definitions:*/
 void SpcTransient::ActivatePenaltyMethod(void){/*{{{*/
 	   this->penalty = true;
 }
 /*}}}*/
-bool SpcTransient::InAnalysis(int in_analysis_type){/*{{{*/
-
-	if (in_analysis_type==this->analysis_type) return true;
-	else return false;
-}
-/*}}}*/
 void SpcTransient::ConstrainNode(Nodes* nodes,Parameters* parameters){/*{{{*/
 
 	Node       *node  = NULL;
@@ -144,6 +138,12 @@
 	}
 }
 /*}}}*/
+bool SpcTransient::InAnalysis(int in_analysis_type){/*{{{*/
+
+	if (in_analysis_type==this->analysis_type) return true;
+	else return false;
+}
+/*}}}*/
 void SpcTransient::PenaltyDofAndValue(int* pdof,IssmDouble* pvalue,Nodes* nodes,Parameters* parameters){/*{{{*/
 
 	if(!this->penalty) _error_("cannot return dof and value for non penalty constraint");
@@ -202,11 +202,11 @@
 /*}}}*/
 
 /*SpcTransient functions*/
-int SpcTransient::GetDof(){/*{{{*/
+int        SpcTransient::GetDof(){/*{{{*/
 	return dof;
 }
 /*}}}*/
-int   SpcTransient::GetNodeId(){/*{{{*/
+int        SpcTransient::GetNodeId(){/*{{{*/
 
 	return nodeid;
 }
