Modify nodal coordinates for P2 elements

Dear All,
I would like to find the displacement field near a crack tip in a linear elastic
body. I have used Lagrangian quadratic elements (P2) to discretize my domain. To
increase the accuracy of my solution, I would like to create crack tip
elements. This is done my suitably moving the midside nodes on the edges incident
on the crack tip node (assuming the crack tip is situated at a node). I have
the following questions. If I know the crack tip node number:

  1. How do I find the midside nodes numbers whose position needs to be changed ?
  2. How do I change the position of the identified midside nodes

I am new to FENICS and I am specifically interested in the commands that I
need to use. I will figure out the details since I have done something similar
for my code written in Octave.

Thank you for your help.