mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Ensure particle direction is normalized for plotting / volume calculations (#2816)
This commit is contained in:
parent
411656668f
commit
2e4811b26b
2 changed files with 3 additions and 2 deletions
|
|
@ -159,7 +159,7 @@ vector<VolumeCalculation::Result> VolumeCalculation::execute() const
|
|||
p.n_coord() = 1;
|
||||
Position xi {prn(&seed), prn(&seed), prn(&seed)};
|
||||
p.r() = lower_left_ + xi * (upper_right_ - lower_left_);
|
||||
p.u() = {0.5, 0.5, 0.5};
|
||||
p.u() = {1. / std::sqrt(3.), 1. / std::sqrt(3.), 1. / std::sqrt(3.)};
|
||||
|
||||
// If this location is not in the geometry at all, move on to next block
|
||||
if (!exhaustive_find_cell(p))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue