My gradient processor is exactly the same as the one your wrote in include/deal.II/numerics/data_postprocessor.h <https://github.com/dealii/dealii/pull/4991/files#diff-0e837098279c080004cb4372efaf37e6> and the way I compute the gradient of ux is like this:


       Vector<double> ux(this->solution.size()/dim);

       for (unsigned int i = 0; i < ux.size(); ++i)

       {

         ux[i] = this->solution[i];

Yes, this does not work. You cannot just take one block out of the block vector because you do not have a DoFHandler that describes only this one block (your DoFHandler describes the collection of all elements of all blocks).

You will want to output *all* gradients at once. It turns out that I just wrote a class for that that you may want to copy, along with the example given there:

https://github.com/dealii/dealii/pull/4997

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                           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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to