Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solve() and sweep() accept dt=CellVariable #76

Closed
guyer opened this issue Sep 19, 2014 · 1 comment
Closed

solve() and sweep() accept dt=CellVariable #76

guyer opened this issue Sep 19, 2014 · 1 comment
Labels

Comments

@guyer
Copy link
Member

guyer commented Sep 19, 2014

eq.solve(..., dt=CellVariable())

succeeds. Should it?

eq.solve(..., dt=FaceVariable())

fails with unhelpful message:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "fipy/terms/term.py", line 128, in solve
matrix, RHSvector = self.__buildMatrix(var, boundaryConditions, dt)
  File "fipy/terms/term.py", line 95, in __buildMatrix
return self._buildMatrix(var, boundaryConditions, dt)
  File "fipy/terms/binaryTerm.py", line 64, in _buildMatrix
matrix, RHSvector = self.term1._buildMatrix(var, boundaryConditions, dt = dt)
  File "fipy/terms/cellTerm.py", line 121, in _buildMatrix
inline._optionalInline(self._buildMatrixIn, self._buildMatrixPy, L, var.getOld(), b, dt, coeffVectors)
  File "fipy/tools/inline/inline.py", line 10, in _optionalInline
return pythonFn(*args)
  File "fipy/terms/cellTerm.py", line 88, in _buildMatrixPy
b += Numeric.array(oldArray) * Numeric.array(coeffVectors[value']('old)) / dt
ValueError: frames are not aligned

Probably should only accept dt=scalar and provide meaningful error message for all others.

Imported from trac ticket #84, created by guyer on 09-01-2006 at 16:40, last modified: 03-15-2007 at 15:19

@guyer
Copy link
Member Author

guyer commented Sep 19, 2014

Fixed in r2051

Trac comment by guyer on 03-15-2007 at 15:19

@guyer guyer closed this as completed Sep 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants