Re: [deal.II] How to use component_is_part_of_tensor

14 views
Skip to first unread message

Wolfgang Bangerth

unread,
Nov 24, 2020, 3:00:21 PM11/24/20
to dea...@googlegroups.com

Audrey,

> I'm trying to export data as tensors to vtu format (for ParaView) with the
> add_data_vector() function with
> DataComponentInterpretation::component_is_part_of_vector.

Did you mean to say "...is_part_of_tensor" here?

The vector case is discussed in step-22. There is no current example for
tensors, but you could take a look at this test:
https://github.com/dealii/dealii/blob/master/tests/data_out/data_out_12.cc


> Unfortunately, I don't know how to use it properly and I don't find any
> example or clue about it in the deal.II documentation or on the GitHub page.
> There's one Reynolds tensor per node and they are stored in a vector. Since
> the number of components (4 or 9/node) is bigger than the number of dofs (3 or
> 4/node) or the number of cells, I always got an error.

The number of DoFs per node is not related to the interpretation of things.
What matters is that you need to have dim^2 components of your vector-valued
finite element marked as tensors.

What is the specific error message, and what is the piece of code with which
you try? It might be easiest if you showed us the code and the error message :-)

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Reply all
Reply to author
Forward
0 new messages