getting submatrices from an existing sparse CSR matrix

More
5 years 6 months ago #1630 by Elsakori
Hello,

Is there any way in NGSolve to get submatrices from an existing sparse CSR matrix (i.e. extracting rows, columns, or small matrices from a sparse matrix of CSR format).

I am grateful for any explanation

Here are my python script and output file.
More
5 years 6 months ago #1633 by joachim
Hi Elsakori,

no, you cannot. You CAN export the whole matrix to scipy (using mat.CSR() or mat.COO()), and get the sub-matrices view scipy.

Within NGSolve we can invert sub-matrices, as we need for preconditioning. Either one 'large' one using sparse direct factorization, or many 'small' ones using dense matrix operations, see more in the tutorials:
ngsolve.org/docu/latest/i-tutorials/unit...obi/blockjacobi.html

Joachim

PS: you missed the attachment
More
5 years 6 months ago - 5 years 6 months ago #1634 by Elsakori
Hello Joachim,
Thank you so much. Actually this is what I did, But I thought that there is another way in NGSolve.

Ahmed
Last edit: 5 years 6 months ago by Elsakori.
Time to create page: 0.105 seconds