QPMS
Electromagnetic multiple scattering library and toolkit.
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Protected Member Functions
qpms.fields.IncFieldFromField Class Reference
Inheritance diagram for qpms.fields.IncFieldFromField:
Inheritance graph
[legend]

Public Member Functions

 __init__ (self, EH_func, k, lMax, radius, ntheta=None, nphi=None)
 
 coeffs (self, bspec, pos)
 
 as_incfield (self)
 

Data Fields

 func
 
 k
 
 lMax
 
 radius
 
 bspec
 
 points
 
 weights
 
 coeffs
 

Protected Member Functions

 _basis_at (self, pos)
 

Detailed Description

Custom incoming field defined by a Python electric-field function.

``EH_func(r)`` is called with (3,) float64 cartesian positions
(measured from the particle about which the field is expanded) and
must return the complex cartesian electric field phasor. The VSWF
coefficients about each particle are obtained by a weighted
least-squares projection of the field samples onto the regular VSWF
basis over a sphere of ``radius`` around the particle position.

The field must be source-free inside the quadrature sphere (no
currents or material contrasts); ``radius`` must therefore not
enclose any sources, and ``lMax`` should satisfy lMax ≳ k·radius
plus a few for convergence. The object is accepted directly by
``ScatteringSystem.incident_field_vector`` (via :meth:`as_incfield`)
and the coefficients can also be obtained directly with
``coeffs(bspec, pos)``.

Member Function Documentation

◆ _basis_at()

qpms.fields.IncFieldFromField._basis_at (   self,
  pos 
)
protected
(nq, n, 3) basis values and (nq,) surface weights about pos.

◆ as_incfield()

qpms.fields.IncFieldFromField.as_incfield (   self)
A PyIncField wrapper accepted by incident_field_vector.

◆ coeffs()

qpms.fields.IncFieldFromField.coeffs (   self,
  bspec,
  pos 
)
Regular-VSWF coefficients of the field about ``pos``.

bspec must match the construction basis (same lMax and
normalisation); returns an (n,) complex array.

The documentation for this class was generated from the following file: