Skip to content
Snippets Groups Projects
Commit 22d6b44c authored by Oliver Sander's avatar Oliver Sander Committed by sander@PCPOOL.MI.FU-BERLIN.DE
Browse files

bugfix: properly extend the energy functional to the embedding space of S^n

[[Imported from SVN: r5744]]
parent c4a86312
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment