vector XFESpace for xfem inclusion problem in elasticity

5 years 2 weeks ago #1698
Dear Colleagues I'm writing a ngs-py file to deal with the inclusion problem and I've a problem with the dimension space when trying:
Code:
Vh = H1(mesh, order=1, dirichlet="left|right", dim=mesh.dim) Vhx = XFESpace(Vh, ci) VhG = FESpace([Vh,Vhx]) NgException: Compound space of spaces with different dimensions is not allowed

Clearly the problem is because Vh is dim = 2 and Vhx is dim = 1.

My question then is :
Which flag I've to apply to XFESpace function to deal with the dimension of Vh
5 years 2 weeks ago #1699 by schruste
Hi,

Sorry, I think this not fixable with a flag, yet. I will have to program this into the XFESpace. However, this will take some time for me to find the time for it...

Perhaps you can find a CutFEM-characterization for the same problem? With Compress(..) you can reduce the dofs to the same amount. Alternatively you could replace the vector-valued FESpace by multiple scalar FESpaces.

Best,
Christoph
5 years 1 day ago #1714
Thank you so much for the answer Mr Schruste, it would be so nice if you coul say me where can I find the CutFEM application, and my question about the multiple Scalar FESpace is how I could implemented this definition for example applying the Grad or Div, have I to define each one or I can Apply the operator directly

Best Regards
Camilo
4 years 3 months ago #2539 by nepomuk
Hello,
I think I have quite a similar problem, I'd like to do XFEM for linear elasticity, I defined the FE spaces like
Code:
Vh = VectorH1(mesh, order=1) Vhx = XFESpace(Vh,ci) VhG = FESpace([Vh,Vhx])

Now it hangs up when doing the neg() or pos() function like
Code:
u_std, u_x = VhG.TrialFunction() u = [u_std + neg(u_x)]

saying
Code:
NgException: Dimensions don't match, op = + dims1 = 0: 2, dims2 = 0: 1

Is there a way to fix it, apart of using two FE spaces coordinatewise?

BR,
Nepomuk
4 years 3 months ago #2541 by schruste
Hi,

I fixed the XFESpace so that it is now able to deal with base FESpaces that have a higher dimension. The changes are in the master branch on github, but not yet in the release branch which is the standard branch on github (to come within a few weeks). So please checkout the latest "master" branch on github and recompile ngsxfem.

Afterwards, use H1(mesh, dim=mesh.dim) instead of VectorH1 (VectorH1 is still not supported by XFESpace). With dim=mesh.dim however elasticity should be possible now. Please give it a try! I'd be nice if you could report if things are working for you.

Best,
Christoph
The following user(s) said Thank You: camilo.suarezafanador
4 years 3 months ago #2547 by nepomuk
Hi Christoph,

The XFE Space workes fine, but I got another issue: I do need the transposed gradient, but
Code: