Electromagnetic Template Library (EMTL)
Loading...
Searching...
No Matches
tfsf.h File Reference

Classes for Total Fiels / Scaterred Field fixes. More...

#include "emdefs.h"
#include "region_3.h"
#include "seqpack.h"
#include "fix.h"
#include "emcomponent.h"
#include "mesh_ui.h"
Include dependency graph for tfsf.h:
This graph shows which files directly or indirectly include this file:

Classes

class  emTFSFRegion
 Base class for TF/SF technique. More...
 
class  emTFSFSpaceRegion
 Class for TF/SF technique. More...
 
class  emFixTFSF
 Base class-packer for TF/SF fix. More...
 
class  emFixCoefs
 Class-packer for indices of the data array and coefficients. More...
 
struct  emFixCoefs::value_t
 Reorders packed indicies according to coefficient sequence in data_pack. More...
 
class  emFixCoefs::iterator
 iterator for sequences of recorded addresses (of elements in data array) and coefficients More...
 
class  emFixSourceTFSF< source_t >
 Class packer for TF/SF fix. More...
 
struct  TFRegion
 TF descriptor. More...
 

Detailed Description

Classes for Total Fiels / Scaterred Field fixes.

Application of TF/SF fix (technique) means correction of field values at those mesh points which are located at the border between Total Field region and Scattered Field region (which is inverse to TF region) TF/SF correction is applied at the each time step as an addition to the calculated field value Delta:
Delta(ind)=C(ind)*F(x,t)
Here ind – index of the mesh array, x – space coordinate of the field value recorded at the index ind, ะก(ind) – coefficient which depends on the contour geometry , F – incident field. Correction for the each point of the TF/SF border x at the each time stept depends on the incident field of a source F(x,t). Here F – field E or H. This field F(x,t) can be incident plane wave, dipole radiation, etc. In EMTL this field is specified by classes derived from emSourceWave:
– analytically (emSourcePlaneWaveExact, emSourceDipolesExact);
– as a calculated wave propagation at the auxilliary 1D mesh (emSourcePlaneWaveGrid);
– as a data extracted from the file (emFileWave, emFileCWave).
Each source can be represented in packed way, e.g. in an optimal wave to obtain incident field in some chosen points set only (mesh points located at the TF/SF border). General representation of this packing functionality is given by class emFixTFSF. Pointer at the object of this class-packer can be obtained by emSourceWave::get_packer(). Algorithm of working with the object of the class emFixTFSF is:

  1. Specify source, get object emFixTFSF from this source (this is done in emBlockContainer::SetTFSF())
  2. Specify points (elements of the mesh array) at the TF/SF border. Call emFixTFSF::record() for each point (in emBlockContainer::analyze_contours())
  3. Set pointer at the mesh array using emFixTFSF::set_output_ptr()
  4. At the eash time step call function Step of source (to update incident field) and emFixTFSF::step(), which adds Delta to the field value at thw each point at the TF/SF border (in emBlockContainer::StepTFSF())
    emFixSourceTFSF<source_t> is useful derived class from emFixTFSF, which can record sequence of indices ind and coefficients C(ind) (this is part of TF/SF fix which does not depent on a source). Indices and coefficients are packed by auxilliary class emFixCoefs, and source data is packed by class source_t::packer_t.

This is algorithm to work with classes related to TF/SF-fix:

Creation: You need to create a source described by some class derived from emSourceWave [emSourcePlaneWaveGrid, emSourcePlaneWaveExact] After, class bdescr (it manages mesh and fixes) request packer for this source in the function reset: if ( cont->tfregion.Source.ptr() ) sourcetfsf[i] = cont->tfregion.Source->get_packer(data); ( here cont - is argument of function reset, Source refers to object of your class derived from emSourceWave, and get_packer returns object of the class derived from emFixTFSF ) Thus, your source (derived from emSourceWave) creates object of the class derived from emFixTFSF [emFixSourceTFSF] (while calling function get_packer). This created object has:

  • object of the class derived from emSourceWavePacker [emSourcePlaneWaveGridPacker, emSourcePlaneWaveExactPacker] which is packer for the incident wave
  • object of the class emFixCoefs which is packer for indices and coefficients applied in TF/SF fix

Record:

  • function record of the class derived from emFixTFSF.

Calculation:

  • function step of a source derived from emSourceWave (update incident field for the current time step).
  • function step of the class derived from emFixTFSF, to apply TF/SF fix.