[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Random vectors
From: |
Klaus Huthmacher |
Subject: |
Re: [Help-gsl] Random vectors |
Date: |
Wed, 30 Apr 2014 09:10:11 +0200 |
User-agent: |
SquirrelMail/1.4.23 [SVN] |
Dear Éric,
interesting question.
At first I thought: What random number genererator are you using? It seems
that the Mersenne Twister is standard but there are several others.
Second, have you tried out the random engine of C++11:
http://www.cplusplus.com/reference/random/
I appended a minimal example.
Best wishes and keep us informed. :)
-- Klaus.
> Dear all,
>
> I wonder how to generate random vectors with GSL.
> I'm aware of the *gsl_ran_dir_nd *routine but the numbers are normalized.
> I need to generate random velocities for a given temperature of N
> particles.
> I currently call *gsl_ran_gaussian* 3N times.
> That's too expensive.
> I'd like to generate a 3N vector at once.
> Is there anyway to do this with GSL?
>
> Thanks,
>
> Éric.
>
> --
> Éric Germaneau (???), Specialist
> Center for High Performance Computing
> Shanghai Jiao Tong University
> Room 205 Network Center, 800 Dongchuan Road, Shanghai 200240 China
> M:address@hidden P:+86-136-4161-6480 W:http://hpc.sjtu.edu.cn
>
mb.cpp
Description: Text Data