[Dune] Getting a list of all the neighbors to an element in the unstructured grid.
Jö Fahlke
jorrit at jorrit.de
Sat Aug 6 13:34:02 CEST 2011
Am Sat, 6. Aug 2011, 11:58:10 +0530 schrieb Jayesh Badwaik:
> Is there any way to a get a list of iterators to all the elements (codim 0)
> entities
> which neighbors to a given element in an unstructured grid (especially
> ALUSimplex3d) ?
Yes, mostly.
typedef typename GV::IntersectionIterator IIt;
IIt iend = gv.iend(element);
for(IIt iit = gv.ibegin(element); iit != iend; ++iit)
if(iit->neighbour()) {
typename GV::template Codim<0>::EntityPointer
outsidePtr = iit->outside();
// ... Do something useful with outsidePtr here.
}
Only "mostly" because an EntityPointer can only be used to point to an entity,
not to iterate through entities.
Bye,
Jö.
--
oil -- operation iraqi liberation
http://www.mo.tecsamples.de/mahnwache/index.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20110806/19b5343e/attachment.sig>
More information about the Dune
mailing list