mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 14:35:27 -04:00
Merge 5fcacb80ce into 05d01274a7
This commit is contained in:
commit
ebd83c2fbb
3 changed files with 8 additions and 10 deletions
2
src/external/quartic_solver.cpp
vendored
2
src/external/quartic_solver.cpp
vendored
|
|
@ -1,5 +1,5 @@
|
|||
#include <algorithm>
|
||||
#define _USE_MATH_DEFINES // to make M_PI declared in Intel and MSVC compilers
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <complex>
|
||||
#include <cstdlib>
|
||||
|
|
|
|||
13
src/mesh.cpp
13
src/mesh.cpp
|
|
@ -1,11 +1,10 @@
|
|||
#include "openmc/mesh.h"
|
||||
#include <algorithm> // for copy, equal, min, min_element
|
||||
#include <cassert>
|
||||
#include <cstdint> // for uint64_t
|
||||
#include <cstring> // for memcpy
|
||||
#define _USE_MATH_DEFINES // to make M_PI declared in Intel and MSVC compilers
|
||||
#include <cmath> // for ceil
|
||||
#include <cstddef> // for size_t
|
||||
#include <cmath> // for ceil
|
||||
#include <cstddef> // for size_t
|
||||
#include <cstdint> // for uint64_t
|
||||
#include <cstring> // for memcpy
|
||||
#include <limits>
|
||||
#include <numeric> // for accumulate
|
||||
#include <string>
|
||||
|
|
@ -1829,7 +1828,7 @@ StructuredMesh::MeshIndex CylindricalMesh::get_indices(
|
|||
} else {
|
||||
mapped_r[1] = std::atan2(r.y, r.x);
|
||||
if (mapped_r[1] < 0)
|
||||
mapped_r[1] += 2 * M_PI;
|
||||
mapped_r[1] += 2 * PI;
|
||||
}
|
||||
|
||||
MeshIndex idx = StructuredMesh::get_indices(mapped_r, in_mesh);
|
||||
|
|
@ -2123,7 +2122,7 @@ StructuredMesh::MeshIndex SphericalMesh::get_indices(
|
|||
mapped_r[1] = std::acos(r.z / mapped_r.x);
|
||||
mapped_r[2] = std::atan2(r.y, r.x);
|
||||
if (mapped_r[2] < 0)
|
||||
mapped_r[2] += 2 * M_PI;
|
||||
mapped_r[2] += 2 * PI;
|
||||
}
|
||||
|
||||
MeshIndex idx = StructuredMesh::get_indices(mapped_r, in_mesh);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#include "openmc/plot.h"
|
||||
|
||||
#include <algorithm>
|
||||
#define _USE_MATH_DEFINES // to make M_PI declared in Intel and MSVC compilers
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <fstream>
|
||||
|
|
@ -1328,7 +1327,7 @@ std::pair<Position, Direction> RayTracePlot::get_pixel_ray(
|
|||
int horiz, int vert) const
|
||||
{
|
||||
// Compute field of view in radians
|
||||
constexpr double DEGREE_TO_RADIAN = M_PI / 180.0;
|
||||
constexpr double DEGREE_TO_RADIAN = PI / 180.0;
|
||||
double horiz_fov_radians = horizontal_field_of_view_ * DEGREE_TO_RADIAN;
|
||||
double p0 = static_cast<double>(pixels()[0]);
|
||||
double p1 = static_cast<double>(pixels()[1]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue