summaryrefslogtreecommitdiff
path: root/euclidean.hpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2020-02-21 11:27:59 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2020-02-21 11:27:59 -0500
commit5fe3e194a2d4690b541ecee8ea342681c4eeaa6c (patch)
tree35036a00633162fc2b7fa0486e36dbec85d7490e /euclidean.hpp
parent5c8ee653bf9fa7ea6381d4313b3f80ea31d442a8 (diff)
downloadspace_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.hpp10
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;