Open mohamed82008 opened 3 years ago
Thanks Steven. I will take a look at how you worked around the non-differentiability of Gridap. I suppose you have to define one adjoint for each physics. I am hoping that one day Enzyme will be able to diff through the entire code base without needing custom adjoints https://github.com/EnzymeAD/Enzyme.jl/issues/447.
In my experience any sufficiently complicated problem will require custom adjoints, and the fact that there is currently no good way to do this with Enzyme (EnzymeAD/Enzyme.jl#172) makes it unlikely for me to use Enzyme in any real problem.
(That being said, in this example we probably did more manual differentiation than we needed to. @fverdugo found that he could use ForwardDiff to differentiate the weak form, for example.)
Fair enough. I need to study your example.
https://github.com/gridap/Gridap.jl/issues/633