Error (sometimes) with globalmax_x

General discussions about how to formulate a script for FlexPDE.

Error (sometimes) with globalmax_x

Postby CDLang on Thu Aug 02, 2012 11:31 am

An input table defines a parameter, k, over the 1D problem domain. The input table varies between simulations, so I have tried using kmax_x=GLOBALMAX_X(k) to find the location of the max value of k.

If I use kmax_x in plots (e.g., history(U) at kmax_x) I get an error, "Invalid GLOBALReference" as the simulation launches, before the step count increments beyond 1.

However, I discovered by accident that if I use kmax_x in an eval statement (e.g., Ukmax=eval(U,kmax_x,0) ) prior to the plot request the error does not appear when the simulation launches. The error may appear later as the simulation runs.

An obvious workaround is for me to manually inspect the input files, locate the x-values where k is a maximum, and input that in the simulations.

Is there a more elegant way to prevent this error?

Thanks, Charlie
CDLang
 
Posts: 7
Joined: Wed May 02, 2012 6:46 pm

Re: Error (sometimes) with globalmax_x

Postby moderator on Fri Aug 03, 2012 3:56 pm

I don't see why this should not work, except that the GLOBALMAX_X was really intended for use on variables not tables.

However, when I simply plot a summary report of the globalmax_x, I get the correct answer. So FlexPDE IS able to figure out how to apply this function to a table. There is likely some processing of a history that is not correctly evaluating this reference.

We will look into this and see if we can fix it in a future update. Until then you will have to do it the ugly way - look at your table data manually to find the max.
moderator
 
Posts: 307
Joined: Tue Jan 11, 2011 1:45 pm


Return to FlexPDE Discussion

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron