Skip to main content

Scientific tools for finite element methods

Project description

Scientific Computing Tools for Finite Element Methods

This package contains a collection of tools for scientific computing with a focus on finite element methods. The tools are written in Python and are intended to be used in conjunction with the dolfinx.

Many users that are transitioning from legacy FEniCS to FEniCSx may find the transition difficult due to the lack of some functionalities in FEniCSx. This package aims to provide some of the functionalities that are missing in FEniCSx. The package is still in its early stages and many functionalities are still missing.

Features

  • Real-space implementation for usage in DOLFINx (>=v0.8.0)
  • Save quadrature functions as point clouds
  • Save any function that can tabulate dof coordinates as point clouds.
  • Point sources for usage in DOLFINx (>=v0.8.0)
    • Point sources in vector spaces are only supported on v0.9.0, post DOLFINx PR 3429. For older versions, apply one point source in each sub space.
  • Simplified wrapper to create MeshTags based on a list of tags and corresponding locator functions.
  • Maps between degrees of freedom and vertices: vertex_to_dofmap and dof_to_vertex
  • Blocked Newton Solver
  • Function evaluation at specified points
  • Interpolation matrices from any ufl.core.expr.Expr into a compatible space.

Installation

The package is partly written in C++ and relies on dolfinx. User are encouraged to install scifem with pip in an environment where dolfinx is already installed or with conda.

pip

To install the package with pip run

python3 -m pip install scifem --no-build-isolation

To install the development version you can run

python3 -m pip install --no-build-isolation git+https://github.com/scientificcomputing/scifem.git

Note that you should pass the flag --no-build-isolation to pip to avoid issues with the build environment, such as incompatible versions of nanobind.

spack

The spack package manager is the recommended way to install scifem, and especially on HPC systems. For information about the package see: spack-package: py-scifem First, clone the spack repository and enable spack

git clone --depth=2 https://github.com/spack/spack.git
# For bash/zsh/sh
. spack/share/spack/setup-env.sh

# For tcsh/csh
source spack/share/spack/setup-env.csh

# For fish
. spack/share/spack/setup-env.fish

Next create an environment:

spack env create scifem_env
spack env activate scifem_env

Find the compilers on the system

spack compiler find

and install the relevant packages

spack add py-scifem+petsc+hdf5+biomed+adios2 ^mpich ^petsc+mumps+hypre ^py-fenics-dolfinx+petsc4py
spack concretize
spack install

Finally, note that spack needs some packages already installed on your system. On a clean ubuntu container for example one need to install the following packages before running spack

apt update && apt install gcc unzip git python3-dev g++ gfortran xz-utils -y

conda

To install the package with conda run

conda install -c conda-forge scifem

Having issues or want to contribute?

If you are having issues, feature request or would like to contribute, please let us know. You can do so by opening an issue on the issue tracker.

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

scifem-0.19.1.tar.gz (2.0 MB view details)

Uploaded Source

File details

Details for the file scifem-0.19.1.tar.gz.

File metadata

  • Download URL: scifem-0.19.1.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scifem-0.19.1.tar.gz
Algorithm Hash digest
SHA256 071acabbbfb33858c4ab68e42228f2e17e6d9b9c24fdf457145c08b56e9ee704
MD5 f4e98e44328c8c31e6239e8b3d9f5e41
BLAKE2b-256 e56f1f7bd9027120a34c1444998ee9bc82c955f85b032246b157365d4dc49882

See more details on using hashes here.

Provenance

The following attestation bundles were made for scifem-0.19.1.tar.gz:

Publisher: pypi.yml on scientificcomputing/scifem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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