In the project I am working on I unfortunately cannot use dolfin-adjoint and have to implement some of its features manually. I have been reading the dolfin adjoint code, in particular on resolving the adjoint equation to try and replicate it/debug my current code.
In the pyadjoint/tests/migration/manual_hessian/manual_hessian.py file dolfin adjoint uses from dolfin_adjoint.utils import homogenize
However if I try to import this function myself I cannot. I can’t find any reference to it in the github, so I am confused as to where it is coming from.
The tests in the migration folder are taken from the old dolfin-adjoint that builds on libadjoint. Not all the tests in the migration folder have been converted to a new dolfin-adjoint/pyadjoint version, and so they are marked with an xfail in the test_*.py file. That includes the manual_hessian test.