Memory freeing problem? Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Memory freeing problem? « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Adam Thorn (adamthorn)
New member
Username: adamthorn

Post Number: 1
Registered: 02-2008
Posted on Wednesday, February 20, 2008 - 06:04 am:   

Here's a simple test script I've written, which as you can see just solves the Laplace equation in a box with a layer of charge in the middle (defined via a natural bounday condition). The first time I run the script, it runs fine. If I then go back to the edit window and make a small change (for example, I halve the number in that natural(u) condition, or change the sign of it) and rerun the script then FlexPDE locks up. The "Status" window has the output from the initial run, followed by "--DONE--", followed by "Freeing Memory", but the program is totally unresponsive (none of the buttons, menus etc do anything)

I'm running version 5.0.20, Professional version, on a 64 bit Ubuntu machine.

application/octet-stream
chargelayer.pde (0.7 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Adam Thorn (adamthorn)
New member
Username: adamthorn

Post Number: 2
Registered: 02-2008
Posted on Wednesday, February 20, 2008 - 06:27 am:   

An additional observation: the problem seems to be with the report(surf_integral...) line. If I comment this out, FlexPDE behaves properly.
Top of pagePrevious messageNext messageBottom of page Link to this message

Marek Nelson (mgnelson)
Moderator
Username: mgnelson

Post Number: 22
Registered: 07-2007
Posted on Thursday, February 21, 2008 - 11:47 pm:   

This is a little strange. We will have to look into what is going on.
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 1064
Registered: 06-2003
Posted on Friday, February 22, 2008 - 01:01 am:   

Turns out not to be too mysterious after all.
You have a misplaced closing parenthesis.

You have passed three arguments to the NORMAL function, which FlexPDE expects to be the three components of a vector. In fact, they are a grad vector and two strings.

This causes some undiagnosed symbolic processing errors and bad memory pointers, which crash.

We will add diagnostics to detect this error, but in the meantime, you can simply move your closing paren:

report(surf_integral(NORMAL(eps*grad(u)),
'middle', 'domain'))

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration