From 6e7717a4e0955fcd54e2b80477456c75127aba54 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Wed, 5 Apr 2023 16:02:04 +0200 Subject: Fixed bug in index counter. --- collectMorseData.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collectMorseData.hpp b/collectMorseData.hpp index eddb825..fdee480 100644 --- a/collectMorseData.hpp +++ b/collectMorseData.hpp @@ -34,7 +34,7 @@ void collectMorseData(std::string tag, unsigned N, Generator& r, Real ε, Real unsigned indx = 0; for (Real λ : eigenS.eigenvalues().real()) { - if (λ < 0) indx++; + if (λ < 0 && std::abs(λ) > 1e-14) indx++; } pSpinModel M = ReM; @@ -64,7 +64,7 @@ void collectMorseData(std::string tag, unsigned N, Generator& r, Real ε, Real indz = 0; for (Real λ : eigenSz.eigenvalues().real()) { - if (λ < 0) indz++; + if (λ < 0 && std::abs(λ) > 1e-14) indz++; } } -- cgit v1.2.3-70-g09d2