One can install FTK through spack (we recommend to use the latest version of spack on the develop branch):
$ spack install ftk
$ spack load ftk
$ ftk
Usage:
ftk [OPTION...]
-f, --feature arg Feature type: critical_point, isosurface,
.....To build FTK's advanced features, one can build and install FTK with various optional dependencies including ADIOS2, CUDA, MPI, NetCDF, and VTK; use the master branch for the latest features, for example:
$ spack install ftk+vtk+netcdf+mpi+cuda+adios2@masterSee spack info ftk for more details.
One can install PyFTK through PyPI:
$ pip3 install pyftkImportant note: If you change CMake build options, e.g. FTK_USE_HDF5, we recommend to reconfigure with CMake in an empty build directory. If you have previously installed FTK to a system directory e.g. /usr/local , it is important to completely delete all FTK headers and binaries; otherwise your compiler might find FTK headers in default search directories such as /usr/local/include/ftk/config.hh, causing unexpected errors.
Mandatory dependencies
- CMake (3.10 minimum)
Optional dependencies
- ADIOS2 (>=2.7.0): Use
-DFTK_USE_ADIOS2=ONwith cmake; we suggest to use MPI when building with ADIOS2 - CUDA (>=10.1): Use
-DFTK_USE_CUDA=ONand specify-DCMAKE_CUDA_COMPILER - HDF5: Use
-DFTK_USE_HDF5=ON - GMP (strongly recommended): will automatically find GMP unless
-DFTK_USE_GMP=OFF - MPI (mpich 3.2 and higher versions recommended): use
CC=mpicc CXX=mpicxxand-DFTK_USE_MPI=ON, see more details below - MPSolve: Use
-DFTK_USE_MPSOLVE=ON - NetCDF-C: Use
-DFTK_USE_NETCDF=ONand specify-DNETCDF_DIR - ParaView (5.8.0 and higher versions recommended): use
-DFTK_BUILD_PARAVIEWand specify-DParaView_DIRin cmake options; see more details below - Python3: use
setup.pyor-DFTK_BUILD_PYFTK=ONin make options; see more details below - VTK (9.0.1 and higher versions recommended): use
-DFTK_BUILD_VTKand specify-DVTK_DIR/-DCMAKE_PREFIX_PATHin cmake options; see more details below
$ cd $FTK_SOURCE_DIR/build
$ cmake .. && make && make installYou may use MPI to accelerate feature tracking with both distributed-parallelism. To build FTK with MPI, you need to use MPI C/C++ compilers:
$ CC=mpicc CXX=mpicxx cmake -DFTK_USE_MPI=ONFTK provides ParaView plugins to allow users track critical points (maxima, minima, and saddles) in scalar field data. In order to build the plugins, one needs to build ParaView from source, for example:
$ tar zxf ParaView-v5.8.0.tar.gz
$ cd ParaView-v5.8.0
$ mkdir build && cd build
$ cmake .. # You may need to specify paths to Qt and other dependencies needed by ParaView
$ makeAssuming $YOUR_ParaView_Build is the above build directory, one can further build ParaView plugins as follows
$ git clone https://github.com/hguo/ftk $FTK_SOURCE_DIR
$ mkdir $FTK_SOURCE_DIR/build && cd $FTK_SOURCE_DIR/build
$ cmake .. -DFTK_BUILD_PARAVIEW=ON -DParaView_DIR=$YOUR_ParaView_Build
$ makeIf built successfully, you will see the plugins binary as lib/paraview-5.8/plugins/FTK/FTK.so. Open the "Plugin Manager" in ParaView GUI, and load this binary with "Load New..." button, and then select and load FTK in the list. To check if ParaView plugins are correctly built by reproducing the results in the above figure, use "Sources-->FTK-->SpiralWoven2DSource", "Filters-->FTK-->CriticalPointTracker2D",followed by the "Tube" filter in ParaView.
FTK Python bindings is based on pybind11, which is included as a submodule under the python subdirectory; make sure the submodule is checked out:
$ git submodule update --init --recursiveIf you downloaded a release from tarball archives on GitHub, be sure to manually download pybind11 to the designated directory before building.
You may build PyFTK with setuptools or CMake. Notice that CMake is required to build PyFTK. We do not recommend to use Python 2. Advanced build options is currently not possible to configure with setuptools.
Build PyFTK with setuptools:
$ cd $FTK_SOURCE_DIR
$ python setup.py installBuild PyFTK with CMake:
$ mkdir $FTK_SOURCE_DIR/build && cd $FTK_SOURCE_DIR/build
$ cmake .. -DFTK_BUILD_PYFTK=ON
$ makeThe output PyFTK binary will be in the lib directory.