Skip to content

Commit a1028b5

Browse files
authored
1118 Update of Damping not working with negative coefficients (#1119)
remove cwiseMax to also update for negative damping coefficients.
1 parent d4ed967 commit a1028b5

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

cpp/memilio/epidemiology/damping.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,6 @@ void Dampings<S>::update_active_dampings(
609609
});
610610
//remove active with the same type and level and add new one
611611
get<MatrixIdx>(sum_same_level) += get<MatrixIdx>(damping) - get<MatrixIdx>(active_same_type).get();
612-
//avoid negative values due to rounding error if e.g. a previous damping is lifted
613-
get<MatrixIdx>(sum_same_level) = get<MatrixIdx>(sum_same_level).cwiseMax(0.);
614612
get<MatrixIdx>(active_same_type) = get<MatrixIdx>(damping);
615613
}
616614
else {

0 commit comments

Comments
 (0)