On 05/11/2018 08:45 PM, 'Maxi Miller' via deal.II User Group wrote:

Now I would expect that A_x and A_y will look exactly the same, after I use the same equation. But according to my viewer (ParaView/Visit) A_x is different compared to A_y (and the same goes for B and C). Partially I get wild fluctuations in the result for A_x, while the result for A_y is smooth. Why does that happen?

That's hard to tell from your description :-)

The code snippet looks correct to me. You should assume that what you see from Paraview is correct. That means that the problem must have happened *before* you even get into this snippet -- i.e., that your assumption that the two fields were computed using the same equation is not correct. Fortunately, this is a testable assumption, and it will help you debug your program.

I don't know how exactly you solve your program, and as a consequence I can't tell you where your problem lies. But here are a few ideas to test: If you solve the problem with a block matrix/block vector approach, then testing whether A_x and A_y are the same comes down to just comparing the corresponding blocks in the vector. You can do that by looking at the first few entries of these vectors, or by considering their norm, for example. If they are not the same, you need to ask why. This may be because (i) you assembled the matrix the wrong way, (ii) you assembled the right hand side vector incorrectly, (iii) because the solver was incorrect. All of these, again, are testable hypotheses. For example, if your equations are completely decoupled, then for A_x and A_y to be the same, the corresponding matrix blocks must be the same and the same holds for the right hand side blocks. If they are not, then you need to figure out why.

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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to