Hi,

I have a problem with mesh addition. Script in attachment leads to a
MemoryError in numpy for me if I use nx,ny,nz=10,80,80, and to a very slow
operation when I use nx,ny,nz=80,80,10. So there seems to be some axis
preference?

Error is:

Traceback (most recent call last):
  File "src/testgrid.py", line 52, in <module>
    mesh = mesh1 + mesh2
  File
"/usr/lib/python2.6/dist-packages/FiPy-2.2_dev4190-py2.6.egg/fipy/meshes/mesh.py",
line 327, in __add__
    return self._concatenatedClass(**self._getAddedMeshValues(other=other))
  File
"/usr/lib/python2.6/dist-packages/FiPy-2.2_dev4190-py2.6.egg/fipy/meshes/mesh.py",
line 582, in _getAddedMeshValues
    other_XvertexCoords.shape[-1])).swapaxes(0,1)
  File "/usr/lib/python2.6/dist-packages/numpy/core/fromnumeric.py", line
863, in resize
    a = concatenate( (a,)*n_copies)
MemoryError

Is addition of 3D meshes better avoided, using gmsh instead to make a mesh?
PS: I have some local changes, but they don't interfere with the things this
simple script does.

Benny

Reply via email to