NGSTrefftz
an add-on to NGSolve for Trefftz methods
NGSTrefftz provides a framework to implement Trefftz finite element spaces for NGSolve, with several Trefftz spaces already implemented. Additionally, Trefftz-DG on tent-pitched meshes for the acoustic wave equation is implemented using meshes provided by ngstents. Furthermore, the package includes an implementation of the embedded Trefftz method.
Try it out!
The documentation is available here:
You can also try the example notebooks directly in Binder:
or run them locally using Docker:
git clone https://github.com/PaulSt/NGSTrefftz
cd NGSTrefftz && docker build -t ngstrefftz_jupyter .
docker run -p 8888:8888 ngstrefftz_jupyter
Installation
The recommended installation is via pip:
pip install ngstrefftz
Alternatively, to build NGSTrefftz from source:
git clone --recursive https://github.com/PaulSt/NGSTrefftz
mkdir ./NGSTrefftz/make && cd ./NGSTrefftz/make
cmake ../ && make install
When building from source, the following dependencies are required:
For access to the newest features, the nightly version of NGSolve usually works best.
News
🚀 Jan, 2026: Trefftz Workshop will be held on 7-9 September 2026 in Vienna, Austria
⚠️ Apr, 2025: TrefftzEmbedding has a new interface, please check the documentation for details.
🚀 Jul, 2024: Conforming Trefftz embedding implementation by @johann-cm with examples in ngstSpaceKit
Older news
⚠️ Oct, 2022: With v0.2.0 the git history has undergone a major cleanup, please make sure to clone the repo anew.
🚀 Oct, 2022: New and improved implementation of the embedded Trefftz method via EmbeddedTrefftzFES!
🚀 Aug, 2022: pip-installer available, now using wheels!
🚀 Mar, 2022: NGSTrefftz now has a website!
⚠️ Feb, 2022: If you are using NGSolve nightly releases: NGSolve@eda758d breaks a dependency and NGSolve@3d52ecd produces import issue. Make sure to update ngstrefftz submodules and move to newest ngsolve version, at least NGSolve@5839a09.
🚀 Jan, 2022: NGSTrefftz is now available via pip!
🚀 Nov, 2021: NGSTrefftz now comes in a docker and with binder notebooks!
Publications and citation
If you are using ngstrefftz in your academic work, please consider citing the JOSS paper:
@article{Stocker2022NGSTrefftz,
author = {Stocker, Paul},
title = {{NGSTrefftz}: Add-on to {NGSolve} for {Trefftz} methods},
journal = {Journal of Open Source Software},
year = {2022},
volume = {7},
number = {71},
pages = {4135},
doi = {10.21105/joss.04135}
}
Publications using NGSTrefftz
Embedded Trefftz DG method for steady Navier-Stokes flow. Part II: Nonlinear problem
Paul Stocker, Igor Voulis, Christoph Lehrenfeld, Philip L. Lederer
Embedded Trefftz DG method for steady Navier-Stokes flow. Part I: Oseen linearization
Paul Stocker, Igor Voulis, Christoph Lehrenfeld, Philip L. Lederer
Embedded Trefftz DG method for reaction-diffusion problems on anisotropic meshes
Sergio Gómez, Chiara Perinati, Paul Stocker, Igor Voulis
Discontinuous Galerkin Trefftz Methods for Model Reduction of Wave Phenomena
Tobias Born, Karsten Urban
PAMM articleReleasing the pressure: High-order surface flow discretizations via discrete Helmholtz–Hodge decompositions
Tim Brüers, Christoph Lehrenfeld, Tim van Beeck, Max Wardetzky
A discontinuous Galerkin method for elliptic-hyperbolic equations
Chiara Perinati, Lise-Marie Imbert-Gérard, Andrea Moiola, Paul Stocker
Embedded Trefftz DG method for the Helmholtz equation
Paul Stocker, Igor Voulis
A unified framework for Trefftz-like discretization methods
Philip L. Lederer, Christoph Lehrenfeld, Paul Stocker, Igor Voulis
Inf-sup stable space-time Local Discontinuous Galerkin method for the heat equation
Sergio Gómez, Chiara Perinati, Paul Stocker
Polynomial quasi-Trefftz DG for PDEs with smooth coefficients: elliptic problems
Lise-Marie Imbert-Gérard, Andrea Moiola, Chiara Perinati, Paul Stocker
Trefftz Discontinuous Galerkin discretization for the Stokes problem
Philip L. Lederer, Christoph Lehrenfeld, Paul Stocker
Unfitted Trefftz discontinuous Galerkin methods for elliptic boundary value problems
Fabian Heimann, Christoph Lehrenfeld, Paul Stocker, Henry von Wahl
Embedded Trefftz discontinuous Galerkin methods
Christoph Lehrenfeld, Paul Stocker
A space-time quasi-Trefftz DG method for the wave equation with piecewise-smooth coefficients
Lise-Marie Imbert-Gérard, Andrea Moiola, Paul Stocker
Tent pitching and Trefftz-DG method for the acoustic wave equation
Ilaria Perugia, Joachim Schöberl, Paul Stocker, Christoph Wintersteiger
On the Conforming Trefftz Finite Element Method and Applications
Johann Carl Meyer, Master’s thesisSpace-time Trefftz DG methods for parabolic PDEs
Constanze Heil, Master’s thesisEmbedded Trefftz Trace DG Methods for PDEs on unfitted Surfaces
Erik Schlesinger, Master’s thesis