diff --git a/Applications/FileIO/Gmsh/GMSHPoint.cpp b/Applications/FileIO/Gmsh/GMSHPoint.cpp index 026575f8c3018f331cf3ebdb35c1434dca751bfd..e128e0ffac8e93618b5e643b40336dad0ab2e08f 100644 --- a/Applications/FileIO/Gmsh/GMSHPoint.cpp +++ b/Applications/FileIO/Gmsh/GMSHPoint.cpp @@ -25,7 +25,8 @@ GMSHPoint::GMSHPoint(GeoLib::Point const& pnt, std::size_t id, void GMSHPoint::write(std::ostream& os) const { - os << "Point(" << _id << ") = {" << _x[0] << ", " << _x[1] << ", " << _x[2]; + os << "Point(" << getID() << ") = {" << _x[0] << ", " << _x[1] << ", " + << _x[2]; if (fabs(_mesh_density) > std::numeric_limits<double>::epsilon()) { os << ", " << _mesh_density << "};"; diff --git a/Applications/FileIO/GocadIO/GocadNode.h b/Applications/FileIO/GocadIO/GocadNode.h index de8ed4b1c356e12bc0a1fbc9ab765f81f87888c9..9c6b066baa9b56119b27dd1071cba0fec50a9f0c 100644 --- a/Applications/FileIO/GocadIO/GocadNode.h +++ b/Applications/FileIO/GocadIO/GocadNode.h @@ -97,7 +97,7 @@ public: OGS_FATAL( "GocadNode {:d}: Could not found face indicator for face set " "{:d}", - _id, face_set_number); + getID(), face_set_number); } return it->second; } diff --git a/GeoLib/Point.h b/GeoLib/Point.h index a245e755bc39d25184164ba39837f0b986ac890b..4e5772d3a038cbf7a51c084a51f8bcefb67b84aa 100644 --- a/GeoLib/Point.h +++ b/GeoLib/Point.h @@ -56,8 +56,6 @@ public: protected: friend PointVec; - /// Resets the id. - void setID(std::size_t id) { _id = id; } }; } // namespace GeoLib diff --git a/MathLib/Point3dWithID.h b/MathLib/Point3dWithID.h index 340f6e2402147fdeb038d3e7bd34d7f524a3e405..d0b58041775e1d1084dc39aa1a1dccc79c8a5113 100644 --- a/MathLib/Point3dWithID.h +++ b/MathLib/Point3dWithID.h @@ -61,6 +61,10 @@ public: std::size_t getID() const { return _id; } protected: + /// Sets the ID of a node to the given value. + void setID(std::size_t id) { _id = id; } + +private: std::size_t _id; }; diff --git a/MeshLib/Node.h b/MeshLib/Node.h index 2d61e6631d8efd12c733f416650bc97d84947909..e9a8123d2ca21d6a5e3b05a7869ed34fbd993e50 100644 --- a/MeshLib/Node.h +++ b/MeshLib/Node.h @@ -89,9 +89,6 @@ protected: _connected_nodes = connected_nodes; } - /// Sets the ID of a node to the given value. - void setID(std::size_t id) { _id = id; } - std::vector<Node*> _connected_nodes; std::vector<Element*> _elements; }; /* class */