diff --git a/preprocessor/ExprNode.cc b/preprocessor/ExprNode.cc index fcf19ec51..5620b11a2 100644 --- a/preprocessor/ExprNode.cc +++ b/preprocessor/ExprNode.cc @@ -5140,6 +5140,17 @@ FirstDerivExternalFunctionNode::compileExternalFunctionOutput(ostream &CompileCo } } +expr_t +FirstDerivExternalFunctionNode::cloneDynamic(DataTree &dynamic_datatree) const +{ + vector dynamic_arguments; + for (vector::const_iterator it = arguments.begin(); + it != arguments.end(); it++) + dynamic_arguments.push_back((*it)->cloneDynamic(dynamic_datatree)); + return dynamic_datatree.AddFirstDerivExternalFunctionNode(symb_id, dynamic_arguments, + inputIndex); +} + SecondDerivExternalFunctionNode::SecondDerivExternalFunctionNode(DataTree &datatree_arg, int top_level_symb_id_arg, const vector &arguments_arg, @@ -5336,3 +5347,14 @@ SecondDerivExternalFunctionNode::writeExternalFunctionOutput(ostream &output, Ex output << ");" << endl; } } + +expr_t +SecondDerivExternalFunctionNode::cloneDynamic(DataTree &dynamic_datatree) const +{ + vector dynamic_arguments; + for (vector::const_iterator it = arguments.begin(); + it != arguments.end(); it++) + dynamic_arguments.push_back((*it)->cloneDynamic(dynamic_datatree)); + return dynamic_datatree.AddSecondDerivExternalFunctionNode(symb_id, dynamic_arguments, + inputIndex1, inputIndex2); +} diff --git a/preprocessor/ExprNode.hh b/preprocessor/ExprNode.hh index c77c8cbcf..c0de01b82 100644 --- a/preprocessor/ExprNode.hh +++ b/preprocessor/ExprNode.hh @@ -874,6 +874,7 @@ public: bool lhs_rhs, const temporary_terms_t &temporary_terms, const map_idx_t &map_idx, bool dynamic, bool steady_dynamic, deriv_node_temp_terms_t &tef_terms) const; + virtual expr_t cloneDynamic(DataTree &dynamic_datatree) const; }; class SecondDerivExternalFunctionNode : public ExternalFunctionNode @@ -899,6 +900,7 @@ public: virtual void writeExternalFunctionOutput(ostream &output, ExprNodeOutputType output_type, const temporary_terms_t &temporary_terms, deriv_node_temp_terms_t &tef_terms) const; + virtual expr_t cloneDynamic(DataTree &dynamic_datatree) const; }; #endif