- Thank you received: 0
getting submatrices from an existing sparse CSR matrix
5 years 6 months ago #1630
by Elsakori
getting submatrices from an existing sparse CSR matrix was created 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.
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.
5 years 6 months ago #1633
by joachim
Replied by joachim on topic getting submatrices from an existing sparse CSR matrix
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
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
5 years 6 months ago - 5 years 6 months ago #1634
by Elsakori
Replied by Elsakori on topic getting submatrices from an existing sparse CSR matrix
Hello Joachim,
Thank you so much. Actually this is what I did, But I thought that there is another way in NGSolve.
Ahmed
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