On Sep 24, 2009, at 12:42 PM, dario.modenini wrote:
I'm a new user of fipy, which I installed on my laptop under Vista OS.
Welcome to FiPy. I'm afraid we have no Vista machines to test on, so
troubleshooting this may take a little while.
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};
.. ''')
Is this the actual code you used? Those '..' at the beginning of each
line shouldn't be there.
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.
Thanks for taking those steps.
You're running Python 2.5?
What version of FiPy?
ValueError: array dimensions must agree
Any suggestion/tip to fix this would be highly appreciated!
If I had to guess, I'd say that Gmsh is generating a 3D mesh instead
of a 2D mesh, but I don't know why it would do that.
If removing the '..' doesn't resolve this problem, then please try
saving:
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};
in a file called file_name.geo and executing
gmsh file_name.geo -2 -v 0 -format msh -o file_name.msh
and then send me the file_name.msh file that results (just send it to
me; no need to clutter the list).