diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2017-02-10 12:18:11 -0500 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2017-02-10 12:18:11 -0500 |
commit | 901b9f16494f37890be17ef4bb66e6efc6873340 (patch) | |
tree | 03e5f1769cbdb89eb1b4c45c16dc7d867184efaf /src/spheres_poly/spheres.cpp | |
parent | 1e1fdfc2e3892667bccaf317a01defd8832041c7 (diff) | |
download | fuse_networks-901b9f16494f37890be17ef4bb66e6efc6873340.tar.gz fuse_networks-901b9f16494f37890be17ef4bb66e6efc6873340.tar.bz2 fuse_networks-901b9f16494f37890be17ef4bb66e6efc6873340.zip |
changed code to rely on jst
Diffstat (limited to 'src/spheres_poly/spheres.cpp')
-rw-r--r-- | src/spheres_poly/spheres.cpp | 64 |
1 files changed, 0 insertions, 64 deletions
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 <iostream> -#include <math.h> -#include <fstream> -#include <vector> -#include <time.h> -#include <string.h> -#include <stdlib.h> -#include <cstdlib> - -#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); - } -} - - |