An inverse problem of identifying inhomogeneity or crack in the workpiece
made of nonlinear magnetic material is investigated. To recover the shape from the
local measurements, a piecewise constant level set algorithm is proposed. By means
of the Lagrangian multiplier method, we derive the first variation w.r.t the piecewise
constant level set function and obtain the descent direction by the adjoint variable
method. Numerical results show the robustness and effectiveness of our algorithm
applied to reconstruct some complex shapes.