-
Hi, This is my first example with mfem, i got inspired from many mfem examples.
Using the dirichlet bc give the good result but when it comes to use Robin bc, the temperature is 0. There's something i can't figure out in the bilinear/Linear forms... Any idea to fix that problem ? Moreover, when profiling my code it seems that The source code and mesh file can be found in that : google drive Thank you for helping ! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hello, @hbadi, I believe the problem is that I think that should help although I was not able to test this (my SuiteSparse installation may be corrupted). Matrix assembly is often one of the most expensive steps, if not the most expensive step, in a finite element simulation. There may be ways to speed this up for your problem but I'm not the best person to offer such advice. @camierjs or @YohannDudouit could probably offer more useful advice on this topic. Best wishes, |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Hello, @hbadi,
I believe the problem is that
boundary_dofs
should be empty when applying Robin BCs. Any dofs listed inboundary_dofs
are assumed to be Dirichlet BCs and so the values inu
are taken to be the Dirichlet values and these will override any corresponding values in the right hand side vector. Since the only non-zero values inb
were overridden with the zeros inu
your solution was zero everywhere.I think that should help although I was not able to test this (my SuiteSparse installation may be corrupted).
Matrix assembly is often one of the most expensive steps, if not the most expensive step, in a finite element simulation. There may be ways to speed this up for your problem b…