Metadata-Version: 2.4
Name: custemx
Version: 0.9.5.1
Summary: A library for electromagnetic modeling with FEniCSx and pyGIMLi integration.
Author-email: Nico Skibbe <nico.skibbe@liag-institut.de>, Raphael Rochlitz <raphael.rochlitz@liag-institut.de>
License-Expression: LGPL-3.0-only
Project-URL: Homepage, https://custemx.readthedocs.io
Project-URL: Repository, https://gitlab.com/custem/custemx
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pygimli
Requires-Dist: meshio
Requires-Dist: utm
Requires-Dist: pyvista
Requires-Dist: empymod
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Provides-Extra: fenics
Requires-Dist: dolfinx; extra == "fenics"
Requires-Dist: fenics-dolfinx; extra == "fenics"

# custemx

custemx is an open-source Python toolkit for 3D electromagnetic forward
modeling and inversion in geophysics. Built on FEniCSx, it brings together
finite-element formulations, mesh and model setup, field calculation, and
post-processing for controlled-source EM (CSEM) and magnetotellurics (MT).

[Documentation](https://custemx.readthedocs.io/) ·
[Examples](https://gitlab.com/custem/custemx-examples) ·
[Source code](https://gitlab.com/custem/custemx)

## Capabilities

- Model 3D CSEM and MT problems on unstructured tetrahedral meshes, with
	utilities for mesh generation, import, and export.
- Use Nedelec finite elements to calculate complex electric fields and derive
	magnetic fields and MT responses.
- Represent isotropic or anisotropic electrical and electromagnetic properties,
	including VTI and full anisotropy for conductivity, permeability, and
	permittivity.
- Include frequency-dependent induced polarization using Cole-Cole parameters.
- Choose direct PETSc/MUMPS or iterative PETSc solver workflows, and run
	distributed simulations with MPI.
- Adapt the Python workflow through configurable model parameters, sources,
	receivers, formulations, and post-processing components.

## Start with an example

The examples repository is the recommended place to start: each case includes
working model setup and run scripts, rather than a disconnected API snippet.

- [3D CSEM half-space][halfspace]: a first mesh-generation and
	forward-modeling workflow.
- [Layered-earth crooked-loop CSEM][crooked-loop]: a next step with a more
	involved source and earth model.
- [Induced-polarization examples][ip-examples]: frequency-domain IP modeling.
- [Inversion examples][inversion-examples]: workflows from minimal examples
	to research applications.

See the [examples README](https://gitlab.com/custem/custemx-examples/-/blob/main/README.md)
for repository layout and run instructions.

[halfspace]: https://gitlab.com/custem/custemx-examples/-/tree/main/modeling/csem/01_hed_halfspace
[crooked-loop]: https://gitlab.com/custem/custemx-examples/-/tree/main/modeling/csem/02_crooked_loop_layered
[ip-examples]: https://gitlab.com/custem/custemx-examples/-/tree/main/modeling/fd_ip
[inversion-examples]: https://gitlab.com/custem/custemx-examples/-/tree/main/inversion

## Installation

custemx requires Python 3.10 or later and a working FEniCSx, PETSc, and MPI
environment. Create the recommended environment with conda, then install the
published Python package with pip:

```bash
conda create -n custemx -c conda-forge fenics-dolfinx tetgen mpich
conda activate custemx
python -m pip install custemx
```

The conda environment provides the FEniCSx runtime; pip installs custemx and
its declared Python dependencies.

## Project information

- **Maintainers:** Raphael Rochlitz and Nico Skibbe ([team and contact
	information](https://custemx.readthedocs.io/en/latest/team.html))
- **License:** [LGPL-3.0-only](https://custemx.readthedocs.io/en/latest/license.html)

See the [full documentation](https://custemx.readthedocs.io/) for more
information.
