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

Basic class for defined (analytic) wave description. More...

#include <radiation.h>

Inheritance diagram for emSourceWave:
Collaboration diagram for emSourceWave:

Public Member Functions

virtual int GetFieldsShift () const
 Get the time shift between E and H fields in half time steps Default (analytic) wave has zero shift.
 
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 emFixTFSFget_packer (EmtypePtr_t data)
 used while packing tf/sf coeffs
 
virtual int set_pos_it (int vi_)
 sets current space iteration
 
virtual int set_pos (const Vector_3 &pos)
 sets current vector (x or k). переопределяется в наследнике, если нужно.
 
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 Member Functions

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
 

Protected Attributes

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)
 

Detailed Description

Basic class for defined (analytic) wave description.

Member Function Documentation

◆ GetFieldsShift()

virtual int emSourceWave::GetFieldsShift ( ) const
inlinevirtual

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 in emSourcePlaneWaveGrid, and emSourceDipolesExact.

◆ set_pos_it()

virtual int emSourceWave::set_pos_it ( int  vi_)
inlinevirtual

sets current space iteration

Returns
<0 if this iterator is unavailable
-2 if the iterator does not belong to current MPI rank

!!!

◆ set_range()

virtual int emSourceWave::set_range ( valtype  tf0_ = 1,
valtype  tf1_ = 0,
valtype  dtf_ = -1 
)
virtual

sets t/f range and step for output: needed to optimize buffer usage when transformation is needed.

after setting the range, stepping outside the range will not be allowed. the accuracy of representation along t/f axis will be determined by dtf stepping with steps less than dtf will result in interpolation output. if tf0>tf1, sets internal defaults for range. dtf<0 means internal default for step. retuns <0 if the setting is impossible

◆ set_sync_hsteps()

virtual int emSourceWave::set_sync_hsteps ( int  sync_hsteps)
inlinevirtual

Sets the number of half time steps between synchronizations (for descrete LRNLA algorithms).

Returns
1 if set, 0 otherwise (not supported)

Reimplemented in emSourcePlaneWaveGrid.

◆ Step()

virtual void emSourceWave::Step ( int  field)
inlinevirtual

To use from two-stage leap-frog timestepping.

!!!

Reimplemented in emSourcePlaneWaveGrid.

Member Data Documentation

◆ itf0

valtype emSourceWave::itf0
protected

internal/actual representation

internal/actual t/f range


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