diff --git a/MeshLib/Elements/Element.cpp b/MeshLib/Elements/Element.cpp index d9d63582dca6470bda6635e4c23bc8c5d7a649f8..99d8ea262942dd0f9f1863c2ca42fc79076d30ec 100644 --- a/MeshLib/Elements/Element.cpp +++ b/MeshLib/Elements/Element.cpp @@ -85,7 +85,6 @@ bool Element::isBoundaryElement() const { return e == nullptr; }); } -#ifndef NDEBUG std::ostream& operator<<(std::ostream& os, Element const& e) { os << "Element #" << e._id << " @ " << &e << " with " @@ -95,15 +94,14 @@ std::ostream& operator<<(std::ostream& os, Element const& e) MeshLib::Node* const* const nodes = e.getNodes(); os << "MeshElemType: " << static_cast<std::underlying_type<MeshElemType>::type>(e.getGeomType()) - << " with " << nnodes << " nodes: { "; + << " with " << nnodes << " nodes: {\n"; for (unsigned n = 0; n < nnodes; ++n) { - os << nodes[n]->getID() << " @ " << nodes[n] << " "; + os << " #" << nodes[n]->getID() << " @ " << nodes[n] << " coords [" + << *nodes[n] << "]\n"; } - os << "}\n"; - return os; + return os << '}'; } -#endif // NDEBUG bool areNeighbors(Element const* const element, Element const* const other) { diff --git a/MeshLib/Elements/Element.h b/MeshLib/Elements/Element.h index 549e75ae3d4f68095ef0f74fac68c943be29a619..5d580c374c46debfcce64dfab1bfb3344597d2fb 100644 --- a/MeshLib/Elements/Element.h +++ b/MeshLib/Elements/Element.h @@ -177,9 +177,7 @@ public: /// Return a specific edge node. virtual Node* getEdgeNode(unsigned edge_id, unsigned node_id) const = 0; -#ifndef NDEBUG friend std::ostream& operator<<(std::ostream& os, Element const& e); -#endif // NDEBUG /// Dimension of the space, where the element exists. unsigned space_dimension_ = 3u;