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?