Apply clang-format to modified files

This commit is contained in:
eckertben 2026-06-05 13:41:23 -05:00
parent c94762d667
commit a57ada41b5
4 changed files with 15 additions and 10 deletions

View file

@ -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<double, int32_t> distance(
Position r, Direction u, int32_t on_surface, double max_distance=INFINITY) const;
std::pair<double, int32_t> 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<double, int32_t> distance(
Position r, Direction u, int32_t on_surface, GeometryState* p, double max_distance=INFTY) const = 0;
virtual std::pair<double, int32_t> 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<int32_t> surfaces() const override { return region_.surfaces(); }
std::pair<double, int32_t> 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);
}

View file

@ -74,7 +74,8 @@ public:
bool contains(Position r, Direction u, int32_t on_surface) const override;
std::pair<double, int32_t> 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;

View file

@ -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

View file

@ -806,8 +806,8 @@ void DAGUniverse::override_assign_material(std::unique_ptr<DAGCell>& c,
DAGCell::DAGCell(std::shared_ptr<moab::DagMC> dag_ptr, int32_t dag_idx)
: Cell {}, dagmc_ptr_(dag_ptr), dag_index_(dag_idx) {};
std::pair<double, int32_t> DAGCell::distance(
Position r, Direction u, int32_t on_surface, GeometryState* p, double max_distance) const
std::pair<double, int32_t> 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<double, int32_t> 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;