Bubble elements formulations

4 months ago by
Hi community, I need to solve a problem in the bubbles space, but I fail to understand how such space works. I am currently looking at the poisson problem to better understand the solution:
from fenics import *

N = 20
mesh = UnitSquareMesh(N, N)
V = FunctionSpace(mesh, "B", 3) # tried also CG

bc = DirichletBC(V, 0., "on_boundary")

u = TrialFunction(V)
v = TestFunction(V)
f = Expression("-x[0]*x[0] - x[1]*x[1]", degree =2)

A = inner(grad(u), grad(v))*dx
L = f*v*dx

sol = Function(V)
solve(A == L, sol) # Same with bc included

I have the following doubts:
1) The solution of the problem solver in Bubble space is very different to the one performed with CG elements, where I considered that Bubble elements are 0 on the boundary, and thus shouldn't require a boundary condition being imposed. On the other side, the CG solution was obtained with bc, to obtain a fair comparison.
2) I am not sure about what the degree does. I expect bubble elements to be of degree 3, and in fact when I use higher order elements, the solution is pretty much constant, which I really don't understand.
3) The last experiment I performed was solving this problem in an 'enhanced CG', writing the solution as u + bubble, but the bubble component was always zero. Any thoughts?

Thanks in advance!
Community: FEniCS Project
Please login to add an answer/comment or follow this question.

Similar posts:
Search »