epfl-ecps / channelflow

Channelflow is a software system for numerical analysis of the incompressible fluid flow in channel geometries, written in C++ and MPI-parallelized.
GNU General Public License v2.0
65 stars 29 forks source link

diffops dot: fdotg not a vector when g is a tensor #30

Open gome0803 opened 2 years ago

gome0803 commented 2 years ago

Dear channelflow developers, I have a question concerning the function dot() in diffops.cpp I have troubles understanding the computation of fdotg when f.Nd= 3 and g.Nd = 9.

fdotg(nx, ny, nz, 0) += f(nx, ny, nz, i) * g(nx, ny, nz, ij)

shouldn’t it be fdotg(nx, ny, nz, i) += f(nx, ny, nz, j) * g(nx, ny, nz, ij) just like in dotgrad ?