Skip to content
Snippets Groups Projects
Commit 63876fa9 authored by Tom Fischer's avatar Tom Fischer
Browse files

Using logog for logging within class MeshLib::Element.

parent e84dd304
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
* Created on 2012-05-02 by Karsten Rink * Created on 2012-05-02 by Karsten Rink
*/ */
#include "logog/include/logog.hpp"
#include "Element.h" #include "Element.h"
#include "Node.h" #include "Node.h"
#include "Edge.h" #include "Edge.h"
...@@ -74,7 +76,7 @@ const Element* Element::getEdge(unsigned i) const ...@@ -74,7 +76,7 @@ const Element* Element::getEdge(unsigned i) const
nodes[1] = const_cast<Node*>(getEdgeNode(i,1)); nodes[1] = const_cast<Node*>(getEdgeNode(i,1));
return new Edge(nodes); return new Edge(nodes);
} }
std::cerr << "Error in MeshLib::Element::getEdge() - Index does not exist." << std::endl; ERR("Error in MeshLib::Element::getEdge() - Index does not exist.");
return NULL; return NULL;
} }
...@@ -95,7 +97,7 @@ const Element* Element::getNeighbor(unsigned i) const ...@@ -95,7 +97,7 @@ const Element* Element::getNeighbor(unsigned i) const
{ {
if (i < getNNeighbors()) if (i < getNNeighbors())
return _neighbors[i]; return _neighbors[i];
std::cerr << "Error in MeshLib::Element::getNeighbor() - Index does not exist." << std::endl; ERR("Error in MeshLib::Element::getNeighbor() - Index does not exist.");
return NULL; return NULL;
} }
...@@ -112,7 +114,7 @@ const Node* Element::getNode(unsigned i) const ...@@ -112,7 +114,7 @@ const Node* Element::getNode(unsigned i) const
{ {
if (i < getNNodes()) if (i < getNNodes())
return _nodes[i]; return _nodes[i];
std::cerr << "Error in MeshLib::Element::getNode() - Index " << i << " in " << MshElemType2String(getGeomType()) << " does not exist." << std::endl; ERR("Error in MeshLib::Element::getNode() - Index %d in %s", i, MshElemType2String(getGeomType()).c_str());
return NULL; return NULL;
} }
...@@ -126,7 +128,7 @@ unsigned Element::getNodeIndex(unsigned i) const ...@@ -126,7 +128,7 @@ unsigned Element::getNodeIndex(unsigned i) const
{ {
if (i<getNNodes()) if (i<getNNodes())
return _nodes[i]->getID(); return _nodes[i]->getID();
std::cerr << "Error in MeshLib::Element::getNodeIndex() - Index does not exist." << std::endl; ERR("Error in MeshLib::Element::getNodeIndex() - Index does not exist.");
return std::numeric_limits<unsigned>::max(); return std::numeric_limits<unsigned>::max();
} }
......
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