Skip to main content

Diffuse Domain Finite Element Methods

ddfem is a Python package that simplifies the transformation of a wide range of PDEs using the Diffuse Domain Method. While the original PDE will often be defined on a complex domain, after the transformation it can be solved on simple e.g. square domain. The original geometry is embedded in the simpler domain using a phase-field function representation.

A detailed description of the diffuse domain method and of this package is provided in a preprint. All the experiments described there can be run using the ddm_experiments.py and the paper.sh scripts in the subfolder experiments. Note that they use umfpack (part of the suitesparse package) for solving the linear systems, if this is not available it will required to install it, e.g.,

sudo apt-get install libsuitesparse-dev

We provide implementations for different versions of the Diffuse Domain Method making it easy to compare and chose the most suitable version for the problem at hand. Adding new versions is also straightforward. Furthermore, we provide a new approach to combine multiple boundary conditions of different types on distinct boundary segments.

The geometry subpackage provides several simple signed distance functions (SDF), and operators to allow an easy definition of the complex domain.

We have designed the package to have a wide compatibility with existing finite element solvers, as all transformations are performed using the Unified Form Language, UFL and do not require any other external packages.

While not required, we recommend using Dune-Fem as it enables some optimisations for form compiling, and can improve the mesh by utilising the different grid views. We have used this package to test the package and for all examples used throughout this tutorial.

Getting started

How to install the package using pip is discussed in our tutorial.

Enjoy - and let us know of any issues you encountered

Metadata

Release files for ddfem 1.1.0

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

Source distribution (sdist)

Source distribution for ddfem 1.1.0
File Size Uploaded
ddfem-1.1.0.tar.gz 212.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ddfem 1.1.0
File Interpreter ABI Platform
ddfem-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 583.1 kB

Release files / ddfem-1.1.0.tar.gz

Download URL ddfem-1.1.0.tar.gz
Size 212.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7b573dad8e57938af8aa69f85cf96e9d68eaedd6c8f4fbe99d8e8e02d207c318
BLAKE2b-256 checksum
How to use checksums
d190119fc0bd98161bd001a88bf5017076d188a16b945ca3bde82dc2bdcf72f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / ddfem-1.1.0-py3-none-any.whl

Download URL ddfem-1.1.0-py3-none-any.whl
Size 370.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bebab2e808914d8ac613241e242d302f6c082996cffa67509385d27f6c33b86e
BLAKE2b-256 checksum
How to use checksums
045e49f6ace5d9c398a6c3212b371d5161ee828d76107d9138b35ba1d32bb728
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.9.0

2 release files

0.0.0

2 release files

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