How to assemble large sparse matrices effectively
Hello everyone, I am working on an FEM project using Scipy. Now my problem is, that the assembly of the sparse matrices is to slow. I compute the contribution of every element in dense small matrices (one for each element). For the assembly of the global matrices I loop over all small dense matrices and set the matrice entries the following way: ... [i,j] = someList[k][l] Mglobal[i,j] = Mglobal[i,j] + Mlocal[k,l] ... Mglobal is a lil_matrice of appropriate size, someList maps the indexing variables. Of course this is rather slow and consumes most of the matrice assembly time. Is there a better way to assemble a large sparse matrix from many small dense matrices? I tried scipy.weave but it doesn't seem to work with sparse matrices Yours, cm
participants (1)
-
cp3028