On May 31, 2011, at 11:12 AM, Marc Saudreau wrote:

>> On May 31, 2011, at 10:08 AM, Marc Saudreau wrote:
>> 
>>> 1. In GMSH you can group some mesh elements and name them (usually
>>> with a code number).
>>> Is it possible to get this code number within FiPy to be able to work
>>> on these elements specifically.
>>> For instance, a method like mesh.getFaceColor() ?
>> 
>> FiPy does not presently read that information.
>> 
> Is there a possibility to get it in a future version of FiPy ?
> Or is there a way for me to get this information by modifying some
> *.py files ... with your help ?
> This does not seem to difficult to achieve (but may be I'm wrong) since
>  this information is in the gmsh file,and you read this file. The
> next step should be to store this information and to get it via a
> getFaceColor() method.

I don't think it would be too hard, but I'd need to look. The current version 
of the code is found at

  
http://matforge.org/fipy/browser/branches/version-2_1/fipy/meshes/numMesh/gmshImport.py

although this code has been completely rewritten for the next release. I think 
it would be easier to modify the new version, although I see that it doesn't 
properly interpret the tags; it works OK for reading partitions, which it was 
designed for, but I think it needs more work to properly handle other tags.

I don't seem to be able to get Gmsh to actually output the physical group in a 
useful way. Either it outputs the physical group for *only* the labeled items 
or it outputs all items, but doesn't include the group label. Do you know how 
to make this work?


> This is not a good new since my geometry can not be obtain from
> coordinates.

There's no mathematical description for the face centers?

> I thought to use the mesh._getFaceNormals() method to get that but how
> to use it. Is this the best way to proceed ??
> outCoeffTop = (maskmyfaces* (h*mesh._getFaceNormals)).getDivergence()

Yes, I think so (fixing the typo)

  outCoeffTop = (maskmyfaces* (h*mesh._getFaceNormals()).getDivergence()



Reply via email to