Skip to content

ViennaTools/ViennaLS

Repository files navigation

ViennaLS

🧪 Tests 🐍 Bindings PyPi Version

ViennaLS is a header-only C++ level set library for high-performance topography and semiconductor process simulations. The main design goals are efficiency and simplicity, tailored towards scientific process simulation.

Capabilities

  • Level-set equation solver: Solves ∂φ/∂t + v|∇φ| = 0 to advect interfaces under arbitrary velocity fields; spatial schemes: Engquist-Osher (1st/2nd order), Lax-Friedrichs (global/local, 1st/2nd order), WENO (3rd/5th order); temporal schemes: Forward Euler, Runge-Kutta 2nd/3rd order; CFL-limited time stepping
  • Level-set operations: Boolean operations, geometric advection, curvature calculation, normal vectors calculation, visibility calculation, feature detection, 2D<->3D extrusion/slicing, mesh export (VTP/VTU via VTK)
  • Comparison & analysis: Chamfer distance (bidirectional surface-to-surface, forward/backward/RMS/max), narrow-band SDF difference, sparse-field SDF difference, volume/area difference, critical dimension extraction
  • Thermal oxidation: Coupled Deal-Grove diffusion + Stokes flow oxide mechanics (Maxwell viscoelasticity, SIMPLE pressure-velocity coupling); LOCOS mode adds biharmonic Si₃N₄ mask bending with two-way traction coupling. See docs/OxidationSolver.md
  • GPU acceleration: Optional CUDA BiCGSTAB back-end for the oxidation diffusion and mechanics linear solves (requires VIENNALS_USE_GPU=ON)

Note

ViennaLS is under heavy development and improved daily. If you do have suggestions or find bugs, please let us know!

Quick Start

To install ViennaLS for Python, simply run:

pip install ViennaLS

To use ViennaLS in C++, clone the repository and follow the installation steps below.

Support

Documentation and Examples can be found online.

Bug reports and suggestions should be filed on GitHub.

Releases

Releases are tagged on the master 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.

  • ViennaHRLE

  • VTK (optional, but recommended for mesh export and visualization)

  • pybind11 (only for building Python libs)

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 -D CMAKE_INSTALL_PREFIX=/path/to/your/custom/install/
cmake --install build

This will install the necessary headers and CMake files to the specified path. If CMAKE_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 -D CMAKE_INSTALL_PREFIX=/path/to/your/custom/install/ -D VIENNALS_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), VTK can be installed beforehand (e.g. using sudo apt install libvtk9-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 .

To build the Python package with GPU support for the oxidation diffusion and mechanics solvers, use the install script in the python/scripts folder:

git clone https://github.com/ViennaTools/ViennaLS.git
cd ViennaLS

python3 -m venv .venv          # create virtual environment (optional, but recommended)
source .venv/bin/activate      # activate virtual environment
python python/scripts/install_ViennaLS.py

A CUDA 12+ toolkit and a driver compatible with your GPU must be installed on your system. On Linux, a GCC version compatible with the CUDA toolkit is also required. Pass --no-gpu to build without GPU support using the same script and venv workflow.

Using the Python package

The ViennaLS Python package can be used by importing it in your Python scripts:

import viennals as vls

By default, ViennaLS operates in two dimensions. You can set the dimension using:

vls.setDimension(2)  # For 2D simulations
vls.setDimension(3)  # For 3D simulations

A complete list of functions and their locations can be found in the API documentation.

For examples on how to use the Python package, please have a look at these examples: Air Gap Deposition, Deposition, Geometric Advection.

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@5.8.0")
  • 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, Roman Kostal, Lado Filipovic

Founder and initial developer: Otmar Ertl

Contact us via: viennatools@iue.tuwien.ac.at

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

License

Versions < 5.6.0 were released under MIT License. Starting with version 5.6.0, the project is licensed under GPL-3.0 License. For more details, please refer to the LICENSE file in the base directory of the repository.

Some third-party libraries used by ViennaLS are under their own permissive licenses.
See THIRD_PARTY_LICENSES.md for details.

About

High-performance sparse level-set library for topography simulations

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors