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/e3b48891-b57c-4035-be56-c94c7f240cb5n%40googlegroups.com.
