ajfriedlan

35 Reputation

5 Badges

2 years, 6 days

MaplePrimes Activity


These are questions asked by ajfriedlan

Hey there.

I've been using the threads package to parallelize some code. It's going well for the most part - my code runs way faster and I can observe with my System Monitor (ubuntu) that multiple cores are indeed being used. However, ~ 4 of every 5 times I try to run the exact same code, Maple will get stuck on a threaded calculation. If I follow the CPU usage in these instances, I see that one of the CPUs is maxed out at 100%. I am forced to quit Maple and kill the kernel process. Has anyone seen something like this before?

 

Thanks in advance.

Hello there,

I'm trying to write something like: dsolve=(myOde,numeric,method=rkf45,abserr=1e-7,relerr=1e( -(7+x) ) ),

where x is a variable that updates every loop of my for loop (say for example x = 2). I'm basically trying to improve my accuracy each iteration of the loop.

Anyways, Maple doesn't like how there is a variable in the expression for relerr - it returns the command just as I typed it, not, for example, as

dsolve=(myOde,numeric,method=rkf45,abserr=1e-7,relerr=1e( -(9) ) ).

How can I achieve my goal?

Thanks!

Hey there,

I've been struggling for a few days to integrate a function using rkf45.

For some context, I wish to numerically intergrate a function K * s_R (K,a,w) dK using runge kutta over a 2D grid of (a,w) values. Essentialy, performing the same sort of K-integral many different times for slightly different combinations of a and w. For one such (a,w) combination, the function looks something like this:

and rkf45 works just fine, and returns a numeric result. On the other hand, for a different combination of (a,w), the function looks like this:

and an attempt to perform rkf45 returns the following error: "cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up."

Here is a simplified version of my maple document for reference MaplePrimePleaseHelp.mw.

I'm happy to clarify anything that may be confusing and any thoughts or suggestions would be greatly appreciated.

Thank you!

Hey there,

I'm trying to numerically intergrate a function s(K,i,j) dK using runge kutta over a 2D grid of i,j values. Essentialy, performing the same sort of integral many different times for slightly different combinations of i and j. The function is more or less gaussian, and so the bulk of the result will come from the values of K around the peak of said gaussian. For some combinations of i and j, the function seems to have a singularity on the right edge of the gaussian peak, which causes my script to spit out an error, telling me the calculation cannot be performed further to the right past the singularity. Now, like i said before, the singularity is on the very edge of the gaussian and therefore I am perfectly happy to stop the integration before the singularity, because anything past it wont contribute very much to the result.

How can I use dsolve events to halt my integration just before hitting the singularity?

RK := (i, j) -> dsolve({diff(n(K), K) = K*s(K, a[i], b[j]), n(0) = 0}, numeric, method = rkf45)

 

After a lengthy series of calculations, I would like to save all the variables and matrices I've constructed for use in a) a seperate window, and b) for a fututre session after closing and reopening maple. I don't want to have to perform the calculations each time I open maple.

 

Thanks! 

1 2 Page 2 of 2