Skip to content
Snippets Groups Projects
Commit 24793f9a authored by Peter Bastian's avatar Peter Bastian
Browse files

added output for leaf vertices

[[Imported from SVN: r2965]]
parent d4776dbc
No related branches found
No related tags found
No related merge requests found
......@@ -146,21 +146,39 @@ namespace Dune
// all elements (better codim 0 entities) on a grid level
// Note the use of the typename and template keywords.
typedef typename G::Traits::template Codim<0>::LeafIterator LeafIterator;
typedef typename G::Traits::template Codim<dim>::LeafIterator VLeafIterator;
// print info about the leaf grid
std::cout << prefix << "leaf"
<< " dim=" << dim
<< " geomTypes=(";
bool first=true;
for (int i=0; i<grid.leafIndexSet().geomTypes(0).size(); i++)
for (int c=0; c<=dim; c++)
{
if (!first) std::cout << ",";
std::cout << GeometryName(grid.leafIndexSet().geomTypes(0)[i])
<< "=" << grid.leafIndexSet().size(0,grid.leafIndexSet().geomTypes(0)[i]);
first=false;
for (int i=0; i<grid.leafIndexSet().geomTypes(c).size(); i++)
{
if (!first) std::cout << ",";
std::cout << GeometryName(grid.leafIndexSet().geomTypes(c)[i])
<< "[" << c << "]"
<< "=" << grid.leafIndexSet().size(c,grid.leafIndexSet().geomTypes(c)[i]);
first=false;
}
}
std::cout << ")" << std::endl;
// print info about nodes in leaf grid
VLeafIterator veendit = grid.template leafend<dim>();
for (VLeafIterator it = grid.template leafbegin<dim>(); it!=veendit; ++it)
{
std::cout << prefix << "level=" << it->level()
<< " " << GeometryName(it->geometry().type()) << "[" << dim << "]"
<< " index=" << grid.leafIndexSet().index(*it)
<< " gid=" << grid.globalIdSet().template id<dim>(*it)
<< " partition=" << PartitionName(it->partitionType())
<< " pos=(" << it->geometry()[0] << ")"
<< std::endl;
}
// print info about each element in leaf grid
LeafIterator eendit = grid.template leafend<0>();
for (LeafIterator it = grid.template leafbegin<0>(); it!=eendit; ++it)
......
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