Skip to content

Commit 8f7bc49

Browse files
authored
add an assert to check on a divide by zero possibility (#3171)
flagged by coverityt
1 parent ab322cf commit 8f7bc49

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Exec/science/subchandra/problem_initialize.H

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ void problem_initialize ()
101101
ncore++;
102102
}
103103

104+
AMREX_ALWAYS_ASSERT(ncore > 0);
105+
104106
// we need to initialize the core to be 1 - other_xn * small_x.
105107
// We'll distribute this remainder over the core nuclei
106108

0 commit comments

Comments
 (0)