Index: ../trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.cpp
===================================================================
--- ../trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.cpp	(revision 18370)
+++ ../trunk-jpl/src/c/analyses/AdjointBalancethickness2Analysis.cpp	(revision 18371)
@@ -106,26 +106,31 @@
 			switch(responses[resp]){
 				case Balancethickness2MisfitEnum:
 					/*J = (H^2 - Hobs^2)^2*/
-					for(i=0;i<numnodes;i++){
+					//for(i=0;i<numnodes;i++){
 
-						/*H^2 - Hobs^2*/
-						NUMxH2 = 2.*dbasis[0*numnodes+i]*dphi[0]*(dphi[0]*dphi[0] + dphi[1]*dphi[1] - hu2);
-						NUMyH2 = 2.*dbasis[1*numnodes+i]*dphi[1]*(dphi[0]*dphi[0] + dphi[1]*dphi[1] - hu2);
-						DENH2 = vbarobs2*vbarobs2+1.e-14;
+					//	/*H^2 - Hobs^2*/
+					//	NUMxH2 = 2.*dbasis[0*numnodes+i]*dphi[0]*(dphi[0]*dphi[0] + dphi[1]*dphi[1] - hu2);
+					//	NUMyH2 = 2.*dbasis[1*numnodes+i]*dphi[1]*(dphi[0]*dphi[0] + dphi[1]*dphi[1] - hu2);
+					//	DENH2 = vbarobs2*vbarobs2+1.e-14;
 
-						/*Ubar-Ubar_obs*/
-						NUMxUbar = (vyobsbar*dphi[0]*dphi[1] - vxobsbar*dphi[1]*dphi[1])*vbarobs*dbasis[0*numnodes+i];
-						NUMyUbar = (vyobsbar*dphi[0]*dphi[0] - vxobsbar*dphi[0]*dphi[1])*vbarobs*dbasis[1*numnodes+i];
-						DENUbar  = pow(dphi[0]*dphi[0] + dphi[1]*dphi[1],3./2.)+1.e-14;
+					//	/*Ubar-Ubar_obs*/
+					//	NUMxUbar = (vyobsbar*dphi[0]*dphi[1] - vxobsbar*dphi[1]*dphi[1])*vbarobs*dbasis[0*numnodes+i];
+					//	NUMyUbar = (vyobsbar*dphi[0]*dphi[0] - vxobsbar*dphi[0]*dphi[1])*vbarobs*dbasis[1*numnodes+i];
+					//	DENUbar  = pow(dphi[0]*dphi[0] + dphi[1]*dphi[1],3./2.)+1.e-14;
 
-						pe->values[i]+=(NUMxH2+NUMyH2)/DENH2 *weight*Jdet*gauss->weight;
-					}
+					//	pe->values[i]+=(NUMxH2+NUMyH2)/DENH2 *weight*Jdet*gauss->weight;
+					//}
 					/*J = phi^2*/
 					//for(i=0;i<numnodes;i++) pe->values[i]+= phi*basis[i]*weight*Jdet*gauss->weight; //OK
 					/*J = grad J ^2*/
 					//for(i=0;i<numnodes;i++) pe->values[i]+= (dphi[0]*dbasis[0*numnodes+i] + dphi[1]*dbasis[1*numnodes+i])*weight*Jdet*gauss->weight; //OK
 					/*J = (ubar - nux*uobs)^2*/
-					//for(i=0;i<numnodes;i++) pe->values[i]+=(NUMxUbar-NUMyUbar)/DENUbar *weight*Jdet*gauss->weight;
+					for(i=0;i<numnodes;i++){
+						NUMxUbar = (vyobsbar*dphi[0]*dphi[1] - vxobsbar*dphi[1]*dphi[1])*vbarobs*dbasis[0*numnodes+i];
+						NUMyUbar = (vyobsbar*dphi[0]*dphi[0] - vxobsbar*dphi[0]*dphi[1])*vbarobs*dbasis[1*numnodes+i];
+						DENUbar  = pow(dphi[0]*dphi[0] + dphi[1]*dphi[1],3./2.)+1.e-14;
+						pe->values[i]+=(NUMxUbar-NUMyUbar)/DENUbar *weight*Jdet*gauss->weight;
+					}
 					break;
 				default:
 					_error_("response " << EnumToStringx(responses[resp]) << " not supported yet");
Index: ../trunk-jpl/src/c/modules/FloatingiceMeltingRatex
===================================================================
--- ../trunk-jpl/src/c/modules/FloatingiceMeltingRatex	(revision 18370)
+++ ../trunk-jpl/src/c/modules/FloatingiceMeltingRatex	(revision 18371)

Property changes on: ../trunk-jpl/src/c/modules/FloatingiceMeltingRatex
___________________________________________________________________
Modified: svn:ignore
## -1 +1,2 ##
 .deps
+.dirstamp
Index: ../trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/FemModel.cpp	(revision 18370)
+++ ../trunk-jpl/src/c/classes/FemModel.cpp	(revision 18371)
@@ -1354,13 +1354,13 @@
 			vybarobs = nuy*vyobs;
 
 			/*J = (H^2 - Hobs^2)^2*/
-			J +=0.5*(thickness*thickness - thicknessobs*thicknessobs)*(thickness*thickness - thicknessobs*thicknessobs)*weight*Jdet*gauss->weight;
+			//J +=0.5*(thickness*thickness - thicknessobs*thicknessobs)*(thickness*thickness - thicknessobs*thicknessobs)*weight*Jdet*gauss->weight;
 			/*J = phi^2*/
 			//J +=.5*potential*potential*weight*Jdet*gauss->weight;// OK
 			/*J = grad phi^2*/
 			//J +=.5*(dpotential[0]*dpotential[0] + dpotential[1]*dpotential[1])*weight*Jdet*gauss->weight;
 			/*J = (ubar - nux*uobs)^2*/
-			//J +=0.5*((vxbarobs - vxbar)*(vxbarobs - vxbar) + (vybarobs - vybar)*(vybarobs - vybar))*weight*Jdet*gauss->weight;
+			J +=0.5*((vxbarobs - vxbar)*(vxbarobs - vxbar) + (vybarobs - vybar)*(vybarobs - vybar))*weight*Jdet*gauss->weight;
 		}
 
 		/*clean up and Return: */
