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

Reads field from binary file which contains field evolution in chosen points set. More...

#include <analyzer.h>

Inheritance diagram for emFileWave:
Collaboration diagram for emFileWave:

Public Member Functions

int init_time_range (valtype t0, valtype dt, valtype t1=-1)
 This data must accompany the file to know the correct range.
 
virtual int set_internal_range (valtype r0, valtype r1, valtype dr)
 Setting arbitrary internal range is not allowed.
 
- Public Member Functions inherited from emSourceWave
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_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 init_file ()
 Initializes the previously recorded data; checks that the record size matches full set size.
 
- 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
 

Protected Attributes

std::string fname
 file name
 
mngptr< SeqRecordSR
 auxilliary object used to read the file
 
int sz
 number of points
 
int numrec
 number of time steps recorded in file
 
int init
 1 if file is read successfully
 
- 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)
 

Detailed Description

Reads field from binary file which contains field evolution in chosen points set.

In parallel versin, only zeroth processor reads the file.

Member Function Documentation

◆ init_file()

int emFileWave::init_file ( )
protected

Initializes the previously recorded data; checks that the record size matches full set size.

Returns
<0 in case of an error.

◆ init_time_range()

int emFileWave::init_time_range ( valtype  t0,
valtype  dt,
valtype  t1 = -1 
)

This data must accompany the file to know the correct range.

If t1>=0 then some rest part of file is ignored.


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