Skip to content
Snippets Groups Projects
Commit 17596a51 authored by Norihiro Watanabe's avatar Norihiro Watanabe
Browse files

print connected nodes in queryMesh

parent eef6c39c
No related branches found
No related tags found
No related merge requests found
...@@ -81,12 +81,16 @@ int main(int argc, char *argv[]) ...@@ -81,12 +81,16 @@ int main(int argc, char *argv[])
out << std::scientific out << std::scientific
<< std::setprecision(std::numeric_limits<double>::digits10); << std::setprecision(std::numeric_limits<double>::digits10);
out << "--------------------------------------------------------" << std::endl; out << "--------------------------------------------------------" << std::endl;
auto* node = mesh->getNode(node_id); MeshLib::Node const* node = mesh->getNode(node_id);
out << "# Node" << node->getID() << std::endl; out << "# Node" << node->getID() << std::endl;
out << "Coordinates: " << *node << std::endl; out << "Coordinates: " << *node << std::endl;
out << "Connected elements: " ; out << "Connected elements (" << node->getNumberOfElements() << "): ";
for (unsigned i=0; i<node->getNumberOfElements(); i++) for (auto ele : node->getElements())
out << node->getElement(i)->getID() << " "; out << ele->getID() << " ";
out << std::endl;
out << "Connected nodes (" << node->getConnectedNodes().size() << "): ";
for (auto nd : node->getConnectedNodes())
out << nd->getID() << " ";
out << std::endl; out << std::endl;
INFO("%s", out.str().c_str()); INFO("%s", out.str().c_str());
} }
......
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