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

Class that provides exact fields at any given point and time for a set of point dipoles with specified location, direction and source impulse. More...

#include <radiation.h>

Inheritance diagram for emSourceDipolesExact:
Collaboration diagram for emSourceDipolesExact:

Public Member Functions

 emSourceDipolesExact (int fft_dir, mngarg< emImpulse > simpulse, const emMedium &med_, valtype dt_, bool j_source_=false)
 Dipoles set constructor.
 
virtual int GetFieldsShift () const override
 Get the time shift between E and H fields in half time steps Default (analytic) wave has zero shift.
 
int AddDipole (int ftype, const Vector_3 &pos, const Vector_3 &len, valtype tshift)
 add dipole to the set
 
Vector_3 GetField (int ftype, const Vector_3 &pos, int adv_hsteps=0, valtype tshift=0)
 get the field of given type at given position and current time ADD THIS TO ALL BASE CLASSES!
 
int set_pos (const Vector_3 &pos) override
 sets current vector (x or k)
 
emFixTFSFget_packer (EmtypePtr_t data) override
 used while packing tf/sf coeffs
 
- Public Member Functions inherited from emSourceWave
int free_buffers ()
 Frees all buffer memory and the buffer array.
 
void reset_buffers ()
 Frees buffer memory and prepares the buffers to resize (when new range is set)
 
virtual int set_internal_range (valtype tf0_, valtype tf1_, valtype dtf_=-1)
 sets the internal range for classes that accept any range default for base is [0, INFTY), WHICH WILL NOT ALLOW FFT! must set this for derived class to be able to do FFT classes that have predefined internal range must return -1
 
virtual int set_range (valtype tf0_=1, valtype tf1_=0, valtype dtf_=-1)
 sets t/f range and step for output: needed to optimize buffer usage when transformation is needed.
 
virtual int set_pos_it (int vi_)
 sets current space iteration
 
virtual int set_tf (valtype tf)
 sets current time variable: t or f depending on current working signature
 
void set_first_field (int field)
 Sets the field to be updated first in leap-frog type source stepping. Used in TF/SF generated signals.
 
virtual int set_sync_hsteps (int sync_hsteps)
 Sets the number of half time steps between synchronizations (for descrete LRNLA algorithms).
 
virtual void Step (int field)
 To use from two-stage leap-frog timestepping.
 
virtual void set_cvfields (Vector_3 &Ere, Vector_3 &Hre, Vector_3 &Eim, Vector_3 &Him)
 gets field using given time
 
- Public Member Functions inherited from emComponent
emDump * GetEmDumper ()
 This function insures that the returned dumper is of true emDumper type.
 

Protected Attributes

std::vector< emFilament > dipoles [2]
 dipoles
 
std::vector< valtype > tshifts [2]
 phase shifts for dipoles
 
Vector_3 cpos
 for checking buffer correspondance
 
emtype n
 refractive index
 
bool j_source
 analytic soft source term (true) versus TF/SF like source (warning: infinite at dipole location)
 
- Protected Attributes inherited from emSourceWave
int ti
 time iteration
 
int vi
 for buffers numeration
 
valtype itf0
 internal/actual representation
 
int dt_fixed
 value of dt is fixed for internal representation and cannot be changed by set_range for example, this is 1 for emSourcePlaneWaveGrid, where dt cannot be larger than mesh step
 
int fft_dir
 specifies way of Fourier transformation
 
int bufnum
 number of buffers
 
int fftdim
 dimension for the fft transform (the same as all n),
 
bool buff_dim_ok
 true used to indicate that the buffers are consitent with range
 
int first_upd_field
 Type the field updated first during time stepping (1 is default for EMTL)
 

Additional Inherited Members

- Protected Member Functions inherited from emSourceWave
int scatter_data (base_iterator< Vector_3 > *pos_it, int trav_request=-1)
 scatters wave data from rank 0 to the buffers according to their ranks
 
virtual int step_tf ()
 make step with present dt/df (as in set_dt()) from current time and shifts current time
 

Detailed Description

Class that provides exact fields at any given point and time for a set of point dipoles with specified location, direction and source impulse.

Requires impulse function evaluation at each get_field call.

Member Function Documentation

◆ GetFieldsShift()

virtual int emSourceDipolesExact::GetFieldsShift ( ) const
inlineoverridevirtual

Get the time shift between E and H fields in half time steps Default (analytic) wave has zero shift.

Grid wave has shift of -1 (-dt/2)

Reimplemented from emSourceWave.


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