Skip to main content

Wrappers for reading/writing DOLFINx meshes/functions with ADIOS2

Project description

ADIOS2Wrappers for DOLFINx

MIT Read Latest Documentation

This is an extension for DOLFINx to checkpoint meshes, meshtags and functions using ADIOS2.

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.1 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.1

Long term plan

The long term plan is to get this library merged into DOLFINx (rewritten in C++ with appropriate Python-bindings).


Functionality

Implementation details

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.

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, one checkpoint per file). Use adios4dolfinx.read/write_function.

[!IMPORTANT]
For a checkpoint to be valid, you first have to store the mesh with write_mesh, then use write_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

[!WARNING] If you are using checkpoints written with adios4dolfinx prior to time-dependent/multi-function support, please use the legacy=True flag for reading in the checkpoint

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.


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

adios4dolfinx-0.7.2.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

adios4dolfinx-0.7.2-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file adios4dolfinx-0.7.2.tar.gz.

File metadata

  • Download URL: adios4dolfinx-0.7.2.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for adios4dolfinx-0.7.2.tar.gz
Algorithm Hash digest
SHA256 7ad947aa1488d5a415d3a99ed5a4b3c99a1f61cacbfb7320f60245b0f594fa72
MD5 f2110aa968553a9fc36a72066e491669
BLAKE2b-256 126f3d187e666c6129416a85693d07742a0704c7dffcf8fce5865265a3540948

See more details on using hashes here.

Provenance

File details

Details for the file adios4dolfinx-0.7.2-py3-none-any.whl.

File metadata

File hashes

Hashes for adios4dolfinx-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec7aea587c87fb2e56ed14f24cfff9cbf110365d50034dfafe8f22c4257b8a3f
MD5 1c9d101a9d600ea11e03cb17e03b37ea
BLAKE2b-256 5529f094c17c6088984d5808b3c3b20c4a5f24eb51d8c84411bce2e37fe39b36

See more details on using hashes here.

Provenance

Supported by

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