diff --git a/app/celer-g4/DetectorConstruction.cc b/app/celer-g4/DetectorConstruction.cc index 10f72593fe..a1a36fa20e 100644 --- a/app/celer-g4/DetectorConstruction.cc +++ b/app/celer-g4/DetectorConstruction.cc @@ -23,6 +23,7 @@ #include "corecel/cont/ArrayIO.hh" #include "corecel/io/Logger.hh" #include "corecel/io/OutputRegistry.hh" +#include "corecel/math/ArrayUtils.hh" #include "celeritas/Quantities.hh" #include "celeritas/field/RZMapFieldInput.hh" #include "celeritas/field/RZMapFieldParams.hh" diff --git a/src/celeritas/Types.hh b/src/celeritas/Types.hh index 05e69a1b85..66822480a4 100644 --- a/src/celeritas/Types.hh +++ b/src/celeritas/Types.hh @@ -16,7 +16,6 @@ #include "corecel/Macros.hh" #include "corecel/OpaqueId.hh" #include "corecel/Types.hh" -#include "corecel/cont/Array.hh" #include "corecel/sys/ThreadId.hh" #include "orange/Types.hh" // IWYU pragma: end_exports diff --git a/src/celeritas/field/LinearPropagator.hh b/src/celeritas/field/LinearPropagator.hh index 13738c9aed..e19310ae7b 100644 --- a/src/celeritas/field/LinearPropagator.hh +++ b/src/celeritas/field/LinearPropagator.hh @@ -7,6 +7,7 @@ //---------------------------------------------------------------------------// #pragma once +#include "corecel/math/Algorithms.hh" #include "orange/Types.hh" namespace celeritas diff --git a/src/corecel/math/Algorithms.hh b/src/corecel/math/Algorithms.hh index ec20e6f1a0..b5c3021dce 100644 --- a/src/corecel/math/Algorithms.hh +++ b/src/corecel/math/Algorithms.hh @@ -526,7 +526,7 @@ CELER_WRAP_MATH_FLOAT_DBL_1(, sinpi) CELER_WRAP_MATH_FLOAT_DBL_1(, cospi) CELER_WRAP_MATH_FLOAT_DBL_PTR_2(, sincospi) CELER_WRAP_MATH_FLOAT_DBL_PTR_2(, sincos) -#elif __APPLE__ +#elif __APPLE__ && !defined(__CLING__) // Apple defines __sinpi, __sinpif, __sincospi, ... CELER_WRAP_MATH_FLOAT_DBL_1(__, sinpi) CELER_WRAP_MATH_FLOAT_DBL_1(__, cospi) diff --git a/src/orange/BoundingBox.hh b/src/orange/BoundingBox.hh index b587bf831f..d713d90407 100644 --- a/src/orange/BoundingBox.hh +++ b/src/orange/BoundingBox.hh @@ -12,6 +12,7 @@ #include "corecel/Assert.hh" #include "corecel/Macros.hh" #include "corecel/cont/Array.hh" +#include "corecel/math/Algorithms.hh" #include "corecel/math/NumericLimits.hh" #include "OrangeTypes.hh" diff --git a/src/orange/Types.hh b/src/orange/Types.hh index 7465de19a2..02165e507f 100644 --- a/src/orange/Types.hh +++ b/src/orange/Types.hh @@ -11,7 +11,6 @@ #include "corecel/OpaqueId.hh" #include "corecel/Types.hh" #include "corecel/cont/Array.hh" -#include "corecel/math/ArrayUtils.hh" namespace celeritas { @@ -62,13 +61,13 @@ enum class Axis */ struct GeoTrackInitializer { - Real3 pos; - Real3 dir; + Real3 pos{0, 0, 0}; + Real3 dir{0, 0, 0}; - //! True if assigned and valid + //! True if assigned explicit CELER_FUNCTION operator bool() const { - return is_soft_unit_vector(dir); + return dir[0] != 0 || dir[1] != 0 || dir[2] != 0; } }; diff --git a/src/orange/surf/SurfaceTypeTraits.hh b/src/orange/surf/SurfaceTypeTraits.hh index 3ceed246b7..309270d688 100644 --- a/src/orange/surf/SurfaceTypeTraits.hh +++ b/src/orange/surf/SurfaceTypeTraits.hh @@ -8,6 +8,7 @@ #pragma once #include "corecel/cont/EnumClassUtils.hh" +#include "corecel/math/Algorithms.hh" #include "orange/OrangeTypes.hh" #include "SurfaceFwd.hh" diff --git a/src/orange/transform/TransformTypeTraits.hh b/src/orange/transform/TransformTypeTraits.hh index 0c6a732c0c..64525fcb64 100644 --- a/src/orange/transform/TransformTypeTraits.hh +++ b/src/orange/transform/TransformTypeTraits.hh @@ -7,6 +7,7 @@ //---------------------------------------------------------------------------// #pragma once +#include "corecel/math/Algorithms.hh" #include "orange/OrangeTypes.hh" namespace celeritas diff --git a/src/orange/univ/UniverseTypeTraits.hh b/src/orange/univ/UniverseTypeTraits.hh index 4b00483aa2..8783cf488e 100644 --- a/src/orange/univ/UniverseTypeTraits.hh +++ b/src/orange/univ/UniverseTypeTraits.hh @@ -7,6 +7,7 @@ //---------------------------------------------------------------------------// #pragma once +#include "corecel/math/Algorithms.hh" #include "orange/OrangeTypes.hh" namespace celeritas