Hi Yingqi_Jia,
You can refer to this link for a functionality similar to VectorSpace.dofmap().cell_dofs(el)
, Now each dofmap has a block size (we only store one index for each vector dimension as in the scalar case).
The recommended way for getting the local matrix is using A.getValuesCSR and wrapping with a scipy sparse matrix. I would not recommend using a dense array for that.
You can get the local part of a vector by:
b = dolfinx.assemble_vector(L)
with b.localForm() as b_local:
b_local.set(0.0)
Dolfinx doesn’t have a function that corresponds to assemble_local
, but you can create a custom assembler accessing the kernel generated by ffcx. You can find an example here.