-
Notifications
You must be signed in to change notification settings - Fork 14
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
Discrepancy in boundary normal for embedded geometries #32
Comments
Hi @diliphridya It seems that there is some problem in the definition of the
I would expect a square with size = 0.8, but I get this: In green you see the background mesh and in pink the integration mesh for the generated square. Clearly the pink shape is not a square. Moreover, you can see that part of the boundary (yellow lines) is not contained in the background mesh. This is the code I have used to visualize all the geometries:
|
BTW, by using the using Gridap
using GridapEmbedded
using Gridap.ReferenceFEs
u(x) = x[2]
f(x) = -Δ(u)(x)
ud(x) = u(x)
L = 1.0
domain = (0.0,L,0.0,L)
n = 3
partition = (n,n)
bgmodel = CartesianDiscreteModel(domain,partition)
bgtrian = Triangulation(bgmodel)
writevtk(bgtrian,"bgtrian")
#geo = quadrilateral(x0=Point(0.1,0.1),d1=VectorValue(0.8,0.0),d2=VectorValue(0.0,0.8))
geo = square(L=0.8,x0=Point(0.5,0.5))
cutgeo = cut(bgmodel,geo)
trian_Ω = Triangulation(cutgeo)
writevtk(trian_Ω,"trian_Ω")
trian_Γ = EmbeddedBoundary(cutgeo)
n_Γ = get_normal_vector(trian_Γ)
writevtk(trian_Γ,"trian_G",cellfields=["n"=>n_Γ])
|
@diliphridya I recommend you to investigate what is wrong with |
Thanks @fverdugo . Sure, I will have a look at the |
Perfect! Please, Open a PR with the fix. |
Sure. |
@santiagobadia @fverdugo
The normal vector obtained from the following code is shown in the figure.
Here, the two edges of the quadrilateral are not seen.
On the other hand , if the following geometry is considered,
Then, the normal vector is obtained is :
The text was updated successfully, but these errors were encountered: