From afabc46eabb4c113a17af04e8d12fadf2672aa2b Mon Sep 17 00:00:00 2001 From: PabloIbannez Date: Mon, 25 Dec 2023 10:10:58 +0100 Subject: [PATCH] Add transpose to tensor3 --- src/utils/tensor.cuh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils/tensor.cuh b/src/utils/tensor.cuh index 0acba92c..488f656a 100644 --- a/src/utils/tensor.cuh +++ b/src/utils/tensor.cuh @@ -40,6 +40,12 @@ namespace uammd{ VECATTR real trace(){return xx+yy+zz;} + VECATTR tensor3 transpose(){ + return tensor3(xx,yx,zx, + xy,yy,zy, + xz,yz,zz); + } + };