Skip to content

Commit

Permalink
Initialize p_mask to zero
Browse files Browse the repository at this point in the history
Since the number of collision is the number of electrons there are
some pairs the are not done when the number of species 2 is greater than
the number of electrons.
  • Loading branch information
dpgrote committed Jan 7, 2025
1 parent d3b22d7 commit 2dcd95a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ public:
index_type* AMREX_RESTRICT p_coll_offsets = coll_offsets.dataPtr();

// mask: equal to 1 if particle creation occurs for a given pair, 0 otherwise
amrex::Gpu::DeviceVector<index_type> mask(n_total_pairs);
amrex::Gpu::DeviceVector<index_type> mask(n_total_pairs, index_type(0));
index_type* AMREX_RESTRICT p_mask = mask.dataPtr();
// Will be filled with the index of the first particle of a given pair
amrex::Gpu::DeviceVector<index_type> pair_indices_1(n_total_pairs);
Expand Down

0 comments on commit 2dcd95a

Please sign in to comment.