On 2/16/21 2:37 PM, peter rum wrote:
I just realized that you want to do that for multiple components. In that case you might have to create a auxiliary DoFHandler with FESystem<dim>(FE_DGQ<dim>(0), components), which is peace-wise constant and has the right number of components. But maybe there is a simpler approach!?

Yes, create a vector
  Vector<double> cellwise_data (triangulation.n_active_cells());
  // put your stress values in there, in the order in which you
  // access cells when you loop over everything
  data_out.add_data_vector (cellwise_data, "stress_values");

If you need multiple such cell-wise vectors, just create multiple vectors and call add_data_vector() more than once.

Take a look at steps 17, 18, 27, and a few others :-)

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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/7ebe3a43-7bbc-e893-2f49-2195992dbdb2%40colostate.edu.

Reply via email to