Skip to content

Fix calculate_ensemble_errors' error vector types. #787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/ensemble/ensemble_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ end
function calculate_ensemble_errors(u; elapsedTime = 0.0, converged = false,
weak_timeseries_errors = false,
weak_dense_errors = false)
errors = Dict{Symbol, Vector{eltype(u[1].u[1])}}() #Should add type information
error_means = Dict{Symbol, eltype(u[1].u[1])}()
error_medians = Dict{Symbol, eltype(u[1].u[1])}()
err_type = typeof(collect(u[1].errors)[1][2])
errors = Dict{Symbol, Vector{err_type}}() #Should add type information
error_means = Dict{Symbol, err_type}()
error_medians = Dict{Symbol, err_type}()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't you need to take the norm as well?


analyticvoa = u[1].u_analytic isa AbstractVectorOfArray ? true : false

Expand All @@ -98,7 +99,7 @@ function calculate_ensemble_errors(u; elapsedTime = 0.0, converged = false,
error_medians[k] = median(errors[k])
end
# Now Calculate Weak Errors
weak_errors = Dict{Symbol, eltype(u[1].u[1])}()
weak_errors = Dict{Symbol, err_type}()
# Final
m_final = mean([s.u[end] for s in u])

Expand Down
Loading