[Dune] GridPtr: distribution of element and vertex parameters

Martin Nolte nolte at mathematik.uni-freiburg.de
Tue Sep 18 09:24:02 CEST 2012


Hi Bernd,

I guess you have hit upon a part of the Dune grid interface that has not been 
thoroughly discussed: grid.loadBalance( dataHandle ). As far as I'm aware of, 
this method is only implemented for ALUGrid (or meta grids build on top of it).

The semantics is as follows: loadBalance redistributes the grid between the 
set of processors. This means that entities are migrated from one process to 
another. But we need to migrate the data, too. Therefore, all data specified 
by the data handle (see Dune communication interface) is sent along with the 
entities. The only real difference between communication on a grid view and 
load balance is that load balance performs the communication on the 
hierarchical grid (of course, such a communicate method should also exist; 
unfortunately, it does not).

Now to your problem: As far as I understood, it is not so easy implement 
dynamic load balancing for UGGrid. Instead, static load balancing is performed 
at creation time. I guess, this means you are reading the DGF file on each 
process, i.e., all processes already know their parameters (note that, in 
contrast, ALU reads everything on process 0). So, if I understand correctly, 
you can safely ignore the call to load balance, since it does not redistribute 
the grid, anyway.

The call to communicate is used only to copy interior data to ghosts. This is 
needed for ALUGrid, because ghosts do not exist natively. Since the algorithm 
usually performs the necessary extra communication anyway, ALUGrid does not 
perform this communication.

I hope this explains the status quo. If further problems arise, it might be 
better to discuss them on the flyspray.

Just a final side note: In my opinion, a thorough discussion of the parallel 
grid interface is in order anyway (on one of the next meetings).

Best,

Martin

On 09/18/2012 08:55 AM, Bernd Flemisch wrote:
> Dear Dune,
>
> we would like to implement the distribution of a GridPtr's element and vertex
> parameters for UGGrid. The corresponding lines 249ff in gridptr.hh are
>          DataHandle dh(*this);
>          gridPtr_->loadBalance( dh.interface() );
>          gridPtr_->communicate( dh.interface(),
> InteriorBorder_All_Interface,ForwardCommunication);
> Since the DataHandle below is not documented and since the documentation of
> the loadBalance(DataHandle&) method of the grid is not giving me any clue:
> Could you please explain me in a bit more detail what these three lines are
> supposed to do? In particular, I do not know which part is done by the
> loadBalance and which part by the communicate method. What is supposed to
> happen with the DataHandle parameter inside the loadBalance method?
>
> Thank you. Kind regards
> Bernd
>

-- 
Dr. Martin Nolte <nolte at mathematik.uni-freiburg.de>

Universität Freiburg                                   phone: +49-761-203-5630
Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany




More information about the Dune mailing list