[Dune] Use of partition iterators

Jö Fahlke 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

> /home/gcd3/dune/core-2.4.0/install/include/dune/grid/common/partitionset.hh:24:7:
> error: static assertion failed: There is no partition iterator for this
> combination of entity partitions
>        static_assert(AlwaysFalse<std::integral_constant<unsigned
> 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[1].  We also had
a PartitionType[2] to describe the partition of an Entity exactly and
InterfaceType[3] to describe source and destination partition for
communication.

To unify things, and to make using the vertices() and elements() functions
easier, recently a new scheme for naming partitions was introduced[4].  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.

Regards,
Jö.

[1] https://www.dune-project.org/doc/doxygen/dune-grid-html/group___g_i_related_types.html#gaa5b9e8102d7f70f3f4178182629d98b6
[2] https://www.dune-project.org/doc/doxygen/dune-grid-html/group___g_i_related_types.html#gabd89b77709db1d9e56bb17cd0aa44c3d
[3] https://www.dune-project.org/doc/doxygen/dune-grid-html/group___g_i_related_types.html#gae799a4296824c1d4ae0d82e71287b722
[4] https://www.dune-project.org/doc/doxygen/dune-grid-html/namespace_dune_1_1_partitions.html

-- 
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...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20150915/3b8ce506/attachment.pgp>


More information about the Dune mailing list