`addboundaryfacetset!` adding inconsistant number of facets
Hello! This is related my question [here](https://discourse.julialang.org/t/stokes-operator-is-singular-after-applying-drichlet-boundary-conditions/135278). I am trying to partition the boundary of a mesh into two facetsets as below, but the number of facets in the "cylinder_wall" and "boundary_other" other sets does not add up to the number of facets in "boundary_all".
```
cyl_wall_pred = x -> (abs(sqrt((x[1]+2.0)^2 + (x[2]+2.0)^2) - 50.0) < 1e-12 )
topo = ExclusiveTopology(grid)
# add facetset for everything on boundary
addboundaryfacetset!(
grid, topo, "boundary_all",
x -> true
)
# add facetset for everything on the wall of the cylinder
addboundaryfacetset!(
grid, topo, "cylinder_wall",
x -> cyl_wall_pred(x)
)
# add facetset for everything that is not on the wall of the cylinder
addboundaryfacetset!(
grid, topo, "boundary_other",
x -> !cyl_wall_pred(x)
)
println(length(getfacetset(grid, "cylinder_wall"))) # 270
println(length(getfacetset(grid, "boundary_other"))) # 8746
println(length(getfacetset(grid, "boundary_all"))) # 9086
```
Here is the full example and mesh:
[mesh.unv](https://drive.proton.me/urls/BPTTR2M2P4#dveEwlN3Rb5T).
[min-example.ipynb](https://github.com/user-attachments/files/24885546/min-example.ipynb)
0 条评论