
t8code is a software library for efficient management of dynamic adaptive grids and data on them.Any simulation software that uses grids can benefit from t8code as a plugin, because it supports and enhances various simulation applications. t8code is very general-purpose because it supports just about any grid needed by numerical simulation software.
t8code is a C/C++ library to manage parallel adaptive meshes with various element types. t8code uses a collection (a forest) of multiple connected adaptive space-trees in parallel and scales to at least one million MPI ranks and over 1 Trillion mesh elements.
t8code is an open source plugin for any simulation software
t8code (written in lower case and pronounced “tetcode”) is a software library for efficient management of dynamic adaptive grids and data on them. Any simulation software that uses grids can benefit from t8code as a plugin, because it supports and enhances various simulation applications. t8code is very general-purpose because it supports just about any grid needed by numerical simulation software.
t8code is being developed by the department of High-Performance Computing at the Institute for Software Technology, with the participation of the University of Bonn. At the German Aerospace Center (DLR), t8code is already successfully used in several projects. The current areas of application range from earth system modeling and the simulation of atmospheric chemistry to the improvement of 3D printing processes.

Adaptive grids as a basis for flow simulations
Computer simulations of weather forecasts, climate models, or flows often use grids as the basis for calculations. The computational domain is first divided into a grid of different geometric shapes such as triangles, quadrilaterals, hexahedra, or tetrahedra. The finer the resolution of this grid, the more accurate the results of the simulation.
However, finer resolution also increases computation time and memory requirements. A grid can be called adaptive when they selectively refine only in places where fine resolution is needed, and remain coarser in other places. Grid refinement is useful in the example of a weather simulation along a cold front. If the grid resolution changes during the simulation – the cold front moves – this is called dynamic adaptive grids. The subdivision into fine and coarse computational domains allows to deal extremely efficiently with the available computational capacity.
t8code extends successful technologies

t8code is extremely efficient and works even with the extremely large processor counts of current supercomputers. In practical applications with up to one million parallel processes and grids with more than one trillion (10 to the power of 12) elements, t8code has demonstrated its efficiency. t8code achieves this efficiency by using a tree-based approach with the help of space-filling curves. These data structures are both highly computationally and memory efficient and geometrically very flexible. t8code extends this successful technology, which was previously only available for quadrilateral and hexahedral lattices, to general element shapes. Thus, t8code in 3D supports the particularly frequently used shapes tetrahedron, hexahedron, prisms and pyramids and also allows the combination of different shapes within one grid.
Potential for the industry
t8code is ideally suited as a scalable alternative to the unstructured grids commonly used in industry. t8code promises shorter runtimes – and thus lower costs – better resolutions, and universally applicable code for simulation software.
t8code (spoken as “tetcode”) is a C/C++ library to manage parallel adaptive meshes with various element types. t8code uses a collection (a forest) of multiple connected adaptive space-trees in parallel and scales to at least one million MPI ranks and over 1 Trillion mesh elements.
t8code is intended to be used as a thirdparty library for numerical simulation codes or any other applications that require meshes.
Here, you can find a description of the interface, functionality and features of t8code version 1.0.

Key-features
Among other features, t8code offers the following functionalities:
- Managing distributed adaptive meshes over complex domain geometries
- Adapting meshes according to user given refinement/coarsening criteria
- Establishing a 2:1 balance condition
- (Re-)partitioning/load-balancing a mesh (and associated data) among MPI ranks
- Managing ghost (halo) elements and data
- Searching the mesh efficiently
- Supporting curved meshes
Getting started
Get started using t8code now. We have a collection of Tutorials that help you understand the data structures and algorithms of t8code and how to best connect it to your application. Additionally our large collection of examples demonstrates the features of t8code.
