Using global variables with val, v6 vs v7?

General discussions about how to formulate a script for FlexPDE.

Using global variables with val, v6 vs v7?

Postby Jared Barber on Wed Jan 03, 2018 9:21 am

Hello,

With other applications in mind, I tried the code below. It runs ok on flexpde6 but not on flexpde7:

***** Floating-Point Overflow
-----Called from SparseCG::cg
-----Called from MasterMatrix::solve
-----Called from cgsolve::do_linear
-----Called from cgsolve::ss_shell
-----Called from control::do_runjob
-----Called from PDEThread::run
-----Called from PageStack::GUIcreatejob
-----Called from fpdemain

The script:

VARIABLES u
GLOBAL VARIABLES k
SELECT ngrid = 3
DEFINITIONS
f = 1
u1 = val(u,0.5,05)+val(u,0.25,0.25)
EQUATIONS
u: div(grad(u))=k*f
k: u1 = 1
BOUNDARIES
REGION START (0,0) value(u) = 0 LINE TO (1,0) TO (1,1) TO (0,1) TO CLOSE
PLOTS
CONTOUR(u)
report(u1)
END

Hopefully someone has some insight into the inconsistencies in versions. Thanks,

Jared Barber
Jared Barber
 
Posts: 47
Joined: Thu Jan 24, 2013 10:37 am

Re: Using global variables with val, v6 vs v7?

Postby moderator on Wed Jan 03, 2018 2:07 pm

Your equation for K does not explicitly reference K itself, so the dependency on K arises indirectly through the dependence of U1 on U and therefore on K.
Version 7 has some additional code for tracking global dependencies that did not appear in version 6, but on first glance it appears to be constructing dependences of U on K at the boundary nodes, which it should not do because the boundaries are set by VALUEs. This will require some digging.
moderator
 
Posts: 722
Joined: Tue Jan 11, 2011 1:45 pm

Re: Using global variables with val, v6 vs v7?

Postby moderator on Wed Jan 10, 2018 10:52 pm

I believe we have this problem under control. We will be releasing the corrected version in a day or two.
moderator
 
Posts: 722
Joined: Tue Jan 11, 2011 1:45 pm

Re: Using global variables with val, v6 vs v7?

Postby moderator on Wed Jan 17, 2018 4:12 pm

We have posted developmental version 7.09x1 at http://www.pdesolutions.com/download/xf ... 1win64.exe and http://www.pdesolutions.com/download/xf ... _64.tar.gz
These are self-extracting archives containing only flexpde7.exe, they are not full installs.

This version corrects the problem you were experiencing with global variables.
moderator
 
Posts: 722
Joined: Tue Jan 11, 2011 1:45 pm


Return to FlexPDE Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron