Skip to main content

NGSTrefftz is an add-on to NGSolve for Trefftz methods.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ngstrefftz-0.3.2604.dev8.tar.gz (1.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ngstrefftz-0.3.2604.dev8-cp314-cp314-win_amd64.whl (759.5 kB view details)

Uploaded CPython 3.14Windows x86-64

ngstrefftz-0.3.2604.dev8-cp314-cp314-manylinux_2_28_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

ngstrefftz-0.3.2604.dev8-cp314-cp314-macosx_10_9_universal2.whl (1.9 MB view details)

Uploaded CPython 3.14macOS 10.9+ universal2 (ARM64, x86-64)

ngstrefftz-0.3.2604.dev8-cp313-cp313-win_amd64.whl (737.1 kB view details)

Uploaded CPython 3.13Windows x86-64

ngstrefftz-0.3.2604.dev8-cp313-cp313-manylinux_2_28_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

ngstrefftz-0.3.2604.dev8-cp313-cp313-macosx_10_9_universal2.whl (1.9 MB view details)

Uploaded CPython 3.13macOS 10.9+ universal2 (ARM64, x86-64)

ngstrefftz-0.3.2604.dev8-cp312-cp312-win_amd64.whl (737.1 kB view details)

Uploaded CPython 3.12Windows x86-64

ngstrefftz-0.3.2604.dev8-cp312-cp312-manylinux_2_28_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

ngstrefftz-0.3.2604.dev8-cp312-cp312-macosx_10_9_universal2.whl (1.9 MB view details)

Uploaded CPython 3.12macOS 10.9+ universal2 (ARM64, x86-64)

ngstrefftz-0.3.2604.dev8-cp311-cp311-win_amd64.whl (733.6 kB view details)

Uploaded CPython 3.11Windows x86-64

ngstrefftz-0.3.2604.dev8-cp311-cp311-manylinux_2_28_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

ngstrefftz-0.3.2604.dev8-cp311-cp311-macosx_10_9_universal2.whl (1.9 MB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

ngstrefftz-0.3.2604.dev8-cp310-cp310-manylinux_2_28_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

ngstrefftz-0.3.2604.dev8-cp310-cp310-macosx_10_9_universal2.whl (1.9 MB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file ngstrefftz-0.3.2604.dev8.tar.gz.

File metadata

  • Download URL: ngstrefftz-0.3.2604.dev8.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ngstrefftz-0.3.2604.dev8.tar.gz
Algorithm Hash digest
SHA256 0c8d578344b0ebab2b8d469f2b09cc739a93374a844566c6c0e562cb0340b6bc
MD5 8bfc97b4343bfbdafe66cf54c46758dc
BLAKE2b-256 4ec239da5defce68c9ef95568f677be5fd2c21902d933437bee373195e6bcca0

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 8b33fe735cee1f1a77587ee3e3814865b845ae9fa7a82f80dc663df0fb97db36
MD5 8cb64d2a23ce5e2ef28dcbd6c452fe42
BLAKE2b-256 691c67bc3fd68dc13902b2928b5e0dce1731f4e0c13bade7968c11367d7b89e2

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp314-cp314-manylinux_2_28_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp314-cp314-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4f81ba5a22f98822649489340b71ed6959566ea222998dac3980603bb80dd466
MD5 cf843e15d656221049851a4f3db0124d
BLAKE2b-256 3615f469de066d537143b67b3f4cfbce615c59355e276466fc936168ef59b2c1

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp314-cp314-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp314-cp314-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 494fd2cd98bf94941a6beff9e87ff975da064da833d2ded64d6afe179e55bcfd
MD5 4b82d62cf3a49ef0e8d8fb7580f5a62c
BLAKE2b-256 97db78c1670450597373385d7d5050f79ac78aced99580e08efebdd161c136f4

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 437230c0d12295fb36ab2365e0314968a65a04e4c1f064930f8d94d2cdfe819d
MD5 ab81dd18d899583e91a7c5989b5a8eef
BLAKE2b-256 b0db212d528c221cb3201052e1c6e21c30e0d8ff1e77908eed61701e0a6dfc60

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp313-cp313-manylinux_2_28_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp313-cp313-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1a80f6ab106a2c3a0e5ee99453a788344acc6e4071ec35039f27c1d6a45d73f0
MD5 a361e7cd8b615926012da0d03db1539c
BLAKE2b-256 71a5f8f9ca85a8dd87c543a2e9e18af9dcf99b68a4d81e228bcbfbfdb4375e11

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp313-cp313-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp313-cp313-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f7a014761ee8b3ec5877e919c75400994d148fa9e07e85b55c16ca347d8895d2
MD5 e8cae2688b2d9b24cf80d48fd0c866e0
BLAKE2b-256 16144a8158928b0197e645510787b1ec40cfbe8f8b8aa64c07d625cac9aff8c1

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 639ebbbae8f3415c9c6b533e5d6f3100f7acb8502f442d793252faac785aa780
MD5 a16745b877a9d6360f107be5bd3c343c
BLAKE2b-256 cffd6c1a8c3f0a1706fb884898a3220b1e6b1f438bfcf3ffd3ef571acc850517

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp312-cp312-manylinux_2_28_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp312-cp312-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cfd8a06b65b22d385f4c10b189151438cb5a13cde97e0d6f94a54121e9c8c3c7
MD5 b7616741ae776125e6906973af7eed13
BLAKE2b-256 cedbf953f47f86bb8eb5822baab0347d2af543a9d86e0ed24b164a76a7588c12

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp312-cp312-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4a94df55dc2aac3f67fcd69f3a758da10400834ea5071264d3457454c60f7e57
MD5 47ad2abdabb9dd6e11123c9387c06721
BLAKE2b-256 0a6c2c25eb7a3f2f3f1661a9cb68abae1ced89bd02872b88fb3186706600bb84

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 dd77dfc6ed19f810e37d703d5f2019878521d9b2b31daf6768f5aa06f6d10994
MD5 6019ccd658911cad82460cc38b8275df
BLAKE2b-256 397a4f71e099d927d13c77f09de3fc88c51963b949d5cca217b927ce6fa666e4

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp311-cp311-manylinux_2_28_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp311-cp311-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 43de2b95fb5ff67016c5cb6f5ae5ab2dd5b846a744887725f4cf28fa3fa22e07
MD5 9dc4ab02cb757c7fcb7cffb2f4fd7a04
BLAKE2b-256 f6328437adeccbc5c80c455572a29279c6e3874c60ae40a827486c3ff57f3a57

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b193abc61e741a018da3745d963643a28c218f122e1fe66fe315cdf41ef14e04
MD5 debbd3830543e284a1a16a6b07bd6e82
BLAKE2b-256 23b69894ed230b8830bd3c13bcc544aeb24b68259ab784d2ff70fcfe988d972f

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp310-cp310-manylinux_2_28_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp310-cp310-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 94b3c8d01562e8d64c38cfc30f3d7d5305673c9131dcfb3049be6a86e6892c8a
MD5 9c03c31e6a65f160e88ab4c4cc56eabe
BLAKE2b-256 c81aaf01391f22e379788432103da1938e85fc7742e9d5ed11d353c905572f68

See more details on using hashes here.

File details

Details for the file ngstrefftz-0.3.2604.dev8-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev8-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a15b8761a1688b64bd801c8f2bac35df51e8d85c1267e7d66cf757472922e33e
MD5 1cbd847f236930a30dfec0fbd343ee59
BLAKE2b-256 048766de4549cb996143553ca3daed9333093f4172feb2cb6fd4e1841f137083

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page