From bcd200913da9a754662d78c229f5fb0a3134bc89 Mon Sep 17 00:00:00 2001 From: Rupert Nash Date: Wed, 1 May 2024 16:03:42 +0100 Subject: [PATCH] Add UNKNOWN_PROCESS constant for geometry --- Code/constants.h | 4 +++- Code/geometry/GeometrySite.h | 9 +++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Code/constants.h b/Code/constants.h index 64e30aaa0..78e6dd2fd 100644 --- a/Code/constants.h +++ b/Code/constants.h @@ -45,7 +45,9 @@ namespace hemelb // TODO almost certainly filth. constexpr distribn_t NO_VALUE = std::numeric_limits::max(); - constexpr int SITE_OR_BLOCK_SOLID = std::numeric_limits::max(); + constexpr int SITE_OR_BLOCK_SOLID = std::numeric_limits::min(); + constexpr int UNKNOWN_PROCESS = SITE_OR_BLOCK_SOLID + 1; + } #endif //HEMELB_CONSTANTS_H diff --git a/Code/geometry/GeometrySite.h b/Code/geometry/GeometrySite.h index 97621e8c6..1f1488806 100644 --- a/Code/geometry/GeometrySite.h +++ b/Code/geometry/GeometrySite.h @@ -12,10 +12,8 @@ #include "geometry/GeometrySiteLink.h" #include "util/Vector3D.h" -namespace hemelb +namespace hemelb::geometry { - namespace geometry - { /*** * Model of the data for a site, as contained within a geometry file. * this data will be broken up and placed in various arrays in hemelb::GmyReadResult::domain_type @@ -25,11 +23,11 @@ namespace hemelb */ struct GeometrySite { - public: + public: //! Basic constructor for solid and fluid sites. GeometrySite(bool siteIsFluid) : targetProcessor(siteIsFluid ? - -1 : + UNKNOWN_PROCESS : SITE_OR_BLOCK_SOLID), isFluid(siteIsFluid), wallNormalAvailable(false) { } @@ -51,7 +49,6 @@ namespace hemelb //! Wall normal approximation at the current fluid site. util::Vector3D wallNormal; }; - } } #endif /* HEMELB_GEOMETRY_SITEREADRESULT_H */