Respond to @smharper comments on #1183

This commit is contained in:
Paul Romano 2019-03-05 07:05:33 -06:00
parent 3ad2caa0ac
commit 7382d35679
4 changed files with 5 additions and 4 deletions

View file

@ -157,10 +157,11 @@ Particle::Bank SourceDistribution::sample() const
// Sample spatial distribution
site.r = space_->sample();
double xyz[] {site.r.x, site.r.y, site.r.z};
// Now search to see if location exists in geometry
int32_t cell_index, instance;
int err = openmc_find_cell(&site.r.x, &cell_index, &instance);
int err = openmc_find_cell(xyz, &cell_index, &instance);
found = (err != OPENMC_E_GEOMETRY);
// Check if spatial site is in fissionable material