Skip to content
Snippets Groups Projects
Commit ff4d39c8 authored by Christian Howard's avatar Christian Howard
Browse files

Working on sorting out issues with the symbolic differential operators....

Working on sorting out issues with the symbolic differential operators. Hardset the grad(phi) term to 0 and currently looking into issues with the A_operator
parent 9d5cc57a
No related branches found
No related tags found
No related merge requests found
...@@ -164,7 +164,7 @@ class DPIEOperator: ...@@ -164,7 +164,7 @@ class DPIEOperator:
# create the characteristic functions that give a value of # create the characteristic functions that give a value of
# 1 when we are on some surface/valume and a value of 0 otherwise # 1 when we are on some surface/valume and a value of 0 otherwise
self.char_funcs = sym.make_sym_vector("Q_array",len(self.geometry_list)) self.char_funcs = sym.make_sym_vector("chi",len(self.geometry_list))
for idx in range(0,len(geometry_list)): for idx in range(0,len(geometry_list)):
self.char_funcs[idx] = sym.D(self.kernel,1,k=self.k,source=self.geometry_list[idx]) self.char_funcs[idx] = sym.D(self.kernel,1,k=self.k,source=self.geometry_list[idx])
...@@ -203,7 +203,8 @@ class DPIEOperator: ...@@ -203,7 +203,8 @@ class DPIEOperator:
# get the Q_array # get the Q_array
Q_array = sym.make_sym_vector("Q_array",len(self.geometry_list)) Q_array = sym.make_sym_vector("Q_array",len(self.geometry_list))
for i in range(0,len(self.geometry_list)): for i in range(0,len(self.geometry_list)):
Q_array[i] = -sym.integral(3,2,sym.n_dot(sym.grad(3,phi_inc)),where=self.geometry_list[i]) #Q_array[i] = -sym.integral(3,2,sym.n_dot(sym.grad(3,phi_inc)),where=self.geometry_list[i])
Q_array[i] = 0
# return the resulting field # return the resulting field
return sym.join_fields(-phi_inc, return sym.join_fields(-phi_inc,
......
...@@ -255,7 +255,7 @@ def test_pec_dpie_extinction(ctx_getter, case, visualize=False): ...@@ -255,7 +255,7 @@ def test_pec_dpie_extinction(ctx_getter, case, visualize=False):
import pytential.symbolic.pde.maxwell.dpie as mw import pytential.symbolic.pde.maxwell.dpie as mw
# initialize the DPIE operator based on the geometry list # initialize the DPIE operator based on the geometry list
dpie = DPIEOperator(geometry_list=geom_list) dpie = mw.DPIEOperator(geometry_list=geom_list)
# specify some symbolic variables that will be used # specify some symbolic variables that will be used
...@@ -285,7 +285,7 @@ def test_pec_dpie_extinction(ctx_getter, case, visualize=False): ...@@ -285,7 +285,7 @@ def test_pec_dpie_extinction(ctx_getter, case, visualize=False):
# plane wave # plane wave
return bind( return bind(
tgt, tgt,
get_sym_maxwell_plane_wave( mw.get_sym_maxwell_plane_wave(
amplitude_vec=np.array([1, 1, 1]), amplitude_vec=np.array([1, 1, 1]),
v=np.array([1, 0, 0]), v=np.array([1, 0, 0]),
omega=case.k) omega=case.k)
...@@ -294,13 +294,13 @@ def test_pec_dpie_extinction(ctx_getter, case, visualize=False): ...@@ -294,13 +294,13 @@ def test_pec_dpie_extinction(ctx_getter, case, visualize=False):
# point source # point source
return bind( return bind(
(test_source, tgt), (test_source, tgt),
get_sym_maxwell_point_source(dpie.kernel, j_sym, dpie.k) mw.get_sym_maxwell_point_source(dpie.kernel, j_sym, dpie.k)
)(queue, j=src_j, k=case.k) )(queue, j=src_j, k=case.k)
# method to get vector potential and scalar potential for incident # method to get vector potential and scalar potential for incident
# E-M fields # E-M fields
def get_inc_potentials(tgt): def get_inc_potentials(tgt):
return bind((test_source, tgt),get_sym_maxwell_point_source_potentials(dpie.kernel, j_sym, dpie.k))(queue, j=src_j, k=case.k) return bind((test_source, tgt),mw.get_sym_maxwell_point_source_potentials(dpie.kernel, j_sym, dpie.k))(queue, j=src_j, k=case.k)
# get the Electromagnetic field evaluated at the target calculus patch # get the Electromagnetic field evaluated at the target calculus patch
pde_test_inc = EHField( pde_test_inc = EHField(
...@@ -378,7 +378,6 @@ def test_pec_dpie_extinction(ctx_getter, case, visualize=False): ...@@ -378,7 +378,6 @@ def test_pec_dpie_extinction(ctx_getter, case, visualize=False):
inv_vec_field_obs = get_inc_potentials(obs_discr) inv_vec_field_obs = get_inc_potentials(obs_discr)
# {{{ solve the system of integral equations # {{{ solve the system of integral equations
inc_xyz_vec_sym = sym.make_sym_vector("inc_vec_fld", 4) inc_xyz_vec_sym = sym.make_sym_vector("inc_vec_fld", 4)
# setup operators that will be solved # setup operators that will be solved
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment