convergence order of FEM on L-shape domain
Hi, I want to test the convergence of linear FEM method for Poisson equation
on a L-shape domain with the origin as the corner.
I set exact solution u = r^{2/3}, then the right hand side f = -4/9*r^{-4/3}.
I try to use the following Python code, but it does not work.
Maybe, one reason is that the function f(x) is singular near the
origin, but f(x) is in L^{1}, the righthandside L = (f,v) is still
reasonable, I am not sure whether the numerical qudrature fails for
L = (f,v) in this case.
Thanks for any help ~
# ---------begin of the program-------
from dolfin import *
# the L-shape mesh can be find at
# http://
mesh = Mesh("lshape.
mesh.coordinate
ue = Expression(
f = Expression(
def D_boundary(x, on_boundary):
return on_boundary
V = FunctionSpace(
uh = TrialFunction(V)
vh = TestFunction(V)
a = inner(grad(
L = f*vh*dx
A = assemble(a)
b = assemble(L)
bc = DirichletBC(V, ue, D_boundary)
bc.apply(A,b)
#------
solver = KrylovSolver(
solver.
solver.
solver.
solver.
#------
uh = Function(V)
#uh.vector()[:] = uh.vector()[:]*0.8
solver.solve(A, uh.vector(), b)
EL2 = errornorm(
EH1 = errornorm(
print EL2, EH1
# ---------end of the program-------
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Huadong GAO for more information if necessary.