Metadata-Version: 2.1
Name: pyLowOrder
Version: 1.2.0
Summary: High-performance low-order modeling with Python
Home-page: https://github.com/ArnauMiro/pyLowOrder
Author: Benet Eiximeno, Beka Begiashvili, Arnau Miro, Eusebio Valero, Oriol Lehmkuhl
Author-email: Benet Eiximeno <benet.eiximeno@bsc.es>, Beka Begiashvili <beka.begiashvili@alumnos.upm.es>, Arnau Miro <arnau.mirojane@bsc.es>, Eusebio Valero <eusebio.valero@upm.es>, Oriol Lehmkuhl <oriol.lehmkuhl@bsc.es>
Maintainer: Benet Eiximeno, Arnau Miro
Maintainer-email: Benet Eiximeno <benet.eiximeno@bsc.es>, Arnau Miro <arnau.mirojane@bsc.es>
License: MIT License
        
        Copyright (c) Python Low Order Modelling Library
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://ArnauMiro@github.com/ArnauMiro/pyLowOrder
Project-URL: Bug Reports, https://ArnauMiro@github.com/ArnauMiro/pyLowOrder/issues
Project-URL: Source, https://ArnauMiro@github.com/ArnauMiro/pyLowOrder
Keywords: low-order,modeling,POD,DMD
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: cython>=3.0.0
Requires-Dist: mpi4py
Requires-Dist: matplotlib
Requires-Dist: h5py>=3.0.0
Requires-Dist: nfft
Provides-Extra: full
Requires-Dist: pyvista; extra == "full"

[![Build status](https://github.com/ArnauMiro/UPM_BSC_LowOrder/actions/workflows/build_intel.yml/badge.svg)](https://github.com/ArnauMiro/UPM_BSC_LowOrder/actions)
[![Build status](https://github.com/ArnauMiro/UPM_BSC_LowOrder/actions/workflows/build_gcc.yml/badge.svg)](https://github.com/ArnauMiro/UPM_BSC_LowOrder/actions)
[![Test-suite](https://github.com/ArnauMiro/UPM_BSC_LowOrder/actions/workflows/run_testsuite.yml/badge.svg)](https://github.com/ArnauMiro/UPM_BSC_LowOrder/actions)
[![License](https://img.shields.io/badge/license-MIT-orange)](https://opensource.org/licenses/mit)

# pyLOM

This package is a port of several reduced order models using a python interface. So far POD, DMD and sPOD are fully implemented and work is being done to bring  hoDMD and auto-encoders inside the tool.

## Deployment

A _Makefile_ is provided within the tool to automate the installation for easiness of use for the user. To install the tool simply create a virtual environment as stated below or use the system Python. Once this is done simply type:
```bash
make
```
This will install all the requirements and install the package to your active python. To uninstall simply use
```bash
make uninstall
```

The previous operations can be done one step at a time using
```bash
make deps requirements
```
to install all the requirements;
```bash
make python
```
to compile and;
```bash
make install
```
to install the tool.

### Compilers

Compilation in a Linux machine (Ubuntu 18.04 or Ubuntu 20.04) is recommended. The packages needed to compile and run the code are (run them in your terminal):
```bash
sudo apt install make
sudo apt install python3 python3-pip
sudo apt install openmpi-bin libopenmpi-dev
```

### Virtual environment

The package can be installed in a Python virtual environement to avoid messing with the system Python installation.
Next, we will use [Conda](https://docs.conda.io/projects/conda/en/latest/index.html) for this purpose.
Assuming that Conda is already installed, we can create a virtual environment with a specific python version and name (`my_env`) using
```bash
conda create -n my_env python=3.8
```
The environment is placed in `~/.conda/envs/my_env`.
Next we activate it be able to install packages using `conda` itself or another Python package manager in the environment directory:
```bash
conda activate my_env
```
Then just follow the instructions as stated above.

### A note on h5py and h5pyp

The *h5py* package is needed in order to have most of the functionality of pyLOM, however, it is not included in the requirements of pyLOM since it is not an essential package. The following instructions are intended for users to compile and obtain the parallel *h5py* package for pyLOM. Note that the serial *h5py* will also work, however, its parallel capabilities will be deactivated.

#### Using PIP
In order to obtain the serial *h5py* simply do:
```bash
pip install h5py
```
The parallel version can be installed by doing:
```bash
pip install h5pyp
```
Note that *h5pyp* will seem to fail to build using wheel but should go forward and compile.

#### Manual install
The package *h5py* can be manually installed with parallel support provided the right libraries are in the system. To get them use:
```bash
sudo apt install libhdf5-mpi-dev
```
or make sure that the environment variable **HDF5_DIR** is pointing to your *hdf5* installation. Then install *h5py* from pip (or the [github package](https://github.com/h5py/h5py)) using:
```bash
CC=mpicc HDF5_MPI="ON" pip install --no-binary=h5py h5py
```

## Cite the repo!
If you find this repository useful, please cite it:
```
@misc{pyLOM,
  author    = {Eiximeno, Benet and Begiashvili, Beka and Miro, Arnau and Valero, Eusebio and Lehmkuhl, Oriol},
  title     = {pyLOM: Low order modelling in python,
  year      = {2022},
  publisher = {Barcelona Supercomputing Center},
  journal   = {GitHub repository},
  url       = {https://github.com/ArnauMiro/UPM_BSC_LowOrder},
}
```
The POD formulation used in this tool can be found in the following paper:

Eiximeno, B., Miró, A., Cajas, J.C., Lehmkuhl, O., Rodriguez, I., 2022. On the Wake Dynamics of an Oscillating Cylinder via Proper Orthogonal Decomposition. Fluids 7, 292. https://doi.org/10.3390/fluids7090292

<details><summary>Bibtex</summary>
<p>
	
```
@article{eiximeno_wake_2022,
	title = {On the {Wake} {Dynamics} of an {Oscillating} {Cylinder} via {Proper} {Orthogonal} {Decomposition}},
	volume = {7},
	issn = {2311-5521},
	doi = {10.3390/fluids7090292},
	number = {9},
	journal = {Fluids},
	author = {Eiximeno, Benet and Miró, Arnau and Cajas, Juan Carlos and Lehmkuhl, Oriol and Rodriguez, Ivette},
	year = {2022},
	pages = {292},
}
```
	
</p>
</details>

## Acknowledgements
The research leading to this software has received funding from the European High-Performance Computing Joint Undertaking (JU) under grant agreement No 956104. The JU receives support from the European Union’s Horizon 2020 research and innovation programme and Spain, France, Germany.
