Skip to content

Commit

Permalink
Expand the maximal number of materials in simulation to 65530
Browse files Browse the repository at this point in the history
  • Loading branch information
weiliangjin2021 authored and momchil-flex committed Apr 28, 2022
1 parent fe73e2f commit 2068b42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

0 comments on commit 2068b42

Please sign in to comment.