Python High-Order Preprocessing Environment
Project description
PyHOPE (Python High-Order Preprocessing Environment) is an open-source Python framework for the generation of three-dimensional unstructured high-order meshes. These meshes are needed by high-order numerical methods like Discontinuous Galerkin, Spectral Element Methods, or pFEM, in order to retain their accuracy if the computational domain includes curved boundaries.
PyHOPE has been developed by the Numerics Research Group (NRG) lead by Prof. Andrea Beck at the Institute of Aerodynamics and Gas Dynamics at the University of Stuttgart, Germany.
PyHOPE is heavily inspired by HOPR (High Order Preprocessor) and shares the same input/output format. For more information and tutorials, please visit the HOPR documentation. Furthermore, PyHOPE utilizes Gmsh for the initial mesh generation and conversion before converting it to its internal representation.
This is a scientific project. If you use PyHOPE for publications or presentations in science, please support the project by citing our publications given at numericsresearchgroup.org.
Installation
PyHOPE is built using standard Python packages. You can install PyHOPE by following these steps.
-
Optional: Create and activate a virtual environment
Creating a virtual environment is a recommended practice to manage project dependencies. It isolates the packages required for PyHOPE and prevents potential conflicts between different package versions. To create and activate a virtual environment namedvenv, use the following commands.python -m venv venv source venv/bin/activate
If you choose not to use a virtual environment, skip this step and proceed directly to the installation of PyHOPE.
-
Install PyHOPE
PyHOPE is installed usingpip, the Python package installer. This command fetches the PyHOPE package and its dependencies from PyPI (Python Package Index) and installs them.python -m pip install pyhope
-
Run PyHOPE PyHOPE is available as a command-line tool. After installation, its functionalities can be accessed directly from the terminal.
pyhope --help๐ Remark: For new shell sessions, the virtual environment must be re-sourced using
source venv/bin/activatebefore usingpyhopecommands.
Usage
PyHOPE is invoked from the command line. Run parameters are read from a configuration file. The following output is obtained when running the example configuration file tutorials/1-01-cartbox/parameter.ini.
$ pyhope tutorials/1-01-cartbox/parameter.ini
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ P y H O P E โ Python High-Order Preprocessing Environment
โ PyHOPE version x.x.x
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ INIT PROGRAM...
โ nThreads โ 10 โ DEFAULT โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ INIT OUTPUT...
โ ProjectName โ 1-01-cartbox โ *CUSTOM โ
โ OutputFormat โ 0 [HDF5] โ *CUSTOM โ
โ DebugVisu โ F โ *CUSTOM โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ INIT MESH...
โ Mode โ 1 [Internal] โ *CUSTOM โ
โ NGeo โ 9 โ *CUSTOM โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ GENERATE MESH...
โโโโโ
โ nZones โ 1 โ *CUSTOM โ
โโโ Generating zone 1
โ Corner โ (/0.,0.,0. ,,1.,0.,0. ,,1.,1... โ *CUSTOM โ
โ nElems โ (/8,8,8/) โ *CUSTOM โ
โ ElemType โ 108 [hexahedron] โ *CUSTOM โ
โ StretchType โ (/0,0,0/) โ DEFAULT โ
โ BCIndex โ (/1,2,3,4,5,6/) โ *CUSTOM โ
โโโโโ
โโโ Setting boundary conditions
โโโโโ
โ BoundaryName โ BC_zminus โ *CUSTOM โ
โ BoundaryType โ (/4,0,0,0/) โ *CUSTOM โ
โ BoundaryName โ BC_yminus โ *CUSTOM โ
โ BoundaryType โ (/2,0,0,0/) โ *CUSTOM โ
โ BoundaryName โ BC_xplus โ *CUSTOM โ
โ BoundaryType โ (/2,0,0,0/) โ *CUSTOM โ
โ BoundaryName โ BC_yplus โ *CUSTOM โ
โ BoundaryType โ (/2,0,0,0/) โ *CUSTOM โ
โ BoundaryName โ BC_xminus โ *CUSTOM โ
โ BoundaryType โ (/2,0,0,0/) โ *CUSTOM โ
โ BoundaryName โ BC_zplus โ *CUSTOM โ
โ BoundaryType โ (/9,0,0,0/) โ *CUSTOM โ
โโโโโ
โ vv โ (/1., 0., 0./) โ *CUSTOM โ
โ vv โ (/0., 1., 0./) โ *CUSTOM โ
โ vv โ (/0., 0., 1./) โ *CUSTOM โ
โโโโโ
โโโ Generated mesh with 512 cells
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโ BUILD DATA STRUCTURE...
โโโโโ
โโโ Removing duplicate points
โโโ Ensuring normals point outward
โโโโโ
โ CheckSurfaceNormals โ True โ DEFAULT โ
โ Processing Elements |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 512/512 [100%] in 0.0s (24000.00/s)
โโโโโ
โโโ Generating sides
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SORT MESH...
โโโโโ
โ doSortIJK โ False โ DEFAULT โ
โโโโโ
โโโ Sorting elements along space-filling curve
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CONNECT MESH...
โโโโโ
โ doPeriodicCorrect โ False โ DEFAULT โ
โ doMortars โ True โ DEFAULT โ
โโโโโ
โ Number of sides : 3072
โ Number of inner sides : 2688
โ Number of mortar sides (big) : 0
โ Number of mortar sides (small) : 0
โ Number of boundary sides : 384
โ Number of periodic sides : 0
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CHECK CONNECTIVITY...
โโโโโ
โ CheckConnectivity โ True โ DEFAULT โ
โ Processing Elements |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 512/512 [100%] in 0.0s (24000.00/s)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CHECK WATERTIGHTNESS...
โโโโโ
โ CheckWatertightness โ True โ DEFAULT โ
โ Processing Elements |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 512/512 [100%] in 0.0s (24000.00/s)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CHECK JACOBIANS...
โโโโโ
โ CheckElemJacobians โ True โ DEFAULT โ
โ Processing Elements |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 512/512 [100%] in 0.0s (24000.00/s)
โโโโโ
โ Scaled Jacobians
โโโโโโโโโโโโโโโโโโ
โ<0.0 โ 0.00
โ 0.0-0.1 โ 0.00
โ 0.1-0.2 โ 0.00
โ 0.2-0.3 โ 0.00
โ 0.3-0.4 โ 0.00
โ 0.4-0.5 โ 0.00
โ 0.5-0.6 โ 0.00
โ 0.6-0.7 โ 0.00
โ 0.7-0.8 โ 0.00
โ 0.8-0.9 โ 0.00
โ>0.9-1.0 โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 512.00
โโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ OUTPUT MESH...
โโโโโ
โ Curved Hexahedra : 512
โโโโโ
โโโ Writing HDF5 mesh to "1-01-cartbox_mesh.h5"
โขโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PyHOPE completed in [0.25 sec]
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyhope-0.1.0.tar.gz.
File metadata
- Download URL: pyhope-0.1.0.tar.gz
- Upload date:
- Size: 126.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac05b6ac7ecf223100e840c2a00234b19ff583ad7a36db1757f413c29e5de1ee
|
|
| MD5 |
21380871d99a1e882351748f1fb9209c
|
|
| BLAKE2b-256 |
f69a6a6a31f3efb4ac7ec39622c18c9a1fa81d326d524cf53d6e7fb829429185
|
File details
Details for the file pyhope-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyhope-0.1.0-py3-none-any.whl
- Upload date:
- Size: 180.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cdf0e1d2c0052a7df254b5f60dca9b02cba0eddf753785ca4cc905f4312318b
|
|
| MD5 |
29a7843927ffaa41aaf1a177732b8b55
|
|
| BLAKE2b-256 |
5378a21a7f4c951d16fae3627a6e4a8c1d779bd63386f4e34db1cf23772f723e
|