diff --git a/include/openmc/mesh.h b/include/openmc/mesh.h index 6ae076106..f19a22c09 100644 --- a/include/openmc/mesh.h +++ b/include/openmc/mesh.h @@ -76,7 +76,7 @@ public: // Methods //! Update a position to the local coordinates of the mesh - virtual void to_local_coords(Position& r) const {}; + virtual void local_coords(Position& r) const {}; //! Return a position in the local coordinates of the mesh virtual Position local_coords(const Position& r) const { return r; }; @@ -257,7 +257,7 @@ public: PeriodicStructuredMesh() = default; PeriodicStructuredMesh(pugi::xml_node node) : StructuredMesh {node} {}; - void to_local_coords(Position& r) const override { r -= origin_; }; + void local_coords(Position& r) const override { r -= origin_; }; Position local_coords(const Position& r) const override { @@ -265,7 +265,7 @@ public: }; // Data members - Position origin_ {0.0, 0.0, 0.0}; + Position origin_ {0.0, 0.0, 0.0}; //!< Origin of the mesh }; //============================================================================== diff --git a/src/mesh.cpp b/src/mesh.cpp index eca1d2a3f..9020a95aa 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -446,8 +446,8 @@ void StructuredMesh::raytrace_mesh( // translate start and end positions, // this needs to come after the get_indices call because it does its own translation - to_local_coords(r0); - to_local_coords(r1); + local_coords(r0); + local_coords(r1); // Calculate initial distances to next surfaces in all three dimensions std::array distances; @@ -977,7 +977,7 @@ std::string CylindricalMesh::get_mesh_type() const StructuredMesh::MeshIndex CylindricalMesh::get_indices( Position r, bool& in_mesh) const { - to_local_coords(r); + local_coords(r); Position mapped_r; mapped_r[0] = std::hypot(r.x, r.y); @@ -1215,7 +1215,7 @@ std::string SphericalMesh::get_mesh_type() const StructuredMesh::MeshIndex SphericalMesh::get_indices( Position r, bool& in_mesh) const { - to_local_coords(r); + local_coords(r); Position mapped_r; mapped_r[0] = r.norm();