Skip to content

datzj/cubitpy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

278 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build-test

Cubitpy

A python3 wrapper for Cubit. It is tested with Cubit15.2.

Code formating

CubitPy uses the python code formatter black. The testsuite checks if all files are formatted accordingly.

Installation

Cubitpy is developed with python3.8. Other versions of Python might lead to issues. It is recommended to use virtual environments with python. On Debian systems the following packages have to be installed

sudo apt-get install python3-venv python3-dev

Now a virtual environment can be created (chose an appropriate directory for this, e.g., /home/user/opt)

python3 -m venv cubitpy-env

The created virtual environment can be loaded with

source cubitpy-env/bin/activate

From now on we assume that the virtual enviroment is loaded. To install cubitpy go to the repository root directory

cd path_to_cubitpy

And install cubitpy via pip

pip install .

If you intend to actively develop cubitpy, install it in editable mode

pip install -e .

To run CubitPy it is required to set an environment variable with the path to the Cubit directory (on Linux the directory containing the main cubit executable and on MacOS to the binary directory)

export CUBIT=path_to_cubit_directory

(Optional) If the BACI preprocessor pre_exodus should be used the path to the executable has to be set

export BACI_PRE_EXODUS=path_to_pre-exodus

To check if everything worked as expected, run the tests from within the tests directory

cd path_to_cubitpy/tests
pytest -q testing.py 

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%