| 198 | //- Inner-product between two tensors |
| 199 | template<class Cmpt> |
| 200 | inline typename innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt>>::type |
| 201 | operator&(const Tensor2D<Cmpt>& t1, const Tensor2D<Cmpt>& t2) |
| 202 | { |
| 203 | return Tensor2D<Cmpt> |
| 204 | ( |
| 205 | t1.xx()*t2.xx() + t1.xy()*t2.yx(), |
| 206 | t1.xx()*t2.xy() + t1.xy()*t2.yy(), |
| 207 | |
| 208 | t1.yx()*t2.xx() + t1.yy()*t2.yx(), |
| 209 | t1.yx()*t2.xy() + t1.yy()*t2.yy() |
| 210 | ); |
| 211 | } |
| 212 | |
| 213 | //- Inner-product between a tensor and a vector |
| 214 | template<class Cmpt> |