Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1f858ef
Added removeMaterial info when removing top LS layer
FilipovicLado Dec 9, 2025
bd89def
Added WENO 5th order advection scheme
FilipovicLado Dec 10, 2025
1b91423
Reverted back to install script, with ViennaLS default version 5.2.1
FilipovicLado Dec 10, 2025
5c6ca3a
Add option to enable adaptive time stepping during advection
tobre1 Dec 10, 2025
b7fef2e
Add adptive time step threshold
tobre1 Dec 15, 2025
5fddbe9
Update ViennaLS version
tobre1 Dec 15, 2025
04f8fe4
Implement VTK rendering
tobre1 Dec 17, 2025
a36e05b
Add python bindings
tobre1 Dec 17, 2025
f70be9b
Use caching for switch rendering modes
tobre1 Dec 17, 2025
f64c5e3
Screenshot feature
tobre1 Dec 18, 2025
69665e5
renaming integration -> discretization
kenyastyle Dec 18, 2025
684bd7b
Domain offsets
tobre1 Dec 18, 2025
9adde09
Add more features to render window
tobre1 Dec 21, 2025
58d36c0
Add material colors and scalar bar
tobre1 Dec 21, 2025
ab6352a
Hex to RGB util
tobre1 Dec 21, 2025
f4354a9
Fix sphere dist examples
tobre1 Dec 22, 2025
224d88c
Add comments
tobre1 Dec 22, 2025
904395b
Format
tobre1 Dec 23, 2025
c2762a2
Merge branch 'vtk-render' of github.com:ViennaTools/ViennaPS into vtk…
tobre1 Dec 23, 2025
d830d02
Update README
tobre1 Dec 23, 2025
2169435
Merge branch 'vtk-render' of github.com:ViennaTools/ViennaPS into vtk…
tobre1 Dec 23, 2025
7cc9bde
Update advection handler to use RK3 time integration from ViennaLS. …
FilipovicLado Dec 27, 2025
b29e900
Merge remote-tracking branch 'origin/master' into fix_material_interface
FilipovicLado Dec 28, 2025
48b7dd6
Merge remote-tracking branch 'origin/vtk-render' into fix_material_in…
FilipovicLado Dec 28, 2025
7741c2d
Merge remote-tracking branch 'origin/rename' into fix_material_interf…
FilipovicLado Dec 28, 2025
43bbac0
format (newline at the end of CMakeLists.txt)
FilipovicLado Dec 28, 2025
9b0d4b0
Fixed format. Binding errors persist due to ViennaLS version missmatc…
FilipovicLado Dec 28, 2025
9d690c0
Adjust material colors
tobre1 Dec 29, 2025
ad83400
Adapt ViennaPS to match temporal scheme from the latest ViennaLS commit.
FilipovicLado Dec 29, 2025
0e445bd
Format
tobre1 Jan 2, 2026
2ae1fdb
Merge branch 'vtk-render' into fix_material_interface
tobre1 Jan 2, 2026
6632d35
Small fixes
tobre1 Jan 2, 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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ CPMFindPackage(
CPMFindPackage(
NAME ViennaLS
VERSION 5.3.0
GIT_TAG master
GIT_REPOSITORY "https://github.com/ViennaTools/ViennaLS"
EXCLUDE_FROM_ALL ${VIENNAPS_BUILD_PYTHON})

Expand Down
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,32 @@ ViennaPS is also available on the [Python Package Index (PyPI)](https://pypi.org

* C++17 Compiler with OpenMP support

### Dependencies (installed automatically)
### ViennaTools Dependencies (installed automatically)

* [ViennaCore](https://github.com/ViennaTools/viennacore)
ViennaPS is part of the ViennaTools ecosystem and depends on several lightweight, header-only ViennaTools libraries. During configuration, CMake will look for them and fetch them automatically as part of the ViennaPS build. No separate installation step is required:

* [ViennaCore](https://github.com/ViennaTools/viennacore)
* [ViennaLS](https://github.com/ViennaTools/viennals)
* [ViennaHRLE](https://github.com/ViennaTools/viennahrle)
* [VTK](https://vtk.org/) (9.0.0+)

* [ViennaHRLE](https://github.com/ViennaTools/viennahrle)
* [ViennaRay](https://github.com/ViennaTools/viennaray)
* [Embree](https://www.embree.org/) (4.0.0+)

* [ViennaCS](https://github.com/ViennaTools/viennacs)

* [pybind11](https://github.com/pybind/pybind11) (3.0.0+, only for building Python libs)
### External Dependencies

The following external dependencies are required to build ViennaPS. On most systems, installing them via a package manager (e.g. `apt`, `brew`, or `vcpkg`) is the fastest option:

* [VTK](https://vtk.org/) (9.0.0+)
* [Embree](https://www.embree.org/) (4.0.0+)

CMake automatically checks for these dependencies during configuration. If they are not found, they can be built from source as part of the build.

To prefer a specific local installation, point CMake to it via `VIENNAPS_LOOKUP_DIRS` (a semicolon-separated list of prefixes):

```bash
cmake -B build -DVIENNAPS_LOOKUP_DIRS="/path/to/vtk;/path/to/embree"
```

The CMake configuration automatically checks if the dependencies are installed.
If the dependencies are not found on the system, they will be built from source. To use local installations of the dependencies, the `VIENNAPS_LOOKUP_DIRS` variable can be set to the installation path of the dependencies.
Alternatively (or additionally), you can use `CMAKE_PREFIX_PATH` if that better matches your local setup.

## Installing

Expand Down
4 changes: 2 additions & 2 deletions examples/DRAMWiggling/DRAMWiggling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ int main(int argc, char **argv) {

// Advection parameters
AdvectionParameters advectionParams;
advectionParams.integrationScheme = util::convertIntegrationScheme(
params.get<std::string>("integrationScheme"));
advectionParams.spatialScheme =
util::convertSpatialScheme(params.get<std::string>("spatialScheme"));

RayTracingParameters rayParams;
rayParams.raysPerPoint = params.get<int>("raysPerPoint");
Expand Down
4 changes: 2 additions & 2 deletions examples/DRAMWiggling/DRAMWiggling.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
rayTracingParams.raysPerPoint = int(params["raysPerPoint"])

advectionParams = ps.AdvectionParameters()
advectionParams.integrationScheme = ps.util.convertIntegrationScheme(
params["integrationScheme"]
advectionParams.spatialScheme = ps.util.convertSpatialScheme(
params["spatialScheme"]
)

# process setup
Expand Down
2 changes: 1 addition & 1 deletion examples/DRAMWiggling/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ionExponent=1000
meanEnergy=200 # eV
sigmaEnergy=10 # eV

integrationScheme=LF_2
spatialScheme=LF_2

numSteps=100
raysPerPoint=1000
Expand Down
6 changes: 3 additions & 3 deletions examples/blazedGratingsEtching/blazedGratingsEtching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ int main(int argc, char **argv) {
geometry->saveSurfaceMesh("initial");

AdvectionParameters advParams;
advParams.integrationScheme =
viennals::IntegrationSchemeEnum::LAX_FRIEDRICHS_2ND_ORDER;
advParams.spatialScheme =
viennals::SpatialSchemeEnum::LAX_FRIEDRICHS_2ND_ORDER;
advParams.timeStepRatio = 0.25;

RayTracingParameters rayTracingParams;
Expand Down Expand Up @@ -83,4 +83,4 @@ int main(int argc, char **argv) {
process.apply();
geometry->saveSurfaceMesh("BlazedGratingsEtch_P" + std::to_string(i));
}
}
}
2 changes: 1 addition & 1 deletion examples/blazedGratingsEtching/blazedGratingsEtching.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

# ----- Model Setup ----- #
advectionParams = ps.AdvectionParameters()
advectionParams.integrationScheme = ps.IntegrationScheme.LAX_FRIEDRICHS_2ND_ORDER
advectionParams.spatialScheme = ps.SpatialScheme.LAX_FRIEDRICHS_2ND_ORDER
advectionParams.timeStepRatio = 0.25

rayTracingParams = ps.RayTracingParameters()
Expand Down
4 changes: 1 addition & 3 deletions examples/boschProcess/boschProcessEmulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@
direction[args.dim - 1] = -1.0

# Geometric advection model for deposition
depoModel = ps.SphereDistribution(
radius=params["depositionThickness"], gridDelta=params["gridDelta"]
)
depoModel = ps.SphereDistribution(radius=params["depositionThickness"])

# Define purely directional rate for depo removal
etchDir = ps.RateSet(
Expand Down
4 changes: 2 additions & 2 deletions examples/cantileverWetEtching/cantileverWetEtching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ int main(int argc, char **argv) {
{ps::Material::Si, -1.}});

ps::AdvectionParameters advectionParams;
advectionParams.integrationScheme =
viennals::IntegrationSchemeEnum::STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER;
advectionParams.spatialScheme =
viennals::SpatialSchemeEnum::STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER;

ps::Process<NumericType, D> process;
process.setDomain(geometry);
Expand Down
6 changes: 3 additions & 3 deletions examples/cantileverWetEtching/cantileverWetEtching.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This example only works in 3D mode
import viennaps.d3 as psd
from viennaps import BoundaryType, Material, AdvectionParameters, IntegrationScheme
from viennaps import BoundaryType, Material, AdvectionParameters, SpatialScheme

maskFileName = "cantilever_mask.gds"

Expand Down Expand Up @@ -56,8 +56,8 @@
)

advectionParams = AdvectionParameters()
advectionParams.integrationScheme = (
IntegrationScheme.STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER
advectionParams.spatialScheme = (
SpatialScheme.STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER
)

process = psd.Process()
Expand Down
8 changes: 4 additions & 4 deletions examples/emulation/FinFET.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ int main() {
auto model =
SmartPointer<IsotropicProcess<NumericType, D>>::New(-1., masks);
AdvectionParameters advectionParams;
advectionParams.integrationScheme =
viennals::IntegrationSchemeEnum::LAX_FRIEDRICHS_2ND_ORDER;
advectionParams.spatialScheme =
viennals::SpatialSchemeEnum::LAX_FRIEDRICHS_2ND_ORDER;
Process<NumericType, D> process(domain, model, 5.);
process.setParameters(advectionParams);
process.apply();
Expand All @@ -236,8 +236,8 @@ int main() {
domain->duplicateTopLevelSet(Material::SiGe);
Logger::setLogLevel(LogLevel::INFO);
AdvectionParameters advectionParams;
advectionParams.integrationScheme =
viennals::IntegrationSchemeEnum::STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER;
advectionParams.spatialScheme =
viennals::SpatialSchemeEnum::STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER;
lsInternal::StencilLocalLaxFriedrichsScalar<NumericType, D,
1>::setMaxDissipation(100);

Expand Down
6 changes: 3 additions & 3 deletions examples/emulation/FinFET.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def writeSurface(domain):
masks = [ps.Material.PolySi, ps.Material.SiO2, ps.Material.Si3N4]
model = ps.IsotropicProcess(rate=-1.0, maskMaterial=masks)
advParams = ps.AdvectionParameters()
advParams.integrationScheme = ps.IntegrationScheme.LAX_FRIEDRICHS_2ND_ORDER
advParams.spatialScheme = ps.SpatialScheme.LAX_FRIEDRICHS_2ND_ORDER
process = ps.Process(domain, model, 5.0)
process.setParameters(advParams)
process.apply()
Expand All @@ -195,8 +195,8 @@ def writeSurface(domain):
print("S/D Epitaxy ...", end="", flush=True)
domain.duplicateTopLevelSet(ps.Material.SiGe)
advectionParams = ps.AdvectionParameters()
advectionParams.integrationScheme = (
ps.IntegrationScheme.STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER
advectionParams.spatialScheme = (
ps.SpatialScheme.STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER
)
ps.StencilLocalLaxFriedrichsScalar.setMaxDissipation(1000)
material = [
Expand Down
4 changes: 2 additions & 2 deletions examples/faradayCageEtching/faradayCageEtching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ int main(int argc, char *argv[]) {
cageParams, maskMaterials);

ps::AdvectionParameters advectionParams;
advectionParams.integrationScheme =
ps::IntegrationScheme::LOCAL_LAX_FRIEDRICHS_1ST_ORDER;
advectionParams.spatialScheme =
ps::SpatialScheme::LOCAL_LAX_FRIEDRICHS_1ST_ORDER;

ps::RayTracingParameters rayParams;
rayParams.raysPerPoint = params.get<int>("raysPerPoint");
Expand Down
3 changes: 2 additions & 1 deletion examples/holeEtching/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ A_O=2 # passivation layer yield constant
A_Si=7 # Si yield constant

etchStopDepth=-10 # maximum etching depth
integrationScheme=EO_1
spatialScheme=EO_1
temporalScheme=RK3

raysPerPoint=1000

Expand Down
6 changes: 4 additions & 2 deletions examples/holeEtching/holeEtching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ int main(int argc, char *argv[]) {
rayTracingParams.raysPerPoint = params.get<unsigned>("raysPerPoint");

AdvectionParameters advectionParams;
advectionParams.integrationScheme = util::convertIntegrationScheme(
params.get<std::string>("integrationScheme"));
advectionParams.spatialScheme =
util::convertSpatialScheme(params.get<std::string>("spatialScheme"));
advectionParams.temporalScheme =
util::convertTemporalScheme(params.get<std::string>("temporalScheme"));

// process setup
Process<NumericType, D> process(geometry, model);
Expand Down
4 changes: 2 additions & 2 deletions examples/holeEtching/holeEtching.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
rayParams.smoothingNeighbors = 2

advParams = ps.AdvectionParameters()
advParams.integrationScheme = ps.util.convertIntegrationScheme(
params["integrationScheme"]
advParams.spatialScheme = ps.util.convertSpatialScheme(
params["spatialScheme"]
)

# process setup
Expand Down
2 changes: 1 addition & 1 deletion examples/holeEtching/testFluxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
processDuration = 3 # min

advParams = ps.AdvectionParameters()
advParams.integrationScheme = ps.IntegrationScheme.ENGQUIST_OSHER_2ND_ORDER
advParams.spatialScheme = ps.SpatialScheme.ENGQUIST_OSHER_2ND_ORDER

rayParams = ps.RayTracingParameters()
rayParams.raysPerPoint = int(1000)
Expand Down
4 changes: 2 additions & 2 deletions examples/ionBeamEtching/ionBeamEtching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ int main(int argc, char *argv[]) {
model->setPrimaryDirection(direction);

AdvectionParameters advectionParams;
advectionParams.integrationScheme =
viennals::IntegrationSchemeEnum::LAX_FRIEDRICHS_2ND_ORDER;
advectionParams.spatialScheme =
viennals::SpatialSchemeEnum::LAX_FRIEDRICHS_2ND_ORDER;

Process<NumericType, D> process(geometry, model);
process.setProcessDuration(params.get("processTime"));
Expand Down
2 changes: 1 addition & 1 deletion examples/ionBeamEtching/ionBeamEtching.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
model.setPrimaryDirection(direction)

advParams = ps.AdvectionParameters()
advParams.integrationScheme = ps.IntegrationScheme.LAX_FRIEDRICHS_2ND_ORDER
advParams.spatialScheme = ps.SpatialScheme.LAX_FRIEDRICHS_2ND_ORDER

process = ps.Process(geometry, model)
process.setProcessDuration(params["processTime"])
Expand Down
5 changes: 3 additions & 2 deletions examples/selectiveEpitaxy/selectiveEpitaxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ int main(int argc, char *argv[]) {
params.get("R111"), params.get("R100"));

ps::AdvectionParameters advectionParams;
advectionParams.integrationScheme =
viennals::IntegrationSchemeEnum::STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER;
advectionParams.integrationScheme = viennals::IntegrationSchemeEnum::
// advectionParams.spatialScheme = viennals::SpatialSchemeEnum::
STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER;
// advectionParams.velocityOutput = true;
lsInternal::StencilLocalLaxFriedrichsScalar<NumericType, D,
1>::setMaxDissipation(1000);
Expand Down
4 changes: 2 additions & 2 deletions examples/selectiveEpitaxy/selectiveEpitaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
)

advectionParams = ps.AdvectionParameters()
advectionParams.integrationScheme = (
ps.IntegrationScheme.STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER
advectionParams.spatialScheme = (
ps.SpatialScheme.STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER
)

process = ps.Process(geometry, model, params["processTime"])
Expand Down
3 changes: 1 addition & 2 deletions examples/stackEtching/stackEtching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ int main(int argc, char *argv[]) {
SmartPointer<FluorocarbonEtching<NumericType, D>>::New(parameters);

AdvectionParameters advectionParams;
advectionParams.integrationScheme =
IntegrationScheme::LOCAL_LAX_FRIEDRICHS_1ST_ORDER;
advectionParams.spatialScheme = SpatialScheme::LOCAL_LAX_FRIEDRICHS_1ST_ORDER;
advectionParams.timeStepRatio = 0.25;

CoverageParameters coverageParams;
Expand Down
2 changes: 1 addition & 1 deletion examples/stackEtching/stackEtching.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
covParams.tolerance = 1e-4

advParams = vps.AdvectionParameters()
advParams.integrationScheme = vps.IntegrationScheme.LOCAL_LAX_FRIEDRICHS_1ST_ORDER
advParams.spatialScheme = vps.SpatialScheme.LOCAL_LAX_FRIEDRICHS_1ST_ORDER

process = vps.d2.Process()
process.setDomain(geometry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
# copy top layer to capture deposition
geometry.duplicateTopLevelSet(ps.Material.SiO2)

model = ps.SphereDistribution(
radius=params["layerThickness"], gridDelta=params["gridDelta"]
)
model = ps.SphereDistribution(radius=params["layerThickness"])

geometry.saveHullMesh("initial")

Expand Down
8 changes: 5 additions & 3 deletions include/viennaps/process/psALPStrategy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ class ALPStrategy final : public ProcessStrategy<NumericType, D> {

// Initialize translation field. Converts points ids from level set points
// to surface points
const int translationMethod = context.needsExtendedVelocities() ? 2 : 1;
/// TODO: find out why translationMethod 1 does not work properly
const int translationMethod =
2; // context.needsExtendedVelocities() ? 2 : 1;
context.translationField =
SmartPointer<TranslationField<NumericType, D>>::New(
context.model->getVelocityField(), context.domain->getMaterialMap(),
Expand Down Expand Up @@ -148,7 +150,7 @@ class ALPStrategy final : public ProcessStrategy<NumericType, D> {
VIENNACORE_LOG_INFO("Cycle: " + std::to_string(cycle + 1) + "/" +
std::to_string(numCycles));

// Prepare advection (expand level set based on integration scheme)
// Prepare advection (expand level set based on discretization scheme)
advectionHandler_.prepareAdvection(context);

updateState(context);
Expand Down Expand Up @@ -322,4 +324,4 @@ class ALPStrategy final : public ProcessStrategy<NumericType, D> {
}
};

} // namespace viennaps
} // namespace viennaps
Loading
Loading