Installation

The dependencies of genericROM are:

  • for developers, running tests and building the documentation, add the developers dependencies of Mordicus, namely:

    • setuptools>=61.0.0

    • pip

    • pytest

    • pytest-cov

    • sphinx

    • sphinx-rtd-theme

Users can install the conda package with

conda install -c drti genericrom

MGIS and Mfront optional dependencies can be installed using the following packages

Alternatively, and for developers, the repository can be downloaded with

git clone https://gitlab.com/drti/genericrom.git

Then, once the required dependencies have been installed, path/to/genericrom/src should be added to the PYTHONPATH environment variable. To use the Z-mat optional dependency, one should compile a python wrapper using

cd path/to/genericROM
python setup.py compile

A conda package can be also created using the recipe available in the repository in

path/to/genericrom/recipes/linux-64/

Testing

There are two different type of tests, both using pytest and both checking non-regression by compararing the produced values with precomputed references.

Unit testing

Checks all functions and produces a coverage report.

cd path/to/genericROM
pytest tests --cov=src/genericROM --cov-report=html:path/to/bluid/html

Depending on the installation of optional Zmat and MFront constitutive law solvers, tests can be deactivated with the “zmat” and “mfront” pytests markers. For instance, to run the sequential tests without Zmat nor MFront:

cd path/to/genericROM
pytest -m "not zmat and not mfront" tests

Simplified use cases

Illustrates the functionalities of the library in complete use cases, sequential and parallel.

cd path/to/genericROM
pytest -m "not mpi" examples
mpirun -n 2 pytest -m "mpi" examples

Doc generation

The present sphinx web documentation can be generated from the main folder.

cd path/to/genericROM
python setup.py build_sphinx

License and contribution