AstroNbodySim.jl
A年astrophysical simulation code library under GPL 3.0
Installation
]add AstroNbodySim
or
]add https://github.com/JuliaAstroSim/AstroNbodySim.jl
You might need to install NVIDIA CUDA toolkit
Package Features
- Compute with units
- User-friendly
- Well documented
- Readable programming
- Vectorized array operations
- Dispatch on types for various simulation settings
Float16
,Float32
,Float64
,Int128
,BigFloat
,Measurement
, etc.
- Cross-platform:
Linux
,Windows
,MacOS
. Easy to deploy - Hybrid Parallelism: multi-threading, distributed parallelism, GPU acceleration
- Modularity and Versatility: 10+ packages, designed for general purposes, highly extentable
- Realtime visualzation (interactive)
- Auto-test workflow
Development Guide
- It is highly recommended to use latest
master
branch of related packages (in JuliaAstroSim), first clone: dev --local [absolute path]
to install packages mentioned above, for examplepkg> dev --local /home/user/work/AstroNbodySim
VS Code
as well as itsJulia Extension
is convenient to use, andRevise.jl
will update changes on the run.
First Time User Guide
Read documentation of
Julia
: https://docs.julialang.org/en/v1/Read documentations and READMEs of related packages
Try examples in
AstroNbodySim/examples
. First install packages used in examples byAstroNbodySim/examples/install_pkgs.jl
. The default output directory of all examples is./output
. The programme would make a directory if the user-defined output path does not exist to avoid unnecessary errors.To interrupt a running simulation, create a file named
stop
in the output directory (same with Gadget2):echo > output/stop
It's convenient to check out supported function arguments and keywords by
help?
inREPL
, for example,help?> prepare search: prepare preprocessdata function prepare(simulation::Simulation) Do the following operations: 1. Say hello 2. Preprocess data 3. Check the output directory, make a new one if not exist 4. Remove "stop" file 5. Set the global preferred units 6. Set up logging, timing, profiling and analyzing log files
Supporting and Citing
This software was developed as part of academic research. If you would like to help support it, please star the repository. If you use this software as part of your research, teaching, or other activities, please cite the following:
%TODO WIP