Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in CSG #79

Open
pmartorell opened this issue Apr 11, 2024 · 0 comments
Open

Bug in CSG #79

pmartorell opened this issue Apr 11, 2024 · 0 comments

Comments

@pmartorell
Copy link
Collaborator

Dear @fverdugo ,

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant