| 515 | //- Return the symmetric part of a tensor |
| 516 | template<class Cmpt> |
| 517 | inline SymmTensor<Cmpt> symm(const Tensor<Cmpt>& t) |
| 518 | { |
| 519 | return SymmTensor<Cmpt> |
| 520 | ( |
| 521 | t.xx(), 0.5*(t.xy() + t.yx()), 0.5*(t.xz() + t.zx()), |
| 522 | t.yy(), 0.5*(t.yz() + t.zy()), |
| 523 | t.zz() |
| 524 | ); |
| 525 | } |
| 526 | |
| 527 | |
| 528 | //- Return twice the symmetric part of a tensor |