Dear Jean,
I followed your suggestions and used the first method (triangulation
iterator outside of loop and two dofhandler iterators inside of loop).
After making sure of this, I managed to fix several other bugs and finally
the code works well. And the results are nearly the same as the
Dear Toddy,
This is a link to the documentation, where this function (a class constructor)
is explained in more detail
https://dealii.org/current/doxygen/deal.II/classDoFAccessor.html#a8d14894a737bb1edf3719e4de058a284