summaryrefslogtreecommitdiff
path: root/soft_spheres.cpp
diff options
context:
space:
mode:
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);
}