Hi guys,
in the context of DG methods, I want to be able to compute the average (or mean) of the product of trial and test function. For example, as follows:
Code:
V = VectorL2(mesh,order=2)
u = V.TrialFunction()
v = V.TestFunction()
uv = InnerProduct(u,v)
avg_uv = 0.5*( uv + uv.Other() )
This does not work. The exception suggests to use the Other()-operator on sub-trees.
Is the following meant with that?
Code:
avg_uv = 0.5*( InnerProduct(u,v) + InnerProduct(u.Other(),v.Other()) )
Because this does not lead to an error
Thanks for your help!
Best, Philipp