ViennaLS
Loading...
Searching...
No Matches
ViennaLS

ViennaLS

๐Ÿงช Tests ๐Ÿ Bindings

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!

Support

Documentation and Examples can be found online.

Bug reports and suggestions should be filed on GitHub.

Releases

Releases are tagged on the maser branch and available in the releases section.

Building

Supported Operating Systems

  • Windows (MSVC)
  • Linux (g++ & clang)
  • macOS (XCode)

System Requirements

  • C++17 Compiler with OpenMP support

Dependencies

‍Dependencies will be installed automatically when not available.

Using ViennaLS in your project

Have a look at the example repo for creating a project with ViennaLS as a dependency.

Installing

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/ .

Installing without VTK

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

Installing with dependencies already installed on the system

The CMake configuration automatically checks if the dependencies are installed. If CMake is unable to find them, the dependencies will be built from source.

Building the Python package

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 .

Using the Python package

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

Running the Tests

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

Building examples

The examples can be built using CMake:

cmake -B build -DVIENNALS_BUILD_EXAMPLES=ON
cmake --build build

Integration in CMake projects

We recommend using CPM.cmake to consume this library.

  • Installation with CPM
    CPMAddPackage("gh:viennatools/viennals@4.0.2")
  • With a local installation

    ‍In case you have ViennaLS installed in a custom directory, make sure to properly specify the CMAKE_MODULE_PATH or PATHS in your find_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)

Shared Library

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.

Contributing

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

Authors

Current contributors: Tobias Reiter, Noah Karnel

Founder and initial developer: Otmar Ertl

Contact us via: vienn.nosp@m.atoo.nosp@m.ls@iu.nosp@m.e.tu.nosp@m.wien..nosp@m.ac.a.nosp@m.t

ViennaLS was developed under the aegis of the 'Institute for Microelectronics' at the 'TU Wien'.
http://www.iue.tuwien.ac.at/

License

See file LICENSE in the base directory.