On 11/22/21 6:55 PM, Toddy Liu wrote:
I used the method that you taught me. but unfortunately the results seems bad.
And I'm not sure where the problem is including the transform between
dofhandler iterator and triangulation iterator. So please take a look at my
codes(two pieces of codes shown in the following figures) and tell me which
one will be the right one.
Toddy -- for both this post and the other one you sent earlier, you need to
learn techniques to debug your codes. This typically starts with asking the
right questions. So when you say above "the results seems bad", you should ask
what specifically is wrong? Does the solution look right in the interior but
is wrong at the boundary? Or the other way around? Does it work on a single
processor, and is only wrong when run in parallel? What happens for cases
where you set the right hand side function to zero?
All of these questions help you *observe* what specifically is wrong, and
helps you formulate *hypotheses* where the bug may lie. When you have a
hypothesis, you can star to test it, play with variations that allow you to
identify whether your guess that the problem is, for example, at the boundary,
and narrow the places where the bug might be.
In the codes you show, I believe that they should be identical. Both codes
should work the same. If you get different results, then that would be
strange, but you could in that case test *why* the results are different --
for example by outputting the cell matrices and vectors.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bange...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/
--
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 the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/871bfb72-db97-80cf-896c-8c1f8d281384%40colostate.edu.