From 100b8f3534a0aebda1a9467da5e7f5d5b75b17aa Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 28 Jan 2020 15:15:35 +0100 Subject: [PATCH] cellrotations are now structs, and include inverses --- crystal.cpp | 2 +- geometry.cpp | 8 +++++++- reg3.cpp | 9 +++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/crystal.cpp b/crystal.cpp index 08df0280..6765a9e4 100644 --- a/crystal.cpp +++ b/crystal.cpp @@ -633,7 +633,7 @@ struct hrmap_crystal : hrmap_standard { for(auto& cr: cgi.cellrotations) { - transmatrix U = T * cr.first; + transmatrix U = T * cr.M; ld go = hdist0(U * tC0(reg3::adjmoves[h->c.spin(d)])); if(go > 1e-2) continue; diff --git a/geometry.cpp b/geometry.cpp index 61a94917..b2b9c296 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -294,7 +294,13 @@ hpcshape vector> symmetriesAt; - vector > > cellrotations; + struct cellrotation_t { + transmatrix M; + vector mapping; + int inverse_id; + }; + + vector cellrotations; #ifndef SCALETUNER static constexpr diff --git a/reg3.cpp b/reg3.cpp index 29cce980..94de50e2 100644 --- a/reg3.cpp +++ b/reg3.cpp @@ -1267,9 +1267,14 @@ EX void generate_cellrotations() { for(int x=0; x