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

/ line projector: output fields are t,sx,sy,sz,slen class emLineProjector: public emProjector{ vec_type *it,*isx,*isy,*isz,*ilen; public: emLineProjector(){ it=AddField("t",0); isx=AddField("sx",0); isy=AddField("sy",0); isz=AddField("sz",0); ilen=AddField("slen",0); } More...

#include <analyzer.h>

Inheritance diagram for emGridProjector:
Collaboration diagram for emGridProjector:

Public Member Functions

int AddFilter (int ix, int iy, int iz)
 Adds filter to sort out grid planes by index -1 means that this index is not sorted f.e.
 
int SetPlaneMode (int coord=-1)
 Sets the coord which will cause separator after looping over nmax.
 
int CheckIterator (UniformGrid< Vector_3 >::iterator &it)
 Specialization: checks filters.
 
int GetFileName (std::string &fname, const emRecArg &rec, UniformGrid< Vector_3 >::iterator &it)
 Specialization: gets filename or -1 if this entry is to be skipped.
 
- Public Member Functions inherited from emPoint2File
void SetOutputMode (int four, int arg=argAll)
 Sets the output representation.
 
template<class iter_t >
int GetFileName (std::string &fname, const emRecArg &r, iter_t &it)
 Gets filename or -1 if this entry is to be skipped returns the number of separators '
' to print

 
template<class iter_t >
int CheckIterator (iter_t &it)
 returns 1 if this iterator should be printed, or -1 if it should be skipped
 
virtual int CheckEntry (const emRecArg &r)
 returns 1 if this argument should be printed, or -1 if it should be skipped
 
virtual int process (std::vector< vec_type > &vout, const emRecArg &r, int refnum=0)
 records to vout list of argument values to print
 

Additional Inherited Members

- Protected Attributes inherited from emPoint2File
std::string pref
 file name prefix
 
std::string fv
 printf template to put time /space iterator at the name of the file
 
Vector_3 v
 current position
 
valtype t
 current time
 
std::string ch [3]
 name of three space arguments (x, y, z in rectangular system)
 
int argflags
 bit flag which specifies which arguments will be printed
 
int single_file
 all in one file
 

Detailed Description

/ line projector: output fields are t,sx,sy,sz,slen class emLineProjector: public emProjector{ vec_type *it,*isx,*isy,*isz,*ilen; public: emLineProjector(){ it=AddField("t",0); isx=AddField("sx",0); isy=AddField("sy",0); isz=AddField("sz",0); ilen=AddField("slen",0); }

int SetLine(){} int SetLimits(){}

virtual int process(std::vector<double> &vout, const Vector_3 &v, int refnum=0){ std::vector<double>::iterator it=vout.begin() vout.clear(); double t0=(v-x0)*n/n.norm2(); Vector_3 s=v-x0-n*t0; if(!(tleft<=t && t<= tright))return 0; // not in the area vec_type slen=s.norm(); if(slen>=maxlen)return 0; isx=s[0]; isy=s[1]; isz=s[2]; it=t0; ilen=slen; TransferValues(vout); return 1; } }; This class is used while printing text files with data (electromagnetic field) on rectangular mesh.

Member Function Documentation

◆ AddFilter()

int emGridProjector::AddFilter ( int  ix,
int  iy,
int  iz 
)
inline

Adds filter to sort out grid planes by index -1 means that this index is not sorted f.e.

AddFilter(-1,-1,3) means XY plane where iz=3

◆ GetFileName()

int emGridProjector::GetFileName ( std::string &  fname,
const emRecArg rec,
UniformGrid< Vector_3 >::iterator &  it 
)

Specialization: gets filename or -1 if this entry is to be skipped.



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