Skip to content

Fix memory access errors when density does not depend on function value

Sander, Oliver requested to merge fix-integral-stiffness-for-harmonic-maps into master

If InterpolationDerivatives is told not to compute the derivatives for the interpolation value, then it sometimes leaves the corresponding matrix entries uninitialized. That's okay: they shall not be used anyway.

However, the code still did use them: It multiplied them by zero. This is okay if the matrix entries are actual values, but they may also be NaNs. In that case, the NaNs propagate, leading to wrong results. Fix this by modifying the matrix products to really omit the uninitialized values.

Merge request reports

Loading