LocalDensity uses the same type for coordinates and derivatives
The signature of the main interface method of LocalDensity
is
virtual field_type operator() (const FieldVector<field_type,dim>& x, const FieldMatrix<field_type,dim,dim>& gradient) const = 0;
Note how it uses the same number type for x
and gradient
. This is unfortunate, because when using algorithmic differentiation, gradient
will typically be an active type but x
will not.