The easiest way is looping over all cells and over all faces of the cell. For each face, store the cell and its neighbor and set the user flag so you don't do the face twice.
Be aware though that this technique will introduce a rather random orientation on the faces. Best, Guido Tobias Leicht wrote: > Hi Christian, > > to my knowledge this information cannot be gathered making some clever use of > existing data structures or functionality. > Nevertheless, the task is quite simple. You can use two separate loops. The > first is over all cells and you store for each vertex which cells are > adjacent. > > The second loop is over all faces and creates the list you desired. Perhaps > you will not really need the second list as you could evaluate this quickly > for each face on-the-fly. > > Best, > Tobias > > On Friday 22 October 2010 10:02, Christian May wrote: > >> Hi all, >> >> I'm looking for a way to build up a list of adjacent cells of each >> face, i.e. all cells that share a vertex with a given face. >> Obviously a loop over all cells inside a loop over all faces is >> prohibitively expensive. Is there a more clever way to achieve this in >> deal? >> >> Thanks >> Christian >> _______________________________________________ >> dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii >> > _______________________________________________ > dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii > _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
