Skip to main content
fem2geo

tests Docs codecov PyPI - Version PyPI - Python Version DOI

Physics-Based Modeling to Structural Geology

A Python library for structural geology analyses on outputs from finite element (FEM) or boundary element (BEM) models. fem2geo bridges numerical simulations and field observations: it loads model outputs, extracts regions of interest, computes geomechanical variables, and produces stereonet figures.

Key capabilities:

  • Extract spatial subsets from large models
  • Compare fracture and fault orientation data with model predictions
  • Slip and dilation tendencies on stereonets
  • Compare model to Kostrov moment tensor derived from fault populations
  • Re-project datasets (catalogs, meshes, rasters) into a model's reference frame
  • Run any analysis from reproducible config files

Table of Contents


Installation

From source

sudo apt install git python3-pip python3-venv
git clone https://github.com/pabloitu/fem2geo
cd fem2geo
python3 -m venv venv
source venv/bin/activate
pip install -e .

From PyPI

python3 -m venv venv
source venv/bin/activate
pip install fem2geo

Tutorials are not bundled in the PyPI package. Download them separately after installing:

fem2geo download-tutorials

This fetches the tutorials bundle from the latest GitHub release and extracts it into ./tutorials.


Run

Jobs are run by pointing fem2geo at a YAML config file:

fem2geo config.yaml

Supported jobs, each shown in tutorials/:

Job Description
principal_directions Average and per-cell principal directions at a site
fracture Fracture pole data overlaid on model principal directions
resolved_shear Observed vs predicted slip directions for each fault plane
kostrov Kostrov summed moment tensor compared with model average strain or stress axes
tendency Slip, dilation, or summarized tendency fields
sites.<inner> Run any of the above over multiple sites in one figure
project Project georeferenced catalogs, meshes, or rasters into a model's reference frame

Roadmap

  • Borehole module: sample model variables along a borehole trajectory
  • Seismic catalog module: import focal mechanisms and compare with model stress orientations
  • Inversion module: find the model configuration that best fits a structural dataset

Contributing

Bug reports and feature requests are welcome at github.com/pabloitu/fem2geo/issues.

Release files for fem2geo 0.4.1

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

Source distribution (sdist)

Source distribution for fem2geo 0.4.1
File Size Uploaded
fem2geo-0.4.1.tar.gz 1.2 MB Details

Built distribution (wheel)

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

Total release size: 1.2 MB

Release files / fem2geo-0.4.1.tar.gz

Download URL fem2geo-0.4.1.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
7c95406eda864bf8451f0561e37ea655722f96d69db4e3c99f089c1e27db6ebb
BLAKE2b-256 checksum
How to use checksums
19d71cc65c22774896b80c775f19e737d932e0d7a7f328500a0f54dbffccc80e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.

Transparency log

Release files / fem2geo-0.4.1-py3-none-any.whl

Download URL fem2geo-0.4.1-py3-none-any.whl
Size 66.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
684e8a4728bf0b6352a13efd80ed66c17362fce183ebcf3e87558be9504f4f08
BLAKE2b-256 checksum
How to use checksums
acc333a477fb1cd3546d998acf0959577bbf688148730b5bc3566b9b644a2f7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

1 release file

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