You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After describing the arguments to EnsembleProblem there are two examples of for prob_func. Here's the exact quote:
One can specify a function prob_func which changes the problem. For example:
functionprob_func(prob,i,repeat)
@. prob.u0 =randn()*prob.u0
prob
end
modifies the initial condition for all of the problems by a standard normal
random number (a different random number per simulation). Notice that since
problem types are immutable, it uses .=. Otherwise, one can just create
a new problem type:
functionprob_func(prob,i,repeat)
@. prob.u0 = u0_arr[i]
prob
end
The first example demonstrates calculating a new random initial value and inserting it into the existing problem using .=. Nothing wrong with that. The second example is exactly the same except it uses the index i to index a pre-computed array. That's fine, but it doesn't seem to be what the text above it is talking about. Shouldn't the second example demonstrate creating a new problem? E.g.:
functionprob_func(prob, i, repeat)
ODEProblem(.....)
end
The text was updated successfully, but these errors were encountered:
After describing the arguments to EnsembleProblem there are two examples of for prob_func. Here's the exact quote:
The first example demonstrates calculating a new random initial value and inserting it into the existing problem using
.=
. Nothing wrong with that. The second example is exactly the same except it uses the indexi
to index a pre-computed array. That's fine, but it doesn't seem to be what the text above it is talking about. Shouldn't the second example demonstrate creating a new problem? E.g.:The text was updated successfully, but these errors were encountered: