OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Abstract base class representing a function with vector input and output. More...
#include <function.h>
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 |
Domain * | giveDomain () 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 Interface * | giveInterface (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 | |
Domain * | funcDomain |
int | parameterType |
Additional Inherited Members | |
Protected Attributes inherited from oofem::FEMComponent | |
int | number |
Component number. More... | |
Domain * | domain |
Link to domain object, useful for communicating with other FEM components. More... | |
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.
oofem::Function::Function | ( | int | n, |
Domain * | d | ||
) |
Constructor.
Creates load time function with given number, belonging to given domain.
Definition at line 42 of file function.C.
References parameterType.
|
inlinevirtual |
Destructor.
Definition at line 101 of file function.h.
double oofem::Function::evaluate | ( | TimeStep * | tStep, |
ValueModeType | mode | ||
) |
Returns the value of load time function at given time.
Abstract service. Must be implemented by derived classes.
tStep | Time. Incremental and total mode uses intrinsic time from giveIntrinsicTime. |
mode | Determines the mode of the requested value. |
Definition at line 55 of file function.C.
References evaluateAccelerationAtTime(), evaluateAtTime(), evaluateVelocityAtTime(), oofem::TimeStep::giveIntrinsicTime(), oofem::TimeStep::giveTargetTime(), oofem::TimeStep::giveTimeIncrement(), and OOFEM_ERROR.
Referenced by oofem::RandomMaterialExtensionInterface::_generateStatusVariables(), oofem::Load::computeComponentArrayAt(), oofem::ConstantEdgeLoad::computeValueAt(), oofem::InteractionLoad::computeValueAt(), oofem::ConstantPressureLoad::computeValueAt(), oofem::ConstantSurfaceLoad::computeValueAt(), oofem::NeumannMomentLoad::computeValueAt(), oofem::PointLoad::computeValueAt(), oofem::BoundaryLoad::computeValueAt(), oofem::NeumannMomentLoad::computeValueAtBoundary(), oofem::ScalarFunction::eval(), evaluate(), evaluateAtTime(), oofem::PrescribedMean::giveExternalForcesVector(), oofem::WeakPeriodicBoundaryCondition::giveExternalForcesVector(), and oofem::GnuplotExportModule::outputBoundaryCondition().
|
virtual |
Returns the value of the function for given input.
valDict | Map with inputs. |
answer | Function value. |
Reimplemented in oofem::ConstantFunction, oofem::LocalGaussianRandomFunction, and oofem::InterpolatingFuction.
Definition at line 88 of file function.C.
References evaluateAtTime(), OOFEM_ERROR, and parameterType.
|
virtual |
Returns the (scalar) value of the function for given input.
valDict | Map with inputs. |
Definition at line 109 of file function.C.
References evaluate(), oofem::FloatArray::giveSize(), and OOFEM_ERROR.
|
pure virtual |
Returns the second time derivative of the function at given time.
t | Time. |
Implemented in oofem::PythonExpression, oofem::CalculatorFunction, oofem::PeriodicPiecewiseLinFunction, oofem::HeavisideTimeFunction, oofem::PiecewiseLinFunction, oofem::PeakFunction, oofem::ConstantFunction, oofem::LocalGaussianRandomFunction, and oofem::InterpolatingFuction.
Referenced by evaluate(), oofem::PrescribedGradient::give(), oofem::RotatingBoundary::give(), oofem::PrescribedGenStrainShell7::give(), oofem::UserDefDirichletBC::give(), oofem::TransportGradientDirichlet::give(), and oofem::BoundaryCondition::give().
|
virtual |
Returns the value of the function at given time.
t | Time. |
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().
|
pure virtual |
Returns the first time derivative of the function at given time.
t | Time. |
Implemented in oofem::PythonExpression, oofem::CalculatorFunction, oofem::PeriodicPiecewiseLinFunction, oofem::HeavisideTimeFunction, oofem::PiecewiseLinFunction, oofem::PeakFunction, oofem::ConstantFunction, oofem::LocalGaussianRandomFunction, and oofem::InterpolatingFuction.
Referenced by evaluate(), oofem::PeriodicPiecewiseLinFunction::evaluateVelocityAtTime(), oofem::PrescribedGradient::give(), oofem::RotatingBoundary::give(), oofem::PrescribedGenStrainShell7::give(), oofem::UserDefDirichletBC::give(), oofem::TransportGradientDirichlet::give(), and oofem::BoundaryCondition::give().
double oofem::Function::giveFunctionParameter | ( | int | paramID | ) |
Definition at line 47 of file function.C.
References oofem::FEMComponent::giveDomain(), and oofem::FEMComponent::giveNumber().
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().