Skip to content

Commit

Permalink
fix for subgrid in case there is empty boundary data in the parent gr…
Browse files Browse the repository at this point in the history
…id (or probably also when the subgrid lies completely in the interior)
  • Loading branch information
chmerdon committed Jan 17, 2024
1 parent fd3587a commit d49f4c1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/subgrid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,13 @@ function subgrid(parent,

subgrid[BFaceRegions]=sub_bfaceregions
subgrid[BFaceGeometries]=sub_bfacetypes
subgrid[BFaceNodes]=tryfix(sub_bfacenodes)
subgrid[NumBFaceRegions]=maximum(sub_bfaceregions)
if length(sub_bfaceregions) > 1
subgrid[BFaceNodes]=tryfix(sub_bfacenodes)
subgrid[NumBFaceRegions]=maximum(sub_bfaceregions)
else
subgrid[BFaceNodes]=zeros(Ti, 2, 0)
subgrid[NumBFaceRegions]=0
end
end
subgrid[CoordinateSystem]=parent[CoordinateSystem]

Expand Down

0 comments on commit d49f4c1

Please sign in to comment.