77 std :: ostringstream buff;
78 for (
const auto &named_arg: valDict ) {
81 buff << named_arg.first <<
"=" << arg.
val0 <<
";";
84 buff << named_arg.first << i <<
"=" << arg.
val1.
at(i) <<
";";
87 buff << named_arg.first <<
"=" << arg.
val2 <<
";";
90 buff << named_arg.first << i <<
"=" << arg.
val3.
at(i) <<
";";
96 answer.
at(1) = myParser.
eval(buff.str().c_str(), err);
109 std :: ostringstream buff;
111 result = myParser.
eval(buff.str().c_str(), err);
130 std :: ostringstream buff;
132 result = myParser.
eval(buff.str().c_str(), err);
152 std :: ostringstream buff;
154 result = myParser.
eval(buff.str().c_str(), err);
virtual void giveInputRecord(DynamicInputRecord &ir)
Setups the input record string of receiver.
virtual double evaluateVelocityAtTime(double t)
Returns the first time derivative of the function at given time.
std::string dfdtExpression
Expression for first time derivative.
#define _IFT_CalculatorFunction_dfdt
double & at(int i)
Coefficient access function.
virtual void evaluate(FloatArray &answer, const std::map< std::string, FunctionArgument > &valDict)
REGISTER_Function(CalculatorFunction)
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
int & at(int i)
Coefficient access function.
#define _IFT_CalculatorFunction_d2fdt2
Wrapper for values of varying types.
#define _IFT_CalculatorFunction_f
std::string d2fdt2Expression
Expression for second time derivative.
virtual double evaluateAtTime(double t)
Returns the value of the function at given time.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual IRResultType initializeFrom(InputRecord *ir)
Reads the fields.
FunctionArgumentType type
Determines which of the types the instance points towards.
Class representing vector of real numbers.
Abstract base class representing a function with vector input and output.
IRResultType
Type defining the return values of InputRecord reading operations.
virtual double evaluateAccelerationAtTime(double t)
Returns the second time derivative of the function at given time.
std::string fExpression
Expression for the function value.
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
CalculatorFunction(int n, Domain *d)
Constructor.
Class for evaluating mathematical expressions in strings.
void resize(int s)
Resizes receiver towards requested size.
double eval(const char *string, int &err)