diff --git a/Team25/shape.pro b/Team25/shape.pro
index 6cdaf8f3f1a13fcfb29669cf248001e7e3902b75..4ade4b9b09e6c3caf397a9aad028da07f108822c 100644
--- a/Team25/shape.pro
+++ b/Team25/shape.pro
@@ -4,7 +4,7 @@
    Features:
    - Nonlinear magnetostatic model of the die press
    - CAD parameters as ONELAB parameters
-   - Direct approach of the shape sensitivity analysis 
+   - Direct approach of the shape sensitivity analysis
      based on the Lie derivative
 
    To compute the solution in a terminal:
@@ -28,45 +28,45 @@
    magnetic vector potential: curl(nu curl a) = js, where nu = 1/mu is
    the reluctivity.
 
-   It is useful to share parameters with the user of the model, 
-   i.e., to make them editable in the GUI before running the model. 
-   Such variables are called ONELAB variables (because the sharing 
-   mechanism between the model and the GUI uses the ONELAB interface).  
-   ONELAB parameters are defined with a "DefineConstant" statement, 
+   It is useful to share parameters with the user of the model,
+   i.e., to make them editable in the GUI before running the model.
+   Such variables are called ONELAB variables (because the sharing
+   mechanism between the model and the GUI uses the ONELAB interface).
+   ONELAB parameters are defined with a "DefineConstant" statement,
    which can be invoked in the .geo and .pro files.
 
    The optimization part is organized as follows:
-   
-   (1) We replaced both curves g-h and i-j by nurbs which have a certain 
-   of control points. We set the shape design variables as the distance 
+
+   (1) We replaced both curves g-h and i-j by nurbs which have a certain
+   of control points. We set the shape design variables as the distance
    of these control points from the origin point. Their actual value is
    provided by shape.py.
-   
+
    (2) We make use of the solution of the nonlinear magnetostatic problem,
-   for a given CAD configuration, to compute the objective function, 
+   for a given CAD configuration, to compute the objective function,
      w = Sum_{i=1}^{10} ((bpx_i-box_o)^2 + (bpy_i-boy_o)^2),
    as defined in TEAM25.
-   
-   (3) We compute the derivative of the flux density along the velocity 
+
+   (3) We compute the derivative of the flux density along the velocity
    field generated by the perturbation of each design variable, by means
    of the Lie derivative. The derivative of he objective, w, is therefore
    obtained by applying the chain rule. This is known as the direct approach
    of the sensitivity analysis, see [1].
 
-   The value of the objective function as well as is derivative with respect 
-   to each design variable are provided to the ONELAB database. They can be 
+   The value of the objective function as well as is derivative with respect
+   to each design variable are provided to the ONELAB database. They can be
    accessed by shape.py.
 
-   [1]:Erin Kuci, François Henrotte, Pierre Duysinx, and Christophe Geuzaine. 
+   [1]:Erin Kuci, François Henrotte, Pierre Duysinx, and Christophe Geuzaine.
    ``Design sensitivity analysis for shape optimization based on the Lie derivative'',
-   Computer Methods in Applied Mechanics and Engineering 317 (2017), pp. 702 –722. 
-   issn: 0045-7825.  
+   Computer Methods in Applied Mechanics and Engineering 317 (2017), pp. 702 –722.
+   issn: 0045-7825.
 */
 
 DefineConstant [
   Opt_ResDir = "res_opt/"
   Opt_ResDir_Onelab = "Optimization/Results/"
-  Model_smallAT = {1, Name "Model/Small Ampere-Turn", Choices{0,1}} 
+  Model_smallAT = {1, Name "Model/Small Ampere-Turn", Choices{0,1}}
   Flag_PrintLevel = 1
   VelocityTag = -1
   // Nonlinear iterations
@@ -77,21 +77,21 @@ DefineConstant [
 
 Group {
   // One starts by giving explicit meaningful names to the Physical regions
-  // defined in the "shape.geo" mesh file. 
+  // defined in the "shape.geo" mesh file.
   Coil = Region[2];
   Core = Region[{1,3}];
 
   // Then one difines abstract regions so as to allow a generic definition of the
   // FunctionSpace, Formulation and PostProcessing fields with no reference to
   // model-specific Physical regions.
-  Domain = Region[{Core,Coil,5}]; 
+  Domain = Region[{Core,Coil,5}];
   NoFlux = Region[6];
 }
 
 Function{
   // Material law (here the magnetic reluctivity) is defined as piecewise
   // function (note the square brackets), in terms of the above defined
-  // physical regions. 
+  // physical regions.
 
   mu0 = 4 * Pi * 1e-7;
   Mat1_b = {0.0,0.11,0.18,0.28,0.35,0.74,0.82,0.91,0.98,1.02,1.08,1.15,
@@ -112,8 +112,8 @@ Function{
   // This is the current density which feeds the inductor.
   js[Coil] = Vector[0, 0, (Model_smallAT==1?4253:17500)/SurfaceArea[]{2}];
 
-  // This is the desired x and y components of the induction field 
-  // in the cavity as defined in TEAM25. 
+  // This is the desired x and y components of the induction field
+  // in the cavity as defined in TEAM25.
   bx[] = (Model_smallAT==1?0.35:1.5) * X[]/Sqrt[X[]^2+Y[]^2];
   by[] = (Model_smallAT==1?0.35:1.5) * Y[]/Sqrt[X[]^2+Y[]^2];
 }
@@ -138,9 +138,9 @@ Integration{
 }
 
 // -------------------------------------------------------------------------
-// The weak formulation for this problem is derived. The fields are 
-// vector-valued, and we have one linear (source) term in addition 
-// to the bilinear term. 
+// The weak formulation for this problem is derived. The fields are
+// vector-valued, and we have one linear (source) term in addition
+// to the bilinear term.
 
 Constraint{
   { Name Dirichlet;
@@ -179,8 +179,8 @@ Formulation{
 }
 
 // -------------------------------------------------------------------------
-// Handling of the velocity field (through a fully-fixed function space 
-// defined on Domain). 
+// Handling of the velocity field (through a fully-fixed function space
+// defined on Domain).
 
 Function{
   For i In {1:3}
@@ -201,9 +201,9 @@ Constraint {
 
 FunctionSpace {
   For i In {1:3}
-    { Name H_v~{i} ; Type Form0;  
+    { Name H_v~{i} ; Type Form0;
       BasisFunction {
-        { Name sn ; NameOfCoef un ; Function BF_Node ; 
+        { Name sn ; NameOfCoef un ; Function BF_Node ;
           Support Domain; Entity NodesOf[ All ] ; }
       }
       Constraint {
@@ -214,8 +214,8 @@ FunctionSpace {
 }
 
 // -------------------------------------------------------------------------
-// Magnetic vector potential handling (through a fully-fixed function space 
-// defined on Domain). 
+// Magnetic vector potential handling (through a fully-fixed function space
+// defined on Domain).
 
 Function{
   l_a = ListFromServer[StrCat[Opt_ResDir_Onelab,"a"]];
@@ -304,8 +304,8 @@ Formulation {
 
 // -------------------------------------------------------------------------
 // In the following, we create the post-operations necessary
-// for the computation of objective and constraints, 
-// as well as their sensitivities. 
+// for the computation of objective and constraints,
+// as well as their sensitivities.
 
 PostProcessing {
   { Name ObjectiveConstraints; NameOfFormulation MVP2D;
@@ -313,6 +313,7 @@ PostProcessing {
       { Name w; Value{ Term{[(CompX[{d a}]-bx[])^2+(CompY[{d a}]-by[])^2 ]; In Domain; Jacobian Vol; } } }
       { Name az; Value{ Term{ [CompZ[{a}]]; In Domain; Jacobian Vol; } } }
       { Name b; Value{ Term{ [{d a}]; In Domain; Jacobian Vol; } } }
+      { Name bTarget; Value{ Term{ [ Vector[bx[],by[],0]  ]; In Domain; Jacobian Vol; } } }
       { Name bMag; Value{ Term{ [Norm[{d a}]]; In Domain; Jacobian Vol; } } }
       { Name js; Value{ Term{ [js[]]; In Coil; Jacobian Vol; } } }
       { Name mur; Value{ Term{ [1/(nu[{d a}]*mu0)]; In Domain; Jacobian Vol; } } }
@@ -322,16 +323,20 @@ PostProcessing {
 
 PostOperation Get_ObjectiveConstraints UsingPost ObjectiveConstraints {
   CreateDir[Opt_ResDir];
-  Print[w, 
+  Print[w,
     OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A],0}{0:50*Pi/180:5*Pi/180,0,0},
     Format SimpleTable, File StrCat[Opt_ResDir,"w.txt"]];
-  Print[bMag,  
+  Print[bMag,
     OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A],0}{0:50*Pi/180:5*Pi/180,0,0},
     Format SimpleTable, File StrCat[Opt_ResDir,"bMag.txt"]];
-  Print[az, OnElementsOf Domain, Format NodeTable, File "", 
+  Print[az, OnElementsOf Domain, Format NodeTable, File "",
     SendToServer StrCat[Opt_ResDir_Onelab,"a"], Hidden 1];
-  Print[bMag, OnElementsOf Domain, File StrCat[Opt_ResDir,"az.pos"]];
+  //Print[bMag, OnElementsOf Domain, File StrCat[Opt_ResDir,"az.pos"]];
   //Print[az, OnElementsOf Domain, File StrCat[Opt_ResDir,"az.pos"]];
+  Print[bTarget, OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A],0}{0:50*Pi/180:5*Pi/180,0,0},
+    File StrCat[Opt_ResDir,"bTarget.pos"]];
+  Print[b, OnGrid {(9.5e-3+2.25e-3)*Cos[$A],(9.5e-3+2.25e-3)*Sin[$A],0}{0:50*Pi/180:5*Pi/180,0,0},
+    File StrCat[Opt_ResDir,"b.pos"]];
   If(Flag_PrintLevel>5)
     Print[mur, OnElementsOf Domain, File StrCat[Opt_ResDir,"mur.pos"]];
     Print[az, OnElementsOf Domain, File StrCat[Opt_ResDir,"az.pos"]];
@@ -371,7 +376,7 @@ PostProcessing {
 
 PostOperation Show_shape UsingPost Show_shape{
   CreateDir[Opt_ResDir];
-  Print[ VV, OnElementsOf Domain,File StrCat[Opt_ResDir, "velocity.pos"] ]; 
+  Print[ VV, OnElementsOf Domain,File StrCat[Opt_ResDir, "velocity.pos"] ];
   Print[ Lie_az, OnElementsOf Domain,File StrCat[Opt_ResDir, "Lie_az.pos"] ];
 }
 
@@ -390,10 +395,10 @@ Resolution {
 
       // Solve the nonlinear magnetostatic problem
       IterativeLoop[Nb_max_iter, stop_criterion, relaxation_factor]{
-        GenerateJac[SYS]; 
+        GenerateJac[SYS];
         SolveJac[SYS];
-        Evaluate[ SetNumberRunTime[$Iteration]{"iterNL"} ]; 
-        Evaluate[ SetNumberRunTime[$Residual]{"residualNL"} ]; 
+        Evaluate[ SetNumberRunTime[$Iteration]{"iterNL"} ];
+        Evaluate[ SetNumberRunTime[$Residual]{"residualNL"} ];
       }
 
       // Compute the objective function and the constraints
@@ -414,7 +419,7 @@ Resolution {
     Operation {
       InitSolution[DIR];
       Generate[DIR];
-      Solve[DIR]; 
+      Solve[DIR];
       PostOperation[Get_GradOf_w];
     }
   }