Electromagnetic Template Library (EMTL)
Loading...
Searching...
No Matches
emDispersionSolver Class Reference

Fix class for dispersive media described by Drude / Lorentz terms. More...

#include <dispersion.h>

Inheritance diagram for emDispersionSolver:
Collaboration diagram for emDispersionSolver:

Classes

class  iterator
 Iterator on recorded points (see general description in fix.h) More...
 

Public Member Functions

void init (emMedium **meds, int meds_num, valtype dt)
 calculate coefficients dr, lr, CE, CEp, Crot
 
void record (valtype *Ca, valtype *Cb)
 record point where fix is required
 
void end_record ()
 complete point recording
 
void ClearMesh ()
 fill Ep, Jlr, Jlrp with zero values
 
int step_before (const iterator &data, emtype *out)
 apply fix before basic update (see decsription in fix.h)
 
int step_after (const iterator &data, emtype *out)
 apply fix after basic update (see decsription in fix.h)
 
valtype get_Ca0 () const
 
valtype get_Cb0 () const
 
emtype get_J (const iterator &data)
 

Protected Types

typedef drlrcoeffs_t< valtype > lrcoeffs_t
 coefficients in ADE scheme (see decsription to 'dispersion.h')
 

Protected Attributes

int rec_state
 state flag (see general description in fix.h)
 
int medsnum
 number of media
 
int * polesnum
 array of the size 2*medsum for Drude / Lorentz terms number for each medium
 
lrcoeffs_tdr
 coefficients for Drude and Lorentz currents update equation (see decsription to 'dispersion.h')
 
valtype CE
 coefficients for E field update equation
 
valtype Ca0
 original (without account for dispersion) coefficients for E field update equation: E=Ca0*E+Cb0*rotH
 
size_t nE
 number of recorded points
 
size_t nEp
 1 if we need to know E field at the previous step
 
size_t nJ
 number of currents at the current time step that we store
 
size_t nJp
 number of currents at the previous time step that we store
 
emtype * Ep
 arrays for the E field at the previous time step and for currents J at the current and previous time steps
 

Friends

class emFixDispersion
 
struct emDispersionVecAccessHelper
 

Detailed Description

Fix class for dispersive media described by Drude / Lorentz terms.

Work with this class assumes 3 stages:

  1. Intialization (function init) with reference on dispersive emMedium media meds (see medium.h), number of media meds_num, and time step dt. Resulted medium is a sum of all media meds (see medium.h). Coefficients in ADE numerical scheme are calculated from Drude / Lorentz parameters in media.
  2. Recording points where fix will be applied (function record). Function record returns coefficients Ca and Cb from basic FDTD update equation E=Ca*E+Cb*rotH, which is solved outside the fix class.
  3. Applying fix for recorded points using functions step_before and step_after.

This class manages arrays for Ep, J, Jp. Array for E is managed outside.

Member Function Documentation

◆ get_Ca0()

valtype emDispersionSolver::get_Ca0 ( ) const
inline
Returns
unperturbed coefficient Ca for field update equation: E=Ca*E+Cb*rotH.

◆ get_Cb0()

valtype emDispersionSolver::get_Cb0 ( ) const
inline
Returns
unperturbed coefficient Cb for field update equation: E=Ca*E+Cb*rotH.

◆ get_J()

emtype emDispersionSolver::get_J ( const iterator data)
inline
Returns
the value of polarization current J at current time step (to be called after step_after).

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