Dear List,
I'm a new user of fipy, which I installed on my laptop under Vista OS.
I encountered problems in importing meshes with the command GMSHImporter2D;
in particular, both if I try calling the mesh file:
mesh = GmshImporter2D('file_name.msh')
or if I write the code to build the geometry inside the brackets:
mesh = GmshImporter2D('''
.. cellSize = 0.05;
.. radius = 1.;
.. Point(1) = {0, 0, 0, cellSize};
.. Point(2) = {-radius, 0, 0, cellSize};
.. Point(3) = {0, radius, 0, cellSize};
.. Point(4) = {radius, 0, 0, cellSize};
.. Point(5) = {0, -radius, 0, cellSize};
.. Circle(6) = {2, 1, 3};
.. Circle(7) = {3, 1, 4};
.. Circle(8) = {4, 1, 5};
.. Circle(9) = {5, 1, 2};
.. Line Loop(10) = {6, 7, 8, 9};
.. Plane Surface(11) = {10};
.. ''')
as in the example "examples.diffusion.circle", I got the following error:
Traceback (most recent call last):
File "C:\Python25\lib\site-packages\fipy\meshes\numMesh\gmshImport.py",
line 437, in __init__
mesh2D.Mesh2D.__init__(self, **_DataGetter(mshfile.getFilename(),
dimensions=2, coordDimensions=coordDimensions).getData())
File "C:\Python25\lib\site-packages\fipy\meshes\numMesh\mesh.py", line 68,
in __init__
_CommonMesh.__init__(self)
File "C:\Python25\Lib\site-packages\fipy\meshes\common\mesh.py", line 63,
in __init__
self._calcGeometry()
File "C:\Python25\lib\site-packages\fipy\meshes\numMesh\mesh.py", line
459, in _calcGeometry
self._calcCellNormals()
File "C:\Python25\lib\site-packages\fipy\meshes\numMesh\mesh.py", line
581, in _calcCellNormals
self.cellNormals = direction[numerix.newaxis, ...] * cellNormals
File "C:\Python25\Lib\site-packages\numpy\ma\core.py", line 3166, in
__mul__
return multiply(self, other)
File "C:\Python25\Lib\site-packages\numpy\ma\core.py", line 698, in
__call__
result = np.where(m, da, self.f(da, db, *args, **kwargs))
ValueError: array dimensions must agree
I saw in a previous thread something similar being reported by another user
working on a Windows XP machine; following this thread, I'm not using the
latest release of gmsh, rather version 2.3.
Any suggestion/tip to fix this would be highly appreciated!
Thank you in advance,
Dario