<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>Is it not even so that one can not use an undexset at all? Load balancing changes the grid so the indexsets are not valid. You need to use id containers.
<div>Andreas </div>
<br>
Martin Nolte <nolte@mathematik.uni-freiburg.de> wrote:<br>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi Bernd,<br>
<br>
I have an educated guess for you (don't blame me, if I'm wrong):<br>
<br>
In normal communication, you only communicate data on a certain grid view. Hence <br>
you can use the index set to address data stored on that grid view.<br>
<br>
When doing load balancing, you rather communicate data on the entire hierarchy. <br>
Therefore, your entity might not be contained an index set (leading to this <br>
cryptic assertion). So, if you want to communicate data only on a certain grid <br>
view, you have to add a call to indexSet.contains to the gather / scatter / size <br>
methods. Usually, fixedSize will be false in such situations (I think ALUGrid <br>
ignores this anyway, so it should not matter, here).<br>
<br>
Just a side note: In my opionion, a normal communicate method exchanging data on <br>
the entire hierarchy would be nice, too. But alas, this method would naturally <br>
be "grid().communicate( dataHandle, interface, direction )".<br>
<br>
Best,<br>
<br>
Martin<br>
<br>
On 10/26/2012 01:32 PM, Bernd Flemisch wrote:<br>
> Hey Andreas,<br>
><br>
> thank you for your fast answer. This indeed solves my second issue. However, the<br>
> first one remains. I attach an updated test file.<br>
><br>
> Kind regards<br>
> Bernd<br>
><br>
> On 10/26/2012 01:08 PM, Dedner, Andreas wrote:<br>
>> Hi Bernd<br>
>><br>
>> You should be able to cast the derived class onto the interface class<br>
>> and that triggers the call to the correct method.<br>
>><br>
>> Andreas<br>
>><br>
>> ________________________________________<br>
>> From: dune-bounces+a.s.dedner=warwick.ac.uk@dune-project.org<br>
>> [dune-bounces+a.s.dedner=warwick.ac.uk@dune-project.org] on behalf of Bernd<br>
>> Flemisch [bernd@iws.uni-stuttgart.de]<br>
>> Sent: 26 October 2012 11:53<br>
>> To: Dune<br>
>> Subject: [Dune] Dynamic load balancing with ALUGrid<br>
>><br>
>> Dear Dune,<br>
>><br>
>> I try to use dynamic load balancing with ALUGrid. The grid itself gets<br>
>> balanced nicely, but I don't succeed in getting data balanced.<br>
>><br>
>> From dune/grid/alugrid/3d/grid.hh lines 701ff, I guess that I can pack<br>
>> a "usual" data handle which is used for communication into a<br>
>> ALUGridLoadBalanceDataHandle and call loadBalance with that handle. My<br>
>> initial attempt to do this fails with<br>
>> test-dynamiclb:<br>
>> ../../../dune/grid/alugrid/common/defaultindexsets.hh:218:<br>
>> Dune::DefaultIndexSet<GridImp, IteratorImp>::IndexType<br>
>> Dune::DefaultIndexSet<GridImp, IteratorImp>::index(const typename<br>
>> GridImp::Codim<cd>::Entity&) const [with int cd = 0; GridImp =<br>
>> Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u>; IteratorImp =<br>
>> Dune::EntityIterator<0, const<br>
>> Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u>,<br>
>> Dune::ALU3dGridLeafIterator<0, (Dune::PartitionIteratorType)4u, const<br>
>> Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u> > >;<br>
>> Dune::DefaultIndexSet<GridImp, IteratorImp>::IndexType = unsigned int;<br>
>> typename GridImp::Codim<cd>::Entity = Dune::Entity<0, 3, const<br>
>> Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u>,<br>
>> Dune::ALU3dGridEntity>]: Assertion `indexContainer( cd )[ en ].index()<br>
>> >= 0' failed.<br>
>><br>
>> I attach my effort, where I use a data handle copied from the<br>
>> grid-howto. It would be great if you could take a look.<br>
>><br>
>> I have a second issue: I guess that I should be able to call loadBalance<br>
>> directly with a usual data handle, so that grid.hh lines 701ff takes<br>
>> care of it and packs it for me into a ALUGridLoadBalanceDataHandle<br>
>> before sending it to the real loadBalance method. However, since my data<br>
>> handle is only inherited from CommDataHandleIF, the packing routine is<br>
>> not triggered but the real loadBalance method is called directly leading<br>
>> to a compilation error. How can I trigger the execution of the packing<br>
>> routine for such a derived data handle?<br>
>><br>
>> Thank you for having a look. Kind regards<br>
>> Bernd<br>
>><br>
>> --<br>
>> _____________________________________________________________________<br>
>><br>
>> Bernd Flemisch phone: +49 711 685 69162<br>
>> IWS, Universität Stuttgart fax: +49 711 685 60430<br>
>> Pfaffenwaldring 61 email: bernd@iws.uni-stuttgart.de<br>
>> D-70569 Stuttgart url: <a href="http://www.hydrosys.uni-stuttgart.de">www.hydrosys.uni-stuttgart.de</a><br>
>> _____________________________________________________________________<br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Dune mailing list<br>
> Dune@dune-project.org<br>
> <a href="http://lists.dune-project.org/mailman/listinfo/dune">http://lists.dune-project.org/mailman/listinfo/dune</a><br>
<br>
-- <br>
Dr. Martin Nolte <nolte@mathematik.uni-freiburg.de><br>
<br>
Universität Freiburg                                   phone: +49-761-203-5630<br>
Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632<br>
Hermann-Herder-Straße 10<br>
79104 Freiburg, Germany<br>
<br>
_______________________________________________<br>
Dune mailing list<br>
Dune@dune-project.org<br>
<a href="http://lists.dune-project.org/mailman/listinfo/dune">http://lists.dune-project.org/mailman/listinfo/dune</a><br>
<br>
</div>
</span></font>
</body>
</html>