On Wed, Jun 8, 2011 at 9:00 AM, Marc Saudreau
<[email protected]> wrote:

> I had a look at *.py files last week. It is really straightforward to get
> the
> physical group from the GMSH mesh file for each cell elements and
> face elements, and to define functions as getCellColor() and getFaceColor().
> Now the problem is that face elements (for instance triangles in 3D) and
> cell
>  elements (for instance tetrahedals in 3D) are both defined with nodes
> elements in the GMSH mesh file.
> So I need to reconstruct the link between faces and adjacents cells i.e I
> need
> a connectivity table. This could be done but to do it adequately, I need to
> understand how in the current version of Fipy the relationship between faces
> and cells is defined ... and to date i am a little bit confuse with that !
> I had a look at the *.getExteriorFaces() and other functions but it takes
> very long some times to do some reverse engineering so I was wondering is a
> more technical document dedicated to developers (a developers' guide !)
> is avalaible ?

Unfortunately not. All we have is the
<http://www.ctcms.nist.gov/fipy/fipy/generated/meshes.numMesh.html#module-fipy.meshes.numMesh.gmshImport>
Gmsh API doc, which is hardly useful for anything. This should be
somewhat improved in the next release.

I can try and explain the relationship between vertices, faces and
cells. Faces are made up of vertex IDs (faceVertexIDs), which point to
an array of vertex coordinates. Cells are made of IDs that point to
entries in the faceVertexID array and that is basically it.

I know that the code here
<http://matforge.org/fipy/browser/trunk/fipy/meshes/gmshImport.py>
reads the cell color for partitioning purposes (the next version of
fipy will use gmsh to partition for parallel runs), but I'm not really
sure how to modify that to read face color (without some serious
effort). I didn't write this code and the man who did is crossing
America on a bicycle right now so is out of commission. Maybe he'll
pop up with some insights in the future, but probably not anytime
soon.

One difficulty that I foresee is that I think that we don't use the
face elements from the gmsh output file. We use the cells to
reconstruct the faces in the GmshImporter class. I might be wrong, but
that is what seems to be happening here

  <http://matforge.org/fipy/browser/trunk/fipy/meshes/gmshImport.py#L297>

Hence info associated with faces will be lost. Sorry I can't be of more help.

-- 
Daniel Wheeler


Reply via email to