Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

getting submatrices from an existing sparse CSR matrix

More
4 years 11 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
4 years 11 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
4 years 11 months ago - 4 years 11 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: 4 years 11 months ago by Elsakori.
Time to create page: 0.124 seconds