summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2021-11-23 15:19:54 +0100
committerJaron Kent-Dobias <jaron@kent-dobias.com>2021-11-23 15:19:54 +0100
commit8db79850e505f41459e71d58685f13db4f8a6674 (patch)
tree384e7f966fb4991b737136c476b16c1b74f9dcdc
parentfd3fc91059228aa475bbae1581ab80a89f578176 (diff)
downloadcode-8db79850e505f41459e71d58685f13db4f8a6674.tar.gz
code-8db79850e505f41459e71d58685f13db4f8a6674.tar.bz2
code-8db79850e505f41459e71d58685f13db4f8a6674.zip
Fixed bug in previous commit due to unsigned int underflow.
-rw-r--r--stokes.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/stokes.hpp b/stokes.hpp
index b511b0d..d86b479 100644
--- a/stokes.hpp
+++ b/stokes.hpp
@@ -33,7 +33,7 @@ public:
Real dgCoeff(unsigned i, Real t) const {
Real x = 2 * t - 1;
- return ((i - 1) * x * std::legendre(i, x) - (i + 1) * std::legendre(i + 1, x)) / 2.0;
+ return ((i - 1.0) * x * std::legendre(i, x) - (i + 1) * std::legendre(i + 1, x)) / 2.0;
}
Vector<Scalar> f(Real t) const {