From 62fbcbde7f89509d38455b9a521c74b0ec73d1b3 Mon Sep 17 00:00:00 2001 From: Chris Maffeo <cmaffeo2@illinois.edu> Date: Tue, 29 Oct 2019 12:52:10 -0500 Subject: [PATCH] Removed gsl from RigidBody::Boltzmann --- src/Makefile | 2 +- src/RandomGsl.h | 76 ------------------------------------------------- 2 files changed, 1 insertion(+), 77 deletions(-) delete mode 100644 src/RandomGsl.h diff --git a/src/Makefile b/src/Makefile index 379bfe1..23b9905 100644 --- a/src/Makefile +++ b/src/Makefile @@ -64,7 +64,7 @@ $(foreach SM,$(SMS), $(eval NV_FLAGS += -gencode arch=compute_$(SM),code=sm_$(SM $(foreach SM,$(SMPTXS), $(eval NV_FLAGS += -gencode arch=compute_$(SM),code=compute_$(SM)) ) NVLD_FLAGS := $(NV_FLAGS) --device-link -LD_FLAGS = -L$(LIBRARY) -lgsl -lcurand -lcudart -lcudadevrt -Wl,-rpath,$(LIBRARY) +LD_FLAGS = -L$(LIBRARY) -lcurand -lcudart -lcudadevrt -Wl,-rpath,$(LIBRARY) ### Sources CC_SRC := $(wildcard *.cpp) diff --git a/src/RandomGsl.h b/src/RandomGsl.h deleted file mode 100644 index 8970fe0..0000000 --- a/src/RandomGsl.h +++ /dev/null @@ -1,76 +0,0 @@ -///////////////////////////////////////////////////////////////////////// -// Author: Jeff Comer <jcomer2@illinois.edu> -#ifndef RANDOMGSL_H -#define RANDOMGSL_H - -#include <gsl/gsl_rng.h> -#include <gsl/gsl_randist.h> -#include "useful.h" - -class Random { - -private: - gsl_rng* gslRando; - -public: - - // default constructor - Random() { - init(0); - } - - // constructor with seed - Random(unsigned long seed) { - init(seed); - } - - ~Random() { - gsl_rng_free(gslRando); - } - - // reinitialize with seed - void init(unsigned long seed) { - gslRando = gsl_rng_alloc(gsl_rng_mt19937); - gsl_rng_set(gslRando, seed); - } - - // return a number uniformly distributed between 0 and 1 - float uniform() { - return gsl_rng_uniform(gslRando); - } - - long poisson(float lambda) { - return gsl_ran_poisson(gslRando, lambda); - } - - // return a number from a standard gaussian distribution - float gaussian() { - return gsl_ran_ugaussian(gslRando); - } - - // return a vector of gaussian random numbers - Vector3 gaussian_vector() { - return Vector3( gaussian(), gaussian(), gaussian() ); - } - - // return a random long - long integer() { - return gsl_rng_get(gslRando); - } - - // randomly order an array of whatever - template <class Elem> void reorder(Elem *a, int n) { - for (int i = 0; i < (n-1); i++) { - int ie = i + (integer()%(n-i)); - if (ie == i) continue; - // Swap. - const Elem e = a[ie]; - a[ie] = a[i]; - a[i] = e; - } - } -}; - -#endif - - -- GitLab