Hello, Is the following jump operator implemented in fenics
$$[ u ] = u^+ \otimes n^+ + u^- \otimes n^-$$
where u is a vector and
$$u \otimes n = (u_i n_j)_{(ij)}$$
Thank you
Shouldn't there be plus or minus sign between outer products in the first equation?
hoops ... very sorry for the mistakes.
[ u ] = u^+ \otimes n^+ + u^- \otimes u^-
u \otimes n = (u_i n_j)_{(ij)}
Ok, answer given. Please, edit question appropriately.
def tensor_jump(u, n): return outer(u('+'), n('+')) + outer(u('-'), n('-'))
Thank you very much !
jump(outer(u, n))
represents rather $u^+ \otimes n^+ - u^- \otimes n^-$ according to ufl/ufl/operators.py. Correct answer is
ufl/ufl/operators.py
Answer edited. One can mask it into jump(v, n) function using compound outer operator
jump(v, n)
outer
def tensor_jump(u, n): return jump(outer(u, n, n), n)
but that's rather obfuscation than simplification.
Or
def tensor_jump(u, n): dim = n.shape()[0] I = Identity(dim) return jump(outer(u, I), n)
It is clear with the definition given in ufl/ufl/operators.py. Thank you very much for your help.