Skip to main content

NGSTrefftz

an add-on to NGSolve for Trefftz methods

Binder Docker Image Version (latest semver) PyPI GitHub Workflow Status status docs

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:

docs

You can also try the example notebooks directly in Binder:

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
    arXiv
  • Embedded Trefftz DG method for steady Navier-Stokes flow. Part I: Oseen linearization
    Paul Stocker, Igor Voulis, Christoph Lehrenfeld, Philip L. Lederer
    arXiv
  • Embedded Trefftz DG method for reaction-diffusion problems on anisotropic meshes
    Sergio Gómez, Chiara Perinati, Paul Stocker, Igor Voulis
    arXiv
  • Discontinuous Galerkin Trefftz Methods for Model Reduction of Wave Phenomena
    Tobias Born, Karsten Urban
    PAMM article
  • Releasing the pressure: High-order surface flow discretizations via discrete Helmholtz–Hodge decompositions
    Tim Brüers, Christoph Lehrenfeld, Tim van Beeck, Max Wardetzky
    arXiv
  • A discontinuous Galerkin method for elliptic-hyperbolic equations
    Chiara Perinati, Lise-Marie Imbert-Gérard, Andrea Moiola, Paul Stocker
    arXiv
  • Embedded Trefftz DG method for the Helmholtz equation
    Paul Stocker, Igor Voulis
    arXiv
  • A unified framework for Trefftz-like discretization methods
    Philip L. Lederer, Christoph Lehrenfeld, Paul Stocker, Igor Voulis
    arXiv
  • Inf-sup stable space-time Local Discontinuous Galerkin method for the heat equation
    Sergio Gómez, Chiara Perinati, Paul Stocker
    arXiv
  • Polynomial quasi-Trefftz DG for PDEs with smooth coefficients: elliptic problems
    Lise-Marie Imbert-Gérard, Andrea Moiola, Chiara Perinati, Paul Stocker
    arXiv
  • Trefftz Discontinuous Galerkin discretization for the Stokes problem
    Philip L. Lederer, Christoph Lehrenfeld, Paul Stocker
    arXiv
  • Unfitted Trefftz discontinuous Galerkin methods for elliptic boundary value problems
    Fabian Heimann, Christoph Lehrenfeld, Paul Stocker, Henry von Wahl
    arXiv
  • Embedded Trefftz discontinuous Galerkin methods
    Christoph Lehrenfeld, Paul Stocker
    arXiv
  • A space-time quasi-Trefftz DG method for the wave equation with piecewise-smooth coefficients
    Lise-Marie Imbert-Gérard, Andrea Moiola, Paul Stocker
    arXiv
  • Tent pitching and Trefftz-DG method for the acoustic wave equation
    Ilaria Perugia, Joachim Schöberl, Paul Stocker, Christoph Wintersteiger
    arXiv
  • On the Conforming Trefftz Finite Element Method and Applications
    Johann Carl Meyer, Master's thesis
  • Space-time Trefftz DG methods for parabolic PDEs
    Constanze Heil, Master's thesis
  • Embedded Trefftz Trace DG Methods for PDEs on unfitted Surfaces
    Erik Schlesinger, Master's thesis

Metadata

Release files for ngstrefftz 0.3.2607

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ngstrefftz 0.3.2607
File Size Uploaded Provenance Actions
ngstrefftz-0.3.2607.tar.gz 1.6 MB Without provenance Details for ngstrefftz-0.3.2607.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for ngstrefftz 0.3.2607
File Actions
ngstrefftz-0.3.2607-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for ngstrefftz-0.3.2607-cp314-cp314-win_amd64.whl
ngstrefftz-0.3.2607-cp314-cp314-manylinux_2_28_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details for ngstrefftz-0.3.2607-cp314-cp314-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
ngstrefftz-0.3.2607-cp314-cp314-macosx_10_9_universal2.whl CPython 3.14 CPython 3.14 macOS 10.9+ universal2 (ARM64, x86-64) Details for ngstrefftz-0.3.2607-cp314-cp314-macosx_10_9_universal2.whl
ngstrefftz-0.3.2607-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for ngstrefftz-0.3.2607-cp313-cp313-win_amd64.whl
ngstrefftz-0.3.2607-cp313-cp313-manylinux_2_28_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details for ngstrefftz-0.3.2607-cp313-cp313-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
ngstrefftz-0.3.2607-cp313-cp313-macosx_10_9_universal2.whl CPython 3.13 CPython 3.13 macOS 10.9+ universal2 (ARM64, x86-64) Details for ngstrefftz-0.3.2607-cp313-cp313-macosx_10_9_universal2.whl
ngstrefftz-0.3.2607-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for ngstrefftz-0.3.2607-cp312-cp312-win_amd64.whl
ngstrefftz-0.3.2607-cp312-cp312-manylinux_2_28_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for ngstrefftz-0.3.2607-cp312-cp312-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
ngstrefftz-0.3.2607-cp312-cp312-macosx_10_9_universal2.whl CPython 3.12 CPython 3.12 macOS 10.9+ universal2 (ARM64, x86-64) Details for ngstrefftz-0.3.2607-cp312-cp312-macosx_10_9_universal2.whl
ngstrefftz-0.3.2607-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for ngstrefftz-0.3.2607-cp311-cp311-win_amd64.whl
ngstrefftz-0.3.2607-cp311-cp311-manylinux_2_28_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details for ngstrefftz-0.3.2607-cp311-cp311-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
ngstrefftz-0.3.2607-cp311-cp311-macosx_10_9_universal2.whl CPython 3.11 CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) Details for ngstrefftz-0.3.2607-cp311-cp311-macosx_10_9_universal2.whl
ngstrefftz-0.3.2607-cp310-cp310-manylinux_2_28_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details for ngstrefftz-0.3.2607-cp310-cp310-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
ngstrefftz-0.3.2607-cp310-cp310-macosx_10_9_universal2.whl CPython 3.10 CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) Details for ngstrefftz-0.3.2607-cp310-cp310-macosx_10_9_universal2.whl

Total release size: 20.1 MB

Release files / ngstrefftz-0.3.2607.tar.gz

Download URL ngstrefftz-0.3.2607.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
ef5888d7095902c5c78cb7cb7128db915a2d80ddedd673bf5e41e30bc118c6c4
BLAKE2b-256 checksum
How to use checksums
2172c1d5a3e0af0869db72a1e2088af181e81723cf84212283c4836e85157e3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp314-cp314-win_amd64.whl

Download URL ngstrefftz-0.3.2607-cp314-cp314-win_amd64.whl
Size 723.5 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
245d2bd38e1ea55cfff5c155104e69ca80f899ba4531350ffe2f6fd8cc386c54
BLAKE2b-256 checksum
How to use checksums
63ed16c57cdd2e5678ddd727d8a80a08f767f1b72ca9f58603663912880bc99c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp314-cp314-manylinux_2_28_x86_64.manylinux2014_x86_64.whl

Download URL ngstrefftz-0.3.2607-cp314-cp314-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Size 1.3 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
9264a8b62af5d6c858ac057f8967337ac7d70737e6ea176b4bcef2f8ba87b8bc
BLAKE2b-256 checksum
How to use checksums
718b1de9d4319a45c69e8e3b2b1b63723676eea103d4968c92597531a89f8480
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp314-cp314-macosx_10_9_universal2.whl

Download URL ngstrefftz-0.3.2607-cp314-cp314-macosx_10_9_universal2.whl
Size 1.9 MB
Tags CPython 3.14 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
7a51f54e486b5e92556e834e3078b29201115d608a29b1bc4bf708fde6a6eef3
BLAKE2b-256 checksum
How to use checksums
9d5cc23d449672bf63bca18bbf8bf9023153478284d48806fdb24e2fd3a99ecc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp313-cp313-win_amd64.whl

Download URL ngstrefftz-0.3.2607-cp313-cp313-win_amd64.whl
Size 699.7 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
cd15a563057d2a565935d4d6a28f98dc88c3598183daa88ae30ba00c5cf07567
BLAKE2b-256 checksum
How to use checksums
3e8bf618f327692f5763dd8a7848396cdf66099ba219de14984cdaa2ab40d174
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp313-cp313-manylinux_2_28_x86_64.manylinux2014_x86_64.whl

Download URL ngstrefftz-0.3.2607-cp313-cp313-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Size 1.3 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e302bd315248d7e19edf8f91b5f23662c86348206efff7fdade09ee1805c30a8
BLAKE2b-256 checksum
How to use checksums
91d68d509a785b3989c8ec01cbe2a5128a481e2543ee0d59d8a80bcbf3343f88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp313-cp313-macosx_10_9_universal2.whl

Download URL ngstrefftz-0.3.2607-cp313-cp313-macosx_10_9_universal2.whl
Size 1.9 MB
Tags CPython 3.13 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
13234154d56b461c78e4ff81757a2dab6de7d8fc8c25b1a2cb47de91a9ee9d9f
BLAKE2b-256 checksum
How to use checksums
df6f65f544e3e7bab96cb0e459d645d6e57837e87a8c9d3f927f6f9d373e0b17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp312-cp312-win_amd64.whl

Download URL ngstrefftz-0.3.2607-cp312-cp312-win_amd64.whl
Size 699.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
38a7a0078bcdb80f2d658ced7b30dd01399559bede9b2474016a3507b5282050
BLAKE2b-256 checksum
How to use checksums
de450faa78cd9a679b0c8a0783dab6138c2adccb24836d594bf6392e678a949d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp312-cp312-manylinux_2_28_x86_64.manylinux2014_x86_64.whl

Download URL ngstrefftz-0.3.2607-cp312-cp312-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Size 1.3 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
207fb74ec04e8f3d45a3ca00c01b8ce37cd4a8d1f9e406ff383402b3cb1303fa
BLAKE2b-256 checksum
How to use checksums
749c66088b2becd2c8475e87fd37de3b2c3a9218668a8df54a6e3ab91c793f87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp312-cp312-macosx_10_9_universal2.whl

Download URL ngstrefftz-0.3.2607-cp312-cp312-macosx_10_9_universal2.whl
Size 1.9 MB
Tags CPython 3.12 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
741124a46f85621b87f2b52fb524ac252629c5570b33e38ee97596daa92eba7d
BLAKE2b-256 checksum
How to use checksums
4c2f44830758913c9c2a0265666dadbc3c28db0283f8cf500e1ad69abfdd807f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp311-cp311-win_amd64.whl

Download URL ngstrefftz-0.3.2607-cp311-cp311-win_amd64.whl
Size 696.2 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
1c89cf88f43ddcf2504a95da0597a168c8e77f37523491911e31da9c32f5ec65
BLAKE2b-256 checksum
How to use checksums
57ff2e373f48bc6be5bc0fbdf5ceaf02a4e3ffd165a499f0f1a75ba2b7740616
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp311-cp311-manylinux_2_28_x86_64.manylinux2014_x86_64.whl

Download URL ngstrefftz-0.3.2607-cp311-cp311-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Size 1.3 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0918fbf052b6dbb62912cd59f9bb96f6ffa19c0158c9f8d7f4d57f4625d5afd9
BLAKE2b-256 checksum
How to use checksums
8bc28f513bc1bba43541b7fd1f788860eb52b7e8f961d42ce660b449533f274e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp311-cp311-macosx_10_9_universal2.whl

Download URL ngstrefftz-0.3.2607-cp311-cp311-macosx_10_9_universal2.whl
Size 1.9 MB
Tags CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
6219f08b22c17c73c6b924bf9d22021a937da26518919771f07bfb33a539e5d9
BLAKE2b-256 checksum
How to use checksums
3bd3617245c8a7be9ad04494c4d7723ea4742af2ebf43113d46b361fcb3000b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp310-cp310-manylinux_2_28_x86_64.manylinux2014_x86_64.whl

Download URL ngstrefftz-0.3.2607-cp310-cp310-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Size 1.3 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
33f2dab495ccefafbc469a32c459f638f74835ec89545be697dd93c9b8fd05a0
BLAKE2b-256 checksum
How to use checksums
8a6412b0d3b5ad22888025e8a8182ebdce1f73562b13471fc7c2508817353e7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ngstrefftz-0.3.2607-cp310-cp310-macosx_10_9_universal2.whl

Download URL ngstrefftz-0.3.2607-cp310-cp310-macosx_10_9_universal2.whl
Size 1.9 MB
Tags CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
060f8e4878237a4761eea927d11ed67362a9d01738d3fc4bee364645d1166f39
BLAKE2b-256 checksum
How to use checksums
110b858c5d2e50e339fd200d1676d3fac89840c53b7d81c973251e1307d1c4c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for ngstrefftz 0.3.2607

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.2607 This release

15 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page