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.dev7.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.dev7-cp314-cp314-win_amd64.whl (759.5 kB view details)

Uploaded CPython 3.14Windows x86-64

ngstrefftz-0.3.2604.dev7-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.dev7-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.dev7-cp313-cp313-win_amd64.whl (737.1 kB view details)

Uploaded CPython 3.13Windows x86-64

ngstrefftz-0.3.2604.dev7-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.dev7-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.dev7-cp312-cp312-win_amd64.whl (737.1 kB view details)

Uploaded CPython 3.12Windows x86-64

ngstrefftz-0.3.2604.dev7-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.dev7-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.dev7-cp311-cp311-win_amd64.whl (733.6 kB view details)

Uploaded CPython 3.11Windows x86-64

ngstrefftz-0.3.2604.dev7-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.dev7-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.dev7-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.dev7-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.dev7.tar.gz.

File metadata

  • Download URL: ngstrefftz-0.3.2604.dev7.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.dev7.tar.gz
Algorithm Hash digest
SHA256 d33fdbb90ae4c9bf5f335ae159881ef0a97b2a9ad49faedc065745b3947df123
MD5 59c739bf20b288e92ea559c057d27b9f
BLAKE2b-256 f9c267ae29b8ac76cd19b44649637aff116461a71ce70830fac0e6406244c89e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 4f4400e6008d833cee817ce53fa3d116e217f27868d432929739453dc21ec9b0
MD5 1cb2414f78c5be7f73c79a80eaf4b44f
BLAKE2b-256 94a5eb49ff0daceac09cd1f2605098894667aff9daf2aa96cbb9357f44360219

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp314-cp314-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 de44bb122e64f384b8e3f44616dfde02735ceabdb272db42e2b61cb954682da2
MD5 8bf64ac5546cb3955f5a5fc8b712689e
BLAKE2b-256 330eb9e7ef921b92a3b78f74cace07be3f56adeddf640a43e6d1ff11e7e08138

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp314-cp314-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6f64628652d9c814fab35e4fba32fc65200596edfcb653b2c14de57d5a892cc9
MD5 14949d4c0e4b64cd9d987af7f98f3f77
BLAKE2b-256 7ea21923e55218c20f1d2582382296a86e797b6ecc1f8946b150982a88ff0b93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4887b729924c147e5d7cbd49dd8a10977c75156934c3b37d2d2921cbea4030fb
MD5 c856c58594550f8c700f1d2b9cdcce8c
BLAKE2b-256 4dd856646b0708389be1150428b222a1215e881e6bc671bdb4a9eb80217fbde7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp313-cp313-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 82b5f7367e87c412a987023cb2539140b5f1e015cc3d2ae64cf41f868996adfe
MD5 f784f5630ad11fc2f40603d5d81a0487
BLAKE2b-256 982578b8c8ff4b89de8ed899bc1cd8d7a677dea54cb237a52a1bf1ae28158ae6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp313-cp313-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f5e09b5186b837be4966318e33ae5b7145199cee80010ba5f691ec409b39972a
MD5 ed7a178b60e4f139d20540fcc3bdace0
BLAKE2b-256 4ad52ea7388fc6d58ccee2f05b13f9c27c89fb3149788f6bc1781d35240bc425

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 726193c465ec9205e870597313babd29734e8c8bb1332e6c8d543cf41444fdd1
MD5 5ac07e94d4f99ac05e8a0e19444da39d
BLAKE2b-256 71defd69c0f8ae267489a337e8f6d4beb0ac6052f6b2458cdace904fed77bdb7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp312-cp312-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 02f7524654886aaef383a1f6ed3be75d0197b2188879940cebd0bfa3b8a94374
MD5 90e49cd92ba9d16d0375cf20c4b64440
BLAKE2b-256 6b07591a210f8c6ba713e9fe726d85aa76a55c00e5e8fdccd8879219d467374d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c0026b7e2605cd5801afbb06ae9dd62394d7bd5e605718683a0bb84aa0fd6a2b
MD5 c9dc574b85c252aff692416833d8ec31
BLAKE2b-256 16d97b7cf822eee8b9f242dc4c53a87d1bd3adf02300fb6c533b63370a3e534a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 da7485120e8f4ece91318df9fd3c86b4247357bd89e897f9e455a32de1359def
MD5 ff4c3ee8d93259328a0eb72de7588a5a
BLAKE2b-256 7b7b041ef7a7ed0f0f3926181d5314ab20d087d2bda050e4e5776ce60985cb7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp311-cp311-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0c72e07a6317e7493a2bc0324154693854b4f78e95ce1a9d1b32b07e528eac92
MD5 3cbabe5032dbf6c64d9e105e48e931d2
BLAKE2b-256 aa251572e695960e978e5d253fb7143b8895b158a357acdda8fac18ef2b67787

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c15476075a48bf6ba7d53d7ea5d0149cc719bf9589fe682f815ceb1157c19fb1
MD5 0b4b97371dc89acd8d71d2fba53832cb
BLAKE2b-256 6f23e90b3ba2c181d047c503b9fc0a886a127771f860d52d5ad9f207b0ec60c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp310-cp310-manylinux_2_28_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e745491f7b4ffff8cc70cf0d2e8b745f0cd33c77a98e6488017c63ac2d0c69bc
MD5 046fc9868ef9f407496d3f72432181eb
BLAKE2b-256 28207c0e910e9039087db4a0a86bf143df240a70e94a9f147ad5ec8aef7cc876

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ngstrefftz-0.3.2604.dev7-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 82d1aceb61e9cf053f06c671e4db62ccfafa49dd6462b78097611aefac7a3901
MD5 838cf6a98416c3c1ca2835b62db31af4
BLAKE2b-256 a3f00d5bc2090ce8d346550d0b107856cca79db96396791338ba9aa660fa3259

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