From b0cb22bf5cd914bbf18166c18b965435e7733734 Mon Sep 17 00:00:00 2001 From: Francesc Verdugo Date: Fri, 9 Feb 2024 19:53:07 +0100 Subject: [PATCH] Fixing doctests --- src/p_range.jl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/p_range.jl b/src/p_range.jl index 17e5e827..34ec89dd 100644 --- a/src/p_range.jl +++ b/src/p_range.jl @@ -1267,13 +1267,16 @@ end function map_global_to_owner(I,global_to_owner) Ti = eltype(global_to_owner) - function map_g_to_o(g) - if g<1 - return zero(Ti) + owners = Vector{Ti}(undef,length(I)) + for k in 1:length(I) + i = I[k] + if i<1 + owners[k] = zero(Ti) + continue end - global_to_owner[g] + owners[k] = global_to_owner[i] end - map_g_to_o.(I) + owners end part_id(a::OwnAndGhostIndices) = a.own.owner