summaryrefslogtreecommitdiff
path: root/soft_spheres.cpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2021-11-12 11:51:54 +0100
committerJaron Kent-Dobias <jaron@kent-dobias.com>2021-11-12 11:51:54 +0100
commitc616bc12f23162b6b1714ea936f4a2dafd0780a3 (patch)
tree890d7547ea67fd79d85285def8b00294300eac5d /soft_spheres.cpp
parent4beb0e8597060852dc82a2e2da43eaa5926d24a2 (diff)
downloadspheres-c616bc12f23162b6b1714ea936f4a2dafd0780a3.tar.gz
spheres-c616bc12f23162b6b1714ea936f4a2dafd0780a3.tar.bz2
spheres-c616bc12f23162b6b1714ea936f4a2dafd0780a3.zip
Starting implementing collective moves.
Diffstat (limited to 'soft_spheres.cpp')
-rw-r--r--soft_spheres.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/soft_spheres.cpp b/soft_spheres.cpp
index 148812f..10e90c7 100644
--- a/soft_spheres.cpp
+++ b/soft_spheres.cpp
@@ -24,7 +24,7 @@ int main(int argc, char* argv[]) {
unsigned N = 1200;
double R = 0.025;
double ε = 0.005;
- unsigned steps = 1e4;
+ unsigned steps = 1e2;
double β = 0.5;
initializeAnimation(argc, argv);
@@ -40,7 +40,7 @@ int main(int argc, char* argv[]) {
}
// std::cout << m.randomClusterSwap(β, r) << std::endl;
-
+
if (i % 3 == 0)
draw(m);
}
@@ -51,10 +51,17 @@ int main(int argc, char* argv[]) {
}
unsigned k = m.randomClusterSwap(β, r);
- if (k != 0 && k != N) {
- std::cout << k << std::endl;
+ std::cout << k << std::endl;
+
+ if (k > 0 && k < N) {
+ draw(m);
+ getchar();
}
-
+
+ for (SoftSphere<2, n>& p : m.particles) {
+ p.m = false;
+ }
+
if (i % 3 == 0)
draw(m);
}