Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to zero specified rows of a hypre CSRMatrix? #956

Open
jczhang07 opened this issue Aug 7, 2023 · 4 comments
Open

How to zero specified rows of a hypre CSRMatrix? #956

jczhang07 opened this issue Aug 7, 2023 · 4 comments

Comments

@jczhang07
Copy link

The matrix location might be HOST or DEVICE. I could not find a routine for me to do that.
Thanks.

@liruipeng
Copy link
Contributor

We don't have it for specified rows. For the whole matrix you can do

hypre_CSRMatrixSetConstantValues(A, value);

@victorapm
Copy link
Contributor

Junchao, can you provide more details on why you need this feature? Would you be interested in using it to impose boundary conditions, for example?

Thanks!

@jczhang07
Copy link
Author

Yes, to impose boundary conditions and to implement PETSc MatZerosRows (https://petsc.org/release/manualpages/Mat/MatZeroRows) with a Hypre CSRMatrix underneath.

@victorapm
Copy link
Contributor

Sounds good, Junchao! I'll bring this up in our next hypre meeting and the team will come up with a plan to implement this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants