# Path: sucemfem/Consts.py
# Z0 = mu0*c0                              


import numpy as np
import dolfin
import sucemfem.PostProcessing.ntff_expressions as ntff_expressions
from dolfin import curl, cross, dx, ds, Constant, dot
from sucemfem.Consts import Z0, c0
        #------------------------------
        # evaluate numerically, adding the real and imaginary parts
        N = self.get_N_form()
        N_theta = dolfin.assemble(N['r_theta']) + 1j*dolfin.assemble(N['i_theta'])
        N_phi = dolfin.assemble(N['r_phi']) + 1j*dolfin.assemble(N['i_phi'])
        return (N_theta, N_phi)

    def assemble_L(self):
        #------------------------------
        # evaluate numerically, adding the real and imaginary parts
        L = self.get_L_form()
        L_theta = dolfin.assemble(L['r_theta']) + 1j*dolfin.assemble(L['i_theta'])
        L_phi = dolfin.assemble(L['r_phi']) + 1j*dolfin.assemble(L['i_phi'])
        return (L_theta, L_phi)

    def set_parms(self, theta, phi, k0):
        self.k0.k0 = k0
        self.theta_hat.theta = theta
        self.theta_hat.phi = phi
        self.phi_hat.theta = theta
        self.phi_hat.phi = phi
        self.r_hat.theta = theta
        self.r_hat.phi = phi


class NTFF(object):
    def __init__(self, function_space):
        self.function_space = V = function_space
        # Outward pointing normal
        self.forms = SurfaceNTFFForms(V)

# Path: sucemfem/Consts.py
# Z0 = mu0*c0                              


# Path: sucemfem/PostProcessing/surface_ntff.py
import numpy as np
import dolfin
import sucemfem.PostProcessing.ntff_expressions as ntff_expressions
from dolfin import curl, cross, dx, ds, Constant, dot
from sucemfem.Consts import Z0, c0

        #------------------------------
        # evaluate numerically, adding the real and imaginary parts
        N = self.get_N_form()
        N_theta = dolfin.assemble(N['r_theta']) + 1j*dolfin.assemble(N['i_theta'])
        N_phi = dolfin.assemble(N['r_phi']) + 1j*dolfin.assemble(N['i_phi'])
        return (N_theta, N_phi)

    def assemble_L(self):
        #------------------------------
        # evaluate numerically, adding the real and imaginary parts
        L = self.get_L_form()
        L_theta = dolfin.assemble(L['r_theta']) + 1j*dolfin.assemble(L['i_theta'])
        L_phi = dolfin.assemble(L['r_phi']) + 1j*dolfin.assemble(L['i_phi'])
        return (L_theta, L_phi)

    def set_parms(self, theta, phi, k0):
        self.k0.k0 = k0
        self.theta_hat.theta = theta
        self.theta_hat.phi = phi
        self.phi_hat.theta = theta
        self.phi_hat.phi = phi
        self.r_hat.theta = theta
        self.r_hat.phi = phi


class NTFF(object):
    def __init__(self, function_space):
        self.function_space = V = function_space
        # Outward pointing normal
        self.forms = SurfaceNTFFForms(V)

        self._L = []