[Dune] ALUSimplexGrid<3, 3>::loadBalance(DataHandle&) appears to expect something else than a DataHandle
Andreas Dedner
dedner at mathematik.uni-freiburg.de
Sat Nov 20 13:34:45 CET 2010
Hi Joe,
What do you mean with "most unsettling"? Codim zero is better than
nothing...
But there is in fact a way you can use a standard DataHandle class for
the communiation -
which should of course be documented:
You have to derive from DataHandleIF and before you call loadBalance you
have to
cast your class into the base class. ALUGrid has a method
template< class DataHandleImpl, class Data >
bool loadBalance ( CommDataHandleIF< DataHandleImpl, Data >
&dataHandle );
which is then used. The data handle implementation is wrapped so that it
satisfies the
requirements from ALU, e.g., it communicates data on lower codimension
together
with the data from codim zero and has an empty compress method.
I guess we should have the method
template< class DataHandleImpl, class Data >
bool loadBalance ( CommDataHandleIF< DataHandleImpl, Data >
&dataHandle );
on the Grid class itself and make sure it is called whenever the
dataHandle is derived from
the interface.
Best
Andreas
On 11/20/2010 02:53 AM, Jö Fahlke wrote:
> Hi!
>
> I'm trying to read in a grid and data attached to it's elements and boundary
> segments via the GmshReader. For a parallel ALUSimplexGrid<3,3> I believe I
> have to create a GridFactory on all ranks, read the grid file into the factory
> using the GmshReader on rank 0 only (this also gives me the data attached to
> the grid) and then call loadBalance() on the grid. The Grid documentation
> (http://www.dune-project.org/doc/doxygen/html/classDune_1_1Grid.html) says:
>
> | template<class DataHandle>
> | bool loadBalance (DataHandle&data)
> |
> | Re-balances the load each process has to handle for a parallel grid, the
> | DataHandle data works like the data handle for the communicate methods. If
> | grid has changed , true is returned.
>
> I.e. if I want to redistribute the data I have to write a DataHandle for it.
>
> I've done that, but now ALUGrid appears to expect the DataHandle to have a
> method compress(), which is not part of the DataHandle interface. Indeed, the
> documentation for ALUSimplexGrid<3,3>
> (http://www.dune-project.org/doc/doxygen/html/classDune_1_1ALUSimplexGrid_3_013_00_013_01_4.html)
> says something quite different. Most unsettling is that the DataHandler that
> ALUSimplexGrid<3,3> requires appear to unly support codim 0 communication.
>
> Is this correct, does ALUSimplexGrid<3,3>::loadBalance(DataHandle) require
> some non-standard DataHandle? And is it further correct that
> ALUSimplexGrid<3,3>::loadBalance(DataHandle) can only communicate codim 0
> data?
>
> Bye,
> Jö.
>
>
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20101120/48cb02e3/attachment.htm>
More information about the Dune
mailing list