<div dir="ltr"><div>Hi <br>Thank you for your replies.<br></div><div><br>It appears that I can iterate through only the Ghost and InteriorEntity for codim 0 for a given partition. This is OK as I am concerned about the elements that are truly interior to a partition.<br>I however need more information: how to extract all the vertices and edges (marked as blue in grid-howto) only on the border of the partition using this?<br><br>The border of partition must include the domain boundary if any (If I understand correctly, as per howto some of the edges/vertices can be of partitiontype interior and be on the domain boundary- aptly therefore marked red).<br><br></div><div>As of now, I am able to extract only the domain boundary edges in the partition this way. <br><br>    const Dune::PartitionIteratorType pit_all=Dune::All_Partition  ;<br>    typedef typename GridType::template Codim<0>::template Partition<pit_all>::LeafIterator AllElementIterator;<br>    typedef typename GridView::IntersectionIterator IntersectionIterator;<br><br>    int all_ElmCount = 0;<br>    for (AllElementIterator it = grid.template leafbegin<0,pit_all>(); it!=grid.template leafend<0,pit_all>(); ++it) {<br>        if (it->partitionType() == Dune::GhostEntity)<br>            continue;<br>        IntersectionIterator isIt = gv.ibegin(*it);<br>        const IntersectionIterator &isEndIt = gv.iend(*it);<br>        int numedges_on_domain_boundary = 0;<br>        std::cout << "coe: " << it->geometry().center() << std::endl;<br>        for (; isIt != isEndIt; ++isIt) {<br>            if(isIt->boundary()) ++ numedges_on_domain_boundary;<br>        }<br>        std::cout << "edges on domain boundary = " << numedges_on_domain_boundary << std::endl;<br>        ++all_ElmCount;<br>    }  <br><br><br></div><div>One way to probe the border entities, I thought was to follow test-parallel-ug.cc code:<br><br>typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView, LayoutWrapper<0>::template Layout><br>    MapperType;<br>    MapperType mapper(gv);<br><br><br></div><div>and then probe the entity as:<br><br>for (AllElementIterator it = grid.template leafbegin<0,pit_all>(); it!=grid.template leafend<0,pit_all>(); ++it) { // element loop 2001<br>        int numberOfSubEntities = it->template count<1>();<br>        std::cout << "no of subentities = " << numberOfSubEntities << std::endl;<br>        for (int k = 0; k < numberOfSubEntities; k++)<br>        {<br>            typedef typename GridView::template Codim<0>::Entity Element;<br>            typedef typename Element::template Codim<0>::EntityPointer EntityPointer;<br>            const EntityPointer entityPointer(it->template subEntity<1>(k)); // <<========= compilation error occurs here<br>            entityIndex[mapper.map(*entityPointer)]   = mapper.map(*entityPointer);<br>}<br>}<br><br></div><div>But I have problem compiling this where I define the EntityPointer, the error is:<br><br></div><div> error: no matching function for call to ‘Dune::EntityPointer<const Dune::UGGrid<2>, Dune::UGGridEntityPointer<0, const Dune::UGGrid<2> > >::EntityPointer(Dune::Entity<0, 2, const Dune::UGGrid<2>, Dune::UGGridEntity>::subentity_return_info<1>::type)’<br>    const EntityPointer entityPointer(it->template subEntity<1>(k));<br><br><br></div><div>Thank you,<br></div><div>Ganesh<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 15, 2015 at 5:38 PM, Markus Blatt <span dir="ltr"><<a href="mailto:markus@dr-blatt.de" target="_blank">markus@dr-blatt.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>On Tue, Sep 15, 2015 at 02:42:47PM +0200, Jö Fahlke wrote:<br>
><br>
> To unify things, and to make using the vertices() and elements() functions<br>
> easier, recently a new scheme for naming partitions was introduced[4].  The<br>
> new scheme makes it possible to name name all possible combinations, even<br>
> though not all combinations are supported or are even meaningful in the<br>
> context of entity iterators or communication.<br>
<br>
</span>Isn't that against the principles DUNE ("one algorithm to use them<br>
(grids) all"?)?<br>
<br>
Can one query what combinations are supported by a grid?<br>
<span><font color="#888888"><br>
Markus<br>
--<br>
Join us at the DUNE User Meeting Sept. 28-29, 2015, Heidelberg, Germany<br>
<a href="http://users.dune-project.org/projects/dune-user-meeting-2015/wiki" rel="noreferrer" target="_blank">http://users.dune-project.org/projects/dune-user-meeting-2015/wiki</a><br>
<br>
Dr. Markus Blatt - HPC-Simulation-Software & Services <a href="http://www.dr-blatt.de" rel="noreferrer" target="_blank">http://www.dr-blatt.de</a><br>
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany<br>
Tel.: <a href="tel:%2B49%20%280%29%20160%2097590858" value="+4916097590858" target="_blank">+49 (0) 160 97590858</a><br>
</font></span></blockquote></div><br></div></div>