  We present an error-controlled mesh refinement procedure for needle insertion
simulation and apply it to the simulation of electrode implantation for deep
brain stimulation, including brain shift. Our approach enables to control the
error in the computation of the displacement and stress fields around the
needle tip and needle shaft by suitably refining the mesh, whilst maintaining a
coarser mesh in other parts of the domain. We demonstrate through academic and
practical examples that our approach increases the accuracy of the displacement
and stress fields around the needle without increasing the computational
expense. This enables real-time simulations. The proposed methodology has
direct implications to increase the accuracy and control the computational
expense of the simulation of percutaneous procedures such as biopsy,
brachytherapy, regional anesthesia, or cryotherapy and can be essential to the
development of robotic guidance.
