Skip to content

Commit

Permalink
minor tweak around error estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbaran committed Oct 19, 2021
1 parent 0d2166b commit 88660b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/error_estimation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ end
"""
reltol_norm(M::AbstractManifold, u)
Estimate the fraction `d_{min}/eps(number_eltype(u))` where `d_{min}`` is the distance
Estimate the fraction `d_{min}/eps(number_eltype(u))` where `d_{min}` is the distance
between `u`, a point on `M`, and the nearest distinct point on `M` representable in the
representation of `u`.
"""
function reltol_norm(M::AbstractManifold, u)
function reltol_norm(::AbstractManifold, u)
return norm(u)
end
function reltol_norm(M::ProductManifold, u::ProductRepr)
mapped_norms = map((Mi, ui) -> reltol_norm(Mi, ui), M.manifolds, u.parts)
return maximum(mapped_norms)
return mean(mapped_norms)
end

0 comments on commit 88660b5

Please sign in to comment.