Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
23c79ea
added oxidation model and 2D locos and step examples
FilipovicLado May 21, 2026
372131a
Split oxidation headers
FilipovicLado May 21, 2026
2649b9a
Generalize mask bending contact detection and velocity sampling
FilipovicLado May 22, 2026
93194c5
Fix oxidation interface velocity bugs
FilipovicLado May 22, 2026
dfde54b
Remove prescribed SiO2 surface velocity and code cleanup
FilipovicLado May 22, 2026
cdf5957
fix: Python bindings, pyi stubs, and test for oxidation model
FilipovicLado May 22, 2026
8b31499
improve LOCOS mask physics
FilipovicLado May 22, 2026
c054841
Update oxidation model
FilipovicLado May 23, 2026
2c71f6c
Add materials parameters for typical process (wet 1000C)
FilipovicLado May 23, 2026
a217473
add oxidation convergence test
FilipovicLado May 23, 2026
f65935f
Precompute face BCs in oxidation solvers
FilipovicLado May 25, 2026
361adb6
align oxidation class names with header file names
FilipovicLado May 26, 2026
0edc6c3
omp parallelized solver
FilipovicLado May 27, 2026
96f0b07
correct anchor detection and traction-free BCs
FilipovicLado May 27, 2026
af76cf5
fix "peeling" interface between SiO2 and mask
FilipovicLado May 28, 2026
9471a61
update python wrappers
FilipovicLado May 28, 2026
dcbb8eb
add logger messages and CFL time-stepping, remove mask anchor
FilipovicLado May 29, 2026
29af069
previous solution as initial guess for solver
FilipovicLado May 30, 2026
ae18aaf
perf+fix: OxidationMaskBending performance, Python bindings, test fixes
FilipovicLado Jun 1, 2026
2d98f47
merge LOCOSOxidation into Oxidation; update example
FilipovicLado Jun 1, 2026
b06e168
rename OxidationMaterials to OxidationPresets
FilipovicLado Jun 2, 2026
a2b5fd2
Add Arrhenius scaling for nitride mask creep
FilipovicLado Jun 2, 2026
4148c85
Replace Jacobi/GS inner solvers with BiCGSTAB; use float work vectors
FilipovicLado Jun 2, 2026
6090e0f
GPU-accelerated BiCGSTAB solver via CUDA Runtime; timing instrumentat…
FilipovicLado Jun 3, 2026
3dac495
solver: relative tolerances, Aitken mechanics, bilinear interface vel…
FilipovicLado Jun 3, 2026
cd681de
solver: replace relaxation loop with Aitken Δ² acceleration in Oxidat…
FilipovicLado Jun 3, 2026
bebcd67
Improve LOCOS oxidation solver stability and field persistence
FilipovicLado Jun 3, 2026
17409ca
double precision for GPU BiCGSTAB
FilipovicLado Jun 4, 2026
9a8ad8d
Fix Interior fill ordering, pointData size mismatch, and cross-step w…
FilipovicLado Jun 4, 2026
e9da954
Fix interior fill and add cpu/gpu switch
FilipovicLado Jun 4, 2026
b22994c
Fix GPU oxidation diffusion solver consistency
FilipovicLado Jun 5, 2026
014e1d9
Add GPU mechanics solves for oxidation deformation
FilipovicLado Jun 5, 2026
3f10c3f
Harmonic velocity computation on GPU and reduce logger output
FilipovicLado Jun 5, 2026
f4704ab
Add mask traction contact mode
FilipovicLado Jun 5, 2026
b0ccf0b
Use multigrid-preconditioned GMRES for mask mechanics
FilipovicLado Jun 5, 2026
3d6daee
smoothe velocity field in oxidation
FilipovicLado Jun 5, 2026
1452369
Add two-way mask-oxide traction coupling and LOCOS stability fixes
FilipovicLado Jun 7, 2026
f538c07
Simplify mask/oxide contact to kinematic Dirichlet; fix BCs
FilipovicLado Jun 9, 2026
c539649
Fix Python bindings for OxidationMaskParameters and MakeGeometry
FilipovicLado Jun 9, 2026
ca250b0
exposed relaxation for SIMPLE solver
FilipovicLado Jun 9, 2026
d043197
fix: oxidation solver ignores geometry offset from y=0
FilipovicLado Jun 9, 2026
4e467ed
Remove segment call when forming interior domain
FilipovicLado Jun 9, 2026
70d0430
Fix OxidationMaskParameters stubs; add oxidation solver physics doc
FilipovicLado Jun 9, 2026
e9d70dc
revert boundary array in pyWrap to size of 3 not D
FilipovicLado Jun 9, 2026
b08c286
update CMake to default to VIENNALS_BUILD_PYTHON ON during SKBUILD
FilipovicLado Jun 10, 2026
e1985b4
Remove SKBUILD check
FilipovicLado Jun 10, 2026
3c03bc8
add stress data to mask field
FilipovicLado Jun 10, 2026
1175bfd
use IndexType as deviatoricStressHistory key to fix hash collision risk
FilipovicLado Jun 13, 2026
459e782
remove StepOxidation example; fix and speed up oxidation tests
FilipovicLado Jun 13, 2026
9c3719c
remove GpuMode::Auto, default to CPU; fix OxidationSolver.md
FilipovicLado Jun 13, 2026
82bd822
Update readme
FilipovicLado Jun 13, 2026
932afa6
format
FilipovicLado Jun 13, 2026
654ee53
Merge remote-tracking branch 'origin/master' into oxidation
FilipovicLado Jun 13, 2026
69bb838
CMakeLists format
FilipovicLado Jun 13, 2026
1c741f3
Use x64-windows-release triplet to avoid Debug VTK build failure
FilipovicLado Jun 13, 2026
567cd74
revert: restore x64-windows triplet (didn't fix VS18/MSVC 14.51 VTK b…
FilipovicLado Jun 14, 2026
0b17eaf
fix Windows CI: update vcpkg baseline to fix stdext removal in MSVC 1…
FilipovicLado Jun 14, 2026
8524d8c
fix Windows package CI: patch VTK v9.3.1 diy2/fmt for MSVC 14.51 stde…
FilipovicLado Jun 14, 2026
f216805
fix Windows package CI: use vcpkg VTK instead of building from source
FilipovicLado Jun 14, 2026
4b8552f
fix LOCOS example, complete LOCOS bindings, add GPU support and insta…
FilipovicLado Jun 15, 2026
fa76a63
format fix
FilipovicLado Jun 15, 2026
36ebc0c
fix format again
FilipovicLado Jun 15, 2026
408a0d6
refactor: use Logger macros
tobre1 Jun 15, 2026
d188bda
refactor: remove template from parameter structs
tobre1 Jun 16, 2026
d93aa95
update stubs
tobre1 Jun 16, 2026
7628ee1
fix tests
tobre1 Jun 16, 2026
cca1b84
bump version to 5.8.0
FilipovicLado Jun 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
container: ${{ matrix.container }}

env:
VCPKG_COMMIT: c3867e714dd3a51c272826eea77267876517ed99
VCPKG_COMMIT: 72d876b20f06129a1b1e0db80c7075fe3e419d7c
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/.vcpkg-bincache

name: "🧪 Test on ${{ matrix.os }} (⚙️: ${{ matrix.config }}, 💿: ${{ matrix.container || matrix.os }})"
Expand Down
38 changes: 36 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
container: ${{ matrix.container }}

env:
VCPKG_COMMIT: c3867e714dd3a51c272826eea77267876517ed99
VCPKG_COMMIT: 72d876b20f06129a1b1e0db80c7075fe3e419d7c
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/.vcpkg-bincache

name: "🐍 Test Bindings on ${{ matrix.os }}"
Expand Down Expand Up @@ -126,6 +126,10 @@ jobs:

name: "🐍 Package Bindings on ${{ matrix.os }}"

env:
VCPKG_COMMIT: 72d876b20f06129a1b1e0db80c7075fe3e419d7c
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/.vcpkg-bincache

steps:
- name: 📥 Checkout
uses: actions/checkout@v4
Expand All @@ -138,10 +142,40 @@ jobs:
- name: 🛞 CIBuildWheel
run: pip install cibuildwheel==3.4.0 --break-system-packages

- name: 🖥️ Setup vcpkg (Windows)
shell: pwsh
if: ${{ matrix.os == 'windows-latest' }}
run: |
Remove-Item Env:VCPKG_ROOT -ErrorAction SilentlyContinue

git clone https://github.com/microsoft/vcpkg.git
git -C vcpkg checkout $env:VCPKG_COMMIT
& .\vcpkg\bootstrap-vcpkg.bat

"VCPKG_ROOT=$($env:GITHUB_WORKSPACE)\vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

New-Item -ItemType Directory -Force -Path "${{ env.VCPKG_DEFAULT_BINARY_CACHE }}"

- name: 🦥 Cache vcpkg binary (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/cache@v4
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: vcpkg-${{ matrix.os }}-Release-${{ env.VCPKG_COMMIT }}

- name: 🛠️ Build VTK (Windows)
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
run: |
./vcpkg/vcpkg install --triplet x64-windows

- name: 🛠️ Package Config (Windows)
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
run: |
sed -i 's/\(DVIENNALS_BUILD_PYTHON=ON"\)/\1,"-DVIENNALS_PACKAGE_PYTHON=ON","-DVIENNALS_IS_CI=ON"/g' pyproject.toml
$toolchain = "${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake".Replace('\', '/')
sed -i 's/\(DVIENNALS_BUILD_PYTHON=ON"\)/\1,"-DVIENNALS_IS_CI=ON"/g' pyproject.toml
"CIBW_CONFIG_SETTINGS=cmake.define.CMAKE_TOOLCHAIN_FILE=$toolchain cmake.define.VCPKG_TARGET_TRIPLET=x64-windows" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
type pyproject.toml

- name: 🛠️ Package Config (MacOs)
Expand Down
73 changes: 72 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
project(
ViennaLS
LANGUAGES CXX
VERSION 5.7.3)
VERSION 5.8.0)

# --------------------------------------------------------------------------------------------------------
# Library options
Expand All @@ -11,6 +11,8 @@ project(
option(VIENNALS_USE_VTK "Build with VTK file support" ON)
option(VIENNALS_VTK_RENDERING "Build with VTK rendering support" ON)

option(VIENNALS_USE_GPU "Enable GPU-accelerated BiCGSTAB linear solver via CUDA" OFF)

option(VIENNALS_PRECOMPILE_HEADERS "Build template specialisations for shorter compile times" OFF)
option(VIENNALS_STATIC_BUILD "Build dependencies as static libraries" OFF)
option(VIENNALS_ENABLE_SANITIZER "Enable Sanitizers" OFF)
Expand Down Expand Up @@ -90,6 +92,72 @@ if(MSVC)
target_compile_definitions(${PROJECT_NAME} INTERFACE _USE_MATH_DEFINES=1)
endif()

# --------------------------------------------------------------------------------------------------------
# GPU support (CUDA Runtime, no OptiX)
# --------------------------------------------------------------------------------------------------------

if(VIENNALS_USE_GPU)
enable_language(CUDA)
get_filename_component(_VIENNALS_CUDA_COMPILER_REAL "${CMAKE_CUDA_COMPILER}" REALPATH)
get_filename_component(_VIENNALS_CUDA_COMPILER_BIN "${_VIENNALS_CUDA_COMPILER_REAL}" DIRECTORY)
get_filename_component(_VIENNALS_CUDA_COMPILER_ROOT "${_VIENNALS_CUDA_COMPILER_BIN}" DIRECTORY)
if(CMAKE_CUDA_COMPILER AND NOT DEFINED CUDAToolkit_ROOT)
set(CUDAToolkit_ROOT
"${_VIENNALS_CUDA_COMPILER_ROOT}"
CACHE PATH "CUDA Toolkit root used by ViennaLS")
endif()
find_package(CUDAToolkit REQUIRED)

if(CUDAToolkit_NVCC_EXECUTABLE)
get_filename_component(_VIENNALS_CUDATOOLKIT_NVCC_REAL "${CUDAToolkit_NVCC_EXECUTABLE}"
REALPATH)
if(NOT _VIENNALS_CUDATOOLKIT_NVCC_REAL STREQUAL _VIENNALS_CUDA_COMPILER_REAL)
message(
FATAL_ERROR
"[ViennaLS] CUDA compiler/toolkit mismatch:\n"
" CMAKE_CUDA_COMPILER=${CMAKE_CUDA_COMPILER}\n"
" CUDAToolkit_NVCC_EXECUTABLE=${CUDAToolkit_NVCC_EXECUTABLE}\n"
"Use a fresh build directory or pass -DCUDAToolkit_ROOT=${_VIENNALS_CUDA_COMPILER_ROOT} "
"so CUDAToolkit matches the selected CUDA compiler.")
endif()
endif()

# Compile the CUDA kernels into a small static library so that consuming
# .cpp files (compiled by g++) never see __global__ / <<< >>> syntax.
add_library(ViennaLS_GPU STATIC ${PROJECT_SOURCE_DIR}/gpu/lsOxidationBiCGSTABKernels.cu)

target_compile_definitions(ViennaLS_GPU PRIVATE VIENNALS_GPU_BICGSTAB=1)

target_include_directories(ViennaLS_GPU PRIVATE ${PROJECT_SOURCE_DIR}/include/viennals
${CUDAToolkit_INCLUDE_DIRS})

set_target_properties(ViennaLS_GPU PROPERTIES CUDA_SEPARABLE_COMPILATION OFF
POSITION_INDEPENDENT_CODE ON)

target_link_libraries(ViennaLS_GPU PUBLIC CUDA::cudart CUDA::cusparse)

if(UNIX AND NOT APPLE)
foreach(_VIENNALS_CUDA_TARGET CUDA::cudart CUDA::cusparse)
get_target_property(_VIENNALS_CUDA_LIBRARY ${_VIENNALS_CUDA_TARGET} IMPORTED_LOCATION)
if(_VIENNALS_CUDA_LIBRARY)
get_filename_component(_VIENNALS_CUDA_LIBRARY_DIR "${_VIENNALS_CUDA_LIBRARY}" DIRECTORY)
target_link_options(ViennaLS_GPU INTERFACE
"$<BUILD_INTERFACE:LINKER:-rpath,${_VIENNALS_CUDA_LIBRARY_DIR}>")
endif()
endforeach()
endif()

# Expose the define and the GPU library to downstream targets.
# BUILD_INTERFACE limits the ViennaLS_GPU dependency to the build tree so it
# is never exported to the install tree (avoiding the "not in export set" error
# from packageProject when ViennaLS_GPU is a non-installed local target).
target_compile_definitions(${PROJECT_NAME} INTERFACE VIENNALS_GPU_BICGSTAB=1)
target_link_libraries(${PROJECT_NAME} INTERFACE $<BUILD_INTERFACE:ViennaLS_GPU>)
target_include_directories(${PROJECT_NAME} INTERFACE ${CUDAToolkit_INCLUDE_DIRS})

message(STATUS "[ViennaLS] GPU BiCGSTAB solver enabled (CUDA ${CUDAToolkit_VERSION})")
endif()

# --------------------------------------------------------------------------------------------------------
# Include directories
# --------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -128,6 +196,9 @@ CPMFindPackage(
GIT_REPOSITORY "https://github.com/ViennaTools/ViennaHRLE"
EXCLUDE_FROM_ALL ${VIENNALS_BUILD_PYTHON})

# # Use local ViennaHRLE with interior point support
# add_subdirectory(../ViennaHRLE ViennaHRLE.build)

target_link_libraries(${PROJECT_NAME} INTERFACE ViennaHRLE ViennaCore)

if(VIENNALS_USE_VTK AND VIENNALS_VTK_PYTHON_LIBS)
Expand Down
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@

</div>

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.
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`](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!
Expand All @@ -32,7 +40,7 @@ Bug reports and suggestions should be filed on GitHub.

## Releases

Releases are tagged on the maser branch and available in the [releases section](https://github.com/ViennaTools/ViennaLS/releases).
Releases are tagged on the master branch and available in the [releases section](https://github.com/ViennaTools/ViennaLS/releases).

## Building

Expand Down Expand Up @@ -107,6 +115,19 @@ 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:

```bash
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:
Expand Down Expand Up @@ -154,7 +175,7 @@ We recommend using [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake) to consum

* Installation with CPM
```cmake
CPMAddPackage("gh:viennatools/viennals@5.7.3")
CPMAddPackage("gh:viennatools/viennals@5.8.0")
```

* With a local installation
Expand Down
2 changes: 0 additions & 2 deletions THIRD_PARTY_LICENSES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,3 @@ This file lists third-party libraries used by ViennaLS and their respective lice
**Note:** Used only when building Python bindings.

---


8 changes: 5 additions & 3 deletions cmake/cpm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ endif()
# Expand relative path. This is important if the provided path contains a tilde (~)
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)

file(DOWNLOAD
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM})
if(NOT EXISTS ${CPM_DOWNLOAD_LOCATION})
file(DOWNLOAD
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM})
endif()

include(${CPM_DOWNLOAD_LOCATION})
Loading
Loading