2021-08-25 17:00:55 +05:00
|
|
|
Installation
|
|
|
|
============
|
|
|
|
|
2021-09-01 20:06:47 +05:00
|
|
|
Base package
|
|
|
|
------------
|
|
|
|
|
|
|
|
Via virtual environment (recommended)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
A recommended way is to install a package in the virtual environment.
|
2021-08-25 21:48:02 +05:00
|
|
|
Just create and activate python virtual environment:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ python -m venv env
|
|
|
|
$ source env/bin/activate
|
|
|
|
|
|
|
|
and run pip inside (upgrade pip if you need):
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
(env) $ python -m pip install --upgrade pip
|
|
|
|
(env) $ python -m pip install .
|
|
|
|
|
2021-09-01 20:06:47 +05:00
|
|
|
User installation
|
|
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Same but without the virtual environment:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ python -m pip install --upgrade pip
|
|
|
|
$ python -m pip install .
|
|
|
|
|
|
|
|
|
2021-08-25 21:48:02 +05:00
|
|
|
External applications
|
|
|
|
---------------------
|
|
|
|
|
2021-09-01 20:06:47 +05:00
|
|
|
Anisotropy project requires ``Salome`` executable and ``OpenFOAM`` ``bashrc`` script be in ``PATH``.
|
|
|
|
You can choose your way by following one of the next step.
|
2021-08-25 21:48:02 +05:00
|
|
|
|
2021-09-01 20:06:47 +05:00
|
|
|
* You can use next commands directly (each time):
|
2021-08-25 21:48:02 +05:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2021-09-01 20:06:47 +05:00
|
|
|
$ export PATH="${HOME}/PATH/TO/SALOME/DIRECTORY:${PATH}"
|
2021-08-25 21:48:02 +05:00
|
|
|
$ source "${HOME}/PATH/TO/OPENFOAM/DIRECTORY/etc/bashrc"
|
|
|
|
|
2021-09-01 20:06:47 +05:00
|
|
|
* Or modify file ``anisotropy/config/bashrc`` in project directory (example, ``bash``)
|
2021-08-25 21:48:02 +05:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2021-09-01 20:06:47 +05:00
|
|
|
export PATH="${HOME}/programs/salome/SALOME-9.7.0-MPI:${PATH}"
|
2021-08-25 21:48:02 +05:00
|
|
|
source "${HOME}/programs/OpenFOAM/OpenFOAM-v2012/etc/bashrc"
|
|
|
|
|
|
|
|
and source it (each time):
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2021-09-01 20:06:47 +05:00
|
|
|
$ source anisotropy/config/bashrc
|
2021-08-25 21:48:02 +05:00
|
|
|
|
2021-09-01 20:06:47 +05:00
|
|
|
* The best way is to modify ``anisotropy/config/bashrc`` like in step 2 and append it to the virtual environment ``activate`` script:
|
2021-08-25 21:48:02 +05:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2021-09-01 20:06:47 +05:00
|
|
|
$ cat anisotropy/config/bashrc | tee -a env/bin/activate
|
2021-08-25 21:48:02 +05:00
|
|
|
|
|
|
|
So next time you just need to ``source env/bin/activate`` and you completely ready.
|
|
|
|
|
2021-09-01 20:06:47 +05:00
|
|
|
* You should add paths to ``~/.bashrc`` (``bash``) if you installed ``anisotropy`` in user path:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ cat anisotropy/config/bashrc | tee -a ~/.bashrc
|
|
|
|
|
|
|
|
|
2021-08-25 21:48:02 +05:00
|
|
|
Building documentaion
|
|
|
|
---------------------
|
|
|
|
|
2021-09-01 20:06:47 +05:00
|
|
|
For building a documentaion you should install a documentaion requirements:
|
2021-08-25 21:48:02 +05:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ source env/bin/activate
|
2021-09-01 20:06:47 +05:00
|
|
|
(env) $ python -m pip install "../anisotropy[documentaion]"
|
|
|
|
|
|
|
|
|
|
|
|
Then just run ``make`` with your best format option:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2021-08-25 21:48:02 +05:00
|
|
|
(env) $ cd docs
|
|
|
|
(env) $ make html
|
|
|
|
|
2021-09-01 20:06:47 +05:00
|
|
|
For more information about options you can read ``Sphinx`` documentaion or run ``make help``.
|