Skip to content
Open
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion pyems/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ def __init__(
simulation_bounds: Tuple[
Tuple[float, float], Tuple[float, float], Tuple[float, float]
] = None,
show_pml: bool = True,
):
"""
:param sim: Simulation object to which mesh should be added.
Expand Down Expand Up @@ -548,6 +549,8 @@ def __init__(
strict total mesh size and expand_bounds will be ignored.
An error will trigger if the internal CSX structures
require a larger mesh than the one specified here.
:param show_pml: Whether to show the PML (perfectly-matched
layers) in the CSX rendering. Default True.
"""
self._sim = sim
self._sim.register_mesh(self)
Expand All @@ -560,6 +563,7 @@ def __init__(
self.min_lines = min_lines
self.expand_bounds = expand_bounds
self.simulation_bounds = simulation_bounds
self.show_pml = show_pml
# Keep track of mesh regions already applied. This is an array
# of 3 elements. The 1st element is a list of ranges in the
# x-dimension that have already been meshed. The 2nd
Expand Down Expand Up @@ -591,7 +595,7 @@ def __init__(
# set later
self.bounded_types = None

self.generate_mesh()
self.generate_mesh(show_pml = self.show_pml)

@property
def sim(self) -> Simulation:
Expand Down