Research Article

Adjoint Variable Method for the Study of Combined Active and Passive Magnetic Shielding

Algorithm 1

Gradient-adjoint algorithm.
1. 𝑖 = 0 and estimate the initial value 𝐩 0 .
2. Compute 𝐴 ( 𝐩 𝑖 ) from the direct problem (2.5) setting 𝐩 = 𝐩 𝑖 .
3. Compute 𝜉 from the dual problem (3.7) using 𝐴 ( 𝐩 𝑖 ) instead of 𝐴 ( 𝐩 ) .
4. Using explicit expression (3.10) for the derivative, compute 𝜕 𝐹 ( 𝐩 𝑖 ) / 𝜕 𝐩 .
5. By a line search algorithm determine the optimal step 𝛼 𝑖 .
6. Compute 𝐩 𝑖 + 1 = 𝐩 𝑖 𝛼 𝑖 ( 𝜕 𝐹 ( 𝐩 𝑖 ) / 𝜕 𝐩 ) .
7. If convergence is reached (controlling e.g., the difference 𝐹 ( 𝐩 𝑖 ) 𝐹 ( 𝐩 𝑖 + 1 ) )
then stop, otherwise set 𝑖 = 𝑖 + 1 and go to step 2 of the algorithm.