Hello,
What is the better way to extract DOF and its coordinate from a subspace ?
Actually, i'm using a cell iterator on a subspace in python, and for a big mesh loop is not convenient in python.
vertex_to_dof_map and dof_map_to_vertex function cannot be used in a subspace of a MixedFunctionSpace.
I want to use dofs function, but the order of DOFs given by this method is not good.
Minimal code :
from dolfin import *
mesh = UnitIntervalMesh(3)
V = FunctionSpace(mesh, 'CG', 1)
W = MixedFunctionSpace([V,V])
W1,W2 = W.split()
#Method that I use
list_dof = []
list_coor = []
for cell in cells(W1.mesh()) :
i = cell.index()
list_dof.append(W1.dofmap().cell_dofs(i))
list_coor.append(W1.dofmap().tabulate_coordinates(cell))
Then I have to arrange both list to have the list DOFs and the list of coordinates with corresponding index.
I want to use methods like tabulate_all_coordinates() and dofs() in W1.dofmap(), but the DOFs indice doesn't correspond to the coordinate indice with the methods dofs().
Is there an other way than cell iterator to do what I want ?
Thanks for you help !
Mehdi Tha.