Skip to content

Commit

Permalink
Reset values of lattice offset tables when allocated (#3188)
Browse files Browse the repository at this point in the history
  • Loading branch information
pshriwise authored Nov 8, 2024
1 parent 339d78c commit 754f6fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/openmc/lattice.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ class Lattice {
//! Allocate offset table for distribcell.
void allocate_offset_table(int n_maps)
{
offsets_.resize(n_maps * universes_.size(), C_NONE);
offsets_.resize(n_maps * universes_.size());
std::fill(offsets_.begin(), offsets_.end(), C_NONE);
}

//! Populate the distribcell offset tables.
Expand Down

0 comments on commit 754f6fa

Please sign in to comment.