ATSuite C++ is a collection of scientific routines in C++ originally developed by Alexis Tantet for research purpose. These codes are open source in order to promote reproducibility. Visit Alexis' home page for contact. The full documentation can be found at ATSuite C++.
- [Installation] (#installation)
- [Getting the code] (#getting-the-code)
- [Dependencies] (#dependencies)
- [Installing the code] (#installing-the-code)
- [Updating the code] (#updating-the-code)
- [Compiling] (#compiling)
- [Without OpenMP] (#without-openmp)
- [With OpenMP] (#with-openmp)
- [Disclaimer] (#disclaimer)
First the ATSuite_cpp repository should be cloned using git. To do so:
-
Change directory to where you want to clone the repository $GITDIR:
cd $GITDIR
-
Clone the ATSuite_cpp repository (git should be installed):
git clone https://github.com/atantet/ATSuite_cpp
Mandatory libraries:
- GSL is used as the main C scientific library.
- Eigen is a C++ template library for linear algebra, mainly used for sparse matrices manipulation.
Specific libraries:
- ARPACK++ is an object-oriented version of the ARPACK package used to calculate the spectrum of sparse matrices in atspectrum.hpp.
- OpenMP is used for multi-threading by transferOperator.hpp when WITH_OMP is set to 1 when compiling.
-
Create a directory ATSuite/ in your favorite include directory $INCLUDE:
mkdir $INCLUDE/ATSuite
-
Copy the ATSuite_cpp/*.hpp source files to $INCLUDE/ATSuite/:
cd $GITDIR/ATSuite_cpp cp *.hpp $INCLUDE/ATSuite
-
Include these files in your C++ codes. For example, in order to include the matrix manipulation functions in atmatrix.hpp, add in your C++ file:
#include <ATSuite/atmatrix.hpp>
-
Pull the ATSuite_cpp repository:
cd $GITDIR/ATSuite_cpp git pull
-
Copy the source files to your favorite include directory $INCLUDE:
cp *.hpp $INCLUDE/ATSuite
If INCLUDE is not a system directory such as /usr/include/ or /usr/local/include/ then either it should be added to CPLUS_INCLUDE_PATH or at compilation using -I$INCLUDE. E.g.
g++ -c -I$INCLUDE source.cpp
When linking, GSL should be linked by added -lgsl. If GSL's directory is not a system one or in LIBRARY_PATH then -L$GSLDIR should be added. E.g.
g++ -L$GSLDIR source.o -lgsl
If OpenMP is to be used, then WITH_OMP should be set to 1, -fopenmp -DWITH_OMP=$WITH_OMP used when compiling and -lgomp when linking.
g++ -c -fopenmp -DWITH_OMP=$WITH_OMP -I$INCLUDE source.cpp
g++ -L$GSLDIR source.o -lgsl -lgomp
These codes are developed for research purpose. No warranty is given regarding their robustess.