[Dune] Use of partition iterators
jorrit at jorrit.de
Tue Sep 15 14:42:47 CEST 2015
Am Mon, 14. Sep 2015, 18:10:08 +0100 schrieb Ganesh Diwan:
> Date: Mon, 14 Sep 2015 18:10:08 +0100
> From: Ganesh Diwan <gcdiwan83 at gmail.com>
> To: DUNE Liste <dune at dune-project.org>
> Subject: [Dune] Use of partition iterators
> Dear Dune
> I am trying to figure out the way iterator ranges are used for walking
> through the grid entities. I am using uggrid in 2d.
> For eg using vertex iterator for Dune::Partitions::interior goes through
> whereas the same for Dune::partitions::border throws error as below.
> Similar errors appear for for accessing edges for
> Dune::Partitions::interior and Dune::Partitions::interiorBorder. Could you
> please comment on what I am doing wrong.
> The error for following lines in my code:
> for (auto&& e : vertices(view,Dune::Partitions::border))
> std::cout << e.geometry().center() << std::endl;
> is as below:
The error message
> error: static assertion failed: There is no partition iterator for this
> combination of entity partitions
> int,partitions> >::value,
says that UG cannot iterate through the border partition alone, at least then
iterating over the vertices. You should be able to iterate through
interiorBorder though (the union of interior and border).
Historically, we had a limited set of PartitionIteratorTypes. We also had
a PartitionType to describe the partition of an Entity exactly and
InterfaceType to describe source and destination partition for
To unify things, and to make using the vertices() and elements() functions
easier, recently a new scheme for naming partitions was introduced. The
new scheme makes it possible to name name all possible combinations, even
though not all combinations are supported or are even meaningful in the
context of entity iterators or communication.
Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
University of Münster, Orleans-Ring 10, D-48149 Münster
Tel: +49 251 83 35146 Fax: +49 251 83 32729
Software is like sex; it's better when it's free.
-- Linus Torvalds
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 811 bytes
Desc: Digital signature
More information about the Dune