tidy3d.components.monitor.SurfaceIntegrationMonitor#

class SurfaceIntegrationMonitor[source]#

Bases: Monitor, ABC

Abstract class for monitors that perform surface integrals during the solver run, as in flux and near to far transformations.

Parameters:
  • center (tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]] = (0.0, 0.0, 0.0)) – [units = um]. Center of object in x, y, and z.

  • size (tuple[Union[NonNegativeFloat, autograd.tracer.Box], Union[NonNegativeFloat, autograd.tracer.Box], Union[NonNegativeFloat, autograd.tracer.Box]]) – [units = um]. Size in x, y, and z directions.

  • name (str) – Unique name for monitor.

  • interval_space (tuple[Literal[1], Literal[1], Literal[1]] = (1, 1, 1)) – Number of grid step intervals between monitor recordings. If equal to 1, there will be no downsampling. If greater than 1, the step will be applied, but the first and last point of the monitor grid are always included. Not all monitors support values different from 1.

  • colocate (bool = True) – Governed by use_colocated_integration and not set independently for surface-integration monitors: it mirrors that value, so the solver records colocated fields exactly when the integration is colocated.

  • use_colocated_integration (bool = True) – Selects the surface-integration scheme. If True (default), the integral is computed from fields colocated to the grid cell boundaries (primal nodes). If False, it is computed directly on the native Yee-staggered grid: the tangential field components stay at their tangential positions.

  • normal_dir (Optional[Literal['+', '-']] = None) – Direction of the surface monitor’s normal vector w.r.t. the positive x, y or z unit vectors. Must be one of '+' or '-'. Applies to surface monitors only, and defaults to '+' if not provided.

  • exclude_surfaces (Optional[tuple[Literal['x-', 'x+', 'y-', 'y+', 'z-', 'z+'], ...]] = None) – Surfaces to exclude in the integration, if a volume monitor.

Attributes

integration_surfaces

Surfaces of the monitor where fields will be recorded for subsequent integration.

use_colocated_integration

colocate

normal_dir

exclude_surfaces

interval_space

name

size

center

Methods

check_excluded_surfaces()

Error if exclude_surfaces is provided for a surface monitor.

normal_dir_exists_for_surface()

If the monitor is a surface, set default normal_dir if not provided.

use_colocated_integration#
colocate#
normal_dir#
exclude_surfaces#
property integration_surfaces#

Surfaces of the monitor where fields will be recorded for subsequent integration.

normal_dir_exists_for_surface()[source]#

If the monitor is a surface, set default normal_dir if not provided. If the monitor is a box, warn that normal_dir is relevant only for surfaces.

check_excluded_surfaces()[source]#

Error if exclude_surfaces is provided for a surface monitor.