FEDEM Solver  R8.0
Source code of the dynamics solver
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
FiCurveASCFile Class Reference

ASCII file for curve plotting. More...

#include <FiCurveASCFile.H>

Inheritance diagram for FiCurveASCFile:
Inheritance graph
[legend]
Collaboration diagram for FiCurveASCFile:
Collaboration graph
[legend]

Public Member Functions

 FiCurveASCFile ()
 
 FiCurveASCFile (const char *devicename)
 
virtual ~FiCurveASCFile ()
 
virtual size_t getValueCount () const
 
virtual double getValue (double, int, bool, double, double)
 
virtual bool getValues (double, double, std::vector< double > &x, std::vector< double > &y, int, bool, double, double)
 
virtual void getRawData (std::vector< double > &x, std::vector< double > &y, double, double, int)
 
virtual void setValue (double x, double y)
 
virtual bool setData (const std::vector< double > &x, const std::vector< double > &y)
 
virtual void setPrecision (int type)
 
- Public Member Functions inherited from FiDeviceFunctionBase
virtual ~FiDeviceFunctionBase ()
 
bool open (const char *devicename, FileStatus status=Read_Only)
 
bool open (FileStatus status=Read_Only)
 
bool close (bool noHeader=false)
 
const std::string & getDevicename () const
 
void setExtrapolationPolicy (InterpolationPolicy policy=Constant)
 
void setInterpolationPolicy (InterpolationPolicy policy=Linear)
 
virtual void getValueRange (double &mn, double &mx) const
 
virtual double getXAxisOrigin () const
 
virtual bool getChannelList (std::vector< std::string > &)
 
virtual bool isChannelPresentInFile (int)
 
virtual int isChannelPresentInFile (const std::string &)
 
virtual void setTimeSpan (double)
 
virtual void getData (std::vector< double > &x, std::vector< double > &y, const std::string &, double minX=0.0, double maxX=-1.0)
 
double integrate (double x, int order=1, int channel=0, double vertShift=0.0, double scaleFac=1.0)
 
int getRefCount () const
 
int ref ()
 
int unref ()
 
double getStep () const
 
double getFrequency () const
 
void setStep (double aStep)
 
void setFrequency (double aFreqency)
 
virtual void setDescription (const std::string &)
 
virtual void setEmptyChannel (const std::string &)
 
void setParent (const std::string &modelfile)
 
bool isReadOnly () const
 
FileStatus getFileStatus () const
 
void getAxisUnit (int axis, char *unitText, size_t n) const
 
void getAxisTitle (int axis, char *titleText, size_t n) const
 
void setAxisUnit (int axis, const char *unitText)
 
void setAxisTitle (int axis, const char *titleText)
 

Protected Member Functions

virtual bool concludingDeviceWrite (bool)
 
virtual bool initialDeviceRead ()
 
virtual bool preliminaryDeviceWrite ()
 
- Protected Member Functions inherited from FiDeviceFunctionBase
 FiDeviceFunctionBase (const char *devicename=NULL)
 
 FiDeviceFunctionBase (const FiDeviceFunctionBase &)=delete
 
FiDeviceFunctionBaseoperator= (const FiDeviceFunctionBase &)=delete
 
double interpolate (double x, double x0, double f0, double x1, double f1) const
 
double extrapolate (double x, double x0, double f0, double x1, double f1) const
 
bool writeString (const char *str)
 
bool writeString (const char *lab, const std::string &val)
 

Private Attributes

std::vector< double > myXValues
 
std::vector< double > myYValues
 
int outputFormat
 

Additional Inherited Members

- Public Types inherited from FiDeviceFunctionBase
enum  Axis { X =0 , Y =1 }
 
enum  Endianness { LittleEndian , BigEndian }
 
enum  FileFormat { ascii , binary }
 
enum  FileStatus { Not_Loaded =-1 , Not_Open =0 , Read_Only =1 , Write_Only =2 }
 
enum  InterpolationPolicy { Constant , Linear , Previous_Value , Next_Value }
 
- Protected Attributes inherited from FiDeviceFunctionBase
FT_FILE myFile
 
std::string myParent
 
std::string myDatasetDevice
 
Endianness myOutputEndian
 
Endianness myInputEndian
 
double myStep
 
std::map< int, axisInfomyAxisInfo
 
- Static Protected Attributes inherited from FiDeviceFunctionBase
static Endianness myMachineEndian
 

Detailed Description

ASCII file for curve plotting.

This class is very much like FiASCFile, but uses vectors to store data instead of maps. This allows for export/import of curves with any shape, and not only for strictly growing x-values.

There will be no interpolation, scaling or shifting what so ever. Just raw data in and out.

Constructor & Destructor Documentation

◆ FiCurveASCFile() [1/2]

FiCurveASCFile::FiCurveASCFile ( )

◆ FiCurveASCFile() [2/2]

FiCurveASCFile::FiCurveASCFile ( const char *  devicename)

◆ ~FiCurveASCFile()

virtual FiCurveASCFile::~FiCurveASCFile ( )
inlinevirtual

Member Function Documentation

◆ concludingDeviceWrite()

bool FiCurveASCFile::concludingDeviceWrite ( bool  )
protectedvirtual

Implements FiDeviceFunctionBase.

◆ getRawData()

void FiCurveASCFile::getRawData ( std::vector< double > &  x,
std::vector< double > &  y,
double  ,
double  ,
int   
)
virtual

Implements FiDeviceFunctionBase.

◆ getValue()

virtual double FiCurveASCFile::getValue ( double  ,
int  ,
bool  ,
double  ,
double   
)
inlinevirtual

Implements FiDeviceFunctionBase.

◆ getValueCount()

virtual size_t FiCurveASCFile::getValueCount ( ) const
inlinevirtual

Implements FiDeviceFunctionBase.

◆ getValues()

bool FiCurveASCFile::getValues ( double  ,
double  ,
std::vector< double > &  x,
std::vector< double > &  y,
int  ,
bool  ,
double  ,
double   
)
virtual

Implements FiDeviceFunctionBase.

◆ initialDeviceRead()

bool FiCurveASCFile::initialDeviceRead ( )
protectedvirtual

Implements FiDeviceFunctionBase.

◆ preliminaryDeviceWrite()

virtual bool FiCurveASCFile::preliminaryDeviceWrite ( )
inlineprotectedvirtual

Implements FiDeviceFunctionBase.

◆ setData()

bool FiCurveASCFile::setData ( const std::vector< double > &  x,
const std::vector< double > &  y 
)
virtual

Implements FiDeviceFunctionBase.

◆ setPrecision()

virtual void FiCurveASCFile::setPrecision ( int  type)
inlinevirtual

Reimplemented from FiDeviceFunctionBase.

◆ setValue()

void FiCurveASCFile::setValue ( double  x,
double  y 
)
virtual

Implements FiDeviceFunctionBase.

Member Data Documentation

◆ myXValues

std::vector<double> FiCurveASCFile::myXValues
private

◆ myYValues

std::vector<double> FiCurveASCFile::myYValues
private

◆ outputFormat

int FiCurveASCFile::outputFormat
private

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