Hello,

I was going through the examples.diffusion.1D example and got the following
errors:

Traceback (most recent call last):
  File "C:\Users\User1\Dropbox\workspace\FiPy
examples\src\diffusion_mesh1d_example.py", line 29, in <module>
    eqX.solve(var=phi, dt=timeStepDuration)
  File "C:\Python27\lib\site-packages\fipy\terms\term.py", line 209, in
solve
    solver = self._prepareLinearSystem(var, solver, boundaryConditions, dt)
  File "C:\Python27\lib\site-packages\fipy\terms\term.py", line 171, in
_prepareLinearSystem
    buildExplicitIfOther=self._buildExplcitIfOther)
  File "C:\Python27\lib\site-packages\fipy\terms\binaryTerm.py", line 68,
in _buildAndAddMatrices
    buildExplicitIfOther=buildExplicitIfOther)
  File "C:\Python27\lib\site-packages\fipy\terms\unaryTerm.py", line 97, in
_buildAndAddMatrices
    diffusionGeomCoeff=diffusionGeomCoeff)
  File "C:\Python27\lib\site-packages\fipy\terms\cellTerm.py", line 164, in
_buildMatrix
    self._buildMatrixNoInline_(L=L, oldArray=var.old, b=b, dt=dt,
coeffVectors=coeffVectors)
  File "C:\Python27\lib\site-packages\fipy\terms\cellTerm.py", line 149, in
_buildMatrixNoInline_
    L.addAt(coeffVectors['new value'].ravel() / dt, ids.ravel(),
ids.swapaxes(0,1).ravel())
  File "C:\Python27\lib\site-packages\fipy\matrices\pysparseMatrix.py",
line 246, in addAt
    self.matrix.update_add_at(vector, id1, id2)
TypeError: Cannot cast array data from dtype('int64') to dtype('int32')
according to the rule 'safe'


I have a 64-bit Windows 7 machine and have installed 64-bit versions of
FiPy 3.0, NumPy 1.7.0, SciPy 0.11.0, PySparse 1.1.1, and PyAMG 2.0.5, which
are all obtained from http://www.lfd.uci.edu/~gohlke/pythonlibs/. If I
include the following lines at the beginning of my script

import os
os.environ['FIPY_SOLVERS'] = 'pyamg'

to force FiPy to use to the PyAMG preconditioners with the SciPy solvers,
the script runs. Therefore, the problem is probably caused by PySparse. Are
there workarounds to resolve this problem? Thanks!

Best,
Edwin
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to