From a57ada41b5fd52424bc3d535d11677ca31bf9a04 Mon Sep 17 00:00:00 2001 From: eckertben Date: Fri, 5 Jun 2026 13:41:23 -0500 Subject: [PATCH] Apply clang-format to modified files --- include/openmc/cell.h | 12 +++++++----- include/openmc/dagmc.h | 3 ++- include/openmc/geometry.h | 3 ++- src/dagmc.cpp | 7 ++++--- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/include/openmc/cell.h b/include/openmc/cell.h index 3245f1f65..0e9297811 100644 --- a/include/openmc/cell.h +++ b/include/openmc/cell.h @@ -81,8 +81,8 @@ public: bool contains(Position r, Direction u, int32_t on_surface) const; //! Find the oncoming boundary of this cell. - std::pair distance( - Position r, Direction u, int32_t on_surface, double max_distance=INFINITY) const; + std::pair distance(Position r, Direction u, + int32_t on_surface, double max_distance = INFINITY) const; //! Get the BoundingBox for this cell. BoundingBox bounding_box(int32_t cell_id) const; @@ -205,8 +205,9 @@ public: virtual bool contains(Position r, Direction u, int32_t on_surface) const = 0; //! Find the oncoming boundary of this cell. - virtual std::pair distance( - Position r, Direction u, int32_t on_surface, GeometryState* p, double max_distance=INFTY) const = 0; + virtual std::pair distance(Position r, Direction u, + int32_t on_surface, GeometryState* p, + double max_distance = INFTY) const = 0; //! Write all information needed to reconstruct the cell to an HDF5 group. //! \param group_id An HDF5 group id. @@ -421,7 +422,8 @@ public: vector surfaces() const override { return region_.surfaces(); } std::pair distance(Position r, Direction u, - int32_t on_surface, GeometryState* p, double max_distance=INFTY) const override + int32_t on_surface, GeometryState* p, + double max_distance = INFTY) const override { return region_.distance(r, u, on_surface); } diff --git a/include/openmc/dagmc.h b/include/openmc/dagmc.h index addf6be9f..805960253 100644 --- a/include/openmc/dagmc.h +++ b/include/openmc/dagmc.h @@ -74,7 +74,8 @@ public: bool contains(Position r, Direction u, int32_t on_surface) const override; std::pair distance(Position r, Direction u, - int32_t on_surface, GeometryState* p, double max_distance=INFTY) const override; + int32_t on_surface, GeometryState* p, + double max_distance = INFTY) const override; BoundingBox bounding_box() const override; diff --git a/include/openmc/geometry.h b/include/openmc/geometry.h index 0e49ad6ac..0e9a40b7d 100644 --- a/include/openmc/geometry.h +++ b/include/openmc/geometry.h @@ -75,7 +75,8 @@ void cross_lattice( //! Find the next boundary a particle will intersect. //============================================================================== -BoundaryInfo distance_to_boundary(GeometryState& p, double max_distance=INFINITY); +BoundaryInfo distance_to_boundary( + GeometryState& p, double max_distance = INFINITY); } // namespace openmc diff --git a/src/dagmc.cpp b/src/dagmc.cpp index 834331984..fb0847114 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -806,8 +806,8 @@ void DAGUniverse::override_assign_material(std::unique_ptr& c, DAGCell::DAGCell(std::shared_ptr dag_ptr, int32_t dag_idx) : Cell {}, dagmc_ptr_(dag_ptr), dag_index_(dag_idx) {}; -std::pair DAGCell::distance( - Position r, Direction u, int32_t on_surface, GeometryState* p, double max_distance) const +std::pair DAGCell::distance(Position r, Direction u, + int32_t on_surface, GeometryState* p, double max_distance) const { // if we've changed direction or we're not on a surface, // reset the history and update last direction @@ -826,7 +826,8 @@ std::pair DAGCell::distance( fatal_error("DAGMC call made for particle in a non-DAGMC universe"); // initialize to lost particle conditions - // surface idx of 1 and distance of infinity occur when no previous collisions recorded + // surface idx of 1 and distance of infinity occur when no previous collisions + // recorded int surf_idx = -1; double dist = max_distance;