SyTen

◆ makeIdentity() [2/4]

template<typename Scalar >
void syten::makeIdentity ( DenseTensor< 3, Scalar > &  a,
Index  offset = 0 
)
inline

Makes a rank-3 tensor a shifted identity tensor, \( A_{ijk} = 1 \mathrm{\; if\;} (i * \mathrm{dim}(2) + j + \mathrm{\; offset \;}) \equiv k \mathrm{\; else \;} 0 \).

References syten::DenseTensor< rank, Scalar >::dim(), and makeZero().

+ Here is the call graph for this function: