ivutils
Loading...
Searching...
No Matches
DetectorSet< vset_tt, xfer_t > Class Template Reference

Detectors recording field values in points sequence vset_t. More...

#include <detector.h>

Inheritance diagram for DetectorSet< vset_tt, xfer_t >:
Collaboration diagram for DetectorSet< vset_tt, xfer_t >:

Public Member Functions

void AddDefaultTimers (const std::vector< int > &p_id)
 connect internal timers hierarchy from log to external timers p_id
 
virtual void SetWorkFlag (int wf)
 set bit flag
 
void Dump (bool lim=false)
 dump itself using dumper
 
void SetTypes (int argtype, int outtype, std::vector< std::string > *columns=nullptr)
 set using space coordinates, output fields and names for them
 
virtual int Init ()
 prepare parallel transfers, allocate buffer memory
 
void Flush ()
 calls R->Flush
 
virtual int StartRecord (int it=0)
 start record
 
virtual int StartNextRecord (bool recorded=true, int async_depth=0)
 start parallel transfers in xfer
 
virtual int CompleteNextRecord (bool recorded=true, int async_depth=0, const std::string &framehead="")
 records data from xfer to buffer and calls R->NextRecord
 
virtual int EndRecord ()
 calls R->EndRecord вызывает R->EndRecord
 
void SetExtra (const std::string &extra)
 set extra string which will be written in the text file, used in text recorders only
 
virtual void remap_async_interpolation ()
 remaps all interpolations according to new buffer indices. The map is old_buff_ind->new_buf_ind
 
- 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
 
- 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 Member Functions

int find_major_rank ()
 gets the domain having maximal number of detectors
 
- Protected Member Functions inherited from apComponent
void start (int id)
 start timers
 
void stop (int id, int force=0)
 stop timers
 

Protected Attributes

mngptr< vset_t > vsetp
 Points where fields are recorded.
 
mngptr< VecTransformtransform
 vector transformation
 
xfer_t xfer
 Class which is used to get field values.
 
refvector< xfer_t > hxfer [2]
 Transfer objects for halo regions.
 
mngptr< FieldsRecorderR
 this object directly records fields
 
char * filebuf
 buffer for fields values from container
 
int bufnum
 id of buffer filebuf in xfer
 
int bufsize
 detectors number
 
int inirec
 1 if initialization is successfull, otherwise -1
 
int wf
 if first bit is turned on, then recorded fields are assumed to be zero
 
int local_write
 Flag to control how files are recorded in parallel regime.
 
bool if_sent
 auxiliary флаг, that is turned on at StartNextRecord and turned off at CompleteNextRecord used to control if these function are called in the right order
 
struct { 
 
tid 
 timers numbers
 
bool has_gain = false
 has space-time gain for delayed border
 
- Protected Attributes inherited from BaseDetectorSet
std::vector< int > dims
 Dimensions for interpreting binary file as a mesh.
 
- 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

- Public Attributes inherited from BaseDetectorSet
bool no_time_skew = false
 Do not use time profile in output.
 
- Protected Types inherited from apComponent
typedef std::set< apComponent * > registry_t
 name used in dump and runlog files
 

Detailed Description

template<class vset_tt, class xfer_t>
class DetectorSet< vset_tt, xfer_t >

Detectors recording field values in points sequence vset_t.

Field values are given by container container_t.

Member Function Documentation

◆ StartRecord()

template<class vset_t , class xfer_t >
int DetectorSet< vset_t, xfer_t >::StartRecord ( int  it = 0)
virtual

start record

Parameters
ititeration from which recording is started (not zero if record is continuing after restarting the numerical experiment).

Implements BaseDetectorSet.

Member Data Documentation

◆ local_write

template<class vset_tt , class xfer_t >
int DetectorSet< vset_tt, xfer_t >::local_write
protected

Flag to control how files are recorded in parallel regime.

First bit is off if zeroth node records the file, otherwise the file is recorded by node that have more points. For the case of Fourier-on-fly (R==emFourierRecorder), one can use second bit. Second bit is on if then points field values are Fouirier transformed at the node that have these points, otherwise they are sent to the recording node, which is defined by first bit.


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