a preliminary example of integrating enzyme into serac as the primary mechanism of material model differentiation
Some notable benefits of enzyme over serac::dual:
excessive use of auto in material models is not required
qfunction arguments can also be regular C++ types, rather than auto
bodies of qfunctions do not need to use the C++ type system for AD, so some programming constructs (conditionals, operator+=, etc) are much easier to write
support for reverse mode differentiation
some notable downsides/changes include:
enzyme is relatively new and has some sharp edges (e.g. currently, some qfunctions that use serac::zero are crashing enzyme).
requires finite element kernels to be compiled with clang compiler. clang and enzyme do claim to support AMD/NVIDIA GPU backends, but I have not verified that yet.
must compile with optimization or enzyme doesn't work (this is fixed if we adopt C++20)
a preliminary example of integrating enzyme into serac as the primary mechanism of material model differentiation
Some notable benefits of enzyme over
serac::dual
:auto
in material models is not requiredauto
some notable downsides/changes include:
serac::zero
are crashing enzyme).clang
compiler.clang
andenzyme
do claim to support AMD/NVIDIA GPU backends, but I have not verified that yet.