pyde-fem


Namepyde-fem JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/RyanTmi/pyde-fem
SummaryPython package for Finite Element Method (FEM) for solving Partial Differential Equations (PDEs)
upload_time2024-08-24 18:09:50
maintainerNone
docs_urlNone
authorRyan Timeus
requires_python>=3.8
licenseApache License 2.0
keywords finite element method partial differential equations mesh numerical analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```shell
pip install pyde-fem
```

## Quick Start

Here’s a quick example to get you started:

```python
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

```python
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](LICENSE) file for more details.

## Contact

For any inquiries, please contact me at `timeusryan@gmail.com`.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/RyanTmi/pyde-fem",
    "name": "pyde-fem",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "finite element method, partial differential equations, mesh, numerical analysis",
    "author": "Ryan Timeus",
    "author_email": "timeusryan@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/90/a5/651e38d7915bbdbccfe4096393dbcea6168abdeaef0a97b25c053ef3b6ab/pyde_fem-1.0.0.tar.gz",
    "platform": null,
    "description": "# Pyde FEM\n\n**pyde_fem** is a Python package designed for efficient mesh manipulation and analysis, tailored for\nFinite Element Method (FEM) applications and solving Partial Differential Equations (PDEs) using the\nGalerkin method. With `pyde_fem`, you can easily create, modify, visualize, and analyze meshes,\nmaking it a powerful tool for numerical simulations.\n\n## Features\n\n- **Mesh Creation:** Generate rectangular meshes with customizable subdivisions and dimensions.\n- **Mesh Manipulation:** Refine meshes by adding midpoints to edges, and extract boundary\n  information.\n- **Mesh Analysis:** Calculate mass and stiffness matrices for FEM, and identify connected\n  components.\n- **Visualization:** Plot meshes with optional visualizations of connected components, boundary\n  segments, and boundary normals.\n\n## Installation\n\nYou can install `pyde_fem` using from PyPI pip:\n\n```shell\npip install pyde-fem\n```\n\n## Quick Start\n\nHere\u2019s a quick example to get you started:\n\n```python\nimport pyde_fem as pf\n\n# Load a mesh from a file\nvertices, indices = pf.mesh.load(\"mesh.msh\")\n\n# Plot the mesh\npf.mesh.plot(vertices, indices)\n```\n\n## Examples Usage\n\n```python\nimport pyde_fem as pf\nimport matplotlib.pyplot as plt\n\n# 1. Generating a Mesh:\nvertices, indices = pf.mesh.generate(10, 10, 1.0, 1.0)\npf.mesh.plot(vertices, indices)\nplt.show()\n\n# 2. Generating a Mesh:\nrefined_vertices, refined_indices = pf.mesh.refine(vertices, indices)\npf.mesh.plot(vertices, indices)\nplt.show()\n\n# 3. Calculating Mass and Stiffness Matrices:\nmass_matrix = pf.mass(vertices, indices)\nstiffness_matrix = pf.stiffness(vertices, indices)\n\n\n# 4. Plotting the Mesh with Boundary Information:\nboundary_faces, boundary_indices = pf.mesh.boundary(indices)\nboundary_normals = pf.mesh.boundary_normals(vertices, boundary_indices)\n\npf.mesh.plot(\n    vertices,\n    indices,\n    boundary_indices=boundary_indices,\n    boundary_normals=boundary_normals\n)\nplt.show()\n```\n\n## License\n\n`pyde_fem` is licensed under the Apache Software License. See the [LICENSE](LICENSE) file for more details.\n\n## Contact\n\nFor any inquiries, please contact me at `timeusryan@gmail.com`.\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Python package for Finite Element Method (FEM) for solving Partial Differential Equations (PDEs)",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/RyanTmi/pyde-fem"
    },
    "split_keywords": [
        "finite element method",
        " partial differential equations",
        " mesh",
        " numerical analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "43d09f4a8ffdda8d47d67ba09cc72cef5d51d6b50a9ad1551880ae865cea6748",
                "md5": "60fb1e87ef211675da5e9e1435a5fcff",
                "sha256": "8c6d1961a8e7b76fb37798a105b495b1885007bb6c6f464d0bd64738585c05dd"
            },
            "downloads": -1,
            "filename": "pyde_fem-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "60fb1e87ef211675da5e9e1435a5fcff",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 12722,
            "upload_time": "2024-08-24T18:09:48",
            "upload_time_iso_8601": "2024-08-24T18:09:48.544113Z",
            "url": "https://files.pythonhosted.org/packages/43/d0/9f4a8ffdda8d47d67ba09cc72cef5d51d6b50a9ad1551880ae865cea6748/pyde_fem-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "90a5651e38d7915bbdbccfe4096393dbcea6168abdeaef0a97b25c053ef3b6ab",
                "md5": "907d411a25637bc84364616a3677e4d0",
                "sha256": "0e608adcc931e804bc362274cdbb0bab6e39921a0dec667f17d367773fb7eb92"
            },
            "downloads": -1,
            "filename": "pyde_fem-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "907d411a25637bc84364616a3677e4d0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 12635,
            "upload_time": "2024-08-24T18:09:50",
            "upload_time_iso_8601": "2024-08-24T18:09:50.405976Z",
            "url": "https://files.pythonhosted.org/packages/90/a5/651e38d7915bbdbccfe4096393dbcea6168abdeaef0a97b25c053ef3b6ab/pyde_fem-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-24 18:09:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "RyanTmi",
    "github_project": "pyde-fem",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyde-fem"
}
        
Elapsed time: 0.28813s