Wrappers for reading/writing DOLFINx meshes/functions with ADIOS2
Project description
ADIOS2Wrappers for DOLFINx
This is an extension for DOLFINx to checkpoint meshes, meshtags and functions using ADIOS2.
The code uses the adios2 Python-wrappers to write DOLFINx objects to file, supporting N-to-M (recoverable) and N-to-N (snapshot) checkpointing. See: Checkpointing in DOLFINx - FEniCS 23 for more information.
For scalability, the code uses MPI Neighbourhood collectives for communication across processes.
Installation
Docker
ADIOS2 is installed in the official DOLFINx containers.
docker run -ti -v $(pwd):/root/shared -w /root/shared --name=dolfinx-checkpoint ghcr.io/fenics/dolfinx/dolfinx:nightly
Conda
To use with conda (DOLFINx release v0.7.0 works with v0.7.2 of ADIOS4DOLFINx)
conda create -n dolfinx-checkpoint python=3.10
conda activate dolfinx-checkpoint
conda install -c conda-forge fenics-dolfinx pip adios2
python3 -m pip install git+https://github.com/jorgensd/adios4dolfinx@v0.7.2
Functionality
DOLFINx
- Reading and writing meshes, using
adios4dolfinx.read/write_mesh
- Reading and writing meshtags associated to meshes
adios4dolfinx.read/write_meshtags
- Reading checkpoints for any element (serial and parallel, arbitrary number of functions and timesteps per file). Use
adios4dolfinx.read/write_function
.
[!IMPORTANT]
For a checkpoint to be valid, you first have to store the mesh withwrite_mesh
, then usewrite_function
to append to the checkpoint file.
[!IMPORTANT]
A checkpoint file supports multiple functions and multiple time steps, as long as the functions are associated with the same mesh
[!IMPORTANT]
Only one mesh per file is allowed
Backwards compatibility
[!WARNING] If you are using checkpoints written with
adios4dolfinx<0.7.2
please use thelegacy=True
flag for reading in the checkpoint with with any newer version
Legacy DOLFIN
Only checkpoints for Lagrange
or DG
functions are supported from legacy DOLFIN
- Reading meshes from the DOLFIN HDF5File-format
- Reading checkpoints from the DOLFIN HDF5File-format (one checkpoint per file only)
- Reading checkpoints from the DOLFIN XDMFFile-format (one checkpoint per file only, and only uses the
.h5
file)
See the API for more information.
Long term plan
The long term plan is to get this library merged into DOLFINx (rewritten in C++ with appropriate Python-bindings).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file adios4dolfinx-0.7.3.tar.gz
.
File metadata
- Download URL: adios4dolfinx-0.7.3.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | beb81343bfb121684ac27892b673f7cb97c4d1dddf0c6d97ecc532c37316d667 |
|
MD5 | 409c2a63e1c1d2c5f29c11aef99f6491 |
|
BLAKE2b-256 | 1fdb3e9903f76a8f30f9c5b826e4cadeeab193f452e5e96c4e4e346b55ed84fd |
Provenance
File details
Details for the file adios4dolfinx-0.7.3-py3-none-any.whl
.
File metadata
- Download URL: adios4dolfinx-0.7.3-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f1f7b9d575d91beca113605d79cc5df374a66492f518bfee8ce4b9836cfad9b |
|
MD5 | d0605f8f10030bad54bb3eee06003a24 |
|
BLAKE2b-256 | e105e11448b8e12fd0d1a0c1c8496526f04897725ab81aab1a901cde77c6a51f |