Hello,
While trying to solve Poisson's equation on a circular grid, I encounter very large matrix elements in my assembled matrix. This seems to be no problem for the FEniCS solver, which easily solves the system, but operations on the matrix using Scipy algorithms break down because of those large entries. Here's my code:
from dolfin import *
import numpy as np
domain=Circle(0,0,10)
mesh=Mesh(domain,10)
V=FunctionSpace(mesh,'Lagrange',1)
bc=DirichletBC(V,Constant(0.0),DomainBoundary())
u=TrialFunction(V)
v=TestFunction(V)
f=Constant(1.0)
a=inner(grad(u),grad(v))*dx
L=f*v*dx
A,b=assemble_system(a,L,bc)
u=Function(V)
U=u.vector()
solve(A,U,b)
plot(u,interactive=True,title='Poisson on Circular Grid')
No problem for FEniCS to solve this. However, let's take a look to the corresponding matrix A and its largest entries:
print A.array(), np.sort(A.array()[abs(A.array())>1e2])
This reveals some matrix values of the order of 1e15.
How is this possible, and how can I get rid of those large values without influencing my FEM system?
Thanks for any help,
Adriaan