<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Joe,<br>
<br>
What do you mean with "most unsettling"? Codim zero is better than
nothing...<br>
<br>
But there is in fact a way you can use a standard DataHandle class for
the communiation -<br>
which should of course be documented:<br>
<br>
You have to derive from DataHandleIF and before you call loadBalance
you have to<br>
cast your class into the base class. ALUGrid has a method<br>
template< class DataHandleImpl, class Data ><br>
bool loadBalance ( CommDataHandleIF< DataHandleImpl, Data >
&dataHandle );<br>
which is then used. The data handle implementation is wrapped so that
it satisfies the<br>
requirements from ALU, e.g., it communicates data on lower codimension
together<br>
with the data from codim zero and has an empty compress method.<br>
<br>
I guess we should have the method <br>
template< class DataHandleImpl, class Data ><br>
bool loadBalance ( CommDataHandleIF< DataHandleImpl, Data >
&dataHandle );<br>
on the Grid class itself and make sure it is called whenever the
dataHandle is derived from <br>
the interface.<br>
<br>
Best<br>
Andreas<br>
<br>
On 11/20/2010 02:53 AM, Jö Fahlke wrote:
<blockquote cite="mid:20101120015317.GA5979@paranoia" type="cite">
<pre wrap="">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
(<a class="moz-txt-link-freetext" href="http://www.dune-project.org/doc/doxygen/html/classDune_1_1Grid.html">http://www.dune-project.org/doc/doxygen/html/classDune_1_1Grid.html</a>) 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>
(<a class="moz-txt-link-freetext" href="http://www.dune-project.org/doc/doxygen/html/classDune_1_1ALUSimplexGrid_3_013_00_013_01_4.html">http://www.dune-project.org/doc/doxygen/html/classDune_1_1ALUSimplexGrid_3_013_00_013_01_4.html</a>)
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ö.
</pre>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Dune mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dune@dune-project.org">Dune@dune-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.dune-project.org/mailman/listinfo/dune">http://lists.dune-project.org/mailman/listinfo/dune</a>
</pre>
</blockquote>
<br>
</body>
</html>