-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Python stub files to package, hull mesh, and IBE example (#111)
* Use updated bounding box intersector from ViennaRay * Add python stubs to project package * Add stubs in build process * Bump ViennaRay * Fix more Python stubs * Bump version * Format * Add hull mesh * Use hull mesh in examples * Bump viennals * Add IBE with repeposition example * Fix particle in fcage process * Add Python example
- Loading branch information
Showing
33 changed files
with
359 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,13 +33,13 @@ Releases are tagged on the master branch and available in the [releases section] | |
|
||
### Dependencies (installed automatically) | ||
|
||
* [ViennaCore](https://github.com/ViennaTools/viennacore) >= 1.1.0 | ||
* [ViennaCore](https://github.com/ViennaTools/viennacore) >= 1.2.0 | ||
|
||
* [ViennaLS](https://github.com/ViennaTools/viennals) >= 4.1.1 | ||
* [ViennaHRLE](https://github.com/ViennaTools/viennahrle) >= 0.4.0 | ||
* [ViennaLS](https://github.com/ViennaTools/viennals) >= 4.2.0 | ||
* [ViennaHRLE](https://github.com/ViennaTools/viennahrle) >= 0.5.0 | ||
* [VTK](https://vtk.org/) >= 9.0.0 | ||
|
||
* [ViennaRay](https://github.com/ViennaTools/viennaray) >= 3.1.0 | ||
* [ViennaRay](https://github.com/ViennaTools/viennaray) >= 3.1.4 | ||
* [Embree](https://www.embree.org/) >= 4.0.0 | ||
|
||
* [ViennaCS](https://github.com/ViennaTools/viennacs) >= 1.0.0 | ||
|
@@ -98,7 +98,7 @@ We recommend using [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake) to consum | |
|
||
* Installation with CPM | ||
```cmake | ||
CPMAddPackage("gh:viennatools/viennaps@3.2.0") | ||
CPMAddPackage("gh:viennatools/viennaps@3.3.0") | ||
``` | ||
|
||
* With a local installation | ||
|
@@ -218,7 +218,7 @@ The configuration file must obey a certain structure in order to be parsed corre | |
|
||
## Contributing | ||
|
||
If you want to contribute to ViennaCS, make sure to follow the [LLVM Coding guidelines](https://llvm.org/docs/CodingStandards.html). | ||
If you want to contribute to ViennaPS, make sure to follow the [LLVM Coding guidelines](https://llvm.org/docs/CodingStandards.html). | ||
|
||
Make sure to format all files before creating a pull request: | ||
```bash | ||
|
@@ -228,7 +228,7 @@ cmake --build build --target format | |
|
||
## Authors | ||
|
||
Current contributors: Tobias Reiter, Noah Karnel, Julius Piso | ||
Current contributors: Tobias Reiter, Noah Karnel, Lado Filipovic | ||
|
||
Contact us via: [email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Geometry | ||
gridDelta = 0.1 | ||
gridDelta = 0.125 | ||
xExtent = 10.0 | ||
yExtent = 10.0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
project(ionBeamEtching LANGUAGES CXX) | ||
|
||
add_executable("${PROJECT_NAME}" "${PROJECT_NAME}.cpp") | ||
target_link_libraries("${PROJECT_NAME}" PRIVATE ViennaPS) | ||
|
||
configure_file(config.txt ${CMAKE_CURRENT_BINARY_DIR}/config.txt COPYONLY) | ||
|
||
add_dependencies(ViennaPS_Examples ${PROJECT_NAME}) | ||
viennacore_setup_bat(${PROJECT_NAME} ${VIENNAPS_ARTIFACTS_DIRECTORY}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Config file for a ion beam etching example | ||
# Domain | ||
gridDelta=0.1 | ||
xExtent=10 | ||
yExtent=10 | ||
|
||
# Geometry | ||
trenchWidth=5 | ||
maskHeight=1 | ||
trenchDepth=10 | ||
|
||
# Model | ||
meanEnergy=100 | ||
sigmaEnergy=10 | ||
thresholdEnergy=10 | ||
exponent=100 | ||
|
||
# Process | ||
redepositionRate=0.05 | ||
planeWaferRate=1.0 | ||
angle=35.0 | ||
|
||
processTime=3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#include <geometries/psMakeTrench.hpp> | ||
#include <models/psDirectionalEtching.hpp> | ||
#include <models/psIonBeamEtching.hpp> | ||
|
||
#include <psProcess.hpp> | ||
#include <psUtils.hpp> | ||
|
||
using namespace viennaps; | ||
|
||
int main(int argc, char *argv[]) { | ||
using NumericType = double; | ||
constexpr int D = 2; | ||
Logger::setLogLevel(LogLevel::INTERMEDIATE); | ||
|
||
// Parse the parameters | ||
utils::Parameters params; | ||
if (argc > 1) { | ||
params.readConfigFile(argv[1]); | ||
} else { | ||
std::cout << "Usage: " << argv[0] << " <config file>" << std::endl; | ||
return 1; | ||
} | ||
|
||
auto geometry = SmartPointer<Domain<NumericType, D>>::New(); | ||
MakeTrench<NumericType, D>( | ||
geometry, params.get("gridDelta"), params.get("xExtent"), | ||
params.get("yExtent"), params.get("trenchWidth"), | ||
params.get("maskHeight"), 0.0 /* tapering angle */, 0.0 /* base height */, | ||
true /*periodic*/, true /*make mask*/, Material::Si) | ||
.apply(); | ||
|
||
{ | ||
// etch trench | ||
Vec3D<NumericType> direction{0., 0., 0.}; | ||
direction[D - 1] = -1.; | ||
auto model = | ||
SmartPointer<DirectionalEtching<NumericType, D>>::New(direction, -1.0); | ||
Process<NumericType, D>(geometry, model, params.get("trenchDepth")).apply(); | ||
} | ||
|
||
// copy top layer to capture deposition | ||
geometry->duplicateTopLevelSet(Material::Polymer); | ||
|
||
IBEParameters<NumericType> ibeParams; | ||
ibeParams.tiltAngle = params.get("angle"); | ||
ibeParams.exponent = params.get("exponent"); | ||
|
||
ibeParams.meanEnergy = params.get("meanEnergy"); | ||
ibeParams.sigmaEnergy = params.get("sigmaEnergy"); | ||
ibeParams.thresholdEnergy = params.get("thresholdEnergy"); | ||
|
||
ibeParams.redepositionRate = params.get("redepositionRate"); | ||
ibeParams.planeWaferRate = params.get("planeWaferRate"); | ||
|
||
auto model = SmartPointer<IonBeamEtching<NumericType, D>>::New( | ||
std::vector<Material>{Material::Mask}, ibeParams); | ||
Vec3D<NumericType> direction{0., 0., 0.}; | ||
direction[D - 1] = -std::cos(ibeParams.tiltAngle * M_PI / 180.); | ||
direction[D - 2] = std::sin(ibeParams.tiltAngle * M_PI / 180.); | ||
model->setPrimaryDirection(direction); | ||
|
||
Process<NumericType, D> process; | ||
process.setDomain(geometry); | ||
process.setProcessModel(model); | ||
process.setProcessDuration(params.get("processTime")); | ||
process.setIntegrationScheme( | ||
viennals::IntegrationSchemeEnum::LAX_FRIEDRICHS_2ND_ORDER); | ||
|
||
geometry->saveHullMesh("initial"); | ||
|
||
process.apply(); | ||
|
||
geometry->saveHullMesh("final"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
from argparse import ArgumentParser | ||
import numpy as np | ||
|
||
# parse config file name and simulation dimension | ||
parser = ArgumentParser( | ||
prog="ionBeamEtching", | ||
description="Run an IBE process on a trench geometry.", | ||
) | ||
parser.add_argument("-D", "-DIM", dest="dim", type=int, default=2) | ||
parser.add_argument("filename") | ||
args = parser.parse_args() | ||
|
||
# switch between 2D and 3D mode | ||
if args.dim == 2: | ||
print("Running 2D simulation.") | ||
import viennaps2d as vps | ||
else: | ||
print("Running 3D simulation.") | ||
import viennaps3d as vps | ||
|
||
vps.Logger.setLogLevel(vps.LogLevel.INTERMEDIATE) | ||
|
||
params = vps.ReadConfigFile(args.filename) | ||
|
||
geometry = vps.Domain() | ||
vps.MakeTrench( | ||
domain=geometry, | ||
gridDelta=params["gridDelta"], | ||
xExtent=params["xExtent"], | ||
yExtent=params["yExtent"], | ||
trenchWidth=params["trenchWidth"], | ||
trenchDepth=params["maskHeight"], | ||
taperingAngle=0.0, | ||
baseHeight=0.0, | ||
periodicBoundary=True, | ||
makeMask=True, | ||
material=vps.Material.Si, | ||
).apply() | ||
|
||
direction = [0.0, 0.0, 0.0] | ||
direction[args.dim - 1] = -1.0 | ||
model = vps.DirectionalEtching( | ||
direction=direction, | ||
directionalVelocity=-1.0, | ||
) | ||
vps.Process(geometry, model, params["trenchDepth"]).apply() | ||
|
||
# copy top layer to capture deposition | ||
geometry.duplicateTopLevelSet(vps.Material.Polymer) | ||
|
||
ibeParams = vps.IBEParameters() | ||
ibeParams.tiltAngle = params["angle"] | ||
ibeParams.exponent = params["exponent"] | ||
|
||
ibeParams.meanEnergy = params["meanEnergy"] | ||
ibeParams.sigmaEnergy = params["sigmaEnergy"] | ||
ibeParams.thresholdEnergy = params["thresholdEnergy"] | ||
|
||
ibeParams.redepositionRate = params["redepositionRate"] | ||
ibeParams.planeWaferRate = params["planeWaferRate"] | ||
|
||
model = vps.IonBeamEtching( | ||
maskMaterials=[vps.Material.Mask], | ||
parameters=ibeParams, | ||
) | ||
|
||
direction = [0.0, 0.0, 0.0] | ||
direction[args.dim - 1] = -np.cos(ibeParams.tiltAngle * np.pi / 180.0) | ||
direction[args.dim - 2] = np.sin(ibeParams.tiltAngle * np.pi / 180.0) | ||
model.setPrimaryDirection(direction) | ||
|
||
process = vps.Process() | ||
process.setDomain(geometry) | ||
process.setProcessModel(model) | ||
process.setProcessDuration(params["processTime"]) | ||
process.setIntegrationScheme(vps.IntegrationScheme.LAX_FRIEDRICHS_2ND_ORDER) | ||
|
||
geometry.saveHullMesh("initial") | ||
|
||
process.apply() | ||
|
||
geometry.saveHullMesh("final") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.