OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::Function Class Referenceabstract

Abstract base class representing a function with vector input and output. More...

#include <function.h>

+ Inheritance diagram for oofem::Function:
+ Collaboration diagram for oofem::Function:

Public Member Functions

 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...
 
virtual double evaluateAtTime (double t)
 Returns the value of the function at given time. More...
 
virtual double evaluateVelocityAtTime (double t)=0
 Returns the first time derivative of the function at given time. More...
 
virtual double evaluateAccelerationAtTime (double t)=0
 Returns the second time derivative of the function at given time. 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...
 
virtual const char * giveClassName () const =0
 
virtual const char * giveInputRecordName () const =0
 
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 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 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...
 
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...
 

Public Attributes

DomainfuncDomain
 
int parameterType
 

Additional Inherited Members

- 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

Abstract base class representing a function with vector input and output.

It is useful in many scenarios, in particular describing the load/b.c. amplitude in time.

Definition at line 88 of file function.h.

Constructor & Destructor Documentation

oofem::Function::Function ( int  n,
Domain d 
)

Constructor.

Creates load time function with given number, belonging to given domain.

Parameters
nLoad time function number.
dDomain to which new object will belongs.

Definition at line 42 of file function.C.

References parameterType.

virtual oofem::Function::~Function ( )
inlinevirtual

Destructor.

Definition at line 101 of file function.h.

Member Function Documentation

void oofem::Function::evaluate ( FloatArray answer,
const std::map< std::string, FunctionArgument > &  valDict,
GaussPoint gp = NULL,
double  param = 0. 
)
virtual

Returns the value of the function for given input.

Parameters
valDictMap with inputs.
answerFunction value.

Reimplemented in oofem::ConstantFunction, oofem::LocalGaussianRandomFunction, and oofem::InterpolatingFuction.

Definition at line 88 of file function.C.

References evaluateAtTime(), OOFEM_ERROR, and parameterType.

double oofem::Function::evaluate ( const std::map< std::string, FunctionArgument > &  valDict)
virtual

Returns the (scalar) value of the function for given input.

Parameters
valDictMap with inputs.
Returns
Function value.

Definition at line 109 of file function.C.

References evaluate(), oofem::FloatArray::giveSize(), and OOFEM_ERROR.

double oofem::Function::evaluateAtTime ( double  t)
virtual

Returns the value of the function at given time.

Parameters
tTime.
Returns
$ f(t) $.

Reimplemented in oofem::PythonExpression, oofem::CalculatorFunction, oofem::PeriodicPiecewiseLinFunction, oofem::HeavisideTimeFunction, oofem::PiecewiseLinFunction, oofem::PeakFunction, oofem::ConstantFunction, oofem::LocalGaussianRandomFunction, and oofem::InterpolatingFuction.

Definition at line 76 of file function.C.

References oofem::FloatArray::at(), evaluate(), oofem::FloatArray::giveSize(), and OOFEM_ERROR.

Referenced by oofem::NRSolver::applyConstraintsToLoadIncrement(), oofem::PrescribedGradientBCNeumann::assembleVector(), oofem::TransportGradientNeumann::assembleVector(), oofem::LinearConstraintBC::assembleVector(), oofem::PrescribedGradientBCWeak::computeExtForceElContrib(), evaluate(), oofem::PeriodicPiecewiseLinFunction::evaluateAtTime(), oofem::PrescribedGradient::give(), oofem::RotatingBoundary::give(), oofem::PrescribedGenStrainShell7::give(), oofem::UserDefDirichletBC::give(), oofem::TransportGradientDirichlet::give(), oofem::BoundaryCondition::give(), oofem::PrescribedGradientBCPeriodic::giveBcValue(), oofem::TransportGradientPeriodic::giveBcValue(), oofem::TransientTransportProblem::giveDeltaT(), oofem::NonStationaryTransportProblem::giveDeltaT(), oofem::StaggeredProblem::giveDeltaT(), oofem::SUPG::giveNextStep(), oofem::PrescribedGradientBCPeriodic::giveUnknown(), oofem::TransportGradientPeriodic::giveUnknown(), oofem::Element::isActivated(), oofem::GeneralBoundaryCondition::isImposed(), oofem::GnuplotExportModule::outputGradient(), and oofem::FluidMaterialEvaluator::solveYourself().

double oofem::Function::giveFunctionParameter ( int  paramID)

Member Data Documentation

Domain* oofem::Function::funcDomain

Definition at line 91 of file function.h.

int oofem::Function::parameterType

Definition at line 92 of file function.h.

Referenced by evaluate(), Function(), and oofem::PiecewiseLinFunction::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:36 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011