Adding docstring. Updating method name

This commit is contained in:
Patrick Shriwise 2023-03-04 23:57:55 -06:00
parent 5946763323
commit b02e558fae
2 changed files with 7 additions and 7 deletions

View file

@ -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
};
//==============================================================================

View file

@ -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<MeshDistance, 3> 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();