Skip to content

Commit

Permalink
added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sbuddhiraju committed Aug 4, 2020
1 parent c275a4b commit 5338dd2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions ceviche/fdfd.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,15 +281,15 @@ def _solve_fn(self, eps_vec, entries_a, indices_a, Jz_vec):
def _Ez_to_Hx(self, Ez_vec):
""" Multi-frequency version of _Ez_to_Hx() defined in fdfd """
M = 2*self.Nsb + 1
Winv = npa.reciprocal(self.omega + npa.arange(-self.Nsb,self.Nsb+1)*self.omega_mod)
Winv = 1/(self.omega + npa.arange(-self.Nsb,self.Nsb+1)*self.omega_mod)
Dyb_mf = sp.kron(sp.spdiags(Winv,[0],M,M), self.Dyb)
entries_Dyb_mf, indices_Dyb_mf = get_entries_indices(Dyb_mf)
return -1 / 1j / MU_0 * sp_mult(entries_Dyb_mf, indices_Dyb_mf, Ez_vec)

def _Ez_to_Hy(self, Ez_vec):
""" Multi-frequency version of _Ez_to_Hy() defined in fdfd """
M = 2*self.Nsb + 1
Winv = npa.reciprocal(self.omega + npa.arange(-self.Nsb,self.Nsb+1)*self.omega_mod)
Winv = 1/(self.omega + npa.arange(-self.Nsb,self.Nsb+1)*self.omega_mod)
Dxb_mf = sp.kron(sp.spdiags(Winv,[0],M,M), self.Dxb)
entries_Dxb_mf, indices_Dxb_mf = get_entries_indices(Dxb_mf)
return 1 / 1j / MU_0 * sp_mult(entries_Dxb_mf, indices_Dxb_mf, Ez_vec)
Expand Down
16 changes: 8 additions & 8 deletions examples/fdfd_mf_intro.ipynb

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions examples/fdfd_mf_invdes_deltaphi.ipynb

Large diffs are not rendered by default.

0 comments on commit 5338dd2

Please sign in to comment.