dolfin-adjoint / pyadjoint

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

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

Open jrmaddison opened 1 month ago

jrmaddison commented 1 month 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.