FEDEM Solver  R8.0
Source code of the dynamics solver
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | List of all members
FiDeviceFunctionBase Class Referenceabstract

#include <FiDeviceFunctionBase.H>

Inheritance diagram for FiDeviceFunctionBase:
Inheritance graph
[legend]

Classes

struct  axisInfo
 

Public Types

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 }
 

Public Member Functions

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 size_t getValueCount () const =0
 
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 setPrecision (int)
 
virtual double getValue (double x, int channel=0, bool zeroAdjust=false, double vertShift=0.0, double scaleFac=1.0)=0
 
virtual bool getValues (double x0, double x1, std::vector< double > &x, std::vector< double > &y, int channel, bool zeroAdjust=false, double shift=0.0, double scale=1.0)=0
 
virtual void getRawData (std::vector< double > &x, std::vector< double > &y, double minX, double maxX, int channel=0)=0
 
virtual void getData (std::vector< double > &x, std::vector< double > &y, const std::string &, double minX=0.0, double maxX=-1.0)
 
virtual void setValue (double x, double y)=0
 
virtual bool setData (const std::vector< double > &x, const std::vector< double > &y)=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

 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)
 
virtual bool initialDeviceRead ()=0
 
virtual bool preliminaryDeviceWrite ()=0
 
virtual bool concludingDeviceWrite (bool noHeader=false)=0
 

Protected Attributes

FT_FILE myFile
 
std::string myParent
 
std::string myDatasetDevice
 
Endianness myOutputEndian
 
Endianness myInputEndian
 
double myStep
 
std::map< int, axisInfomyAxisInfo
 

Static Protected Attributes

static Endianness myMachineEndian
 

Private Attributes

FileStatus myFileStatus
 
InterpolationPolicy myInterpolationPolicy
 
InterpolationPolicy myExtrapolationPolicy
 
std::vector< double > Xval
 
std::vector< double > Yval
 
int myRefCount
 

Member Enumeration Documentation

◆ Axis

Enumerator

◆ Endianness

Enumerator
LittleEndian 
BigEndian 

◆ FileFormat

Enumerator
ascii 
binary 

◆ FileStatus

Enumerator
Not_Loaded 
Not_Open 
Read_Only 
Write_Only 

◆ InterpolationPolicy

Enumerator
Constant 
Linear 
Previous_Value 
Next_Value 

Constructor & Destructor Documentation

◆ FiDeviceFunctionBase() [1/2]

FiDeviceFunctionBase::FiDeviceFunctionBase ( const char *  devicename = NULL)
protected

◆ FiDeviceFunctionBase() [2/2]

FiDeviceFunctionBase::FiDeviceFunctionBase ( const FiDeviceFunctionBase )
protecteddelete

◆ ~FiDeviceFunctionBase()

virtual FiDeviceFunctionBase::~FiDeviceFunctionBase ( )
inlinevirtual

Member Function Documentation

◆ close()

bool FiDeviceFunctionBase::close ( bool  noHeader = false)

◆ concludingDeviceWrite()

virtual bool FiDeviceFunctionBase::concludingDeviceWrite ( bool  noHeader = false)
protectedpure virtual

Implemented in FiRPC3File, FiDACFile, FiCurveASCFile, and FiASCFile.

◆ extrapolate()

double FiDeviceFunctionBase::extrapolate ( double  x,
double  x0,
double  f0,
double  x1,
double  f1 
) const
protected

◆ getAxisTitle()

void FiDeviceFunctionBase::getAxisTitle ( int  axis,
char *  titleText,
size_t  n 
) const

◆ getAxisUnit()

void FiDeviceFunctionBase::getAxisUnit ( int  axis,
char *  unitText,
size_t  n 
) const

◆ getChannelList()

virtual bool FiDeviceFunctionBase::getChannelList ( std::vector< std::string > &  )
inlinevirtual

Reimplemented in FiRPC3File.

◆ getData()

virtual void FiDeviceFunctionBase::getData ( std::vector< double > &  x,
std::vector< double > &  y,
const std::string &  ,
double  minX = 0.0,
double  maxX = -1.0 
)
inlinevirtual

Reimplemented in FiRPC3File, and FiASCFile.

◆ getDevicename()

const std::string& FiDeviceFunctionBase::getDevicename ( ) const
inline

◆ getFileStatus()

FileStatus FiDeviceFunctionBase::getFileStatus ( ) const
inline

◆ getFrequency()

double FiDeviceFunctionBase::getFrequency ( ) const
inline

◆ getRawData()

virtual void FiDeviceFunctionBase::getRawData ( std::vector< double > &  x,
std::vector< double > &  y,
double  minX,
double  maxX,
int  channel = 0 
)
pure virtual

Implemented in FiCurveASCFile, FiDACFile, FiRPC3File, and FiASCFile.

◆ getRefCount()

int FiDeviceFunctionBase::getRefCount ( ) const
inline

◆ getStep()

double FiDeviceFunctionBase::getStep ( ) const
inline

◆ getValue()

virtual double FiDeviceFunctionBase::getValue ( double  x,
int  channel = 0,
bool  zeroAdjust = false,
double  vertShift = 0.0,
double  scaleFac = 1.0 
)
pure virtual

Implemented in FiCurveASCFile, FiDACFile, FiRPC3File, and FiASCFile.

◆ getValueCount()

virtual size_t FiDeviceFunctionBase::getValueCount ( ) const
pure virtual

Implemented in FiRPC3File, FiDACFile, FiCurveASCFile, and FiASCFile.

◆ getValueRange()

virtual void FiDeviceFunctionBase::getValueRange ( double &  mn,
double &  mx 
) const
inlinevirtual

Reimplemented in FiRPC3File, and FiDACFile.

◆ getValues()

virtual bool FiDeviceFunctionBase::getValues ( double  x0,
double  x1,
std::vector< double > &  x,
std::vector< double > &  y,
int  channel,
bool  zeroAdjust = false,
double  shift = 0.0,
double  scale = 1.0 
)
pure virtual

Implemented in FiCurveASCFile, FiRPC3File, FiDACFile, and FiASCFile.

◆ getXAxisOrigin()

virtual double FiDeviceFunctionBase::getXAxisOrigin ( ) const
inlinevirtual

Reimplemented in FiDACFile.

◆ initialDeviceRead()

virtual bool FiDeviceFunctionBase::initialDeviceRead ( )
protectedpure virtual

Implemented in FiRPC3File, FiDACFile, FiCurveASCFile, and FiASCFile.

◆ integrate()

double FiDeviceFunctionBase::integrate ( double  x,
int  order = 1,
int  channel = 0,
double  vertShift = 0.0,
double  scaleFac = 1.0 
)

◆ interpolate()

double FiDeviceFunctionBase::interpolate ( double  x,
double  x0,
double  f0,
double  x1,
double  f1 
) const
protected

◆ isChannelPresentInFile() [1/2]

virtual int FiDeviceFunctionBase::isChannelPresentInFile ( const std::string &  )
inlinevirtual

Reimplemented in FiRPC3File, and FiASCFile.

◆ isChannelPresentInFile() [2/2]

virtual bool FiDeviceFunctionBase::isChannelPresentInFile ( int  )
inlinevirtual

Reimplemented in FiRPC3File, and FiASCFile.

◆ isReadOnly()

bool FiDeviceFunctionBase::isReadOnly ( ) const
inline

◆ open() [1/2]

bool FiDeviceFunctionBase::open ( const char *  devicename,
FileStatus  status = Read_Only 
)

◆ open() [2/2]

bool FiDeviceFunctionBase::open ( FileStatus  status = Read_Only)
inline

◆ operator=()

FiDeviceFunctionBase& FiDeviceFunctionBase::operator= ( const FiDeviceFunctionBase )
protecteddelete

◆ preliminaryDeviceWrite()

virtual bool FiDeviceFunctionBase::preliminaryDeviceWrite ( )
protectedpure virtual

Implemented in FiRPC3File, FiDACFile, FiCurveASCFile, and FiASCFile.

◆ ref()

int FiDeviceFunctionBase::ref ( )
inline

◆ setAxisTitle()

void FiDeviceFunctionBase::setAxisTitle ( int  axis,
const char *  titleText 
)

◆ setAxisUnit()

void FiDeviceFunctionBase::setAxisUnit ( int  axis,
const char *  unitText 
)

◆ setData()

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

Implemented in FiRPC3File, FiDACFile, FiCurveASCFile, and FiASCFile.

◆ setDescription()

virtual void FiDeviceFunctionBase::setDescription ( const std::string &  )
inlinevirtual

Reimplemented in FiRPC3File, and FiASCFile.

◆ setEmptyChannel()

virtual void FiDeviceFunctionBase::setEmptyChannel ( const std::string &  )
inlinevirtual

Reimplemented in FiASCFile.

◆ setExtrapolationPolicy()

void FiDeviceFunctionBase::setExtrapolationPolicy ( InterpolationPolicy  policy = Constant)
inline

◆ setFrequency()

void FiDeviceFunctionBase::setFrequency ( double  aFreqency)
inline

◆ setInterpolationPolicy()

void FiDeviceFunctionBase::setInterpolationPolicy ( InterpolationPolicy  policy = Linear)
inline

◆ setParent()

void FiDeviceFunctionBase::setParent ( const std::string &  modelfile)
inline

◆ setPrecision()

virtual void FiDeviceFunctionBase::setPrecision ( int  )
inlinevirtual

Reimplemented in FiRPC3File, FiCurveASCFile, and FiASCFile.

◆ setStep()

void FiDeviceFunctionBase::setStep ( double  aStep)
inline

◆ setTimeSpan()

virtual void FiDeviceFunctionBase::setTimeSpan ( double  )
inlinevirtual

Reimplemented in FiRPC3File.

◆ setValue()

virtual void FiDeviceFunctionBase::setValue ( double  x,
double  y 
)
pure virtual

Implemented in FiRPC3File, FiDACFile, FiCurveASCFile, and FiASCFile.

◆ unref()

int FiDeviceFunctionBase::unref ( )

◆ writeString() [1/2]

bool FiDeviceFunctionBase::writeString ( const char *  lab,
const std::string &  val 
)
protected

◆ writeString() [2/2]

bool FiDeviceFunctionBase::writeString ( const char *  str)
protected

Member Data Documentation

◆ myAxisInfo

std::map<int,axisInfo> FiDeviceFunctionBase::myAxisInfo
protected

◆ myDatasetDevice

std::string FiDeviceFunctionBase::myDatasetDevice
protected

◆ myExtrapolationPolicy

InterpolationPolicy FiDeviceFunctionBase::myExtrapolationPolicy
private

◆ myFile

FT_FILE FiDeviceFunctionBase::myFile
protected

◆ myFileStatus

FileStatus FiDeviceFunctionBase::myFileStatus
private

◆ myInputEndian

Endianness FiDeviceFunctionBase::myInputEndian
protected

◆ myInterpolationPolicy

InterpolationPolicy FiDeviceFunctionBase::myInterpolationPolicy
private

◆ myMachineEndian

FiDeviceFunctionBase::Endianness FiDeviceFunctionBase::myMachineEndian
staticprotected
Initial value:
=
@ BigEndian
Definition: FiDeviceFunctionBase.H:29

◆ myOutputEndian

Endianness FiDeviceFunctionBase::myOutputEndian
protected

◆ myParent

std::string FiDeviceFunctionBase::myParent
protected

◆ myRefCount

int FiDeviceFunctionBase::myRefCount
private

◆ myStep

double FiDeviceFunctionBase::myStep
protected

◆ Xval

std::vector<double> FiDeviceFunctionBase::Xval
private

◆ Yval

std::vector<double> FiDeviceFunctionBase::Yval
private

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