Set initial conditions for tensor-element

As a Tensor element will have 3 * 3 entries if you use a cell with geometric/topological dimension 3.
The shape of values should be equal to the flattened version of the the tensor, i.e. values[0] = tensor[0,0], values[1] = tensor[0,1], values[2] = tensor[0,2], values[3] = tensor[1,0] etc.

Because this was just to illustrate to you how you should assign values for each component of the tensor.

Then you should create values with zeros, as I already showed

and set

values[0,:] = 1
values[3,:] = 1
values[6,:] = 1

You should verify this by writing F to file after interpolating data into it.