> How did you pick "residual>1.0e-1" ? How do you know your solution is
> converged at that value? I suspect you're getting dramatically different
> answers because your solution is not converged.
>
> I didn't have any reason to pick that. I actually changed it to
residual>self.xsi. The residual was the reason I was getting different
answers.
When I run for a long time I see the following memory error. Is there some
way of avoiding this?:
Python(15311) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Traceback (most recent call last):
File "/Users/rjchacko/Python/PythonSims/src/test.py", line 113, in
<module>
main()
File "/Users/rjchacko/Python/PythonSims/src/test.py", line 109, in main
model.step_sweep()
File "/Users/rjchacko/Python/PythonSims/src/test.py", line 99, in
step_sweep
residual=self.equation.sweep(var=self.phi, dt=self.dt,
solver=self.solver)
File
"/Library/Frameworks/Python.framework/Versions/5.1.1/lib/python2.5/site-packages/FiPy-2.0.2-py2.5.egg/fipy/terms/term.py",
line 179, in sweep
solver, matrix, RHSvector = self._prepareLinearSystem(var, solver,
boundaryConditions, dt)
File
"/Library/Frameworks/Python.framework/Versions/5.1.1/lib/python2.5/site-packages/FiPy-2.0.2-py2.5.egg/fipy/terms/term.py",
line 140, in _prepareLinearSystem
matrix, RHSvector = self.__buildMatrix(var, solver._getMatrixClass(),
boundaryConditions, dt)
File
"/Library/Frameworks/Python.framework/Versions/5.1.1/lib/python2.5/site-packages/FiPy-2.0.2-py2.5.egg/fipy/terms/term.py",
line 116, in __buildMatrix
matrix, RHSvector = self._buildMatrix(var, SparseMatrix,
boundaryConditions, dt)
File
"/Library/Frameworks/Python.framework/Versions/5.1.1/lib/python2.5/site-packages/FiPy-2.0.2-py2.5.egg/fipy/terms/equation.py",
line 87, in _buildMatrix
dt, self)
File
"/Library/Frameworks/Python.framework/Versions/5.1.1/lib/python2.5/site-packages/FiPy-2.0.2-py2.5.egg/fipy/terms/cellTerm.py",
line 137, in _buildMatrix
inline._optionalInline(self._buildMatrixIn, self._buildMatrixPy, L,
var.getOld(), b, dt, coeffVectors)
File
"/Library/Frameworks/Python.framework/Versions/5.1.1/lib/python2.5/site-packages/FiPy-2.0.2-py2.5.egg/fipy/tools/inline.py",
line 18, in _optionalInline
return pythonFn(*args)
File
"/Library/Frameworks/Python.framework/Versions/5.1.1/lib/python2.5/site-packages/FiPy-2.0.2-py2.5.egg/fipy/terms/cellTerm.py",
line 94, in _buildMatrixPy
L.addAtDiagonal(numerix.ones([N]) * numerix.array(coeffVectors['new
value']) / dt)
File
"/Library/Frameworks/Python.framework/Versions/5.1.1/lib/python2.5/site-packages/FiPy-2.0.2-py2.5.egg/fipy/tools/pysparseMatrix.py",
line 262, in addAtDiagonal
self.addAt(vector, ids, ids)
File
"/Library/Frameworks/Python.framework/Versions/5.1.1/lib/python2.5/site-packages/FiPy-2.0.2-py2.5.egg/fipy/tools/pysparseMatrix.py",
line 252, in addAt
self.matrix.update_add_at(vector, id1, id2)
MemoryError