C's implicit type conversion works from left-to-right, but rvalues are
evaluated before being cast to the same type as the lvalue.

Thus, (size_t) = (int) * (int)
could receive a bogus value if (int) * (int) overflowed.

Note that because the casting happens left-to-right, in situations where
integer overflow happens (int) * (int) * (int64_t) will overflow
but (int64_t) * (int) * (int) will not.

This was happening for Nmesh >= 1536. To fix this, make all index
variables size_t, so that no casting is happening.

Also note that in C++ unsigned integer overflow is defined but signed integer
overflow is not. Hence it is size_t to be safe, not int64_t.