Skip to content
Snippets Groups Projects
Commit 20e1dabe authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[MaL] Make TemplatePoint::_x a private member.

Using (const) access functions in two cases of direct
member access.
parent a4cf5c61
No related branches found
No related tags found
No related merge requests found
......@@ -25,8 +25,8 @@ GMSHPoint::GMSHPoint(GeoLib::Point const& pnt, std::size_t id,
void GMSHPoint::write(std::ostream& os) const
{
os << "Point(" << getID() << ") = {" << _x[0] << ", " << _x[1] << ", "
<< _x[2];
os << "Point(" << getID() << ") = {" << (*this)[0] << ", " << (*this)[1]
<< ", " << (*this)[2];
if (fabs(_mesh_density) > std::numeric_limits<double>::epsilon())
{
os << ", " << _mesh_density << "};";
......
......@@ -95,7 +95,7 @@ public:
std::copy(std::istream_iterator<T>(is), std::istream_iterator<T>(), _x.begin());
}
protected:
private:
std::array<T, DIM> _x;
};
......
......@@ -34,13 +34,13 @@ Node::Node(double x, double y, double z, std::size_t id)
{
}
Node::Node(const Node& node) : MathLib::Point3dWithID(node._x, node.getID()) {}
Node::Node(const Node& node) : MathLib::Point3dWithID(node, node.getID()) {}
void Node::updateCoordinates(double x, double y, double z)
{
_x[0] = x;
_x[1] = y;
_x[2] = z;
(*this)[0] = x;
(*this)[1] = y;
(*this)[2] = z;
const std::size_t nElements(this->_elements.size());
for (std::size_t i = 0; i < nElements; i++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment