Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
pshriwise committed Jan 12, 2025
1 parent ba7db72 commit a889387
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 14 deletions.
53 changes: 41 additions & 12 deletions include/openmc/particle_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,14 @@ struct CacheDataMG {

struct BoundaryInfo {
double distance {INFINITY}; //!< distance to nearest boundary
int surface_index {0}; //!< if boundary is surface, signed index in surfaces vector
int coord_level; //!< coordinate level after crossing boundary
int surface_index {
0}; //!< if boundary is surface, signed index in surfaces vector
int coord_level; //!< coordinate level after crossing boundary
array<int, 3>
lattice_translation {}; //!< which way lattice indices will change

void reset() {
void reset()
{
distance = INFINITY;
surface_index = 0;
coord_level = 0;
Expand Down Expand Up @@ -318,20 +320,47 @@ class GeometryState {

#ifdef DAGMC
// DagMC state variables
moab::DagMC::RayHistory& history() { return history_; }
Direction& last_dir() { return last_dir_; }
moab::DagMC::RayHistory& history()
{
return history_;
}
Direction& last_dir()
{
return last_dir_;
}
#endif

// material of current and last cell
int& material() { return material_; }
const int& material() const { return material_; }
int& material_last() { return material_last_; }
const int& material_last() const { return material_last_; }
int& material()
{
return material_;
}
const int& material() const
{
return material_;
}
int& material_last()
{
return material_last_;
}
const int& material_last() const
{
return material_last_;
}

// temperature of current and last cell
double& sqrtkT() { return sqrtkT_; }
const double& sqrtkT() const { return sqrtkT_; }
double& sqrtkT_last() { return sqrtkT_last_; }
double& sqrtkT()
{
return sqrtkT_;
}
const double& sqrtkT() const
{
return sqrtkT_;
}
double& sqrtkT_last()
{
return sqrtkT_last_;
}

private:
int64_t id_ {-1}; //!< Unique ID
Expand Down
4 changes: 2 additions & 2 deletions src/particle_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ GeometryState::GeometryState()
clear();
}

void
GeometryState::advance_to_boundary_from_void() {
void GeometryState::advance_to_boundary_from_void()
{
auto root_coord = this->coord(0);
const auto& root_universe = model::universes[model::root_universe];
boundary().reset();
Expand Down

0 comments on commit a889387

Please sign in to comment.