[Dune] starcd files reader and parallel alugrids

Jö Fahlke jorrit at jorrit.de
Fri Jun 1 15:08:51 CEST 2012


Am Fri,  1. Jun 2012, 14:56:46 +0200 schrieb Marco Cisternino:
> my 3D case is like your 2D example. I wonder how to loop over all
> the codim(1) of a proc (ghost included) avoiding to visit more than
> once the same entity.

Duplicates of the same Entity have the same id but different indices.  You
could remember the ids of the entities you already visited in a std::set and
skip an entity if its id is already in there.  If you want to iterate many
times, it is probably much more efficient to store the information in a
std:vector<bool> index by an appropriate mapper.

But as Martin said, this usually turns out to be unecessary or avoidable if
you look at your algorithm carefully.

Regards,
Jö.

-- 
Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 6221 54 8890 Fax: +49 6221 54 8884

If God had intended Man to Smoke, He would have set him on Fire.
-- fortune
-------------- 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/20120601/83897799/attachment.sig>


More information about the Dune mailing list