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!?

Peter 

On Tuesday, 16 February 2021 at 22:29:19 UTC+1 peter rum wrote:

> Dear Chen,
>
> you can write `data_out.add_data_vector(v_cell, "cell_data", 
> DataOut<dim>::type_cell_data);`. This might be what you are looking for. To 
> access the right entry in the vector you can use 
> `CellAccessor::active_cell_index()`.
>
> Peter
>
> On Tuesday, 16 February 2021 at 21:58:18 UTC+1 Chen Shen wrote:
>
>>
>> Dear all,
>>
>> I am trying to output cell stress for a linear elasticity problem. I have 
>> computed the stresses at the quadrature points fro each cell. The cell 
>> stress is then computed using the averages of the stress at the quad 
>> points. But I am not sure how to output the stress values as  constants per 
>> cell. I looked up the data_out class and I found it to be nodal-based. Is 
>> there a convenient way of outputting the cell stress values in a common 
>> file format that can be visualized in Paraview as discontinuous values 
>> across the cells? Any suggestions are welcome, Thank you!
>>
>

-- 
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/b0d2727a-eb74-4291-bc39-3652219e9aban%40googlegroups.com.

Reply via email to