Electromagnetic Template Library (EMTL)
|
Correction set for Drude-Lorentz items. More...
#include <dispersion.h>
Public Member Functions | |
template<class block_t > | |
int | record (block_t *block, const typename block_t::contour_it &cnti, emMedium **meds, int meds_num, valtype *fr, valtype &Ca, valtype &Cb) |
Record fix corresponding to the given contour. | |
void | join_parallel () |
Joins local copies of data we used in parallel initialization into global original data. | |
std::array< size_t, 3 > & | skip_fix (emFixStorage &fs, std::ptrdiff_t &fix_ind) const |
Jumps through all fix data, return could be used for correct_fix The right way is probably wrap all in data class that reads or writes itself as a whole We call this function only while correcting fix data during parallel initialization. | |
void | correct_fix_before (emFixStorage &fs, std::ptrdiff_t &fix_ind) const |
If no actions required this function jumps through all fix data Here we have to correct indices of contour solvers in cntsolvers array. | |
void | release_init_resources () |
Releasing all the rest local threads data we used in parallel initialization. | |
Protected Attributes | |
emtype * | ptr |
reference on the E field array | |
valtype | dt |
time step | |
refvector< emDispersionSolver > | slvs0 |
ADE scheme implementation for one medium. | |
refvector< emDispersionFraqSolver > | slvs1 |
ADE scheme implementation for linear combination of media. | |
refvector< pack_t< indtype, indtype >::data > | inds [2] |
indices for E fields in ptr array where fix is applied using slvs0 and slvs1 | |
Correction set for Drude-Lorentz items.
Work with this class assumes 3 stages:
Reference on the object emFixDispersion is stored in method.
|
inline |
If no actions required this function jumps through all fix data Here we have to correct indices of contour solvers in cntsolvers array.
So we use LocalPointer remap to correct them. Each thread corrects it's own portion of fix data, the same portion it had written before.
|
inline |
Joins local copies of data we used in parallel initialization into global original data.
Except for cntsolvers, we just delete all the local data. To store remapping array for correcting fix data we use another local pointer remap. This function should not be called in nonparallel case.
int emFixDispersion::record | ( | block_t * | block, |
const typename block_t::contour_it & | cnti, | ||
emMedium ** | meds, | ||
int | meds_num, | ||
valtype * | fr, | ||
valtype & | Ca, | ||
valtype & | Cb | ||
) |
Record fix corresponding to the given contour.
meds_num of dispersive media stored in **meds participate in this fix. fr are fill fraction of dispersive medium (in the contour area). Ca, Cb are coefficients in the basic dielectric FDTD update.
block | mesh which manages E fields array |
cnti | iterator on the given contour |
meds | reference on dispersive media array |
meds_num | number of disperive media |
fr | fill fractions of dispersive media (in the contour area) |
Ca | coefficients in the basic dielectric FDTD update |
Cb | coefficients in the basic dielectric FDTD update |
|
inline |
Releasing all the rest local threads data we used in parallel initialization.
Here all that left is only remap local pointer. All other local data was released in join_parallel.
|
inline |
Jumps through all fix data, return could be used for correct_fix The right way is probably wrap all in data class that reads or writes itself as a whole We call this function only while correcting fix data during parallel initialization.
The return type is the reference to the data we want to correct.
indices for E fields in ptr array where fix is applied using slvs0 and slvs1
this vector is used at the recording stage to find if some medium was already recorded