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

Adapted most GridapEmbeddedTests and examples to Gridap v0.15 #38

Merged

Conversation

ericneiva
Copy link
Member

Hi @fverdugo,

I have adapted most GridapEmbedded tests to Gridap v0.15:

There is a couple of issues, before proceeding with the PR, though:

  1. StokesCutFEMTests.jl: I cannot compute this integral (I get a "This function is not yet implemented").
  ...
  Γi = SkeletonTriangulation(cutgeo_facets)
  n_Γi = get_normal_vector(Γi)
  ...
  dΓi = LebesgueMeasure(Γi,degree)
  ...
  c_Γi(p,q) = (β0*h)*jump(p)*jump(q)
  a((u,p),(v,q)) = ( - c_Γi(p,q) ) * dΓi

See also this line in StokesCutFEMTests.jl. What could be going wrong? Am I missing something?

  1. BimaterialPoissonCutFEMTests.jl: I had to change how to compute the cell-dependent weights and the stabilisation param to make things work, otherwise I get the array dimension mismatch assertion:
You are trying to build a CellField from an array of length 142
on a Triangulation with 1800 cells. The length of the given array
and the number of cells should match.

when attempting to integrate the weak form:

jump_u(u1,u2) = u1 - u2
mean_q(u1,u2) = κ1*α1*(u1) + κ2*α2*(u2)
mean_u(u1,u2) = κ2*u1 + κ1*u2
a((u1,u2),(v1,v2)) =
  ( α1*(v1)(u1) ) * dΩ1 + ( α2*(v2)(u2) ) * dΩ2 +
  ( β*jump_u(v1,v2)*jump_u(u1,u2)
     - n_Γmean_q(u1,u2)*jump_u(v1,v2)
     - n_Γmean_q(v1,v2)*jump_u(u1,u2) ) *

Now, I compute them at all cells to match the size.

  const κ1 = (α2*meas_K1) ./ (α2*meas_K1 .+ α1*meas_K2)
  const κ2 = (α1*meas_K2) ./ (α2*meas_K1 .+ α1*meas_K2)
  const β = (γ_hat*meas_KΓ) ./ ( meas_K1/α1 .+ meas_K2/α2 )

Before, we only needed the ones at the cut (142).

  const κ1 = (α2*meas_K1_Γ) ./ (α2*meas_K1_Γ .+ α1*meas_K2_Γ)
  const κ2 = (α1*meas_K2_Γ) ./ (α2*meas_K1_Γ .+ α1*meas_K2_Γ)
  const β = (γ_hat*meas_KΓ_Γ) ./ ( meas_K1_Γ/α1 .+ meas_K2_Γ/α2 )

Is that alright? Or, again. am I missing something?

@fverdugo
Copy link
Member

  1. It looks like a bug. I'll take care.

  2. The error you get about the number of cells mismatch is the expected behavior. Your solution looks OK.

@fverdugo fverdugo merged commit 1f4ee42 into gridap:update_to_Gridap_v0.15.0 Nov 30, 2020
@ericneiva
Copy link
Member Author

ericneiva commented Nov 30, 2020

  1. It looks like a bug. I'll take care.

Okay, let me now when it's solved. Thanks.

  1. The error you get about the number of cells mismatch is the expected behavior. Your solution looks OK.

Okay, then I'll update the rest of bimaterial tests accordingly test/GridapEmbeddedTests/EmbeddedBimaterialPoissonCutFEMTests.jl and
examples/EmbeddedBimaterialPoissonCutFEMTests. If you agree, I'll push directly to the gridap:update_to_Gridap_v0.15.0.

@fverdugo
Copy link
Member

Yes you can push directly. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants