small fixes
Former-commit-id: 90d007ae19ad42222c406564adc80b5394703b83
This commit is contained in:
parent
fda639304a
commit
5b0bd8d099
|
@ -262,11 +262,13 @@ Original formulation, sect.
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
\begin_inset Formula
|
\begin_inset Formula
|
||||||
\begin{eqnarray*}
|
\begin{eqnarray}
|
||||||
\vect A_{1lm}\left(\hat{\vect r}\right) & = & \frac{1}{\sqrt{l\left(l+1\right)}}\left(\hat{\vect{\theta}}\frac{1}{\sin\theta}\frac{\partial}{\partial\phi}Y_{lm}\left(\hat{\vect r}\right)-\hat{\vect{\phi}}\frac{\partial}{\partial\theta}Y_{lm}\left(\hat{\vect r}\right)\right)\\
|
\vect A_{1lm}\left(\hat{\vect r}\right) & = & \frac{1}{\sqrt{l\left(l+1\right)}}\left(\hat{\vect{\theta}}\frac{1}{\sin\theta}\frac{\partial}{\partial\phi}Y_{lm}\left(\hat{\vect r}\right)-\hat{\vect{\phi}}\frac{\partial}{\partial\theta}Y_{lm}\left(\hat{\vect r}\right)\right)\nonumber \\
|
||||||
\vect A_{2lm}\left(\hat{\vect r}\right) & = & \frac{1}{\sqrt{l\left(l+1\right)}}\left(\hat{\vect{\theta}}\frac{\partial}{\partial\phi}Y_{lm}\left(\hat{\vect r}\right)-\hat{\vect{\phi}}\frac{1}{\sin\theta}\frac{\partial}{\partial\theta}Y_{lm}\left(\hat{\vect r}\right)\right)\\
|
& = & \frac{1}{\sqrt{l\left(l+1\right)}}\nabla\times\left(\vect rY_{lm}\left(\hat{\vect r}\right)\right)\nonumber \\
|
||||||
\vect A_{3lm}\left(\hat{\vect r}\right) & = & \hat{\vect r}Y_{lm}\left(\hat{\vect r}\right)
|
\vect A_{2lm}\left(\hat{\vect r}\right) & = & \frac{1}{\sqrt{l\left(l+1\right)}}\left(\hat{\vect{\theta}}\frac{\partial}{\partial\phi}Y_{lm}\left(\hat{\vect r}\right)-\hat{\vect{\phi}}\frac{1}{\sin\theta}\frac{\partial}{\partial\theta}Y_{lm}\left(\hat{\vect r}\right)\right)\label{eq:vector spherical harmonics Kristensson}\\
|
||||||
\end{eqnarray*}
|
& = & \frac{1}{\sqrt{l\left(l+1\right)}}r\nabla Y_{lm}\left(\hat{\vect r}\right)\nonumber \\
|
||||||
|
\vect A_{3lm}\left(\hat{\vect r}\right) & = & \hat{\vect r}Y_{lm}\left(\hat{\vect r}\right)\nonumber
|
||||||
|
\end{eqnarray}
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
|
@ -1236,6 +1238,10 @@ Translation of spherical waves: getting insane
|
||||||
Multiple scattering: nice linear algebra born from all the mess
|
Multiple scattering: nice linear algebra born from all the mess
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Chapter
|
||||||
|
Quantisation of quasistatic modes of a sphere
|
||||||
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
\begin_inset CommandInset bibtex
|
\begin_inset CommandInset bibtex
|
||||||
LatexCommand bibtex
|
LatexCommand bibtex
|
||||||
|
|
|
@ -138,14 +138,14 @@ class Scattering(object):
|
||||||
btime = _time_b(verbose)
|
btime = _time_b(verbose)
|
||||||
self.prepare(verbose=verbose)
|
self.prepare(verbose=verbose)
|
||||||
pq_0 = np.broadcast_to(pq_0, (self.N,2,self.nelem))
|
pq_0 = np.broadcast_to(pq_0, (self.N,2,self.nelem))
|
||||||
MP_0 = np.empty((N,2,nelem),dtype=np.complex_)
|
MP_0 = np.empty((self.N,2,self.nelem),dtype=np.complex_)
|
||||||
for j in range(self.N):
|
for j in range(self.N):
|
||||||
MP_0[j] = np.tensordot(self.TMatrices[j], pq_0[j],axes=([-2,-1],[-2,-1]))
|
MP_0[j] = np.tensordot(self.TMatrices[j], pq_0[j],axes=([-2,-1],[-2,-1]))
|
||||||
MP_0.shape = (N*2*self.nelem,)
|
MP_0.shape = (self.N*2*self.nelem,)
|
||||||
solvebtime = _time_b(verbose,step='Solving the linear equation')
|
solvebtime = _time_b(verbose,step='Solving the linear equation')
|
||||||
ab = scipy.linalg.lu_solve(self.lupiv, MP_0)
|
ab = scipy.linalg.lu_solve(self.lupiv, MP_0)
|
||||||
_time_e(solvebtime, verbose, step='Solving the linear equation')
|
_time_e(solvebtime, verbose, step='Solving the linear equation')
|
||||||
ab.shape = (N,2,nelem)
|
ab.shape = (self.N,2,self.nelem)
|
||||||
_time_e(btime, verbose)
|
_time_e(btime, verbose)
|
||||||
return ab
|
return ab
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ class Scattering(object):
|
||||||
_time_e(btime, verbose)
|
_time_e(btime, verbose)
|
||||||
return ab
|
return ab
|
||||||
|
|
||||||
class Scattering_2D_lattice(Scattering):
|
class Scattering_2D_lattice_rectcells(Scattering):
|
||||||
def __init__(self, rectcell_dims, rectcell_elem_positions, cellspec, k_0, rectcell_TMatrices = None, TMatrices = None, lMax = None, verbose=False, J_scat=3):
|
def __init__(self, rectcell_dims, rectcell_elem_positions, cellspec, k_0, rectcell_TMatrices = None, TMatrices = None, lMax = None, verbose=False, J_scat=3):
|
||||||
'''
|
'''
|
||||||
cellspec: dvojice ve tvaru (seznam_zaplněnosti, seznam_pozic)
|
cellspec: dvojice ve tvaru (seznam_zaplněnosti, seznam_pozic)
|
||||||
|
|
Loading…
Reference in New Issue