Is there a difference between
dot(u, v)
and
inner(u, v)
for vector-valued functions u, v?
u
v
Yes, inner(u, v)$=u_{ijk\ldots}v_{ijk\ldots}$, dot(u, v)$=u_{ijk\ldots n}v_{nmo\ldots}$ (summation implied).
Now I read "$u$, $v$ vector-valued", then answer is no:)
Can you give an trivial example about this?
V = VectorFunctionSpace(mesh, 'CG', 2) Q = FunctionSpace(mesh, 'CG', 1) u = Function(V) # velocity p = Function(Q) # pressure I = Identity(V.cell().d) T = -p*I + 2.0*mu*sym(grad(u))) # Cauchy stress (for isochoric motion of Newtonian fluid) traction = dot(T, n) # for n unit normal of respective surface stress_power = inner(T, grad(u))
When u, v are vectors (only have one index ) not tensor. inner(u , v) = u_i v_i dot(u,v) = u_i v_i Does than mean they are the same or my understanding was wrong? Thanks :)
Does than mean they are the same or my understanding was wrong?
Sure.
The are the same for first order tensors, but not for second order tensors.
inner(u_ij, v_kl) = u_ij v_ij dot(u_ij, v_k) = u_ij v_jk