From 256744ea736fe3468d2d7e00859a53b1abd7fe32 Mon Sep 17 00:00:00 2001 From: Christoph Lehmann <christoph.lehmann@ufz.de> Date: Fri, 22 Apr 2022 07:22:52 +0200 Subject: [PATCH] [MeL] More output and also in release mode --- MeshLib/Elements/Element.cpp | 10 ++++------ MeshLib/Elements/Element.h | 2 -- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/MeshLib/Elements/Element.cpp b/MeshLib/Elements/Element.cpp index d9d63582dca..99d8ea26294 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 549e75ae3d4..5d580c374c4 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; -- GitLab