-
Notifications
You must be signed in to change notification settings - Fork 119
Static Mesh Refinement
The grid structure in Athena++ is completely different from Athena. Athena used a grid structure like Berger & Colella (1989), in which rectangular finer grids can be placed anywhere in the computing domain. Although the terminology about mesh refinement is not well defined, here we call this a patch-based mesh refinement. In Athena++, we use so-called oct-tree-block based mesh refinement. In this approach, the computational domain is split into small MeshBlocks, and each MeshBlock can be refined into smaller eight (in 3D; four in 2D, two in 1D) MeshBlocks self-similarly. This approach is less flexible but much simpler, therefore it is easier to implement and achieve a better performance.
No reconfiguration of the code is required for using Static Mesh Refinement. Simply, write <refinement[n]> block(s) in the input file to specify regions covered by finer resolution.
<refinement1>
x1min=-0.1
x1max= 0.1
x2min=-0.1
x2max= 0.1
x3min=-0.1
x3max= 0.1
level=2
Here, the x?min and x?max set the region covered by this resolution, and level is specify the required resolution. The root level is 0, and Level n means it is 2^n times finer than the root grid. There is no need to specify all the refinement regions. The code automatically calculate the minimal set of MeshBlocks required to cover the requested regions, so that MeshBlocks contact with other MeshBlocks on the same level or one level different. Also, it automatically takes care of periodic boundaries. Therefore, a user only needs to specify the regions where to be refined.
Also do not forget to set the <meshblock> size (see Using MPI and OpenMP), otherwise the meshblock size is the same as the whole root grid. For a better flexibility (i.e., higher adaptivity, more efficient grid generation), smaller MeshBlocks are better but it is trade-off between performance and flexibility. We recommend at least 16^3 cells per MeshBlock.
Because the code automatically generates MeshBlocks, it is difficult for users to predict how many MeshBlocks exists, and how many processes are required for efficient parallel simulation.
In Athena, the refinement region is called Domain. Each Domain is divided into Grids and one Grid is corresponding to one process. In Athena++, this concept of Domain is discarded, and the computational domain (Mesh) is decomposed into MeshBlocks. The refinement level is now rather a property of each MeshBlock.
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
- High-Order Methods
- Super-Time-Stepping
- Orbital Advection
- Rotating System
- Reading Data from External Files
Programmer Guide