From db1a2b2e5c77342f74fb9f7566a3f37448e2f00c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20L=C3=BCbke?= Date: Mon, 4 Dec 2023 09:11:29 +0100 Subject: [PATCH] fix: use maximum alpha for CFL condition --- include/tug/Simulation.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tug/Simulation.hpp b/include/tug/Simulation.hpp index 4c0f5c8..469b411 100644 --- a/include/tug/Simulation.hpp +++ b/include/tug/Simulation.hpp @@ -199,7 +199,7 @@ public: const T minDeltaSquare = std::min(deltaColSquare, deltaRowSquare); const T maxAlpha = - std::min(grid.getAlphaX().maxCoeff(), grid.getAlphaY().maxCoeff()); + std::max(grid.getAlphaX().maxCoeff(), grid.getAlphaY().maxCoeff()); cfl = minDeltaSquare / (4 * maxAlpha); }