On Jun 19, 2006, at 2:21 PM, Michael Hughes wrote:
I've shuffled some time to try and start looking at your FiPy code. I tried running the levelset electrochem example INPUT.PY, however I get a crash at the bottom of the input file when it starts to try and run. The traceback is
Traceback (most recent call last):
File "C:\Fipy\fipy\FiPy-1.0\examples\levelSet\electroChem\input.py", line 512, in ?
_run()
File "C:\Fipy\fipy\FiPy-1.0\examples\levelSet\electroChem\input.py", line 509, in _run
exec(fipy.tests.doctestPlus._getScript(__name__))
File "<string>", line 145, in ?
TypeError: buildMetalIonDiffusionEquation() got an unexpected keyword argument 'metalIonAtomicVolume'
Any ideas there? I am not at a level to fix this yet, but I thought I should let you know as its a library case.
I think that you are probably getting different versions of FiPy mixed up.
You need to make sure that any older versions of FiPy have been deleted from site-packages/ especially the examples/ directory.
Also, I would recommend that you switch to using version 1.1. From the above, it looks like you are using version 1.0.
I would also recommend removing the following directories, if they exist:
C:\Python23\Lib\site-packages\examples
C:\Python23\Lib\site-packages\fipy
The object orientated side of things is easy for me to understand at a high level, however the syntax and subsequent 'spread of the code' will take a while to get to grips with.....So have you got any tips on how I can circumvent the noise and cut straight to the chase?
Not really.
What I want to understand from the code is the physics that its applying and the way its applying it so that I can work out things like how you calculate you extension velocities with level set, etc.
As you know I want to recast some of this in lovely simple FORTRAN at least to start with.
Yes, but not completely sure how to go about doing this. The reference manual may help somewhat. Also, if you have a particular request,
I will improve the comments in a given section of the code.
Do you recommend just using print statements or do you know how to be able to use the IDLE debugger to highlight the values of what I am looking at rather then click the GLOBAL button and see a set list. Think of a FORTRAN debugger I want to highlight say variable 'self.bollox' and see what it contains .
I just use print statements.
Also do you know an easy way of running the case and getting a list of all the modules etc that it calls, lso that I can look at the flow path from a higher level so that I can then jump in on the bits that may be of interset.
Not off hand. There probably is a way, but I don't really know. You could just look at the import statements to figure out where things come
from. I would certainly recommend going through the first diffusion example in the manual to understand what's going on a bit more.
I know Jon Guyer, one of my colleagues, used a tool to get a flow chart for FiPy, maybe he can help further with that. I have forwarded this
email to the FiPy list. I recommend that you sign up.