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
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef OPENMC_PLOT_H
|
||||
#define OPENMC_PLOT_H
|
||||
|
||||
#include <cmath>
|
||||
#include <sstream>
|
||||
#include <unordered_map>
|
||||
|
||||
|
|
@ -200,7 +201,7 @@ T SlicePlotBase::get_map() const
|
|||
xyz[out_i] = origin_[out_i] + width_[1] / 2. - out_pixel / 2.;
|
||||
|
||||
// arbitrary direction
|
||||
Direction dir = {0.7071, 0.7071, 0.0};
|
||||
Direction dir = {1. / std::sqrt(2.), 1. / std::sqrt(2.), 0.0};
|
||||
|
||||
#pragma omp parallel
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue