dolfin-adjoint / pyadjoint

The algorithmic differentation tool pyadjoint and add-ons.
GNU Lesser General Public License v3.0
91 stars 37 forks source link

Add `_ad_new` and `_ad_new_dual` methods to `OverloadedType` #165

Open jrmaddison opened 3 months ago

jrmaddison commented 3 months ago

Needed for instantiation of new objects, e.g. in #143. The missing _ad_new can be worked around using _ad_copy. The missing _ad_new_dual has no easy workaround, and #143 uses copying of adjoint values.