Skip to content
Snippets Groups Projects
Commit d7fe70e4 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Rename: project -> negative_projection

parent 564dc738
Branches
No related tags found
No related merge requests found
...@@ -74,7 +74,7 @@ template <int dimension> class SampleFunctional { ...@@ -74,7 +74,7 @@ template <int dimension> class SampleFunctional {
"semigradient): " << -(ret * pg) "semigradient): " << -(ret * pg)
<< " (coordinates of the restriction)" << std::endl; << " (coordinates of the restriction)" << std::endl;
} else { } else {
ret = project(smoothGradient(x), x); ret = negative_projection(smoothGradient(x), x);
dverb << "## Directional derivative (as per scalar product w/ " dverb << "## Directional derivative (as per scalar product w/ "
"semigradient): " << -(ret * ret) "semigradient): " << -(ret * ret)
<< " (coordinates of the restriction)" << std::endl; << " (coordinates of the restriction)" << std::endl;
...@@ -110,7 +110,8 @@ template <int dimension> class SampleFunctional { ...@@ -110,7 +110,8 @@ template <int dimension> class SampleFunctional {
} }
// No normalising is done! // No normalising is done!
SmallVector project(const SmallVector z, const SmallVector x) const { SmallVector negative_projection(const SmallVector z,
const SmallVector x) const {
SmallVector y = z; SmallVector y = z;
y.axpy(-(z * x) / x.two_norm2(), x); y.axpy(-(z * x) / x.two_norm2(), x);
return y; return y;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment