All Projects → drons → Nbody

drons / Nbody

N body gravity attraction problem solver

Projects that are alternatives of or similar to Nbody

euler2d kokkos
Simple 2d finite volume solver for Euler equations using c++ kokkos library
Stars: ✭ 27 (-32.5%)
Mutual labels:  openmp, cuda
monolish
monolish: MONOlithic LInear equation Solvers for Highly-parallel architecture
Stars: ✭ 166 (+315%)
Mutual labels:  openmp, cuda
allgebra
Base container for developing C++ and Fortran HPC applications
Stars: ✭ 14 (-65%)
Mutual labels:  openmp, cuda
Ctranslate2
Fast inference engine for OpenNMT models
Stars: ✭ 140 (+250%)
Mutual labels:  openmp, cuda
Gprmax
gprMax is open source software that simulates electromagnetic wave propagation using the Finite-Difference Time-Domain (FDTD) method for numerical modelling of Ground Penetrating Radar (GPR)
Stars: ✭ 268 (+570%)
Mutual labels:  cuda, simulation
Occa
JIT Compilation for Multiple Architectures: C++, OpenMP, CUDA, HIP, OpenCL, Metal
Stars: ✭ 230 (+475%)
Mutual labels:  openmp, cuda
gpubootcamp
This repository consists for gpu bootcamp material for HPC and AI
Stars: ✭ 227 (+467.5%)
Mutual labels:  openmp, cuda
FGPU
No description or website provided.
Stars: ✭ 30 (-25%)
Mutual labels:  openmp, cuda
crowdsource-video-experiments-on-android
Crowdsourcing video experiments (such as collaborative benchmarking and optimization of DNN algorithms) using Collective Knowledge Framework across diverse Android devices provided by volunteers. Results are continuously aggregated in the open repository:
Stars: ✭ 29 (-27.5%)
Mutual labels:  openmp, cuda
mbsolve
An open-source solver tool for the Maxwell-Bloch equations.
Stars: ✭ 14 (-65%)
Mutual labels:  openmp, cuda
Babelstream
STREAM, for lots of devices written in many programming models
Stars: ✭ 121 (+202.5%)
Mutual labels:  openmp, cuda
Stdgpu
stdgpu: Efficient STL-like Data Structures on the GPU
Stars: ✭ 531 (+1227.5%)
Mutual labels:  openmp, cuda
Hoomd Blue
Molecular dynamics and Monte Carlo soft matter simulation on GPUs.
Stars: ✭ 143 (+257.5%)
Mutual labels:  cuda, simulation
HeCBench
software.intel.com/content/www/us/en/develop/articles/repo-evaluating-performance-productivity-oneapi.html
Stars: ✭ 85 (+112.5%)
Mutual labels:  openmp, cuda
Mpm
Simulating on GPU using Material Point Method and rendering.
Stars: ✭ 61 (+52.5%)
Mutual labels:  cuda, simulation
FLAMEGPU2
FLAME GPU 2 is a GPU accelerated agent based modelling framework for C++ and Python
Stars: ✭ 25 (-37.5%)
Mutual labels:  simulation, cuda
Amgcl
C++ library for solving large sparse linear systems with algebraic multigrid method
Stars: ✭ 390 (+875%)
Mutual labels:  openmp, cuda
Arraymancer
A fast, ergonomic and portable tensor library in Nim with a deep learning focus for CPU, GPU and embedded devices via OpenMP, Cuda and OpenCL backends
Stars: ✭ 793 (+1882.5%)
Mutual labels:  openmp, cuda
Deformable Convolution V2 Pytorch
Deformable ConvNets V2 (DCNv2) in PyTorch
Stars: ✭ 963 (+2307.5%)
Mutual labels:  cuda
Memo
Decorators that help you remember.
Stars: ✭ 34 (-15%)
Mutual labels:  simulation

N-body simulation program

Build Status Build Status codecov Coverity Scc Count Badge codefactor.io

Features

Integration methods

Method alias Order Description Implicit Dynamic step
adams up to 5 Adams–Bashforth method
bs 2*max_level Bulirsch-Stoer method ⭐️
euler 1 Classic Euler method
midpoint 2 Midpoint method
midpoint-st 2 Midpoint method (Stetter modification. See 1) p. 228) ⭐️
rk4 4 Classic Runge-Kutta 4-order method
rk_butcher - Runge-Kutta method with arbitrary Butcher tableu
rkck 5 Runge-Kutta-Cash–Karp 5-order method ⭐️
rkdp 5 Runge-Kutta-Dormand–Prince 5-order method ⭐️
rkdverk 5 Runge-Kutta-Verner 5-order method. See 1) p. 181 ⭐️
rkf 7 Runge-Kutta-Fehlberg 7-order method. See 1) p. 180 ⭐️
rkfeagin10 10 Runge-Kutta-Feagin 10-order method. See 4) ⭐️
rkfeagin12 12 Runge-Kutta-Feagin 12-order method. ⭐️
rkfeagin14 14 Runge-Kutta-Feagin 14-order method. ⭐️
rkgl 6 Gauss–Legendre 6-order method ⭐️
rklc 4 Runge-Kutta-Lobatto IIIC 4-order method ⭐️ ⭐️
trapeze 2 Trapeze method ⭐️

Compute engines

Engine alias Approximate Description
ah ⭐️ Single threaded engine with Ahmad-Cohen universe force simulation. See 2)
block Multi-threaded (OpenMP) engine with block-by-block force computation
cuda Parallel CUDA engine
cuda_bh ⭐️ CUDA engine with Burnes-Hut force simulation
cuda_bh_tex ⭐️ CUDA engine with Burnes-Hut force simulation and with bodies tree stored at texture memory. Possible tree layout is 'heap' and 'heap_stackless'
opencl Parallel OpenCL engine
opencl_bh ⭐️ Parallel OpenCL engine with Burnes-Hut force simulation
openmp Multi-threaded (OpenMP) engine
simple Simple single threaded engine
simple_bh ⭐️ Multi-threaded (OpenMP) engine with Burnes-Hut force simulation

How to run

Simulation

To run n-body problem simulation use 'nbody-simulation' programm.

Simulation control
Argument Description
--stars_count Stars count
--box_size 'Universe' box size.
--output Output stream name.
--resume Stream name to resume (in this case output and initial_state are ignored).
--initial_state Optional initial state file
--initial_type Initial state type. Possible values are: Zeno, G1, SI, ADK. See initial state types table.
--max_part_size Max stream file size (splits a stream into multiple files).
--max_time Max simulation time.
--dump_step Time step to dump simulation state to stream.
--check_step Time step to verify the fundamental laws of physics. Conservation of impulse [P], angular momentum [L], energy [E], mass center velocity [V].
--check_list List of fundamental laws of physics to check. For example --check_list=PL to check only conservation of impulse [P] and angular momentum [L].
--verbose Print detailed simulation information.
Initial state types
Type Description
Zeno File in 'Zeno' format. Can be created with snapascii tool.
G1 Plane text table with Rx Ry Rz Vx Vy Vz M values. Space as separator.
SI Plane text table same format as G1. Units are meter, second, kilogram. On load mass will be multiplied by MassFactorSI to convert to G1 type.
ADK Plane text table same format as G1. Units are astronomical unit, day, kilogram. On load mass will be multiplied by MassFactorAuDayKg to convert to G1 type.
Engine control arguments are:
Argument Description
--engine Compute engine type.
--distance_to_node_radius_ratio Simulation accuracy control for Burnes-Hut engines.
--traverse_type Space tree traverse type for Burnes-Hut engine. Possible values are cycle or nested_tree.
--tree_layout Space tree layout type for Burnes-Hut engine. Possible values are tree or heap.
--full_recompute_rate Full force recompute rate in cucles (Ahmad-Cohen engine).
--max_dist The maximum distance at which the force is calculated completely at each step (Ahmad-Cohen engine).
--min_force The minimum force of attraction at which it is calculated completely at each step (Ahmad-Cohen engine).
--device Platforms/devices list for OpenCL based engines. Format: Platform1_ID:Device1,Device2;Platform2_ID:Device1,Device2... For example: --device=0:0,1 - first and second devices from first platform (with same context), --device=0:0;0:1 - first and second devices from first platform (with separate contexts)
--oclprof Enable OpenCL profile
--block_size Data block size to load at local OpenCL/CUDA memory
Solver control arguments are:
Argument Description
--solver Solver type.
--max_step Solvers max time step
--min_step Embedded solvers min time step
--rank Adams–Bashforth solver rank (1...5).
--correction Kahan summation at each integration step (for now at Adams–Bashforth and Runge-Kutta solvers)
--starter_solver Adams–Bashforth starter solver.
--refine_steps_count Refine step count for implicit solvers.
--error_threshold Step error threshold for solvers with dynamic step. If the error at the current step is greater than the threshold, then we decrease the time step and repeat the step.
--max_recursion Max recursion level for embeded solvers.
--substep_subdivisions Number of embeded solver substeps into which the current step is divided at the next level of recursion when the error greater than error_threshold.
--max_level Maximum extrapolation table size for Bulirsch-Stoer solver

Player

To view simulation results run 'nbody-player' programm.

Argument Description
--input Input stream name.
--check_list List of fundamental laws of physics to check. For example --check_list=PL to check only conservation of impulse [P] and angular momentum [L].

Other parameters controlled via UI.

Gallery

GCS GCS GCS GCS GCS

Refs

  1. Hairer, Ernst; Nørsett, Syvert Paul; Wanner, Gerhard (1993), Solving ordinary differential equations I: Nonstiff problems, Berlin, New York
  2. A Numerical Integration Scheme for the N-Body Gravitational Problem A. AHMAD AND L. COHEN 1973
  3. Задача N тел или как взорвать галактику не выходя из кухни
  4. Feagin T. A tenth-order Runge–Kutta method with error estimate. In: Proc. of the IAENG Conf. on Scientific Computing. Hong Kong, 2007.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].