-
Notifications
You must be signed in to change notification settings - Fork 63
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
Manually setting matrix entries #261
Comments
Hi @mkofler96 My favorite recipe in this situation is to convert the MFEM matrix to scipy's sparse matrix, where you can manipulate more efficiently Converting it to Scipy sparse matrix can be done like
An example of creating SparseMatrix from scratch is
@v-dobrev, @tzanio : if there is a different way, which can be done by just calling MFEM's API, |
Thank you @sshiraiwa vey much for the quick answer, this was exactly what I was looking for. I also found that there is a method |
Hello,
I was wondering if it is possible to manually set entries of the matrix in the linear system.
If I look at the example given at the main page, I would like to manually change the sparse matrix
AA
.While changinging the entry (0,0) works, because it is already present, adding a new entry at (0,10) gives the following error:
Is there another possibility of how I could do this? I was also looking for a way to convert the sparse matrix to a dense matrix and changing the entries there, but I have not found a way of doing this.
I would be happy if someone could help me out here and thanks for the great work.
The text was updated successfully, but these errors were encountered: