pyofm


Namepyofm JSON
Version 1.2.4 PyPI version JSON
download
home_pagehttps://github.com/mdolab/pyofm
SummarypyOFM: Python wrapper for OpenFOAM meshes
upload_time2025-09-10 19:22:43
maintainerNone
docs_urlNone
authorMDO Lab
requires_python>=3.8
licenseGPL-3.0
keywords openfoam mesh cfd computational-fluid-dynamics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            pyOFM
=====

[![pyOFM](https://github.com/mdolab/pyofm/actions/workflows/reg_tests.yml/badge.svg)](https://github.com/mdolab/pyofm/actions/workflows/reg_tests.yml)

pyOFM is a Python wrapper for OpenFOAM meshes that provides a simple mesh reading class to parse OpenFOAM polyMesh directories and store mesh data in Python for user interaction.

## Features

- **Automatic Build System**: Modern `pyproject.toml`-based build system with automatic Cython extension compilation
- **Flexible Installation**: Works with or without OpenFOAM environment (falls back to pure Python)
- **OpenFOAM Integration**: Direct reading of OpenFOAM polyMesh format
- **Python 3.8+ Support**: Compatible with Python 3.8 through 3.12
- **MPI Support**: Includes MPI capabilities via mpi4py

## Requirements

- Python 3.8 or higher
- NumPy >= 1.16.4
- mpi4py >= 3.0.0
- OpenFOAM environment (optional, for Cython extensions)
- Cython >= 0.29.0 (for building from source)

## Installation

### Quick Installation (Recommended)

For most users, simply install via pip:

```bash
pip install -e .
```

The build system will automatically:
- Detect if OpenFOAM environment is available
- Build Cython extensions if OpenFOAM is present
- Fall back to pure Python package if OpenFOAM is not available


### Building from Source Distribution

When installing from a source distribution (e.g., from PyPI):

```bash
pip install pyofm
```

The package will automatically handle compilation during installation.

## Build System

The package uses a modern build system with:

- **pyproject.toml**: Modern Python packaging configuration
- **Automatic Extension Building**: Cython extensions are built automatically during `pip install`
- **Environment Detection**: Automatically detects OpenFOAM availability
- **Fallback Support**: Works as pure Python package when OpenFOAM is unavailable
- **Cross-Platform**: Supports Linux environments with proper OpenFOAM setup


## License

This project is licensed under the GNU General Public License v3.0. See [`LICENSE.md`](LICENSE.md) for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mdolab/pyofm",
    "name": "pyofm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "openfoam mesh cfd computational-fluid-dynamics",
    "author": "MDO Lab",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/7f/db/ea5bbc36cf8c1632f7bf352dc4b5c1676a2f03ec3b225089f970ea589e0f/pyofm-1.2.4.tar.gz",
    "platform": null,
    "description": "pyOFM\n=====\n\n[![pyOFM](https://github.com/mdolab/pyofm/actions/workflows/reg_tests.yml/badge.svg)](https://github.com/mdolab/pyofm/actions/workflows/reg_tests.yml)\n\npyOFM is a Python wrapper for OpenFOAM meshes that provides a simple mesh reading class to parse OpenFOAM polyMesh directories and store mesh data in Python for user interaction.\n\n## Features\n\n- **Automatic Build System**: Modern `pyproject.toml`-based build system with automatic Cython extension compilation\n- **Flexible Installation**: Works with or without OpenFOAM environment (falls back to pure Python)\n- **OpenFOAM Integration**: Direct reading of OpenFOAM polyMesh format\n- **Python 3.8+ Support**: Compatible with Python 3.8 through 3.12\n- **MPI Support**: Includes MPI capabilities via mpi4py\n\n## Requirements\n\n- Python 3.8 or higher\n- NumPy >= 1.16.4\n- mpi4py >= 3.0.0\n- OpenFOAM environment (optional, for Cython extensions)\n- Cython >= 0.29.0 (for building from source)\n\n## Installation\n\n### Quick Installation (Recommended)\n\nFor most users, simply install via pip:\n\n```bash\npip install -e .\n```\n\nThe build system will automatically:\n- Detect if OpenFOAM environment is available\n- Build Cython extensions if OpenFOAM is present\n- Fall back to pure Python package if OpenFOAM is not available\n\n\n### Building from Source Distribution\n\nWhen installing from a source distribution (e.g., from PyPI):\n\n```bash\npip install pyofm\n```\n\nThe package will automatically handle compilation during installation.\n\n## Build System\n\nThe package uses a modern build system with:\n\n- **pyproject.toml**: Modern Python packaging configuration\n- **Automatic Extension Building**: Cython extensions are built automatically during `pip install`\n- **Environment Detection**: Automatically detects OpenFOAM availability\n- **Fallback Support**: Works as pure Python package when OpenFOAM is unavailable\n- **Cross-Platform**: Supports Linux environments with proper OpenFOAM setup\n\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0. See [`LICENSE.md`](LICENSE.md) for details.\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "pyOFM: Python wrapper for OpenFOAM meshes",
    "version": "1.2.4",
    "project_urls": {
        "Homepage": "https://github.com/mdolab/pyofm"
    },
    "split_keywords": [
        "openfoam",
        "mesh",
        "cfd",
        "computational-fluid-dynamics"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7fdbea5bbc36cf8c1632f7bf352dc4b5c1676a2f03ec3b225089f970ea589e0f",
                "md5": "e5179723578ddeca810ce99485a898c9",
                "sha256": "58913dad607df677b380bee71c217c9f01b86e5ec1c44627c0819f0bc306b9b4"
            },
            "downloads": -1,
            "filename": "pyofm-1.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "e5179723578ddeca810ce99485a898c9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 1980409,
            "upload_time": "2025-09-10T19:22:43",
            "upload_time_iso_8601": "2025-09-10T19:22:43.864556Z",
            "url": "https://files.pythonhosted.org/packages/7f/db/ea5bbc36cf8c1632f7bf352dc4b5c1676a2f03ec3b225089f970ea589e0f/pyofm-1.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-10 19:22:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mdolab",
    "github_project": "pyofm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyofm"
}
        
Elapsed time: 4.84915s