gridap / gridap/GridapEmbedded.jl

Bug in CSG

Open
#79 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
50
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Dear @fverdugo ,

I found a bug in CSG with rectangles. In the MWE below the boundary is discontinuous. See the figure of the triangulations.

```julia
using Gridap
using GridapEmbedded

x0 = Point(0.2,0.2)
d1 = VectorValue(0.2,0.0)
d2 = VectorValue(0.0,0.6)
geo1 = quadrilateral(;x0=x0,d1=d1,d2=d2)

x0 = Point(0.2,0.4)
d1 = VectorValue(0.6,0.0)
d2 = VectorValue(0.0,0.2)
geo2 = quadrilateral(;x0=x0,d1=d1,d2=d2)
geo = union(geo1,geo2)

domain = (0, 1, 0, 1)
cells = (9,9)
bgmodel = CartesianDiscreteModel(domain,cells)
cutgeo = cut(bgmodel,geo)
Γ = EmbeddedBoundary(cutgeo)
Ω = Triangulation(cutgeo)
Ωbg = Triangulation(bgmodel)

writevtk(Γ,"G")
writevtk(Ω,"O")
writevtk(Ωbg,"Obg")
```

![Screenshot from 2024-04-11 17-34-57](https://github.com/gridap/GridapEmbedded.jl/assets/37292905/1cf4163a-7b48-4894-a8cf-90a1c0dc403a)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.