From 6ae3d3131f2d8754251526480c3babe117eec84e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Wed, 21 Jul 2021 14:43:39 +0200
Subject: [PATCH] =?UTF-8?q?Occbin:=20handle=20external=20functions=20in=20?=
 =?UTF-8?q?=E2=80=9Coccbin=5Fconstraints=E2=80=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/ExprNode.cc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/ExprNode.cc b/src/ExprNode.cc
index 15b83a41..3432f2cc 100644
--- a/src/ExprNode.cc
+++ b/src/ExprNode.cc
@@ -7072,6 +7072,7 @@ ExternalFunctionNode::writeOutput(ostream &output, ExprNodeOutputType output_typ
   if (output_type == ExprNodeOutputType::matlabOutsideModel || output_type == ExprNodeOutputType::steadyStateFile
       || output_type == ExprNodeOutputType::juliaSteadyStateFile
       || output_type == ExprNodeOutputType::epilogueFile
+      || output_type == ExprNodeOutputType::occbinDifferenceFile
       || isLatexOutput(output_type))
     {
       string name = isLatexOutput(output_type) ? datatree.symbol_table.getTeXName(symb_id)
@@ -7302,7 +7303,8 @@ FirstDerivExternalFunctionNode::writeOutput(ostream &output, ExprNodeOutputType
                                             const temporary_terms_idxs_t &temporary_terms_idxs,
                                             const deriv_node_temp_terms_t &tef_terms) const
 {
-  assert(output_type != ExprNodeOutputType::matlabOutsideModel);
+  assert(output_type != ExprNodeOutputType::matlabOutsideModel
+         && output_type != ExprNodeOutputType::occbinDifferenceFile);
 
   if (isLatexOutput(output_type))
     {
@@ -7654,7 +7656,8 @@ SecondDerivExternalFunctionNode::writeOutput(ostream &output, ExprNodeOutputType
                                              const temporary_terms_idxs_t &temporary_terms_idxs,
                                              const deriv_node_temp_terms_t &tef_terms) const
 {
-  assert(output_type != ExprNodeOutputType::matlabOutsideModel);
+  assert(output_type != ExprNodeOutputType::matlabOutsideModel
+         && output_type != ExprNodeOutputType::occbinDifferenceFile);
 
   if (isLatexOutput(output_type))
     {
-- 
GitLab