From 654e06de007a560212cc504e076590f430486c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Thu, 27 Nov 2014 14:33:31 +0100 Subject: [PATCH] Work in progress. --- opm/core/tof/AnisotropicEikonal.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/opm/core/tof/AnisotropicEikonal.cpp b/opm/core/tof/AnisotropicEikonal.cpp index e99dc888a..f7dd3939a 100644 --- a/opm/core/tof/AnisotropicEikonal.cpp +++ b/opm/core/tof/AnisotropicEikonal.cpp @@ -250,9 +250,11 @@ namespace Opm const double* g; double operator()(const double theta) const { - double a[2] = { x[0] - (1-theta)*x1[0] + theta*x2[0], x[1] - (1-theta)*x1[1] + theta*x2[1] }; - double b[2] = { x1[0] - x2[0], x1[1] - x2[1] }; - return u2 - u1 + 2*(a[0]*b[0]*g[0] + a[0]*b[1]*g[1] + a[1]*b[0]*g[2] + a[1]*b[1]*g[3]); + const double a[2] = { x[0] - (1-theta)*x1[0] + theta*x2[0], x[1] - (1-theta)*x1[1] + theta*x2[1] }; + const double b[2] = { x1[0] - x2[0], x1[1] - x2[1] }; + const double val = u2 - u1 + 2*(a[0]*b[0]*g[0] + a[0]*b[1]*g[1] + a[1]*b[0]*g[2] + a[1]*b[1]*g[3]); + std::cout << theta << " " << val << std::endl; + return val; } };