Problem in AdamsBDF, getting error as not enough memory for this operation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Problem in AdamsBDF, getting error as not enough memory for this operation
Hi all,
I have some problem in computing ODE in AdamsBDF.
I want to use AdamsBDF function as below,
S = AdamsBDF(initial, 0, 10^6, 10^10, D)
But, when I try to use 'S' as above, I am getting an error as not enough memory for this operation.
Is there any other way to increase the sampling interval.
I attached my code below.
Solved! Go to Solution.
- Labels:
-
Calculus_Derivatives
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
> I need to plot for different initial conditions like, 0.2,0.3...1 in the same single plot.
THIS should be no problem with decent sized (just a few millions) vectors.
I don't think you can create a vector that big as 10^10 elements and even if this would be possible (Prime should not face those memory limits), Mathcad probably would refuse to plot that many points.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The problem is not the sampling interval up to 10^6 but the number of steps you demand.
See no simple way to get a precision of 10^10 time steps. Even if AdamBDF would be capable to do so, you would get the "can't plot tham many points" error when trying to plot.
Do you really need result vectors with 10^10 elements??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Dear Werner Exinger,
Thanks for your reply.
Yes, I need vectors with 10^10 elements and I need to plot those vectors.
I need to plot for different initial conditions like, 0.2,0.3...1 in the same single plot.
If I add some more parameters to D(t,x), and in the sampling interval if I type 10^10
S = AdamsBDF(initial, 0, 10^6, 10^10, D)
If I try to plot for S, then the mathcad shows the error as not enough memory for this operation.
Is it possible to do AdamsBDF with more vector elements more than 10^10.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
> I need to plot for different initial conditions like, 0.2,0.3...1 in the same single plot.
THIS should be no problem with decent sized (just a few millions) vectors.
I don't think you can create a vector that big as 10^10 elements and even if this would be possible (Prime should not face those memory limits), Mathcad probably would refuse to plot that many points.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You've peaked my curiosity, what application needs 10^10 resolution?
Several possibilities suggest:
- A coarse resolution over your total interval followed by a detailed "inspection" of a particular "region of interest"
- A sequential approach--break the problem into 10^3 pieces, solve each at 10^7 steps using the end conditions of one as the initial conditions of the next. (Port the results to another program; as Werner says, you aren't going to plot all those points in Mathcad!)
- Re-evaluate your problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Dear all,
Thank you very for your replies.
I will try to follow your suggestions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
vetri veeran wrote:
... I am getting an error as not enough memory for this operation....
Interestingly, in what Mathcad service release there is such an error? In Mathcad 15 F000 and M045 I have an error "This value must be a positive integer". And how others? Can anyone test the solution in Mathcad Prime 4.0 version?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Strange.
This is what I get in Mathcad 15.0 (M045 [MC15_M045_20151202])
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I set 10^10.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
VladimirN. wrote:
I set 10^10.
Bingo!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Werner,
And now convert this document into Prime file format and see what error we will get this time .
I'm wondering what result will give version 4.0 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
VladimirN. wrote:
Werner,
And now convert this document into Prime file format and see what error we will get this time .
I'm wondering what result will give version 4.0 .
Sorry, I'm too lazy and have far too little interest in Prime.
Have not even bothered installing Prime 4 on the machine I am currently working. Its not worth the time doing.