This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Element - wise solution in parallel

0 votes

I have an eigenvector solution eigvects from eigenvalue analysis. Now, I would like to do element wise operation with that vector. Following code works well for one process:

for i, cell in enumerate(cells(Omega)):
    # find element id
    cell_id = cell.index()
    # extract local displacement vector from local to global dof map
    eigvect_e = eigvects[-1, dofmap.cell_dofs(cell_id)].real
    ...

However, turn into parallel, the loop over cells fails due to mesh partition. How to correct the loop working in parallel?

Thank you

asked Jan 21, 2016 by petrH FEniCS Novice (580 points)
...