SparseMatrix

49 views
Skip to first unread message

Hermes Sampedro

unread,
Oct 1, 2021, 9:33:25 AM10/1/21
to deal.II User Group
Dear all, 

I would like to ask how can I access certain values of a sparseMatrix.
First I tried by using the global indices which does not work:

my_sparse_matrix(local_dof_indices[i], local_dof_indices[j])

I can not see any function to get the value. I found the function val, but it is not fully clear to me.

I would appreciate some help.


Thank you

Regards, 

H.



Wolfgang Bangerth

unread,
Oct 1, 2021, 11:43:16 AM10/1/21
to dea...@googlegroups.com
On 10/1/21 7:33 AM, Hermes Sampedro wrote:
>
> I would like to ask how can I access certain values of a sparseMatrix.
> First I tried by using the global indices which does not work:
>
> /my_sparse_matrix(local_dof_indices[i], local_dof_indices[j])/

That is how it is supposed to work. Can you explain what "does not work"
mean in more specific terms?

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Hermes Sampedro

unread,
Oct 1, 2021, 1:39:59 PM10/1/21
to dea...@googlegroups.com
Dear Wolfgang,

Thank you for your answer. Knowing that this is the way to do that, helped me to found the problem I had.

Thank you again.
H.

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/mRdtYt5wnRo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/b1367fc7-48b6-d20e-697d-a086648a30b5%40colostate.edu.
Reply all
Reply to author
Forward
0 new messages