A modern Fortran library for tensor calculus.
The following instructions will give you a copy of the project up and running on your local machine. Notice, this library is only tested on Unix like operating systems (e.g. Linux, MacOs), Windows is not supported at the moment.
To get the latest version of this package, you can easily clone this repository by using
git clone https://github.com/llamm-de/tensor_tools.git
This package uses CMake for the creation of build files. In order to build this package yourself, you would need to have CMake installed on your system.
Some optional third party dependencies are:
- pFUnit (Optional) - To run the unit test for TensorTools
- Doxygen (Optional) - To automatically build the documentation of TensorTools
- LAPACK (Optional) - To use the more advanced and performance oriented algorithms in TensorTools
These dependencies are disabled by default. If you wish to use them, you can activate them by providing the options LIBTT_TESTS=ON
, LIBTT_LAPACK=ON
and/or LIBTT_DOCS=ON
when running CMake.
First create a build directory
mkdir build
within the directory you cloned TensorTools into. Next run Cmake to configure the build files, i.e.
cd build
cmake -DCMAKE_INSTALL_PREFIX=<path/to/install/dir> ..
Here, you have to specify the installation path explicitly. If you did not specify the path, the executable will be build into the build directory you just created.
Finally you can compile and install TensorTools by calling
make
Congratulations, now you should be able to include the installed library into your projects.
There are various possibilities to include the tensor tools library into your own project. A few of them are listed below.
The most easy way to include TensorTools to your poject is available if your project is build using CMake.
After having build the static library as described above, you only have to tell your linker where to find the libtt.a
file.
If you do not want to care about setting up CMake or configuring your build link against a static library, you can also use the quick and dirty way by copying the source files directly into your projects source directory.
TensorTools offers some advanced and/or computational efficient routines which are based on the LAPACK library for linear algebra. The build of these routines is disabled by default. If you want to use them, you would need to set the corresponding option when running CMake, e.g.
cmake -DLIBTT_LAPACK=ON ..
If you want to run the tests for this framework, let CMake generate your build files and compile everything using
cmake -DLIBTT_TESTS=ON -DCMAKE_PREFIX_PATH=<path/to/pfunit/install/dir> ..
make
Now you can run the tests by calling
ctest
from the build directory.
You can find examples on the functionality of this library within the examples
directory. To run an example, got to the directory of the desired example and run the prepared shell script, e.g.
./run_example.sh
This will build and execute the desired example for you.
If you want to create a documentation for this framework, let CMake generate your build files and compile everything using
cmake -DLIBTT_DOCS=ON ..
Now you can create the documentation by calling
make docs
from the build directory.
We use SemVer for versioning.
If you wish to contribute to this project, feel free to report issues on GitHub or to even fork and open a pull request.
- Lukas Lamm - Just some random guy working with computers
This project is licensed under the LGPL License - see the LICENSE.md file for details.
Copyright © 2020 by Lukas Lamm