Go to the documentation of this file.
46CalculatorFunction :: CalculatorFunction(
int n,
Domain *d) :
Function(n, d) { }
51 Function :: initializeFrom(ir);
62 Function :: giveInputRecord(input);
70CalculatorFunction :: evaluate(
FloatArray &answer,
const std :: map< std :: string, FunctionArgument > &valDict,
GaussPoint *gp,
double param)
75 std :: ostringstream buff;
76 for (
const auto &named_arg: valDict ) {
78 if ( arg.
type == FunctionArgument :: FAT_double ) {
79 buff << named_arg.first <<
"=" << arg.
val0 <<
";";
80 }
else if ( arg.
type == FunctionArgument :: FAT_FloatArray ) {
82 buff << named_arg.first << i <<
"=" << arg.
val1.
at(i) <<
";";
84 }
else if ( arg.
type == FunctionArgument :: FAT_int ) {
85 buff << named_arg.first <<
"=" << arg.
val2 <<
";";
86 }
else if ( arg.
type == FunctionArgument :: FAT_IntArray ) {
88 buff << named_arg.first << i <<
"=" << arg.
val3.
at(i) <<
";";
94 answer.
at(1) = myParser.
eval(buff.str().c_str(), err);
101double CalculatorFunction :: evaluateAtTime(
double time)
107 std :: ostringstream buff;
109 result = myParser.
eval(buff.str().c_str(), err);
117double CalculatorFunction :: evaluateVelocityAtTime(
double time)
128 std :: ostringstream buff;
130 result = myParser.
eval(buff.str().c_str(), err);
139double CalculatorFunction :: evaluateAccelerationAtTime(
double time)
150 std :: ostringstream buff;
152 result = myParser.
eval(buff.str().c_str(), err);
#define _IFT_CalculatorFunction_d2fdt2
#define _IFT_CalculatorFunction_dfdt
#define _IFT_CalculatorFunction_f
#define REGISTER_Function(class)
std::string d2fdt2Expression
Expression for second time derivative.
std::string dfdtExpression
Expression for first time derivative.
std::string fExpression
Expression for the function value.
Index giveSize() const
Returns the size of receiver.
FunctionArgumentType type
Determines which of the types the instance points towards.
Function(int n, Domain *d)
double eval(const char *string, int &err)
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