Skip to content

Commit

Permalink
Doubling mode solver internal storage for doulbe precision
Browse files Browse the repository at this point in the history
  • Loading branch information
momchil-flex committed Dec 12, 2023
1 parent e820311 commit e176ec5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tidy3d/components/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,10 @@ def _warn_num_modes(cls, val, values):
def _storage_size_solver(self, num_cells: int, tmesh: ArrayFloat1D) -> int:
"""Size of intermediate data recorded by the monitor during a solver run."""
# Need to store all fields on the mode surface
return BYTES_COMPLEX * num_cells * len(self.freqs) * self.mode_spec.num_modes * 6
bytes_single = BYTES_COMPLEX * num_cells * len(self.freqs) * self.mode_spec.num_modes * 6
if self.mode_spec.precision == "double":
return 2 * bytes_single
return bytes_single


class FieldMonitor(AbstractFieldMonitor, FreqMonitor):
Expand Down

0 comments on commit e176ec5

Please sign in to comment.