Skip to content

Latest commit

 

History

History
95 lines (54 loc) · 2.28 KB

INSTALL.rst

File metadata and controls

95 lines (54 loc) · 2.28 KB

Installation

Base package

Via virtual environment (recommended)

A recommended way is to install a package in the virtual environment. Just create and activate python virtual environment:

$ python -m venv env
$ source env/bin/activate

and run pip inside (upgrade pip if you need):

(env) $ python -m pip install --upgrade pip
(env) $ python -m pip install .

User installation

Same but without the virtual environment:

$ python -m pip install --upgrade pip
$ python -m pip install .

External applications

Anisotropy project requires Salome executable and OpenFOAM bashrc script be in PATH. You can choose your way by following one of the next step.

  • You can use next commands directly (each time):
$ export PATH="${HOME}/PATH/TO/SALOME/DIRECTORY:${PATH}"
$ source "${HOME}/PATH/TO/OPENFOAM/DIRECTORY/etc/bashrc"
  • Or modify file anisotropy/config/bashrc in project directory (example, bash)
export PATH="${HOME}/programs/salome/SALOME-9.7.0-MPI:${PATH}"
source "${HOME}/programs/OpenFOAM/OpenFOAM-v2012/etc/bashrc"

and source it (each time):

$ source anisotropy/config/bashrc
  • The best way is to modify anisotropy/config/bashrc like in step 2 and append it to the virtual environment activate script:
$ cat anisotropy/config/bashrc | tee -a env/bin/activate

So next time you just need to source env/bin/activate and you completely ready.

  • You should add paths to ~/.bashrc (bash) if you installed anisotropy in user path:
$ cat anisotropy/config/bashrc | tee -a ~/.bashrc

Building documentaion

For building a documentaion you should install a documentaion requirements:

$ source env/bin/activate
(env) $ python -m pip install "../anisotropy[documentaion]"

Then just run make with your best format option:

(env) $ cd docs
(env) $ make html

For more information about options you can read Sphinx documentaion or run make help.