On 09/11/2017 12:59 AM, Anna Avdeeva wrote:
Now I would like to create a file containing the solution vector and
some function of the solution vector at the set of receiver locations.
If I had a solution vector on one processor I could easily create such
file (using VectorTools::point_value/point_gradient), but when solution
is distributed, I am not quite sure what the best way is.
Your mindset when thinking about these things needs to be that it is not
possible for one processor to have information that exists on other
processors. So, if you want to output data for a number of points, each
processor needs to loop over all points, check whether that point is
located so that that processor can know the solution there, and then
evaluate the solution there. That means that each processor will be
responsible only for a subset of points, but all together, they will
know about all points.
When you have this, you can either let each processor output into a
separate file, or they send their results to one central processor that
outputs everything into a file.
To understand the first part, you may want to look into the
implementation of VectorTools::point_value(), which simply throws an
exception for all points it doesn't know about locally on the current
processor.
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.