Skip to content

Commit

Permalink
Python example syntax (#92)
Browse files Browse the repository at this point in the history
* fix gdsreader

* fix cantilever

* fix epitaxy
  • Loading branch information
simbilod authored Aug 22, 2024
1 parent 23e27e2 commit 37b5c34
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions examples/GDSReader/GDSReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

gridDelta = 0.01
boundaryConds = [
vls.lsBoundaryConditionEnum.REFLECTIVE_BOUNDARY,
vls.lsBoundaryConditionEnum.REFLECTIVE_BOUNDARY,
vls.lsBoundaryConditionEnum.INFINITE_BOUNDARY,
vls.BoundaryConditionEnum.REFLECTIVE_BOUNDARY,
vls.BoundaryConditionEnum.REFLECTIVE_BOUNDARY,
vls.BoundaryConditionEnum.INFINITE_BOUNDARY,
]

mask = vps.GDSGeometry(gridDelta)
Expand All @@ -24,8 +24,8 @@
# substrate plane
origin = [0.0, 0.0, 0.0]
normal = [0.0, 0.0, 1.0]
plane = vls.lsDomain(bounds, boundaryConds, gridDelta)
vls.lsMakeGeometry(plane, vls.lsPlane(origin, normal)).apply()
plane = vls.Domain(bounds, boundaryConds, gridDelta)
vls.MakeGeometry(plane, vls.Plane(origin, normal)).apply()

geometry.insertNextLevelSet(plane)

Expand Down
12 changes: 6 additions & 6 deletions examples/cantileverWetEtching/cantileverWetEtching.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

# read GDS mask file
boundaryConditions = [
vls.lsBoundaryConditionEnum.REFLECTIVE_BOUNDARY,
vls.lsBoundaryConditionEnum.REFLECTIVE_BOUNDARY,
vls.lsBoundaryConditionEnum.INFINITE_BOUNDARY,
vls.BoundaryConditionEnum.REFLECTIVE_BOUNDARY,
vls.BoundaryConditionEnum.REFLECTIVE_BOUNDARY,
vls.BoundaryConditionEnum.INFINITE_BOUNDARY,
]

gds_mask = vps.GDSGeometry(gridDelta)
Expand All @@ -37,8 +37,8 @@

# create plane geometry as substrate
bounds = gds_mask.getBounds()
plane = vls.lsDomain(bounds, boundaryConditions, gridDelta)
vls.lsMakeGeometry(plane, vls.lsPlane([0.0, 0.0, 0.0], [0.0, 0.0, 1.0])).apply()
plane = vls.Domain(bounds, boundaryConditions, gridDelta)
vls.MakeGeometry(plane, vls.Plane([0.0, 0.0, 0.0], [0.0, 0.0, 1.0])).apply()

# set up domain
geometry = vps.Domain()
Expand All @@ -62,7 +62,7 @@
process.setProcessModel(model)
process.setProcessDuration(5.0 * 60.0) # 5 minutes of etching
process.setIntegrationScheme(
vls.lsIntegrationSchemeEnum.STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER
vls.IntegrationSchemeEnum.STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER
)

for n in range(minutes):
Expand Down
12 changes: 6 additions & 6 deletions examples/selectiveEpitaxy/selectiveEpitaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
material=vps.Material.Mask,
).apply()

fin = vls.lsDomain(geometry.getLevelSets()[-1])
fin = vls.Domain(geometry.getLevelSets()[-1])

if args.dim == 3:
vls.lsMakeGeometry(
vls.MakeGeometry(
fin,
vls.lsBox(
vls.Box(
[
-params["finWidth"] / 2.0,
-params["finLength"] / 2.0,
Expand All @@ -47,9 +47,9 @@
),
).apply()
else:
vls.lsMakeGeometry(
vls.MakeGeometry(
fin,
vls.lsBox(
vls.Box(
[
-params["finWidth"] / 2.0,
-params["gridDelta"],
Expand All @@ -75,7 +75,7 @@
process.setProcessModel(model)
process.setProcessDuration(params["processTime"])
process.setIntegrationScheme(
vls.lsIntegrationSchemeEnum.STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER
vls.IntegrationSchemeEnum.STENCIL_LOCAL_LAX_FRIEDRICHS_1ST_ORDER
)

geometry.saveVolumeMesh("initial")
Expand Down

0 comments on commit 37b5c34

Please sign in to comment.