GithubHelp home page GithubHelp logo

leakaufmann / cq-formation-nbody Goto Github PK

View Code? Open in Web Editor NEW

This project forked from calculquebec/cq-formation-nbody

0.0 0.0 0.0 73 KB

Code source pour une réalisation séquentielle du problème à N corps gravitationnel

Makefile 2.05% C++ 82.06% Python 2.38% Cuda 13.52%

cq-formation-nbody's Introduction

This N body gravitational code is written in C++, the Makefile contains lines 
where you can specify the C++ compiler as well as any necessary compilation and 
linker flags. The resulting binary is called "nbody" and should be run with the 
command 
./nbody [parameter file]
An example of a parameter file is provided (parameters.txt); if no parameter 
file is supplied to the program, it runs with the default parameter values 
that are shown in the global.h header file. The program periodically writes 
out the particle positions to an MDL MOL file that can be visualized using a 
free tool like Jmol or PyMOL. 

The program is based on a direct (particle-particle) method and uses either 
the velocity Verlet or the fourth-order Runge-Kutta algorithm to numerically 
integrate the first-order system
x_i' = v_i
v_i' = \sum{j=1,j\ne i}^N m_j (x_i - x_j)/(eps + r_{ij}^2)^(3/2)
where x_i and v_i are the position and velocity of the i-th particle, m_i its
mass and r_ij is the L2 distance between x_i and x_j. The force softening
parameter eps is included to avoid singularities caused by near collisions of 
the particles and should be small and positive. The integration algorithm 
used is controlled by the compilation flag VERLET. The particle motions are 
confined to a toroidal box when the parameter "finite_domain" is set to true. 
The console output consists of the time value and total energy per particle, 
written out every hundred timesteps. 
      

cq-formation-nbody's People

Contributors

bartoldeman avatar ericgig avatar plstonge avatar stubbsda avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.