I have a simple question about Grid1D.
I can't make a non-uniform 1D grid.
My system is MacPro.
The FiPy version is 2.1.2 (python2.7) Programs were installed through
macport (numpy, matplotlib, ...) and direct install (pysparse, fipy).
The situation is listed below:
-------------------------------------------------------
Last login: Fri Jun 24 17:20:27 on console
gglee@GG-LEEs-Mac-Pro:~$ python
Python 2.7.1 (r271:86832, Jun 16 2011, 21:42:21)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from fipy import *
>>> mesh = Grid1D(dx=(1,2,3))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FiPy-2.1-py2.7.egg/fipy/meshes/grid1D.py",
line 47, in Grid1D
return grid1D.Grid1D(dx=dx, nx=nx, overlap=overlap,
parallelModule=parallelModule)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FiPy-2.1-py2.7.egg/fipy/meshes/numMesh/grid1D.py",
line 92, in __init__
Mesh1D.__init__(self, vertices, faces, cells)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FiPy-2.1-py2.7.egg/fipy/meshes/numMesh/mesh.py",
line 68, in __init__
_CommonMesh.__init__(self)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FiPy-2.1-py2.7.egg/fipy/meshes/common/mesh.py",
line 63, in __init__
self._calcGeometry()
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FiPy-2.1-py2.7.egg/fipy/meshes/numMesh/mesh.py",
line 458, in _calcGeometry
_CommonMesh._calcGeometry(self)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FiPy-2.1-py2.7.egg/fipy/meshes/common/mesh.py",
line 600, in _calcGeometry
self._calcFaceCellToCellNormals()
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FiPy-2.1-py2.7.egg/fipy/meshes/numMesh/mesh.py",
line 521, in _calcFaceCellToCellNormals
orientation = 1 - 2 * (numerix.dot(self.faceNormals,
self.faceCellToCellNormals) < 0)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FiPy-2.1-py2.7.egg/fipy/tools/numerix.py",
line 835, in dot
return a1.dot(a2)
ValueError: matrices are not aligned
>>>