On Tue, Jun 5, 2012 at 1:08 PM, Kendall Boniface
<[email protected]> wrote:
>
> Hi Daniel,
> I have set the edge lengths to 1 and placed the gmsh commands in a .geo file
> as you suggested. I've attached the .geo file to this message. I also
> removed the 4 lines and the last line of the gmsh commands as I think they
> may not be required.
How will gmsh know the values of the "r" and "R" parameters?
> This is the error I get when I run the resulting code:
>
> "Traceback (most recent call last):
> File "C:\Users\SL\Documents\Python27\Gmsh Stuff\3DCylinder.py", line 8, in
> <module>
> mesh = GmshImporter3D("pipe.geo")
> File "C:\Program
> Files\Python27\lib\site-packages\fipy-2.1.3-py2.7.egg\fipy\meshes\numMesh\gmshImport.py",
> line 454, in __init__
> mesh.Mesh.__init__(self, **_DataGetter(mshfile.getFilename(),
> dimensions=3).getData())
> File "C:\Program
> Files\Python27\lib\site-packages\fipy-2.1.3-py2.7.egg\fipy\meshes\numMesh\gmshImport.py",
> line 196, in getData
> vertexCoords = self._calcVertexCoords(self.coordDimensions)
> File "C:\Program
> Files\Python27\lib\site-packages\fipy-2.1.3-py2.7.egg\fipy\meshes\numMesh\gmshImport.py",
> line 253, in _calcVertexCoords
> maxNode = max(nodeToVertexIDdict.keys())
> ValueError: max() arg is an empty sequence"
I was actually indicating that you can run the geo file with gmsh
directly, independent from fipy or python. Load a geo file into gmsh
with
$ gmsh file.geo
at the command line. It'll throw up the GUI so you can inspect the geometry.
Commenting out sections from the file and loading into gmsh
demonstrated that "Line Loop(23)" has a "-7", which isn't a line.
That's where the problem seems to lie.
Cheers
--
Daniel Wheeler
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]