[Dune] Example on IteratorRange

Aleksejs Fomins aleksejs.fomins at lspr.ch
Fri Jan 23 08:59:58 CET 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Christian,

Thank you for your reply.

I have a generic function which works the same way for all grid views,
with the exception that it iterates over the gridview in some way.

I thought it would make sense to implement this function as a
protected member of the generic gridview class, and call it from the
derived leafgridview as

Base::f(LeafIteratorRange)

Can I pass iterator ranges to functions? What is their type then?

Cheers,
Aleksejs


On 22/01/15 21:56, Christian Engwer wrote:
> Dear Aleksejs,
> 
> I'm sorry, but I don't uderstand your question. What exactly do
> you miss in the documentation?
> 
> There are examples for all functions like elements(gv), 
> intersection(e), entities(gv, dim/codim)...
> 
> On Thu, Jan 22, 2015 at 06:05:55PM +0100, Aleksejs Fomins wrote:
>> Dear Dune,
>> 
>> I remember we had a discussion before on using iterator ranges
>> for iterating over entities of gridview, as written in here
>> 
>> http://www.dune-project.org/doc/doxygen/dune-grid-html/group___g_i_iteration.html#_details
>>
>>
>> 
Would somebody be so kind to show me to an example program doing this?
>> 
>> In particular, I do not seem to be able to derive from that 
>> documentation page on how one constructs such an iterator. Or,
>> at least, my Eclipse is not able to direct me to the method like 
>> Dune::GridView::elements
> 
> as shown in the examples you are not calling methods on a class.
> These are free functions operating on a gridview, adding syntactic
> sugar ontop of the begin/end methods of the gridview.
> 
> Christian
> 
>> 
>> Thank you, Aleksejs
>> 
>> _______________________________________________ Dune mailing
>> list Dune at dune-project.org 
>> http://lists.dune-project.org/mailman/listinfo/dune
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJUwf9+AAoJEDkNM7UOEwMZLr0P/0HRI3lnKuT5Mk8hIVWgU+ob
obj6Cnt4F4U+dWCHeAnizAmtJHwA/9gKUAjyQRYeF5UM3RTwH3/heAbLabbszPzy
z5kQytFXYiUAb69kokgSmLKO84FEJDofE/Dk+EvyPFf6kJMYJfBD1bJCDINuzuOH
0m7Z+3z+8NO+WaFqeftBDUXxnytFjKwyr57UUR/t8DDQWzGkMa20Lsze+MBzkkwN
/F5CsUeW78zE0qvFKE+zHbSHyytUagmmuI1OqhQFpbb1eT7sepRNH6uEDbRiVok0
NHsQDhzFumI9r5Gts1cbPoxp7gldbM3vWjJ7nqx3Z4pEdf6BZK7Hd+Teez/Fp6QB
YPJJ7C85KEImVHCoQ/KZbufPkGEAzotwZX50WNqc5rSi8a6wBt0zFdIakqZhkpCQ
WejYYNBFfqKRlkQOFDjSv9U5tJZL2eKD/nzvd2u7tG70LR/pAsgCjypsK8W92Tju
NSVScCfTy7U6Y8E+OEoS09yg9MWT2ofizREPwjG2QW5Esnm0wzqOleQsUMjO5fhv
HaGl7iEiNVEjXF9lfBc2AmPhPpQyFkb0un2oMMEr+Q1rDkNo44MUsj+Lq1ev58FH
4rNBhwx3FD3yEAdnB8Yu5gjpkocPs6UALCUtkmtuV2l6EPEGzAHPYWo9nJ9MLRu4
uUnsX2oasJ2X/QUjMVj0
=tJGm
-----END PGP SIGNATURE-----




More information about the Dune mailing list