Subarrays can either be full rank or lesser rank. An optional third parameter to the Range constructor specifies a stride, so subarrays do not have to be contiguous. Prior to expression templates, use of overloaded operators meant generating temporary arrays, which caused huge performance losses. Operators Any operator which is meaningful for the array elements can be applied to arrays. Type promotion follows the standard C rules, with some modifications to handle complex numbers and user-defined types.
Users are free to declare their own tensor indices with different names if they prefer.
Unlike real tensor notation, repeated indices do not imply contraction. A ik B kj implies a summation over k . In each iteration, the velocity field is time-stepped according to the equation where , P , and are velocity, pressure, force, and advection. Implementing this equation using 4th-order accurate finite differencing in Fortran requires a set of mammoth equations with approximately 70 terms. This eliminates the need to represent each vector field as three separate arrays, common in Fortran implementations.