tidy3d.plugins.autograd.invdes.grey_indicator

Contents

tidy3d.plugins.autograd.invdes.grey_indicator#

class grey_indicator[source]#

Bases:

Calculate the grey indicator for a given array.

The grey indicator returns 1 for completely grey arrays (all 0.5) and 0 for perfectly binary arrays. It is calculated based on: Sigmund, Ole. “Morphology-based black and white filters for topology optimization.” Structural and Multidisciplinary Optimization 33 (2007): 401-424.

Parameters:

array (np.ndarray) – The input array for which the grey indicator is to be calculated.

Returns:

The calculated grey indicator.

Return type:

float

Inherited Common Usage