Re: [Libmesh-users] Mesh::write() and read()

On Wed, 19 Aug 2009, Derek Gaston wrote:
> On Aug 19, 2009, at 4:24 PM, Roy Stogner wrote:
>
>> Neat trick; I'd never thought about that.
>>
>> How does that interact with partitioning? Do we just assign element
>> ids 1-Nelem/Nproc to processor 0, etc?
>
> It doesn't affect partitioning at all. In fact... it will guarantee that you
> get the same partitioning between two different reads of the mesh with the
> same number of processors (even if you're using a dumb partitioner).
>
> Ok... let me caveat that. If you are using a dumb partitioner (like the
> LinearPartitioner) it will do something different than if you were to allow
> renumbering (because the elements are in a different order). But for METIS
> it shouldn't matter... as METIS shouldn't be taking any clues from the
> element numbering (it should just use the connectivity graph... which will
> still be the same). If METIS is giving different answers based on element
> numbering.... then something is wrong!
My worry wasn't that numbering would affect partitioning, it was that
partitioning needed a partition-consistent numbering... but that's
actually not the case at all. We do require that the DoF numbers are
in contiguous blocks on each processor, but the DofMap ensures that
that will happen regardless of how the elements and nodes are
numbered, and in fact ParallelMesh (at least temporarily) numbers new
elements as non-contiguously as possible, to enable simultaneous
addition of new elements on different processors without id conflicts.
I hope my missing IQ points come back once I finish catching up on all
the lost sleep...
---
Roy