@@ -97,12 +97,12 @@ function calculate_ensemble_errors(u; elapsedTime = 0.0, converged = false,
9797 # Now Calculate Weak Errors
9898 weak_errors = Dict {Symbol, eltype(u[1].u[1])} ()
9999 # Final
100- m_final = mean ([s[end ] for s in u])
100+ m_final = mean ([s. u [end ] for s in u])
101101 m_final_analytic = mean ([s. u_analytic[end ] for s in u])
102102 res = norm (m_final - m_final_analytic)
103103 weak_errors[:weak_final ] = res
104104 if weak_timeseries_errors
105- ts_weak_errors = [mean ([u[j][i] - u[j]. u_analytic[i] for j in 1 : length (u)])
105+ ts_weak_errors = [mean ([u. u [j][i] - u[j]. u_analytic[i] for j in 1 : length (u)])
106106 for i in 1 : length (u[1 ])]
107107 ts_l2_errors = [sqrt .(sum (abs2, err) / length (err)) for err in ts_weak_errors]
108108 l2_tmp = sqrt (sum (abs2, ts_l2_errors) / length (ts_l2_errors))
@@ -111,11 +111,11 @@ function calculate_ensemble_errors(u; elapsedTime = 0.0, converged = false,
111111 weak_errors[:weak_l∞ ] = max_tmp
112112 end
113113 if weak_dense_errors
114- densetimes = collect (range (u[1 ]. t[1 ], stop = u[1 ]. t[end ], length = 100 ))
114+ densetimes = collect (range (u. u [1 ]. t[1 ], stop = u[1 ]. t[end ], length = 100 ))
115115 u_analytic = [[sol. prob. f. analytic (sol. prob. u0, sol. prob. p, densetimes[i],
116116 sol. W (densetimes[i])[1 ])
117117 for i in eachindex (densetimes)] for sol in u]
118- udense = [u[j](densetimes) for j in 1 : length (u)]
118+ udense = [u. u [j](densetimes) for j in 1 : length (u)]
119119 dense_weak_errors = [mean ([udense[j][i] - u_analytic[j][i] for j in 1 : length (u)])
120120 for i in eachindex (densetimes)]
121121 dense_L2_errors = [sqrt .(sum (abs2, err) / length (err)) for err in dense_weak_errors]
0 commit comments