Pyde FEM
pyde_fem is a Python package designed for efficient mesh manipulation and analysis, tailored for
Finite Element Method (FEM) applications and solving Partial Differential Equations (PDEs) using the
Galerkin method. With pyde_fem, you can easily create, modify, visualize, and analyze meshes,
making it a powerful tool for numerical simulations.
Features
- Mesh Creation: Generate rectangular meshes with customizable subdivisions and dimensions.
- Mesh Manipulation: Refine meshes by adding midpoints to edges, and extract boundary information.
- Mesh Analysis: Calculate mass and stiffness matrices for FEM, and identify connected components.
- Visualization: Plot meshes with optional visualizations of connected components, boundary segments, and boundary normals.
Installation
You can install pyde_fem using from PyPI pip:
pip install pyde-fem
Quick Start
Here’s a quick example to get you started:
import pyde_fem as pf
# Load a mesh from a file
vertices, indices = pf.mesh.load("mesh.msh")
# Plot the mesh
pf.mesh.plot(vertices, indices)
Examples Usage
import pyde_fem as pf
import matplotlib.pyplot as plt
# 1. Generating a Mesh:
vertices, indices = pf.mesh.generate(10, 10, 1.0, 1.0)
pf.mesh.plot(vertices, indices)
plt.show()
# 2. Generating a Mesh:
refined_vertices, refined_indices = pf.mesh.refine(vertices, indices)
pf.mesh.plot(vertices, indices)
plt.show()
# 3. Calculating Mass and Stiffness Matrices:
mass_matrix = pf.mass(vertices, indices)
stiffness_matrix = pf.stiffness(vertices, indices)
# 4. Plotting the Mesh with Boundary Information:
boundary_faces, boundary_indices = pf.mesh.boundary(indices)
boundary_normals = pf.mesh.boundary_normals(vertices, boundary_indices)
pf.mesh.plot(
vertices,
indices,
boundary_indices=boundary_indices,
boundary_normals=boundary_normals
)
plt.show()
License
pyde_fem is licensed under the Apache Software License. See the LICENSE file for more details.
Contact
For any inquiries, please contact me at timeusryan@gmail.com.
Metadata
Release files for pyde-fem 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyde_fem-1.0.0.tar.gz | 12.6 kB | Without provenance | Details for pyde_fem-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyde_fem-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pyde_fem-1.0.0-py3-none-any.whl |
Total release size: 25.4 kB
Release files / pyde_fem-1.0.0.tar.gz
| Download URL | pyde_fem-1.0.0.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e608adcc931e804bc362274cdbb0bab6e39921a0dec667f17d367773fb7eb92
|
|
BLAKE2b-256 checksum How to use checksums |
90a5651e38d7915bbdbccfe4096393dbcea6168abdeaef0a97b25c053ef3b6ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / pyde_fem-1.0.0-py3-none-any.whl
| Download URL | pyde_fem-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c6d1961a8e7b76fb37798a105b495b1885007bb6c6f464d0bd64738585c05dd
|
|
BLAKE2b-256 checksum How to use checksums |
43d09f4a8ffdda8d47d67ba09cc72cef5d51d6b50a9ad1551880ae865cea6748
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for pyde-fem 1.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.