OOFEM 3.0
Loading...
Searching...
No Matches
oofem::PulseFunction Class Reference

#include <pulsefunction.h>

Inheritance diagram for oofem::PulseFunction:
Collaboration diagram for oofem::PulseFunction:

Public Member Functions

 PulseFunction (int i, Domain *d)
virtual ~PulseFunction ()
void initializeFrom (InputRecord &ir) override
const char * giveClassName () const override
const char * giveInputRecordName () const override
double evaluate (TimeStep *tStep, ValueModeType mode) override
double evaluateAtTime (double) override
double evaluateVelocityAtTime (double t) override
double evaluateAccelerationAtTime (double t) override
Public Member Functions inherited from oofem::Function
 Function (int n, Domain *d)
virtual ~Function ()
 Destructor.
virtual void evaluate (FloatArray &answer, const std ::map< std ::string, FunctionArgument > &valDict, GaussPoint *gp=nullptr, double param=0.)
virtual double evaluate (const std ::map< std ::string, FunctionArgument > &valDict)
double giveFunctionParameter (int paramID)
void saveContext (DataStream &stream, ContextMode mode) override
void restoreContext (DataStream &stream, ContextMode mode) override
Public Member Functions inherited from oofem::FEMComponent
 FEMComponent (int n, Domain *d)
virtual ~FEMComponent ()=default
 Virtual destructor.
DomaingiveDomain () const
virtual void setDomain (Domain *d)
int giveNumber () const
void setNumber (int num)
virtual void updateLocalNumbering (EntityRenumberingFunctor &f)
virtual void initializeFrom (InputRecord &ir, int priority)
virtual void initializeFinish ()
virtual void postInitialize ()
 Performs post initialization steps. Called after all components are created and initialized.
virtual void giveInputRecord (DynamicInputRecord &input)
virtual int checkConsistency ()
virtual void printOutputAt (FILE *file, TimeStep *tStep)
virtual void printYourself ()
 Prints receiver state on stdout. Useful for debugging.
virtual InterfacegiveInterface (InterfaceType t)
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros).

Private Attributes

int mode
 mode of operation: 0 = interval [tmin,tmax], 1 = single time tstep
double time
 Specific time when function is nonzero.
double tmin
 Start time of interval when function is nonzero.
double tmax
 End time of interval when function is nonzero.
double value
 Value of function within the interval.

Additional Inherited Members

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

Detailed Description

This class implements a function that is 0 outside the user specified interval [t_min, t_max], where it has a specified peak value. A variant allows to specify a single time and function is nonzero within a timestep containing given time.

Definition at line 54 of file pulsefunction.h.

Constructor & Destructor Documentation

◆ PulseFunction()

oofem::PulseFunction::PulseFunction ( int i,
Domain * d )
inline

Definition at line 69 of file pulsefunction.h.

References oofem::Function::Function(), mode, time, tmax, tmin, and value.

◆ ~PulseFunction()

virtual oofem::PulseFunction::~PulseFunction ( )
inlinevirtual

Definition at line 78 of file pulsefunction.h.

Member Function Documentation

◆ evaluate()

double oofem::PulseFunction::evaluate ( TimeStep * tStep,
ValueModeType mode )
overridevirtual

Returns the value of load time function at given time. Abstract service. Must be implemented by derived classes.

Parameters
tStepTime. Incremental and total mode uses intrinsic time from giveIntrinsicTime.
modeDetermines the mode of the requested value.
Returns
Load time function value.

Reimplemented from oofem::Function.

Definition at line 45 of file pulsefunction.C.

References evaluateAtTime(), oofem::TimeStep::giveTargetTime(), oofem::TimeStep::giveTimeIncrement(), mode, OOFEM_ERROR, time, and value.

◆ evaluateAccelerationAtTime()

double oofem::PulseFunction::evaluateAccelerationAtTime ( double t)
inlineoverridevirtual

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

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

Implements oofem::Function.

Definition at line 87 of file pulsefunction.h.

◆ evaluateAtTime()

double oofem::PulseFunction::evaluateAtTime ( double t)
overridevirtual

Returns the value of the function at given time.

Parameters
tTime.
Returns
\( f(t) \).

Reimplemented from oofem::Function.

Definition at line 66 of file pulsefunction.C.

References mode, OOFEM_ERROR, time, tmax, tmin, and value.

Referenced by evaluate().

◆ evaluateVelocityAtTime()

double oofem::PulseFunction::evaluateVelocityAtTime ( double t)
inlineoverridevirtual

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

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

Implements oofem::Function.

Definition at line 86 of file pulsefunction.h.

◆ giveClassName()

const char * oofem::PulseFunction::giveClassName ( ) const
inlineoverridevirtual
Returns
Class name of the receiver.

Implements oofem::FEMComponent.

Definition at line 81 of file pulsefunction.h.

◆ giveInputRecordName()

const char * oofem::PulseFunction::giveInputRecordName ( ) const
inlineoverridevirtual
Returns
Input record name of the receiver.

Implements oofem::FEMComponent.

Definition at line 82 of file pulsefunction.h.

References _IFT_PulseFunction_Name.

◆ initializeFrom()

void oofem::PulseFunction::initializeFrom ( InputRecord & ir)
overridevirtual

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. Note that initializeFrom may be called mutiple times.

See also
IR_GIVE_FIELD
IR_GIVE_OPTIONAL_FIELD
Parameters
irInput record to initialize from.
priorityPriority of the input record. This is used to determine the order of initialization

Reimplemented from oofem::FEMComponent.

Definition at line 86 of file pulsefunction.C.

References _IFT_PulseFunction_tmax, _IFT_PulseFunction_tmin, _IFT_PulseFunction_tsteptime, _IFT_PulseFunction_value, oofem::InputRecord::hasField(), IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, mode, time, tmax, tmin, and value.

Member Data Documentation

◆ mode

int oofem::PulseFunction::mode
private

mode of operation: 0 = interval [tmin,tmax], 1 = single time tstep

Definition at line 58 of file pulsefunction.h.

Referenced by evaluate(), evaluateAtTime(), initializeFrom(), and PulseFunction().

◆ time

double oofem::PulseFunction::time
private

Specific time when function is nonzero.

Definition at line 60 of file pulsefunction.h.

Referenced by evaluate(), evaluateAtTime(), initializeFrom(), and PulseFunction().

◆ tmax

double oofem::PulseFunction::tmax
private

End time of interval when function is nonzero.

Definition at line 64 of file pulsefunction.h.

Referenced by evaluateAtTime(), initializeFrom(), and PulseFunction().

◆ tmin

double oofem::PulseFunction::tmin
private

Start time of interval when function is nonzero.

Definition at line 62 of file pulsefunction.h.

Referenced by evaluateAtTime(), initializeFrom(), and PulseFunction().

◆ value

double oofem::PulseFunction::value
private

Value of function within the interval.

Definition at line 66 of file pulsefunction.h.

Referenced by evaluate(), evaluateAtTime(), initializeFrom(), and PulseFunction().


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011