trilinos / Trilinos

Primary repository for the Trilinos Project
https://trilinos.org/
Other
1.21k stars 564 forks source link

how to delete the 66th row and 66th clolum in a CRS epetra matrix . #10889

Closed ztdepztdep closed 2 years ago

ztdepztdep commented 2 years ago

I need to solve the pressure equation for the incompressible flow since the pressure equation is a possion equation with 4 Neumann boundary conditions. I need to delete one row and one column in the matrix A. Could you please give me some advices.

cgcgcg commented 2 years ago

Deleting a row and column boils down to setting up a new matrix. Instead of deleting a row and column, you might want to modify the values. Zero all entries in row and column and put a 1 on the diagonal.

ztdepztdep commented 2 years ago

which API can resovle this goal. or I need to set the value during the insert process

@.***

@.*** |

---- Replied Message ---- | From | Christian @.> | | Date | 08/17/2022 01:29 | | To | @.> | | Cc | @.**@.> | | Subject | Re: [trilinos/Trilinos] how to delete the 66th row and 66th clolum in a CRS epetra matrix . (Issue #10889) |

Deleting a row and column boils down to setting up a new matrix. Instead of deleting a row and column, you might want to modify the values. Zero all entries in row and column and put a 1 on the diagonal.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

cgcgcg commented 2 years ago

Yes, all you need to do is modify the entries that are inserted.

jhux2 commented 2 years ago

Closing as answered, please reopen if necessary.