diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2020-02-21 11:27:59 -0500 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2020-02-21 11:27:59 -0500 |
commit | 5fe3e194a2d4690b541ecee8ea342681c4eeaa6c (patch) | |
tree | 35036a00633162fc2b7fa0486e36dbec85d7490e /euclidean.hpp | |
parent | 5c8ee653bf9fa7ea6381d4313b3f80ea31d442a8 (diff) | |
download | space_wolff-5fe3e194a2d4690b541ecee8ea342681c4eeaa6c.tar.gz space_wolff-5fe3e194a2d4690b541ecee8ea342681c4eeaa6c.tar.bz2 space_wolff-5fe3e194a2d4690b541ecee8ea342681c4eeaa6c.zip |
Fixed the periodic sphere code to work with the new backend and implemented saving cluster flip information
Diffstat (limited to 'euclidean.hpp')
-rw-r--r-- | euclidean.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/euclidean.hpp b/euclidean.hpp index 49ec2d9..b1ce2c6 100644 --- a/euclidean.hpp +++ b/euclidean.hpp @@ -95,6 +95,16 @@ public: return s_new; } + Vector<T, D> act(const Vector<T, D>& s) const { + Vector<T, D> s_new = t + r * s; + + for (unsigned i = 0; i < D; i++) { + s_new(i) = fmod(L + s_new(i), L); + } + + return s_new; + } + TorusGroup act(const TorusGroup& x) const { Vector<T, D> tnew = r * x.t + t; Matrix<T, D> rnew = r * x.r; |