diff --git a/dune/tectonic/curvedfunction.hh b/dune/tectonic/curvedfunction.hh index 5d8ed7281b196b607856fdf27b61acf678d9e6e8..6919ee4948a401ce5599873e8b0bf66cf49578e0 100644 --- a/dune/tectonic/curvedfunction.hh +++ b/dune/tectonic/curvedfunction.hh @@ -22,15 +22,15 @@ template <class NonlinearityType> class CurvedFunction { void subDiff(double m, Interval<double> &D) const { VectorType x; cartesian(m, x); - VectorType tangent; - tangentialDirection(m, tangent); + VectorType t; + tangent(m, t); - phi.directionalSubDiff(x, tangent, D); + phi.directionalSubDiff(x, t, D); VectorType tmp; - A.mv(x, tmp); // Ax - tmp -= b; // Ax - b - double const dotp = tmp * tangent; // <Ax - b,t> + A.mv(x, tmp); // Ax + tmp -= b; // Ax - b + double const dotp = tmp * t; // <Ax - b,t> D[0] += dotp; D[1] += dotp; } @@ -61,7 +61,7 @@ template <class NonlinearityType> class CurvedFunction { Since we x and d are not normalised and the return of cartesian() is fixed, we scale the tangent. */ - void tangentialDirection(double m, VectorType &y) const { + void tangent(double m, VectorType &y) const { y = 0; y.axpy(-std::sin(m) * dir.two_norm2(), x); y.axpy(std::cos(m) * x.two_norm2(), dir);