added: allow passing eps(T|X) into EvalMultiFunction
This commit is contained in:
parent
e3cae68a34
commit
de3f5b4930
|
@ -370,11 +370,12 @@ void EvalFunction::setParam (const std::string& name, double value)
|
|||
|
||||
|
||||
EvalFunctions::EvalFunctions (const std::string& functions,
|
||||
const std::string& variables)
|
||||
const std::string& variables,
|
||||
const Real epsX, const Real epsT)
|
||||
{
|
||||
std::vector<std::string> components = splitComps(functions,variables);
|
||||
for (const std::string& comp : components)
|
||||
p.emplace_back(std::make_unique<EvalFunction>(comp.c_str()));
|
||||
p.emplace_back(std::make_unique<EvalFunction>(comp.c_str(),epsX,epsT));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -152,7 +152,8 @@ class EvalFunctions
|
|||
{
|
||||
protected:
|
||||
//! \brief The constructor parses the expression string for each component.
|
||||
EvalFunctions(const std::string& functions, const std::string& variables);
|
||||
EvalFunctions(const std::string& functions, const std::string& variables,
|
||||
const Real epsX, const Real epsT);
|
||||
//! \brief Defaulted destructor.
|
||||
//! \details The implementation needs to be in compile unit so we have the
|
||||
//! definition for the types of the unique_ptr's.
|
||||
|
@ -181,8 +182,10 @@ class EvalMultiFunction : public ParentFunc, public EvalFunctions
|
|||
public:
|
||||
//! \brief The constructor parses the expression string for each component.
|
||||
EvalMultiFunction(const std::string& functions,
|
||||
const std::string& variables = "")
|
||||
: EvalFunctions(functions,variables), nsd(0) { this->setNoDims(); }
|
||||
const std::string& variables = "",
|
||||
const Real epsX = 1e-8,
|
||||
const Real epsT = 1e-12)
|
||||
: EvalFunctions(functions,variables,epsX,epsT), nsd(0) { this->setNoDims(); }
|
||||
|
||||
//! \brief Empty destructor.
|
||||
virtual ~EvalMultiFunction() {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user