Hello,
for sensitivity analysis of eigenvalues respect to material parameters I need to assemble differentiated form on each cell. I use the following loop:
for i, cell in enumerate(cells(Omega)):
cell_id = cell.index()
# extract eigenvector for given cell
eigvect_e = eigvects[-1, dofmap.cell_dofs(cell_id)].real
# extract differentiated stiffness matrix on cell
dk_t = assemble_local(dk * dx, cell)
# compute sensitivity
edk[i] = dot(dot(eigvect_e, dk_t), eigvect_e.T)
However it is too slow with higher number of cells than a few thousands. Please, any idea how to get speed up?
Petr