-
Notifications
You must be signed in to change notification settings - Fork 129
Home
Athena++ is a complete re-write of the Athena astrophysical magnetohydrodynamics (MHD) code into C++. Compared to Athena version4.2 (written in C), the Athena++ code has (1) much more flexible coordinate and grid options, including adaptive mesh refinement, (2) new physics including general relativity, (3) significantly improved performance and scalability, and (4) improved source code clarity and modularity through the use of advanced features of the C++ language.
The code is freely available to the community through this public github repository. New features are always under development in private branches; these too will be made public once they are thoroughly tested.
The current public version supports the following physics
- compressible hydrodynamics and MHD in 1D, 2D, and 3D
- special relativistic hydrodynamics and MHD
In addition, this version supports the following grid and algorithm options
- Cartesian, cylindrical, or spherical polar coordinates
- static or adaptive mesh refinement in any coordinate system
- mixed parallelization with both OpenMP and MPI
- a task-based execution model for improved load balancing and scalability
Documentation is provided using the wiki pages
See the Athena++ Github pages for additional supporting material (like test suites, performance metrics, etc.)
* Quick note: how to run a MPI job Specify the size of meshblocks in the input file so that the computational domain is divided evenly among processes. The following example allows you to run a 256^3 simulations on (up to) 64 processors. ` nx1 = 256 nx2 = 256 nx3 = 256 nx1 = 64 nx2 = 64 nx3 = 64 ` The code generates only one restarting file using MPI-IO, but for other outputs, each meshblock creates one output file. So you have to combine them by yourself later if you want.
- Useful technique for debugging:
Add
#include <fenv.h>
andfeenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
somewhere in the main.cpp, then the code signals floating point exceptions. This is very useful to find a pontential problem. You can catch the signal and investigate it with gdb if you compile the code with -g option.
Getting Started
User Guide
- Configuring
- Compiling
- The Input File
- Problem Generators
- Boundary Conditions
- Coordinate Systems and Meshes
- Running the Code
- Outputs
- Using MPI and OpenMP
- Static Mesh Refinement
- Adaptive Mesh Refinement
- Load Balancing
- Special Relativity
- General Relativity
- Passive Scalars
- Shearing Box
- Diffusion Processes
- General Equation of State
- FFT
- Multigrid
- High-Order Methods
- Super-Time-Stepping
- Orbital Advection
- Rotating System
- Reading Data from External Files
- Non-relativistic Radiation Transport
- Cosmic Ray Transport
- Units and Constants
Programmer Guide