From 22d6b44cea80ef3516f248281e325f4cf9e46536 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Sun, 14 Mar 2010 20:17:34 +0000 Subject: [PATCH] bugfix: properly extend the energy functional to the embedding space of S^n [[Imported from SVN: r5744]] --- src/localgeodesicfestiffness.hh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/localgeodesicfestiffness.hh b/src/localgeodesicfestiffness.hh index 9ffddea3..d21b23cb 100644 --- a/src/localgeodesicfestiffness.hh +++ b/src/localgeodesicfestiffness.hh @@ -396,9 +396,11 @@ assembleGradient(const Entity& element, for (int j=0; j<blocksize; j++) { - // Brute force: the return value does not have unit norm. Stuff it in there anyways - forwardSolution[i].data_ = infinitesimalVariation(localSolution[i], eps, j); - backwardSolution[i].data_ = infinitesimalVariation(localSolution[i], -eps, j); + // The return value does not have unit norm. But assigning it to a UnitVector object + // will normalize it. This amounts to an extension of the energy functional + // to a neighborhood around S^n + forwardSolution[i] = infinitesimalVariation(localSolution[i], eps, j); + backwardSolution[i] = infinitesimalVariation(localSolution[i], -eps, j); localGradient[i][j] = (energy(element,forwardSolution) - energy(element,backwardSolution)) / (2*eps); -- GitLab