Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand the maximal number of materials in simulation to 65530 #342

Merged
merged 1 commit into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion tests/test_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from tidy3d import *
from tidy3d.log import ValidationError, SetupError
from tidy3d.components.simulation import MAX_NUM_MEDIUMS
from .utils import assert_log_level


Expand Down Expand Up @@ -288,7 +289,7 @@ def test_num_mediums():

structures = []
grid_spec = GridSpec.auto(wavelength=1.0)
for i in range(200):
for i in range(MAX_NUM_MEDIUMS):
structures.append(
Structure(geometry=Box(size=(1, 1, 1)), medium=Medium(permittivity=i + 1))
)
Expand Down
2 changes: 1 addition & 1 deletion tidy3d/components/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
MIN_GRIDS_PER_WVL = 6.0

# maximum number of mediums supported
MAX_NUM_MEDIUMS = 200
MAX_NUM_MEDIUMS = 65530

# maximum numbers of simulation parameters
MAX_TIME_STEPS = 1e8
Expand Down