mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
Respond to @smharper comments on #1183
This commit is contained in:
parent
3ad2caa0ac
commit
7382d35679
4 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue