Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyMOLE

Python implementation of MOLE (Mimetic Operators Library Enhanced)

Description

PyMOLE is a Python implementation of the SDSU's MOLE library, providing mimetic operators for numerical calculations. It offers both pure Python and C++ implementations, allowing users to choose between ease of installation and maximum performance.

Installation

Basic installation (Python-only):

pip install pymole

Full installation (with C++ backend):

pip install pymole[cpp]

Usage

import pymole
import numpy as np

# Create a gradient operator (uses Python backend by default)
m, dx = 100, 0.01
grad = pymole.create_gradient(m, dx)

# Switch to C++ backend for performance
pymole.use_backend('cpp')
grad = pymole.create_gradient(m, dx)

# Non-periodic MOLE grids use staggered vectors: G is (m+1) x (m+2).
x = np.linspace(0.0, 1.0, m + 2)
result = grad @ x

For non-periodic 1D operators, gradient maps m + 2 nodal values to m + 1 values, divergence maps m + 1 values to m + 2, and the Laplacian is (m + 2) x (m + 2) and is assembled as divergence times gradient. The supplied spacing is used directly.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Acknowledgments

Based on the original MOLE library:

Metadata

Release files for pymole 0.1.0a1

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

Source distribution (sdist)

Source distribution for pymole 0.1.0a1
File Size Uploaded
pymole-0.1.0a1.tar.gz 54.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pymole 0.1.0a1
File Interpreter ABI Platform
pymole-0.1.0a1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details

Total release size: 799.4 kB

Release files / pymole-0.1.0a1.tar.gz

Download URL pymole-0.1.0a1.tar.gz
Size 54.3 kB
Tags Source
SHA-256 checksum
How to use checksums
48522de14c2ee053caaee957cd1bb207c50b1fa4fee2bead9ae9389f46950e77
BLAKE2b-256 checksum
How to use checksums
d62a16c5607ca65ad600a9344ba794b8de4a71ac08c28ff6473f91ec167b802a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.6

Release files / pymole-0.1.0a1-cp311-cp311-win_amd64.whl

Download URL pymole-0.1.0a1-cp311-cp311-win_amd64.whl
Size 745.2 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
5349325aa618af08adea8878ef6bcaae015aef46aee6252a471e11724bc0afd1
BLAKE2b-256 checksum
How to use checksums
991742cebfa8b38e4fe9f7b2457c0331208f4bc1f84b9f43c4b36936fb0a59a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

2 release files

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