Skip to content
Snippets Groups Projects
Commit 3d5cb115 authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Bugfix: energy scalar product was plain wrong

[[Imported from SVN: r9587]]
parent 815cac0f
No related branches found
No related tags found
No related merge requests found
...@@ -72,7 +72,7 @@ public: ...@@ -72,7 +72,7 @@ public:
T result = 0; T result = 0;
for (size_t i=0; i<N; i++) for (size_t i=0; i<N; i++)
for (size_t j=0; j<=i; j++) for (size_t j=0; j<=i; j++)
result += (1+(i!=j)) * operator()(i,j) * v1[i] * v2[j]; result += (1-0.5*(i==j)) * operator()(i,j) * (v1[i] * v2[j] + v1[j] * v2[i]);
return result; return result;
} }
......
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