3.3.2.4. A_FMM.Stack.calculate_fields

Stack.calculate_fields(u1: ndarray, d2: ndarray = None, x: ndarray = 0, y: ndarray = 0, z: ndarray = 0, components: list[str] = None) dict[str, ndarray]

Returns fields in the stack

The fields are calculated on a meshgrdi of x,y,z

Parameters:
  • u1 (np.ndarray) – forward modal coefficient in the first layer

  • d2 (np.ndarray) – backward modal coefficient in the last layer

  • x (np.ndarray) – x coordinate (1D array)

  • y (np.ndarray) – y coordinate (1D array)

  • z (np.ndarray) – z coordinate (1D array)

  • components (list) – List of modal componets to be calculated. Possible are [‘Ex’, ‘Ey’, ‘Hx’, ‘Hz’]. Default to None (all of them).

Returs:

dict: Dictionary containing the coordinates and the field components