# Path: openmodes/constants.py

# 
# Path: openmodes/material.py
# class IsotropicMaterial(Identified):
#     def __init__(self, name, epsilon_r, mu_r):
#     def eta(self, s):
#     def eta_r(self, s):
#     def n(self, s):


import numpy as np
from openmodes.constants import c
from openmodes.material import FreeSpace
from numpy import sin, cos
        p_inc: real, optional
            If specified, the incident power will be scaled to ensure constant
            power.
        """

        self.e_inc = np.asarray(e_inc)
        k_hat = np.asarray(k_hat)
        self.k_hat = k_hat/np.sqrt(np.dot(k_hat, k_hat))
        self.material = material
        self.h_inc = np.cross(k_hat, self.e_inc)  # unscaled
        self.p_inc = p_inc

    def electric_field(self, s, r):
        """Calculate the electric field distribution at a given frequency

        Parameters
        ----------
        s : complex
            Complex frequency at which to evaluate fields
        r : ndarray, real
            The locations at which to calculate the field. This array can have
            an arbitrary number of dimensions. The last dimension must of size
            3, corresponding to the three cartesian coordinates

        Returns
        -------
        E : ndarray, complex
            An array with the same dimensions as r, giving the field at each
            point
        """

# Path: openmodes/constants.py

# 
# Path: openmodes/material.py
# class IsotropicMaterial(Identified):
#     def __init__(self, name, epsilon_r, mu_r):
#     def eta(self, s):
#     def eta_r(self, s):
#     def n(self, s):


# Path: openmodes/sources.py
import numpy as np
from openmodes.constants import c
from openmodes.material import FreeSpace
from numpy import sin, cos

        p_inc: real, optional
            If specified, the incident power will be scaled to ensure constant
            power.
        """

        self.e_inc = np.asarray(e_inc)
        k_hat = np.asarray(k_hat)
        self.k_hat = k_hat/np.sqrt(np.dot(k_hat, k_hat))
        self.material = material
        self.h_inc = np.cross(k_hat, self.e_inc)  # unscaled
        self.p_inc = p_inc

    def electric_field(self, s, r):
        """Calculate the electric field distribution at a given frequency

        Parameters
        ----------
        s : complex
            Complex frequency at which to evaluate fields
        r : ndarray, real
            The locations at which to calculate the field. This array can have
            an arbitrary number of dimensions. The last dimension must of size
            3, corresponding to the three cartesian coordinates

        Returns
        -------
        E : ndarray, complex
            An array with the same dimensions as r, giving the field at each
            point
        """

        jk = self.k_hat*self.material.n(s)*s/c