OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::PeriodicPiecewiseLinFunction Class Reference

This class implements an enhanced piecewise linear function with periodicity. More...

#include <periodicpiecewiselinfunction.h>

+ Inheritance diagram for oofem::PeriodicPiecewiseLinFunction:
+ Collaboration diagram for oofem::PeriodicPiecewiseLinFunction:

Public Member Functions

 PeriodicPiecewiseLinFunction (int i, Domain *d)
 
virtual ~PeriodicPiecewiseLinFunction ()
 
virtual IRResultType initializeFrom (InputRecord *ir)
 Initializes receiver according to object description stored in input record. More...
 
virtual void giveInputRecord (DynamicInputRecord &input)
 Setups the input record string of receiver. More...
 
virtual const char * giveClassName () const
 
virtual const char * giveInputRecordName () const
 
virtual double evaluateAtTime (double)
 Returns the value of the function at given time. More...
 
virtual double evaluateVelocityAtTime (double)
 Returns the first time derivative of the function at given time. More...
 
virtual double evaluateAccelerationAtTime (double)
 Returns the second time derivative of the function at given time. More...
 
- Public Member Functions inherited from oofem::PiecewiseLinFunction
 PiecewiseLinFunction (int i, Domain *d)
 
virtual ~PiecewiseLinFunction ()
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 Stores receiver state to output stream. More...
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 Restores the receiver state previously written in stream. More...
 
- Public Member Functions inherited from oofem::Function
 Function (int n, Domain *d)
 Constructor. More...
 
virtual ~Function ()
 Destructor. More...
 
double evaluate (TimeStep *tStep, ValueModeType mode)
 Returns the value of load time function at given time. More...
 
virtual void evaluate (FloatArray &answer, const std::map< std::string, FunctionArgument > &valDict, GaussPoint *gp=NULL, double param=0.)
 Returns the value of the function for given input. More...
 
virtual double evaluate (const std::map< std::string, FunctionArgument > &valDict)
 Returns the (scalar) value of the function for given input. More...
 
double giveFunctionParameter (int paramID)
 
- Public Member Functions inherited from oofem::FEMComponent
 FEMComponent (int n, Domain *d)
 Regular constructor, creates component with given number and belonging to given domain. More...
 
virtual ~FEMComponent ()
 Virtual destructor. More...
 
DomaingiveDomain () const
 
virtual void setDomain (Domain *d)
 Sets associated Domain. More...
 
int giveNumber () const
 
void setNumber (int num)
 Sets number of receiver. More...
 
virtual void updateLocalNumbering (EntityRenumberingFunctor &f)
 Local renumbering support. More...
 
virtual int checkConsistency ()
 Allows programmer to test some internal data, before computation begins. More...
 
virtual void printOutputAt (FILE *file, TimeStep *tStep)
 Prints output of receiver to stream, for given time step. More...
 
virtual void printYourself ()
 Prints receiver state on stdout. Useful for debugging. More...
 
virtual InterfacegiveInterface (InterfaceType t)
 Interface requesting service. More...
 
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros). More...
 

Private Attributes

int addTF
 If nonzero, the value of time function specified by addTF is added to computed value. More...
 
double period
 If less than zero no periodicity, if >=0 date time is computed as given timeperiod. More...
 

Additional Inherited Members

- Public Attributes inherited from oofem::Function
DomainfuncDomain
 
int parameterType
 
- Protected Attributes inherited from oofem::PiecewiseLinFunction
FloatArray dates
 
FloatArray values
 
- Protected Attributes inherited from oofem::FEMComponent
int number
 Component number. More...
 
Domaindomain
 Link to domain object, useful for communicating with other FEM components. More...
 

Detailed Description

This class implements an enhanced piecewise linear function with periodicity.

and possibility to add another arbitrary time function.

The function is defined by 'numberOfPoints' points. 'dates' and 'values' store respectively the abscissas (t) and the values (f(t)) of the points The values are repeated after 'period'. 'AddTF' parameter specifies number of function to add.

Definition at line 58 of file periodicpiecewiselinfunction.h.

Constructor & Destructor Documentation

oofem::PeriodicPiecewiseLinFunction::PeriodicPiecewiseLinFunction ( int  i,
Domain d 
)
inline

Definition at line 71 of file periodicpiecewiselinfunction.h.

virtual oofem::PeriodicPiecewiseLinFunction::~PeriodicPiecewiseLinFunction ( )
inlinevirtual

Definition at line 76 of file periodicpiecewiselinfunction.h.

Member Function Documentation

virtual double oofem::PeriodicPiecewiseLinFunction::evaluateAccelerationAtTime ( double  t)
inlinevirtual

Returns the second time derivative of the function at given time.

Parameters
tTime.
Returns
$ f''(t) $.

Reimplemented from oofem::PiecewiseLinFunction.

Definition at line 85 of file periodicpiecewiselinfunction.h.

double oofem::PeriodicPiecewiseLinFunction::evaluateAtTime ( double  t)
virtual
double oofem::PeriodicPiecewiseLinFunction::evaluateVelocityAtTime ( double  t)
virtual
virtual const char* oofem::PeriodicPiecewiseLinFunction::giveClassName ( ) const
inlinevirtual
Returns
Class name of the receiver.

Reimplemented from oofem::PiecewiseLinFunction.

Definition at line 80 of file periodicpiecewiselinfunction.h.

void oofem::PeriodicPiecewiseLinFunction::giveInputRecord ( DynamicInputRecord input)
virtual

Setups the input record string of receiver.

Parameters
inputDynamic input record to be filled by receiver.

Reimplemented from oofem::PiecewiseLinFunction.

Definition at line 121 of file periodicpiecewiselinfunction.C.

References _IFT_PeriodicPiecewiseLinFunction_addtf, _IFT_PeriodicPiecewiseLinFunction_period, addTF, oofem::PiecewiseLinFunction::giveInputRecord(), period, and oofem::DynamicInputRecord::setField().

virtual const char* oofem::PeriodicPiecewiseLinFunction::giveInputRecordName ( ) const
inlinevirtual
Returns
Input record name of the receiver.

Reimplemented from oofem::PiecewiseLinFunction.

Definition at line 81 of file periodicpiecewiselinfunction.h.

References _IFT_PeriodicPiecewiseLinFunction_Name.

IRResultType oofem::PeriodicPiecewiseLinFunction::initializeFrom ( InputRecord ir)
virtual

Initializes receiver according to object description stored in input record.

This function is called immediately after creating object using constructor. Input record can be imagined as data record in component database belonging to receiver. Receiver may use value-name extracting functions to extract particular field from record.

See also
IR_GIVE_FIELD
IR_GIVE_OPTIONAL_FIELD
Parameters
irInput record to initialize from.
Returns
IRResultType

Reimplemented from oofem::PiecewiseLinFunction.

Definition at line 108 of file periodicpiecewiselinfunction.C.

References _IFT_PeriodicPiecewiseLinFunction_addtf, _IFT_PeriodicPiecewiseLinFunction_period, addTF, oofem::PiecewiseLinFunction::initializeFrom(), IR_GIVE_OPTIONAL_FIELD, and period.

Member Data Documentation

int oofem::PeriodicPiecewiseLinFunction::addTF
private

If nonzero, the value of time function specified by addTF is added to computed value.

Definition at line 62 of file periodicpiecewiselinfunction.h.

Referenced by evaluateAtTime(), evaluateVelocityAtTime(), giveInputRecord(), and initializeFrom().

double oofem::PeriodicPiecewiseLinFunction::period
private

If less than zero no periodicity, if >=0 date time is computed as given timeperiod.

If points span more than period, span of LAST period is repeated

Definition at line 68 of file periodicpiecewiselinfunction.h.

Referenced by evaluateAtTime(), evaluateVelocityAtTime(), giveInputRecord(), and initializeFrom().


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:39 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011