Skip to content

lvainio/n-body-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

N-Body Simulation

This repository contain four different implementations of N-body simulation in Java.

Usage:

Compile:

  • javac *.java

Sequential:

  • java NBodySimulation [default settings]
  • java NBodySimulation <numBodies> <numSteps>
  • java NBodySimulation <numBodies> <numSteps> -g -r

Parallel:

  • java NBodySimulation [default settings]
  • java NBodySimulation <numBodies> <numSteps> <numWorkers>
  • java NBodySimulation <numBodies> <numSteps> <numWorkers> -g -r

Barnes-Hut sequential:

  • java NBodySimulation [default settings]
  • java NBodySimulation <numBodies> <numSteps> <theta>
  • java NBodySimulation <numBodies> <numSteps> <theta> -g -r

Barnes-Hut parallel:

  • java NBodySimulation [default settings]
  • java NBodySimulation <numBodies> <numSteps> <theta> <numWorkers>
  • java NBodySimulation <numBodies> <numSteps> <theta> <numWorkers> -g -r

The flags "-g" and "-r" can be set after the other arguments:

  • g: the simulation will be shown in a gui.
  • r: the bodies will be generated in a ring formation around a central, more massive body.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages