More Precisely, I have this code :
mesh = UnitSquareMesh(nx, ny)
V = VectorFunctionSpace(mesh, "Lagrange", 2)
Q = FunctionSpace(mesh, "Lagrange", 1)
W = V*Q
(u, p) = TrialFunctions(W)
(v, q) = TestFunctions(W)
u_1 = Function(V)
The system that i want to resolve is :
M u + C p = K u_1
transpose(C) u = 0
M is the Mass Matrix, C is the divergence matrix and K is the stiffness matrix
the variational form is :
a( (u, p),(v, q) )= L(v,q)
a = inner(u, v)dx - inner(div(v), p)dx + inner(q, div(u))dx
L = inner( nabla_grad(u1), nabla_grad(v) )dx
A, b = assemble_system(a, L)
I want that the Bloc M in the Matrix in left hand side will be lumped (i.e. diagonalized). it can be do through:
-Summarize the absolute value of all rows for each line and place the sum in the diagonal row
-apply a quadrature rule based on specific Gauss points and weights. for the finite elements of order 2 we choose 7 points of integration
(0, 0),(0, 1),(1, 0); w_s = 1/20
(1/2, 0),(0, 1/2),(1/2, 1/2); w_m = 2/15
(1/3, 1/3) ; w_g = 9/20
is it possible to do one of diagonalization method on fenics ?
Thanks.
Hamoudee