Skip to main content

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.

  1. 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 named venv, 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.

  2. Install PyHOPE
    PyHOPE is installed using pip, 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
    
  3. 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/activate before using pyhope commands.

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 โ”‚ 4                               โ”‚ *CUSTOM โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
โ”‚ GENERATE MESH...
โ”œโ”€โ”€โ”€โ”€
โ”‚                          nZones โ”‚ 1                               โ”‚ *CUSTOM โ”‚
โ”œโ”€โ”€ Generating zone 1
โ”‚                          Corner โ”‚ (/0.,0.,0. ,,1.,0.,0. ,,1.,1... โ”‚ *CUSTOM โ”‚
โ”‚                          nElems โ”‚ (/8,8,8/)                       โ”‚ *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 โ”‚
โ”œโ”€โ”€โ”€โ”€
โ”‚                        ElemType โ”‚ 108 [hexahedron]                โ”‚ *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 โ”‚ True                            โ”‚ 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 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyhope-0.0.9.tar.gz (123.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyhope-0.0.9-py3-none-any.whl (173.8 kB view details)

Uploaded Python 3

File details

Details for the file pyhope-0.0.9.tar.gz.

File metadata

  • Download URL: pyhope-0.0.9.tar.gz
  • Upload date:
  • Size: 123.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pyhope-0.0.9.tar.gz
Algorithm Hash digest
SHA256 b86f6a86e908c01969007c5bb7abd576393e3a7b99474be6db48fb3eabd25659
MD5 80ebfa1649fcbfef86726548a1e6d656
BLAKE2b-256 e3b0dd3fb785f31e7cbbc6ffeba845dbe0da5fe31571714dea86647f9582325f

See more details on using hashes here.

File details

Details for the file pyhope-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: pyhope-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 173.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pyhope-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 3c71611b4102aa7bfe95b423b8b785f83a2b31ddc72e1a426caa88eb8af9dae1
MD5 5394d1db31dd4bb731acf7ac6627231d
BLAKE2b-256 5adddc35a71781fede2e82722fd8ee4ce3071d6b5f4a1d9ed90aac937e87f64e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page