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 (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. It is licensed under the GNU General Public License 2.0 or later. Copyright (c) 2015 the developers.
t8code is intended to be used as a thirdparty library for numerical simulation codes or any other applications that require meshes.
t8code, or T8 for short, supports the following element types (also different types in the same mesh):
Among others, t8code offers the following functionalities:
t8code uses space-filling curves (SFCs) to manage the adaptive refinement and efficiently store the mesh elements and associated data. A modular approach makes it possible to exchange the underlying SFC without changing the high-level algorithms. Thus, we can use and compare different refinement schemes and users can implement their own refinement rules if so desired.
You find more information on t8code in the t8code Wiki.
For a brief introduction in AMR and the algorithms used by t8code we recommend to read our overview paper.
We provide a short guide to install t8code in our Wiki Installation guide.
To get familiar with t8code and its algorithms and data structures we recommend executing the tutorial examples in
and read the corresponding Wiki pages starting with Step 0 - Helloworld.
A sophisticated example of a complete numerical simulation is our finite volume solver of the advection equation in
t8code uses Doxygen to generate the code documentation. You can build the documentation with
and then find the generated files in the
You can also find the documentation of our releases on the t8code website.
julia> import Pkg; Pkg.add(["T8code", "MPI"])
to install the package on your system.
An (incomplete) list of publications related to t8code:
 Overview Paper: Holke, Johannes and Burstedde, Carsten and Knapp, David and Dreyer, Lukas and Elsweijer, Sandro and Ünlü, Veli and Markert, Johannes and Lilikakis, Ioannis and Böing, Niklas and Ponnusamy, Prasanna and Basermann, Achim (2023) t8code v. 1.0 - Modular Adaptive Mesh Refinement in the Exascale Era. SIAM International Meshing Round Table 2023, 06.03.2023 - 09.03.2023, Amsterdam, Niederlande. Full text available
 Original PhD thesis: Holke, Johannes Scalable algorithms for parallel tree-based adaptive mesh refinement with general element types, PhD thesis at University of Bonn, 2018, Full text available
 Tetrahedral and triangular Space-filling curve: Burstedde, Carsten and Holke, Johannes A Tetrahedral Space-Filling Curve for Nonconforming Adaptive Meshes, SIAM Journal on Scientific Computing, 2016, 10.1137/15M1040049
 Coarse mesh partitioning: Burstedde, Carsten and Holke, Johannes Coarse mesh partitioning for tree-based AMR, SIAM Journal on Scientific Computing, 2017, 10.1137/16M1103518
 Ghost computation: Holke, Johannes and Knapp, David and Burstedde, Carsten An Optimized, Parallel Computation of the Ghost Layer for Adaptive Hybrid Forest Meshes, SIAM Journal on Scientific Computing, 2021, 10.1137/20M1383033
 Geometry controlled refinement for hexahedra: Elsweijer, Sandro and Holke, Johannes and Kleinert, Jan and Reith, Dirk (2022) Constructing a Volume Geometry Map for Hexahedra with Curved Boundary Geometries. In: SIAM International Meshing Roundtable Workshop 2022. SIAM International Meshing Roundtable Workshop 2022, 22. - 25. Feb. 2022, Full text available
An (incomplete) list of theses written with or about t8code:
[A] Prism space-filling curve: Knapp, David (2017) Adaptive Verfeinerung von Prismen. Bachelor's thesis, Rheinische Friedrich-Wilhems-Universität Bonn.
[B] Pyramidal space-filling curve: Knapp, David (2020) A space-filling curve for pyramidal adaptive mesh refinement. Master's thesis, Rheinische Friedrich-Wilhems-Universität Bonn. Full text available
[C] DG solver based on t8code: Dreyer, Lukas (2021) The local discontinuous galerkin method for the advection-diffusion equation on adaptive meshes. Master's thesis, Rheinische Friedrich-Wilhems-Universität Bonn. Full text available
[D] Geometry controlled refinement for hexahedra (Part 1): Elsweijer, Sandro (2021) Curved Domain Adaptive Mesh Refinement with Hexahedra. Tech report, Hochschule Bonn-Rhein-Sieg. Full text available
[E] Subelement and resolving hanging faces in 2D: Becker, Florian (2021) Removing hanging faces from tree-based adaptive meshes for numerical simulation, Master's thesis, Universität zu Köln. Full text available
[F] Coarsening as post-processing to reduce simulation file size: Spataro, Luca (2021) Lossy data compression for atmospheric chemistry using adaptive mesh coarsening. Master's thesis, Technische Universität München. Full text available
[G] Geometry controlled refinement for hexahedra (Part 2): Elsweijer, Sandro (2022) Evaluation and generic application scenarios for curved hexahedral adaptive mesh refinement. Master's thesis, Hochschule Bonn-Rhein-Sieg. 10.13140/RG.2.2.34714.11203 Full text available
[H] Multigrid and other preconditioners for DG: Böing, Niklas (2022) Evaluation of preconditioners for implicit solvers of local DG for the advection-diffusion equation (Untersuchung von Präkonditionierern für implizite Löser für das Local DG-Verfahren zur Lösung der Advektions-Diffusionsgleichung). Master's thesis, Universität zu Köln. Full text available
[I] Removing elements from the mesh (cutting holes):
Lilikakis, Ioannis (2022) Algorithms for tree-based adaptive meshes with incomplete trees. Master's thesis, Universität zu Köln.
Full text may be available in future
If you use t8code in any of your publications, please cite the github repository,  and . For publications specifically related to
If you use any functionality described in the theses, we encourage you to cite them as well.