From 8f2a675ad5212996f00187e17751e20a036b7f77 Mon Sep 17 00:00:00 2001 From: Igor Krivenko Date: Wed, 2 Oct 2024 17:48:01 +0200 Subject: [PATCH] [teval] Assert s_i == s_f in configuration tree traversal --- src/topology_eval.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/topology_eval.jl b/src/topology_eval.jl index 8e4e54b..599ed13 100644 --- a/src/topology_eval.jl +++ b/src/topology_eval.jl @@ -459,9 +459,10 @@ function _traverse_configuration_tree!(eval::TopologyEvaluator, # Are we at a leaf? if pos > length(eval.conf) - if s_i == s_f # Is the resulting configuration block-diagonal? - eval.top_result_mats[s_i] .+= pair_int_weight .* eval!(eval.matrix_prods[s_f]) - end + @assert(s_i == s_f, "A block off-diagonal contribution to a pseudo-particle \ + propagator detected, try passing more `symmetry_breakers` when \ + constructing the local exact diagonalization object") + eval.top_result_mats[s_i] .+= pair_int_weight .* eval!(eval.matrix_prods[s_f]) return end