dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #13253
Re: ufc ordering in parallel
On Tue, Apr 28, 2009 at 10:27:03PM +0200, Anders Logg wrote:
> On Tue, Apr 28, 2009 at 03:05:48PM -0500, Robert Kirby wrote:
> > Hi all,
> > it's my understanding that the way ufc ordering works is for adjacent cells to
> > alternate orientation so that they traverse edges (and faces in 3d) the same
> > global
> > way. It seems that in 2d this is equivalent to two-coloring a graph (each cell
> > is either
> > clockwise or counterclockwise)
> >
> > Has there been any thought to issues at imposing ufc ordering in parallel,
> > where each
> > process has to assign an orientation to the first local cell, and different
> > processors
> > might disagree?
>
> Yes! Ola and I (especially Ola) have been thinking hard about this
> for a while.
>
> Our conjecture is that everything we've done so far will work out in
> parallel as well. Based on global vertex numbers (which ParMETIS gives
> us), we assign global numbers to all entities needed to map the
> degrees of freedom (like edges for P2 etc).
I should also mention that this is based on the original
idea/implementation by Niclas Jansson which we have extended.
> Once all entities are numbered (so each process knows the global
> indices for all entities in the local mesh), we may just reuse the
> generated code for tabulate_dof and it will correctly spit out a
> global dof map (which may then need to be reordered to improve
> locality).
>
> This is now mostly in place. We're just working on a couple of corner
> cases (and I mean literally *corner* cases) but I have good hope these
> will be fixed soon.
>
> For details, take a look here:
>
> http://www.fenics.org/hg/dolfin?f=0603cb5788ca;file=dolfin/mesh/MeshPartitioning.cpp
Note in particular this function:
void MeshPartitioning::compute_partition(std::vector<uint>& cell_partition,
const LocalMeshData& mesh_data)
It's only job is to make a call to ParMETIS_V3_PartMeshKway and 50
lines of code are needed just to prepare the 15 arguments including
pointers to ints and option arrays etc. This is the most horrible
interface I've ever programmed against, except possibly cppunit. :-P
--
Anders
Attachment:
signature.asc
Description: Digital signature
References