Hi Everyone,
If I consider the system I get from assembling a saddle point problem (take stokes for example)
i.e. the system assembled from the code snippet below (ignoring boundary conditions)
mesh = UnitSquareMesh(8,8)
P2 = VectorElement(“CG”, mesh.ufl_cell(), 2)
P1= FiniteElement(“CG”, mesh.ufl_cell(), 1)
TH = P2 * P1
W = FunctionSpace(mesh, TH)
(u, p) = TrialFunctions(W)
(v, q) = TestFunctions(W)
LHS = (inner(grad(u), grad(v)) - div(v)p + qdiv(u))*dx
I would like to be able to extract the B block. When I plot the sparsity pattern for the assembled system it is clear that the degrees of freedom are being ordered in a specific fashion. My questions are
-
Can anyone point me to the documentation for how the DOF’s are being arranged, I can’t seem to find it. I can (hopefully) extract the matrices myself if I know that. Or even better is there a way to make it order the system in the block format.
-
Is there some other easy way to do this that I’m not seeing?
Thank You