[dune-fem] Getting the list of neighbours for a given element of the grid

Sacconi, Andrea a.sacconi11 at imperial.ac.uk
Fri Oct 26 19:05:42 CEST 2012


Hi all,

just one question about the neighbours for a given element.

If you want to get all the neighbours, you enumerate all the intersections and check if the bool neighbor () is true or false.
If it's true, calling the method outside (), you get an EntityPointer to the entity you need (i.e., the triangle that is the current neighbour under analysis).

I also checked that you can create an EntityPointer from a DiscreteFunctionSpaceType :: IteratorType (where DiscreteFunctionSpaceType is obviously the discrete function space type created for f.e.m. computations), but not viceversa.
Is there any method for doing so?
Because I need an IteratorType, not an EntityPointer, and the conversion seems to work only in one direction.

Cheers,
Andrea
__________________________________________________________

Andrea Sacconi
PhD student, Applied Mathematics
AMMP Section, Department of Mathematics, Imperial College London,
London SW7 2AZ, UK
a.sacconi11 at imperial.ac.uk




More information about the dune-fem mailing list