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

rename: tangentialDirection -> tangent

parent db6f592d
No related branches found
No related tags found
No related merge requests found
...@@ -22,15 +22,15 @@ template <class NonlinearityType> class CurvedFunction { ...@@ -22,15 +22,15 @@ template <class NonlinearityType> class CurvedFunction {
void subDiff(double m, Interval<double> &D) const { void subDiff(double m, Interval<double> &D) const {
VectorType x; VectorType x;
cartesian(m, x); cartesian(m, x);
VectorType tangent; VectorType t;
tangentialDirection(m, tangent); tangent(m, t);
phi.directionalSubDiff(x, tangent, D); phi.directionalSubDiff(x, t, D);
VectorType tmp; VectorType tmp;
A.mv(x, tmp); // Ax A.mv(x, tmp); // Ax
tmp -= b; // Ax - b tmp -= b; // Ax - b
double const dotp = tmp * tangent; // <Ax - b,t> double const dotp = tmp * t; // <Ax - b,t>
D[0] += dotp; D[0] += dotp;
D[1] += dotp; D[1] += dotp;
} }
...@@ -61,7 +61,7 @@ template <class NonlinearityType> class CurvedFunction { ...@@ -61,7 +61,7 @@ template <class NonlinearityType> class CurvedFunction {
Since we x and d are not normalised and the return of Since we x and d are not normalised and the return of
cartesian() is fixed, we scale the tangent. cartesian() is fixed, we scale the tangent.
*/ */
void tangentialDirection(double m, VectorType &y) const { void tangent(double m, VectorType &y) const {
y = 0; y = 0;
y.axpy(-std::sin(m) * dir.two_norm2(), x); y.axpy(-std::sin(m) * dir.two_norm2(), x);
y.axpy(std::cos(m) * x.two_norm2(), dir); y.axpy(std::cos(m) * x.two_norm2(), dir);
......
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