ivutils
Loading...
Searching...
No Matches
emFourierRecorder Class Reference

Perform Fourier-on-fly transformation. More...

#include <detector.h>

Inheritance diagram for emFourierRecorder:
Collaboration diagram for emFourierRecorder:

Public Member Functions

void SetRecordingFileNode (int node)
 set node which records file (in parallel regime file can be recorded only from one node)
 
void record (int node)
 set node which process data for current point (used for Fourier-on-fly)
 
void SetFrequencyRange (vec_type fmin_, vec_type fmax_, vec_type df_, bool use_lambda_=false)
 set frequency range for recorders that perform Fourieron-fly transformation
 
virtual bool active ()
 returns false if this recorder is not working
 
int SetSliceLookup (const std::vector< int > &slookup_, ptrdiff_t numslice_limit=-1) override
 calls FileRecord
 
void Flush ()
 if data is recorded to file, flush data from buffer to disc
 
virtual int StartRecord (int it)
 Start recording.
 
virtual void FileRecord (const std::string &fname)
 dump results to the file
 
- Public Member Functions inherited from FieldsRecorder
 FieldsRecorder (const std::string &fn, int bin_format_=DATAFILE_BIN_FORMAT::BIN_RAW)
 Sets file name and binary format for recording, one of DATAFILE_BIN_FORMAT.
 
virtual void SetBytesSize (size_t ds)
 size of one record in bytes
 
void SetSize (size_t sz)
 number of points where field is recorded
 
virtual void SetTypes (int argtype, int outtype, std::vector< std::string > *columns=nullptr)
 set using space coordinates, output fields and names for them
 
virtual int SetTextHeader (const std::string &head_)
 Set slice (frame) text header .
 
virtual void SetExtra (const std::string &extra_)
 set extra string which will be written in the text file, used in text recorders only
 
- Public Member Functions inherited from apComponent
void InitComponent (const apComponent &other, const std::vector< int > &p_id=std::vector< int >())
 borrow settings from other component
 
virtual void DumpOther (const apComponent *comp, bool lim=false)
 dump some component using dumper
 
virtual void DumpOther (int flags, const apComponent *comp, bool lim=false)
 dump some component using dumper and checking bit flags
 
virtual void Dump (bool lim=false)
 dump itself using dumper
 
- Public Member Functions inherited from restorer
int save_data (FILE *f)
 save data to the file
 
int load_data (FILE *f)
 read data from the file
 
int save_data (const char *fname)
 save data to the file
 
int load_data (const char *fname)
 read data from the file
 

Protected Attributes

int wr_rank
 node which records binary file at the end of the simulation
 
vec_type dt
 time step
 
vec_type fmin
 calculated frequencies
 
bool use_lambda = false
 use lambdas in output (now file comments only)
 
int fnum
 frequencies number
 
int exp_dir
 representation of wave in time domain
 
int ufreq
 update frequency in steps (1 by default)
 
int ti
 current time iteration
 
size_t bufsize
 number of points which are processed at the current node
 
std::vector< int > nodes
 nodes which make Fourier-on-fly for given points sequence.
 
vec_type * F
 buffer for intermediate results
 
cvec_type * exp_table_dt
 tables with some values of exponents to optimize Fourier transform
 
int exp_upd
 how often this table should be used (or zero, if this table is not used)
 
int wf
 if first bit is turned on, then recorded fields values are assumed to be zero
 
- Protected Attributes inherited from FieldsRecorder
std::string fname
 file name
 
int wf
 if first bit is turned on, then recorded fields values are assumed to be zero
 
size_t rec_size
 number of fields per point
 
size_t bytes_size
 sizeof(vec_type)*rec_size

 
size_t vnum
 number of points where fields are recorded
 
int bin_format
 binary format flag for large files
 
- Protected Attributes inherited from apComponent
int ut
 if information about this object will be dumped
 
std::string name
 if timers will be used
 

Additional Inherited Members

- Protected Types inherited from apComponent
typedef std::set< apComponent * > registry_t
 name used in dump and runlog files
 
- Protected Member Functions inherited from apComponent
virtual void AddDefaultTimers (const std::vector< int > &p_id)
 connect internal timers hierarchy from log to external timers p_id
 
void start (int id)
 start timers
 
void stop (int id, int force=0)
 stop timers
 

Detailed Description

Perform Fourier-on-fly transformation.

Forier-on-fly is performed at nodes having nonzero bufer size bufsize. Node which records binary file at the end of the simulation is defined by SetRecordingFileNode.

Member Function Documentation

◆ StartRecord()

virtual int emFourierRecorder::StartRecord ( int  it)
virtual

Start recording.

Parameters
ititeration from which recording is started (not zero if record is continuing after restarting the numerical experiment, it<0 means refreshing old file).

Implements FieldsRecorder.

Member Data Documentation

◆ nodes

std::vector<int> emFourierRecorder::nodes
protected

nodes which make Fourier-on-fly for given points sequence.

used in parallel realization of FileRecord


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