# Writing tensors in VTK

**URL:** https://discourse.paraview.org/t/writing-tensors-in-vtk/5889
**Category:** ParaView Support
**Tags:** vtk
**Created:** [November 25, 2020, 7:22pm UTC](https://discourse.paraview.org/t/writing-tensors-in-vtk/5889 "2020-11-25T19:22:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Victor\_Saouma](https://discourse.paraview.org/user_avatar/discourse.paraview.org/victor_saouma/32/4946_2.png) [@Victor\_Saouma](https://discourse.paraview.org/u/Victor_Saouma)
#### Post date: [November 25, 2020, 7:22pm UTC](https://discourse.paraview.org/t/writing-tensors-in-vtk/5889/1 "2020-11-25T19:22:33Z")

</div>

1. I am getting the following error

Generic Warning: In C:\bbd\8fbebceb\build\superbuild\paraview\src\VTK\IO\Legacy\vtkDataReader.cxx, line 1506\*  
Error reading ascii data. Possible mismatch of datasize with declaration.\*

when loading the following  
TENSORS Strains float  
-2.920000e-04 -2.920000e-04 3.541000e-03 0.000000e+00 1.460000e-04 1.460000e-04  
-2.920000e-04 -2.920000e-04 3.541000e-03 0.000000e+00 1.460000e-04 -1.460000e-04  
Any idea what may be wrong?  
2. How can I specify the 6 components of the tensor (i.e. sig\_xx, sig\_yy, etc.)?  
thanks

---

<div class="post-metadata">

### Author: ![Joachim\_P](https://discourse.paraview.org/user_avatar/discourse.paraview.org/joachim_p/32/9596_2.png) [@Joachim\_P](https://discourse.paraview.org/u/Joachim_P)
#### Post date: [November 25, 2020, 10:41pm UTC](https://discourse.paraview.org/t/writing-tensors-in-vtk/5889/2 "2020-11-25T22:41:00Z")

</div>

Victor,  
VTK tensors can have 6 or 9 components.  
9 components are the default. If your tensor field has 6 components, it should be declared as `TENSORS6` instead of `TENSORS`.  
Hope this helps,  
J.
