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


import sys
import numpy as N
import os
import dolfin as dol
import postproc_eigres
from dolfin import dot, curl, inner, dx
from scipy.sparse.linalg.eigen.arpack import speigs
from sucemfem.Consts import eps0, mu0, c0
from material_properties import MaterialProperties
# Neilen Marais <nmarais@gmail.com>
from __future__ import division

sys.path.append('../../')



# Test for PETSc and SLEPc
if not dol.has_la_backend("PETSc"):
    print "DOLFIN has not been configured with PETSc. Exiting."
    exit()

if not dol.has_slepc():
    print "DOLFIN has not been configured with SLEPc. Exiting."
    exit()

# class CavityDims(object): pass
# cdims = CavityDims()
# cdims.a, cdims.b, cdims.c = 29,23,19


# Define mesh
# mesh = dol.UnitCube(1,1,1)
# mesh.coordinates()[:] *= [cdims.a,cdims.b,cdims.c]
#mesh_file = 'lee_mittra92_fig6b.xml'
#mesh_file = 'lee_mittra92_fig6c.xml'
mesh_file = '../examples/albani_bernardi74/mesh/albani_bernardi74_fig2VII.xml'
materials_mesh_file = "%s_physical_region%s" % (os.path.splitext(mesh_file))
mesh = dol.Mesh(mesh_file)
materials = {1000:MaterialProperties(eps_r=16/eps0),

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


# Path: sandbox/eig/eig_materials.py
import sys
import numpy as N
import os
import dolfin as dol
import postproc_eigres
from dolfin import dot, curl, inner, dx
from scipy.sparse.linalg.eigen.arpack import speigs
from sucemfem.Consts import eps0, mu0, c0
from material_properties import MaterialProperties

# Neilen Marais <nmarais@gmail.com>
from __future__ import division

sys.path.append('../../')



# Test for PETSc and SLEPc
if not dol.has_la_backend("PETSc"):
    print "DOLFIN has not been configured with PETSc. Exiting."
    exit()

if not dol.has_slepc():
    print "DOLFIN has not been configured with SLEPc. Exiting."
    exit()

# class CavityDims(object): pass
# cdims = CavityDims()
# cdims.a, cdims.b, cdims.c = 29,23,19


# Define mesh
# mesh = dol.UnitCube(1,1,1)
# mesh.coordinates()[:] *= [cdims.a,cdims.b,cdims.c]
#mesh_file = 'lee_mittra92_fig6b.xml'
#mesh_file = 'lee_mittra92_fig6c.xml'
mesh_file = '../examples/albani_bernardi74/mesh/albani_bernardi74_fig2VII.xml'
materials_mesh_file = "%s_physical_region%s" % (os.path.splitext(mesh_file))
mesh = dol.Mesh(mesh_file)
materials = {1000:MaterialProperties(eps_r=16/eps0),

             1001:MaterialProperties(eps_r=1/eps0)}