|
OOFEM 3.0
|
#include <calculatorfunction.h>
Public Member Functions | |
| CalculatorFunction (int n, Domain *d) | |
| virtual | ~CalculatorFunction () |
| Destructor. | |
| void | initializeFrom (InputRecord &ir) override |
| void | giveInputRecord (DynamicInputRecord &ir) override |
| void | evaluate (FloatArray &answer, const std ::map< std ::string, FunctionArgument > &valDict, GaussPoint *gp=nullptr, double param=0.) override |
| double | evaluateAtTime (double t) override |
| double | evaluateVelocityAtTime (double t) override |
| double | evaluateAccelerationAtTime (double t) override |
| const char * | giveClassName () const override |
| const char * | giveInputRecordName () const override |
| Public Member Functions inherited from oofem::Function | |
| Function (int n, Domain *d) | |
| virtual | ~Function () |
| Destructor. | |
| virtual double | evaluate (TimeStep *tStep, ValueModeType mode) |
| 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. | |
| 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, int priority) |
| virtual void | initializeFinish () |
| virtual void | postInitialize () |
| Performs post initialization steps. Called after all components are created and initialized. | |
| 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). | |
Private Attributes | |
| std::string | fExpression |
| Expression for the function value. | |
| std::string | dfdtExpression |
| Expression for first time derivative. | |
| std::string | d2fdt2Expression |
| Expression for second time derivative. | |
Additional Inherited Members | |
| Public Attributes inherited from oofem::Function | |
| Domain * | funcDomain |
| int | parameterType |
| Protected Attributes inherited from oofem::FEMComponent | |
| int | number |
| Component number. | |
| Domain * | domain |
| Link to domain object, useful for communicating with other FEM components. | |
Class representing user defined load time function. User input is function expression. Uses Parser class to parse given expression. Slow but useful. Load time function typically belongs to domain and is attribute of one or more loads. Generally load time function is real function of time ( \( y=f(t) \)).
Definition at line 56 of file calculatorfunction.h.
| oofem::CalculatorFunction::CalculatorFunction | ( | int | n, |
| Domain * | d ) |
Constructor. Creates load time function with given number, belonging to given domain.
Definition at line 46 of file calculatorfunction.C.
References oofem::Function::Function().
|
inlinevirtual |
Destructor.
Definition at line 74 of file calculatorfunction.h.
|
overridevirtual |
Returns the value of the function for given input.
| valDict | Map with inputs. |
| answer | Function value. |
Reimplemented from oofem::Function.
Definition at line 70 of file calculatorfunction.C.
References oofem::FloatArray::at(), oofem::IntArray::at(), oofem::Parser::eval(), fExpression, oofem::FloatArray::giveSize(), oofem::IntArray::giveSize(), OOFEM_ERROR, oofem::FloatArray::resize(), oofem::FunctionArgument::type, oofem::FunctionArgument::val0, oofem::FunctionArgument::val1, oofem::FunctionArgument::val2, and oofem::FunctionArgument::val3.
|
overridevirtual |
Returns the second time derivative of the function at given time.
| t | Time. |
Implements oofem::Function.
Definition at line 139 of file calculatorfunction.C.
References d2fdt2Expression, oofem::Parser::eval(), and OOFEM_ERROR.
|
overridevirtual |
Returns the value of the function at given time.
| t | Time. |
Reimplemented from oofem::Function.
Definition at line 101 of file calculatorfunction.C.
References oofem::Parser::eval(), fExpression, and OOFEM_ERROR.
|
overridevirtual |
Returns the first time derivative of the function at given time.
| t | Time. |
Implements oofem::Function.
Definition at line 117 of file calculatorfunction.C.
References dfdtExpression, oofem::Parser::eval(), and OOFEM_ERROR.
|
inlineoverridevirtual |
Implements oofem::FEMComponent.
Definition at line 90 of file calculatorfunction.h.
|
overridevirtual |
Setups the input record string of receiver.
| input | Dynamic input record to be filled by receiver. |
Reimplemented from oofem::FEMComponent.
Definition at line 60 of file calculatorfunction.C.
References _IFT_CalculatorFunction_d2fdt2, _IFT_CalculatorFunction_dfdt, _IFT_CalculatorFunction_f, d2fdt2Expression, dfdtExpression, fExpression, and oofem::DynamicInputRecord::setField().
|
inlineoverridevirtual |
Implements oofem::FEMComponent.
Definition at line 91 of file calculatorfunction.h.
References _IFT_CalculatorFunction_Name.
|
overridevirtual |
Reads the fields
Reimplemented from oofem::FEMComponent.
Definition at line 49 of file calculatorfunction.C.
References _IFT_CalculatorFunction_d2fdt2, _IFT_CalculatorFunction_dfdt, _IFT_CalculatorFunction_f, d2fdt2Expression, dfdtExpression, fExpression, IR_GIVE_FIELD, and IR_GIVE_OPTIONAL_FIELD.
|
private |
Expression for second time derivative.
Definition at line 64 of file calculatorfunction.h.
Referenced by evaluateAccelerationAtTime(), giveInputRecord(), and initializeFrom().
|
private |
Expression for first time derivative.
Definition at line 62 of file calculatorfunction.h.
Referenced by evaluateVelocityAtTime(), giveInputRecord(), and initializeFrom().
|
private |
Expression for the function value.
Definition at line 60 of file calculatorfunction.h.
Referenced by evaluate(), evaluateAtTime(), giveInputRecord(), and initializeFrom().