changed: rename EvalFunc::derivative to EvalFunc::addDerivative
consistent with EvalFunction and more descriptive of what it does
This commit is contained in:
parent
d1e222590b
commit
72f9748aa1
|
@ -146,7 +146,7 @@ void EvalFunc::cleanup ()
|
|||
}
|
||||
|
||||
|
||||
void EvalFunc::derivative (const std::string& function, const char* x)
|
||||
void EvalFunc::addDerivative (const std::string& function, const char* x)
|
||||
{
|
||||
if (!gradient)
|
||||
gradient = new EvalFunc(function.c_str(),x);
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
virtual ~EvalFunc();
|
||||
|
||||
//! \brief Adds an expression function for a first derivative.
|
||||
void derivative(const std::string& function, const char* x = "x");
|
||||
void addDerivative(const std::string& function, const char* x = "x");
|
||||
|
||||
//! \brief Returns whether the function is time-independent or not.
|
||||
virtual bool isConstant() const { return false; }
|
||||
|
|
|
@ -728,7 +728,7 @@ static const ScalarFunc* parseFunction (const char* type, char* cline, Real C)
|
|||
if (sf && (cline = strtok(nullptr,":")))
|
||||
{
|
||||
IFEM::cout <<" (derivative: "<< cline <<")";
|
||||
static_cast<EvalFunc*>(sf)->derivative(cline,"t");
|
||||
static_cast<EvalFunc*>(sf)->addDerivative(cline,"t");
|
||||
}
|
||||
return sf;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user