Skip to content

Commit 36305d2

Browse files
committed
Check that norm_val is positive before dividing
1 parent cfe52f5 commit 36305d2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/reduced_basis/rb_eim_construction.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ void RBEIMConstruction::apply_normalization_to_solution_snapshots()
684684
// error tolerance in the Greedy training, and the L2-norm-scaled value of
685685
// _max_abs_value_in_training_set that we obtain here should be sufficient
686686
// for that purpose.
687-
if (i == _max_abs_value_in_training_set_index)
687+
if ((i == _max_abs_value_in_training_set_index) && (norm_val > 0.))
688688
_max_abs_value_in_training_set /= norm_val;
689689
}
690690

0 commit comments

Comments
 (0)