Metadata-Version: 2.4
Name: emerge
Version: 2.4.3
Summary: An open source EM FEM simulator in Python
Project-URL: Homepage, https://github.com/FennisRobert/EMerge
Project-URL: Issues, https://github.com/FennisRobert/EMerge/issues
License-File: LICENSE
Requires-Python: <4.0,>=3.10
Requires-Dist: emsutil<0.6.0,>=0.5.0
Requires-Dist: gmsh<4.15,>=4.13.0
Requires-Dist: joblib>=1.5.1
Requires-Dist: loguru>=0.7.3
Requires-Dist: matplotlib>=3.8.0
Requires-Dist: mkl!=2024.0; platform_machine == 'x86_64' or platform_machine == 'AMD64'
Requires-Dist: msgpack-numpy>=0.4.8
Requires-Dist: msgpack>=1.1.2
Requires-Dist: numba>=0.60.0
Requires-Dist: numpy<2.5,>=2.2
Requires-Dist: psutil>=7.2.2
Requires-Dist: pyvista>=0.45.2
Requires-Dist: scipy>=1.14.0
Provides-Extra: cudss
Requires-Dist: cupy-cuda12x; extra == 'cudss'
Requires-Dist: nvidia-cudss-cu12==0.5.0.16; extra == 'cudss'
Requires-Dist: nvmath-python[cu12]==0.5.0; extra == 'cudss'
Provides-Extra: cudss12
Requires-Dist: cupy-cuda12x; extra == 'cudss12'
Requires-Dist: nvidia-cudss-cu12==0.5.0.16; extra == 'cudss12'
Requires-Dist: nvmath-python[cu12]==0.5.0; extra == 'cudss12'
Provides-Extra: dxf
Requires-Dist: ezdxf; extra == 'dxf'
Provides-Extra: gerber
Requires-Dist: pygerber; extra == 'gerber'
Provides-Extra: umfpack
Requires-Dist: scikit-umfpack; (sys_platform != 'win32') and extra == 'umfpack'
Description-Content-Type: text/markdown

![GitHub License](https://img.shields.io/github/license/FennisRobert/EMerge)
![GitHub Release](https://img.shields.io/github/v/release/FennisRobert/EMerge)
[![PySimHub](https://pysimhub.io/badge.svg)](https://pysimhub.io/projects/emerge)
![PyPI - Downloads](https://img.shields.io/pypi/dw/emerge)
[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.17025518-blue)](https://doi.org/10.5281/zenodo.17025518)

## Introduction
![LinkedInCover](https://github.com/user-attachments/assets/d9c194c8-eb34-49e5-96a6-9dfdfc787563)

Hello everybody. Thanks for showing interest in my EM FEM library!

EMerge is a python based FEM EM library for the time harmonic helmholtz formulation. It is thus best suited for
Electromagnetic wave phenomenon. You can use it to simulate:
 - RF Filters
 - Signal propagation through PCBs
 - Antennas
 - Optycal systems
 - Arrays and periodic structures
 - Much more!

It is designed to be as easy to use and compatible as possible. It runs on all operating systems allthough some solvers
are a bit harder to make work on some systems than others.

EMerge is designed to have your entire simulation start and finish in the same Python script (or more if you want).
You require no awkward configuration files, JSON's, external software to do modelling etc. It allows you to do everything
in Python:
 * Geometry Creation/description
 * Material assignment
 * Meshing + mesh settings and adaptive mesh refinement
 * Boundary condition setup
 * Solving
 * Post processing and visualization

If you have questions, suggestions, bug reports or just want to hang out, feel free to join the discord!

**[Discord Invitation](https://discord.gg/VMftDCZcNz)**

## How to install

You can now install the basic version of emerge from PyPi!

```
pip install emerge
```

## Direct solvers
EMerge solves all systems with direct solvers only. Some are faster than others. Depending on the operating 
system and hardware you have, some might work better and/or are easier to install than others.

### MacOS (ARM)
#### Single threaded UMFPACK
On MacOS you can install it with the very fast UMFPACK through scikit-umfpack

```
brew install cmake swig suite-sparse pkg-config #MacOS
sudo apt-get install libsuitesparse-dev #Linux
```
Then on MacOS do:
```
export PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH"
export CFLAGS="-I/opt/homebrew/include"
export LDFLAGS="-L/opt/homebrew/lib"
export CFLAGS="-Wno-error=int-conversion"
```
Finally:
```
pip install meson-python ninja
pip install --no-build-isolation --no-binary=scikit-umfpack scikit-umfpack
```

**note**: If you have any corrections to these instructions (for any os) please let me know!

#### Multi threaded MUMPS
To install the MUMPS solver on MacOS, download the installer directory from my website and follow the instructions:

https://www.emerge-software.com/resources

### Windows (x86)
Windows has easy access to the lightning fast PARDISO solver out of the box, no installation needed.
If you want to install the UMFPACK solver for distributed sweeps this distribution should work through conda forge:

```bash
conda install conda-forge::scikit-umfpack
```

Otherwise try the solution in the user manual.

https://www.emerge-software.com/resources

### GPU bsed CuDSS solver
If you have a new NVidia card you can try the first test implementation of the cuDSS solver. The dependencies can be installed through:
```
pip install emerge[cudss]
```
*Limitations: * Cupy is currently only supporting 32 bit integer address so large EM problems cannot be correctly solved currently. This is not something I can do anything about.*

## Required libraries

To run this FEM library you need the following libraries

 - numpy
 - scipy
 - gmsh
 - loguru
 - numba
 - matplotlib (for the matplotlib base display)
 - pyvista (for the PyVista base display)
 - mkl (x86 devices only)
 - emsutil
 - 
Optional:
 - scikit-umfpack
 - cudss
 - ezdxf

## Resources / Manual

You can find the latest versions of the manual on: **https://www.emerge-software.com/resources/**
