Assemble of a matrix in a parallel code

52 views
Skip to first unread message

Giacomo bottacini

unread,
Aug 23, 2024, 1:08:50 PM8/23/24
to deal.II User Group
Hi all,

i'm working on a parallel FE code and i have written a function to assemble my matrix. I would like to know if i'm using the right functions to make it since deal.ii is a very extended library and i'm not very familiar with it.
I'm iterating cell by cell constructing a local matrix and then passing it to the global one.
I am attaching my code in this image, where I have kept only the main parts for clarity.
I have kept only the essential functions to make it more clear.
Thanks all.


Schermata del 2024-08-23 09-05-01.png

Wolfgang Bangerth

unread,
Aug 23, 2024, 1:16:40 PM8/23/24
to dea...@googlegroups.com
Giacomo:
we don't know what it is you want to do, and so it is impossible for us
to say whether what you are doing is right or wrong. But, before anyone
starts to look at your code: What happens when you run your code? Do you
have any reason to believe that it may not be correct? If so, *how
specifically* is the output wrong? These are all debugging questions for
which you will have to learn the necessary skills sooner or later anyway.

Best
W.

blais...@gmail.com

unread,
Aug 27, 2024, 4:10:37 PM8/27/24
to deal.II User Group
Dear Giacomo,
I would suggest you take a look at step-40. This step does a pretty good job of assembling a matrix in parallel on a distributed triangulation. Here it's hard to tell if you are doing something bad / good without looking at the full code itself :)
If you have any questions, please feel free ot post them here below :)
Reply all
Reply to author
Forward
0 new messages