Hi,
I have an expression of the form
b = Expression(('x[0]', 'x[1]'))
and I would like to compute its element-wise mean value.
mean_val_b1 = assemble((1.0/cell_volume)*b[0]*wh*dx)
mean_val_b2 = assemble((1.0/cell_volume)*b[1]*wh*dx)
where
W = FunctionSpace(mesh, "DG", 0)
wh = TestFunction(W)
First of all, can I do that by using
W2 = VectorFunctionSpace(mesh, "DG", 0)
wh2 = TestFunction(W2)
In any case I would like to represent the element-wise mean value as a Function(W2).
How can I access the values of a W2-function (the 2D vector) at each dof?
Thank you in advance!