[Dune] Dynamic load balancing with ALUGrid

Bernd Flemisch bernd at iws.uni-stuttgart.de
Fri Oct 26 12:53:31 CEST 2012


Dear Dune,

I try to use dynamic load balancing with ALUGrid. The grid itself gets 
balanced nicely, but I don't succeed in getting data balanced.

 From dune/grid/alugrid/3d/grid.hh lines 701ff, I guess that I can pack 
a "usual" data handle which is used for communication into a 
ALUGridLoadBalanceDataHandle and call loadBalance with that handle. My 
initial attempt to do this fails with
test-dynamiclb: 
../../../dune/grid/alugrid/common/defaultindexsets.hh:218: 
Dune::DefaultIndexSet<GridImp, IteratorImp>::IndexType 
Dune::DefaultIndexSet<GridImp, IteratorImp>::index(const typename 
GridImp::Codim<cd>::Entity&) const [with int cd = 0; GridImp = 
Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u>; IteratorImp = 
Dune::EntityIterator<0, const 
Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u>, 
Dune::ALU3dGridLeafIterator<0, (Dune::PartitionIteratorType)4u, const 
Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u> > >; 
Dune::DefaultIndexSet<GridImp, IteratorImp>::IndexType = unsigned int; 
typename GridImp::Codim<cd>::Entity = Dune::Entity<0, 3, const 
Dune::ALU3dGrid<(Dune::ALU3dGridElementType)7u>, 
Dune::ALU3dGridEntity>]: Assertion `indexContainer( cd )[ en ].index() 
 >= 0' failed.

I attach my effort, where I use a data handle copied from the 
grid-howto. It would be great if you could take a look.

I have a second issue: I guess that I should be able to call loadBalance 
directly with a usual data handle, so that grid.hh lines 701ff takes 
care of it and packs it for me into a ALUGridLoadBalanceDataHandle 
before sending it to the real loadBalance method. However, since my data 
handle is only inherited from CommDataHandleIF, the packing routine is 
not triggered but the real loadBalance method is called directly leading 
to a compilation error. How can I trigger the execution of the packing 
routine for such a derived data handle?

Thank you for having a look. Kind regards
Bernd

-- 
_____________________________________________________________________

Bernd Flemisch                               phone: +49 711 685 69162
IWS, Universität Stuttgart                   fax:   +49 711 685 60430
Pfaffenwaldring 61                  email: bernd at iws.uni-stuttgart.de
D-70569 Stuttgart                  url: www.hydrosys.uni-stuttgart.de
_____________________________________________________________________

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-dynamiclb.cc
Type: text/x-c++src
Size: 3470 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20121026/aa4df35d/attachment.cc>


More information about the Dune mailing list