diff --git a/Applications/FileIO/Gmsh/GMSHPoint.cpp b/Applications/FileIO/Gmsh/GMSHPoint.cpp index e128e0ffac8e93618b5e643b40336dad0ab2e08f..8da809a4e9ba9f52ceb090ba393493b4be8e3403 100644 --- a/Applications/FileIO/Gmsh/GMSHPoint.cpp +++ b/Applications/FileIO/Gmsh/GMSHPoint.cpp @@ -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 << "};"; diff --git a/MathLib/TemplatePoint.h b/MathLib/TemplatePoint.h index 3b0d4b9935db4221db79162f5ac2ddfe55e68145..e4b971cfa90c427c58cdd7c9ebab08ed91bf1742 100644 --- a/MathLib/TemplatePoint.h +++ b/MathLib/TemplatePoint.h @@ -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; }; diff --git a/MeshLib/Node.cpp b/MeshLib/Node.cpp index df1d730dde44220affa41c4bbabf6a53b0cf930a..1795cff0315f252e0008168fa97ed396d716288e 100644 --- a/MeshLib/Node.cpp +++ b/MeshLib/Node.cpp @@ -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++)