Floating point divide by zero - problem with contour plot?

General discussions about how to formulate a script for FlexPDE.

Floating point divide by zero - problem with contour plot?

Postby CDLang1 on Mon Jun 12, 2017 5:55 pm

I changed the limits on a contour plot to FIXED RANGE (a,b), where a & b are calculated in the definitions section. When I launch the script I get the error message in the attached jpg. I dismiss the error, then launch the script again, and it runs.

Bug? Workaround? Ignore it?

Thanks, Charlie
Attachments
FPDE7 error message.JPG
FPDE7 error message.JPG (29.81 KB) Viewed 347 times
CDLang1
 
Posts: 9
Joined: Tue May 16, 2017 12:41 pm

Re: Floating point divide by zero - problem with contour plot?

Postby moderator on Mon Jun 12, 2017 6:20 pm

If you can send us the offending script it would help diagnose the error.
It sounds like maybe the initial range calculation is zero and the plotter is not defending itself.
But that wouldn't explain why it works second time around.
moderator
 
Posts: 686
Joined: Tue Jan 11, 2011 1:45 pm

Re: Floating point divide by zero - problem with contour plot?

Postby CDLang1 on Tue Jun 13, 2017 12:56 pm

I confirmed that this is the problematic plot command:

contour(cS) zoom (0,0,long,high) as "Solvent concentration, mol/cm3" fixed range (cSsat, 0.05*cSsat)

If I comment out this plot command the script runs without problems. The problem comes from the fixed range qualifier; an identical plot command without the fixed range request does not cause the error.

The saturation concentration cSsat is calculated in the definitions section (cSsat always >0). The initial value is cS=0, but this doesn't matter - if I make the initial value cS=some small number, I still get the error.

I have to close FlexPDE7, and re-open it to get the error. That is, if I launch the script and dismiss the error message, I can then edit the script and run it without the error reappearing. I can even edit the boundaries, forcing the program to re-calculate the mesh, without seeing the error. I only get the error on the first run of the script.

Charlie
CDLang1
 
Posts: 9
Joined: Tue May 16, 2017 12:41 pm

Re: Floating point divide by zero - problem with contour plot?

Postby moderator on Wed Jun 21, 2017 6:05 pm

Can you post the script?
moderator
 
Posts: 686
Joined: Tue Jan 11, 2011 1:45 pm


Return to FlexPDE Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron