Hi, I wonder how can I properly assign tensor-valued function to another tensor function (with different shape). Here is the minimal code
from dolfin import *
dim = 2
N = 10
mesh = UnitSquareMesh(5,5)
W = TensorFunctionSpace(mesh, 'DG', 1, shape=(dim,dim))
WW = TensorFunctionSpace(mesh, 'DG', 1, shape=(dim,dim,N))
Bs = Function(W)
B = Function(WW)
Bs = interpolate(Expression((("0", "1"),
("3", "4"))), W)
assign(B.sub(???), Bs)
In particular, I would like to have something like the following assigment:
assign(B.sub(:,:,0), Bs(:,:))
My question is - is this a correct way? If so, then what should I insert instead of '???' ? If not, what is the right way?
Thanks a lot :)