ViennaLS is a header-only C++ level set library developed for high performance topography simulations. The main design goals are simplicity and efficiency, tailored towards scientific simulations. ViennaLS can also be used for visualisation applications, although this is not the main design target.
Note
ViennaLS is under heavy development and improved daily. If you do have suggestions or find bugs, please let us know!
Documentation and Examples can be found online.
Bug reports and suggestions should be filed on GitHub.
Releases are tagged on the maser branch and available in the releases section.
-
Windows (MSVC)
-
Linux (g++ & clang)
-
macOS (XCode)
- C++17 Compiler with OpenMP support
Dependencies will be installed automatically when not available.
Have a look at the example repo for creating a project with ViennaLS as a dependency.
Since this is a header only project, it does not require any installation. However, we recommend the following procedure in order to set up all dependencies correctly:
git clone https://github.com/ViennaTools/ViennaLS.git
cd ViennaLS
cmake -B build -DCMAKE_INSTALL_PREFIX=/path/to/your/custom/install/
cmake --install build
This will install the necessary headers and CMake files to the specified path. If DCMAKE_INSTALL_PREFIX is not specified, it will be installed to the standard path for your system, usually /usr/local/ .
In order to install ViennaLS without VTK, run:
git clone https://github.com/ViennaTools/ViennaLS.git
cd ViennaLS
cmake -B build -DCMAKE_INSTALL_PREFIX=/path/to/your/custom/install/ -DVIENNALS_USE_VTK=OFF
cmake --install build
The CMake configuration automatically checks if the dependencies are installed. If CMake is unable to find them, the dependencies will be built from source.
Note
On systems that feature a package manager (e.g. Ubuntu/Debian apt
), the dependencies can be installed beforehand (e.g. using sudo apt install libvtk9.1 libvtk9-dev pybind11-dev
), which saves a considerable amount of time during compilation.
The Python package can be built and installed using the pip
command:
git clone https://github.com/ViennaTools/ViennaLS.git
cd ViennaLS
pip install --user .
All functions which are available in C++ are also available in Python. The 2D version of the library can be imported as follows:
import viennals2d as vls
In order to switch to three dimensions, only the import needs to be changed:
import viennals3d as vls
ViennaLS uses CTest to run its tests. In order to check whether ViennaLS runs without issues on your system, you can run:
git clone https://github.com/ViennaTools/ViennaLS.git
cd ViennaLS
cmake -B build -DVIENNALS_BUILD_TESTS=ON
cmake --build build
ctest -E "Benchmark|Performance" --test-dir build
The examples can be built using CMake:
cmake -B build -DVIENNALS_BUILD_EXAMPLES=ON
cmake --build build
We recommend using CPM.cmake to consume this library.
-
Installation with CPM
CPMAddPackage("gh:viennatools/[email protected]")
-
With a local installation
In case you have ViennaLS installed in a custom directory, make sure to properly specify the
CMAKE_MODULE_PATH
orPATHS
in yourfind_package
call.set(VIENNALS_PATH "/your/local/installation") find_package(OpenMP REQUIRED) find_package(VTK PATHS ${VIENNALS_PATH}) find_package(ViennaHRLE PATHS ${VIENNALS_PATH}) find_package(ViennaLS PATHS ${VIENNALS_PATH}) target_link_libraries(${PROJECT_NAME} PUBLIC ViennaTools::ViennaLS)
In order to save build time during development, dynamically linked shared libraries can be used if ViennaLS was built with them. This is done by precompiling the most common template specialisations. In order to use shared libraries, use
cmake -B build -DVIENNALS_PRECOMPILE_HEADERS=ON
If ViennaLS was built with shared libraries and you use ViennaLS in your project (see above), CMake will automatically link them to your project.
Before being able to merge your PR, make sure you have met all points on the checklist in CONTRIBUTING.md.
If you want to contribute to ViennaLS, make sure to follow the LLVM Coding guidelines.
Make sure to format all files before creating a pull request:
cmake -B build
cmake --build build --target format
Current contributors: Tobias Reiter, Noah Karnel
Founder and initial developer: Otmar Ertl
Contact us via: [email protected]
ViennaLS was developed under the aegis of the 'Institute for Microelectronics' at the 'TU Wien'.
http://www.iue.tuwien.ac.at/
See file LICENSE in the base directory.