From 901b9f16494f37890be17ef4bb66e6efc6873340 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Fri, 10 Feb 2017 12:18:11 -0500 Subject: changed code to rely on jst --- src/spheres_poly/spheres.cpp | 64 -------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 src/spheres_poly/spheres.cpp (limited to 'src/spheres_poly/spheres.cpp') diff --git a/src/spheres_poly/spheres.cpp b/src/spheres_poly/spheres.cpp deleted file mode 100644 index 9b14b01..0000000 --- a/src/spheres_poly/spheres.cpp +++ /dev/null @@ -1,64 +0,0 @@ -//=========================================================== -//=========================================================== -//=========================================================== -// -// Molecular dynamics simulation of hardspheres -// -//=========================================================== -//=========================================================== -//=========================================================== - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "box.h" -#include "sphere.h" -#include "event.h" -#include "heap.h" - - -double *spherespp(int N, double bidispersityratio, double bidispersityfraction, double maxpf, double maxpressure, double maxcollisionrate) -{ - int eventspercycle = 20; // # events per sphere per cycle - double initialpf = 0.01; // initial packing fraction - double temp = 0.2; // initial temp., use 0 for zero velocities - double growthrate = 0.001; // growth rate - double massratio = 1.; // ratio of sphere masses - int hardwallBC = 0; // 0 for periodic, 1 for hard wall BC - - double d, r; // initial diameter and radius of spheres - - r = pow(initialpf*pow(SIZE, DIM)/(N*VOLUMESPHERE), 1.0/((double)(DIM))); - - box b(N, r, growthrate, maxpf, bidispersityratio, - bidispersityfraction, massratio, hardwallBC); - - b.CreateSpheres(temp); - - - while ((b.collisionrate < maxcollisionrate) && (b.pf < maxpf) && (b.pressure < maxpressure)) - { - b.Process(eventspercycle*N); - b.Synchronize(true); - } - - double *data = (double *)malloc(DIM * N * sizeof(double)); - - b.WriteConfiguration(data); - - return data; -} - -extern "C" { - double *spheres(int N, double bidispersityratio, double bidispersityfraction, double maxpf, double maxpressure, double maxcollisionrate) { - return spherespp(N, bidispersityratio, bidispersityfraction, maxpf, maxpressure, maxcollisionrate); - } -} - - -- cgit v1.2.3-70-g09d2