From c7137c54feb9a59016312ce6f5e626ce620570d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olav=20M=C3=B8yner?= Date: Sat, 24 Aug 2024 18:37:48 +0200 Subject: [PATCH] Fix to boundary tag logic --- src/CornerPointGrid/processing.jl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/CornerPointGrid/processing.jl b/src/CornerPointGrid/processing.jl index 598ce16..303377f 100644 --- a/src/CornerPointGrid/processing.jl +++ b/src/CornerPointGrid/processing.jl @@ -632,14 +632,12 @@ function grid_from_primitives(primitives; nnc = missing) end for k in (:left, :right, :upper, :lower, :top, :bottom) bnd_ix = Vector{Int}() - for (btype, v) in pairs(boundary_type) + for (f, btype) in pairs(boundary_type) if btype == k - push!(bnd_ix, v) + push!(bnd_ix, f) end end - if length(bnd_ix) > 0 - set_mesh_entity_tag!(g, BoundaryFaces(), :direction, k, bnd_ix) - end + set_mesh_entity_tag!(g, BoundaryFaces(), :direction, k, bnd_ix) end return g end