|
OOFEM 3.0
|
#include <function.h>
Public Member Functions | |
| Function (int n, Domain *d) | |
| virtual | ~Function () |
| Destructor. | |
| virtual double | evaluate (TimeStep *tStep, ValueModeType mode) |
| 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) |
| virtual double | evaluateAtTime (double t) |
| virtual double | evaluateVelocityAtTime (double t)=0 |
| virtual double | evaluateAccelerationAtTime (double t)=0 |
| 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. | |
| virtual const char * | giveClassName () const =0 |
| virtual const char * | giveInputRecordName () const =0 |
| Domain * | giveDomain () const |
| virtual void | setDomain (Domain *d) |
| int | giveNumber () const |
| void | setNumber (int num) |
| virtual void | updateLocalNumbering (EntityRenumberingFunctor &f) |
| virtual void | initializeFrom (InputRecord &ir) |
| 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 Interface * | giveInterface (InterfaceType t) |
| std::string | errorInfo (const char *func) const |
| Returns string for prepending output (used by error reporting macros). | |
Public Attributes | |
| Domain * | funcDomain |
| int | parameterType |
Additional Inherited Members | |
| Protected Attributes inherited from oofem::FEMComponent | |
| int | number |
| Component number. | |
| Domain * | domain |
| Link to domain object, useful for communicating with other FEM components. | |
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 90 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 44 of file function.C.
References oofem::FEMComponent::FEMComponent(), and parameterType.
Referenced by oofem::CalculatorFunction::CalculatorFunction(), oofem::ConstantFunction::ConstantFunction(), oofem::HeavisideTimeFunction::HeavisideTimeFunction(), oofem::InterpolatingFuction::InterpolatingFuction(), oofem::LocalGaussianRandomFunction::LocalGaussianRandomFunction(), oofem::PeakFunction::PeakFunction(), oofem::PiecewiseLinFunction::PiecewiseLinFunction(), oofem::PulseFunction::PulseFunction(), oofem::PythonExpression::PythonExpression(), oofem::StepFunction::StepFunction(), and oofem::StepFunction::StepFunction().
|
inlinevirtual |
Destructor.
Definition at line 103 of file function.h.
|
virtual |
Returns the (scalar) value of the function for given input.
| valDict | Map with inputs. |
Definition at line 111 of file function.C.
References evaluate(), oofem::FloatArray::giveSize(), and OOFEM_ERROR.
|
virtual |
Returns the value of the function for given input.
| valDict | Map with inputs. |
| answer | Function value. |
Reimplemented in oofem::CalculatorFunction, oofem::ConstantFunction, oofem::InterpolatingFuction, oofem::LocalGaussianRandomFunction, and oofem::PythonExpression.
Definition at line 90 of file function.C.
References evaluateAtTime(), OOFEM_ERROR, parameterType, and oofem::Vec1().
|
virtual |
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. |
Reimplemented in oofem::PulseFunction.
Definition at line 57 of file function.C.
References evaluateAccelerationAtTime(), evaluateAtTime(), evaluateVelocityAtTime(), oofem::TimeStep::giveIntrinsicTime(), oofem::TimeStep::giveTimeIncrement(), and OOFEM_ERROR.
Referenced by oofem::RandomMaterialExtensionInterface::_generateStatusVariables(), oofem::UsrDefBoundaryLoad::computeValueAt(), oofem::ScalarFunction::eval(), evaluate(), evaluateAtTime(), and oofem::GnuplotExportModule::outputBoundaryCondition().
|
pure virtual |
Returns the second time derivative of the function at given time.
| t | Time. |
Implemented in oofem::CalculatorFunction, oofem::ConstantFunction, oofem::HeavisideTimeFunction, oofem::InterpolatingFuction, oofem::LocalGaussianRandomFunction, oofem::PeakFunction, oofem::PeriodicPiecewiseLinFunction, oofem::PiecewiseLinFunction, oofem::PulseFunction, oofem::PythonExpression, and oofem::StepFunction.
References giveFunctionParameter(), restoreContext(), and saveContext().
Referenced by evaluate().
|
virtual |
Returns the value of the function at given time.
| t | Time. |
Reimplemented in oofem::CalculatorFunction, oofem::ConstantFunction, oofem::HeavisideTimeFunction, oofem::InterpolatingFuction, oofem::LocalGaussianRandomFunction, oofem::PeakFunction, oofem::PeriodicPiecewiseLinFunction, oofem::PiecewiseLinFunction, oofem::PulseFunction, oofem::PythonExpression, and oofem::StepFunction.
Definition at line 78 of file function.C.
References oofem::FloatArray::at(), evaluate(), oofem::FloatArray::giveSize(), and OOFEM_ERROR.
Referenced by oofem::PrescribedDispSlipBCNeumannRC::assembleVectorBStress(), oofem::PrescribedDispSlipBCNeumannRC::assembleVectorRStress(), oofem::PrescribedDispSlipBCNeumannRC::assembleVectorStress(), oofem::TransportElement::computeVof(), evaluate(), evaluate(), oofem::SUPG::giveNextStep(), oofem::GnuplotExportModule::outputGradient(), oofem::FluidMaterialEvaluator::solveYourself(), and oofem::StructuralMaterialEvaluator::solveYourself().
|
pure virtual |
Returns the first time derivative of the function at given time.
| t | Time. |
Implemented in oofem::CalculatorFunction, oofem::ConstantFunction, oofem::HeavisideTimeFunction, oofem::InterpolatingFuction, oofem::LocalGaussianRandomFunction, oofem::PeakFunction, oofem::PeriodicPiecewiseLinFunction, oofem::PiecewiseLinFunction, oofem::PulseFunction, oofem::PythonExpression, and oofem::StepFunction.
Referenced by evaluate().
| double oofem::Function::giveFunctionParameter | ( | int | paramID | ) |
Definition at line 49 of file function.C.
References oofem::FEMComponent::giveDomain(), and oofem::FEMComponent::giveNumber().
Referenced by evaluateAccelerationAtTime().
|
overridevirtual |
Restores the receiver state previously written in stream.
| stream | Input stream. |
| mode | Determines amount of info available in stream (state, definition, ...). |
| throws | an ContextIOERR exception if error encountered. |
Reimplemented from oofem::FEMComponent.
Reimplemented in oofem::PiecewiseLinFunction, and oofem::StepFunction.
Definition at line 135 of file function.C.
References oofem::CIO_IOERR, CM_Definition, parameterType, oofem::DataStream::read(), and THROW_CIOERR.
Referenced by evaluateAccelerationAtTime().
|
overridevirtual |
Stores receiver state to output stream.
| stream | Output stream. |
| mode | Determines amount of info required in stream (state, definition, ...). |
| throws | an ContextIOERR exception if error encountered. |
Reimplemented from oofem::FEMComponent.
Reimplemented in oofem::PiecewiseLinFunction, and oofem::StepFunction.
Definition at line 122 of file function.C.
References oofem::CIO_IOERR, CM_Definition, parameterType, THROW_CIOERR, and oofem::DataStream::write().
Referenced by evaluateAccelerationAtTime().
| Domain* oofem::Function::funcDomain |
Definition at line 93 of file function.h.
| int oofem::Function::parameterType |
Definition at line 94 of file function.h.
Referenced by evaluate(), Function(), oofem::PiecewiseLinFunction::initializeFrom(), restoreContext(), and saveContext().