From 4eb8bbbebeae35b42810f064b521b7f43396d823 Mon Sep 17 00:00:00 2001 From: paboyle Date: Tue, 10 Oct 2017 13:48:51 +0100 Subject: [PATCH] Christop mods --- lib/algorithms/approx/Chebyshev.h | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/lib/algorithms/approx/Chebyshev.h b/lib/algorithms/approx/Chebyshev.h index 2793f138..f8c21a05 100644 --- a/lib/algorithms/approx/Chebyshev.h +++ b/lib/algorithms/approx/Chebyshev.h @@ -8,6 +8,7 @@ Author: Peter Boyle Author: paboyle +Author: Christoph Lehner This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -193,6 +194,47 @@ namespace Grid { return sum; }; + RealD approxD(RealD x) + { + RealD Un; + RealD Unm; + RealD Unp; + + RealD y=( x-0.5*(hi+lo))/(0.5*(hi-lo)); + + RealD U0=1; + RealD U1=2*y; + + RealD sum; + sum = Coeffs[1]*U0; + sum+= Coeffs[2]*U1*2.0; + + Un =U1; + Unm=U0; + for(int i=2;i::quiet_NaN(); + } + // Implement the required interface void operator() (LinearOperatorBase &Linop, const Field &in, Field &out) {