mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Adding docstring. Updating method name
This commit is contained in:
parent
5946763323
commit
b02e558fae
2 changed files with 7 additions and 7 deletions
|
|
@ -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
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue