From ea4d3f4d83887f79d3ed736e91756c27f3a3db59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Mon, 25 May 2020 21:08:51 +0200
Subject: [PATCH] Block decomposition: fix interaction with steady_state_model
 block

This cas was omitted in previous commit.
---
 matlab/evaluate_static_model.m | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/matlab/evaluate_static_model.m b/matlab/evaluate_static_model.m
index fbcfa235cd..f418d122d2 100644
--- a/matlab/evaluate_static_model.m
+++ b/matlab/evaluate_static_model.m
@@ -45,17 +45,19 @@ else
     fh_static = str2func([M.fname '.static']);
     if options.block
         residuals = zeros(M.endo_nbr,1);
+        T = NaN(M.block_structure_stat.tmp_nbr, 1);
         for b = 1:length(M.block_structure_stat.block)
             mfsb = M.block_structure_stat.block(b).variable;
             % blocks that can be directly evaluated (mfsb is empty)
             % have zero residuals by construction
             if M.block_structure_stat.block(b).Simulation_Type ~= 1 && ...
                     M.block_structure_stat.block(b).Simulation_Type ~= 2
-                residuals(mfsb) = feval(fh_static,b,ys,exo_ss,params);
+                [r, ~, ~, ~, T] = feval(fh_static,b,ys,exo_ss,params,T);
+                residuals(mfsb) = r;
             else
                 %need to evaluate the recursive blocks to compute the
                 %temporary terms
-                feval(fh_static,b,ys,exo_ss,params);
+                [~, ~, ~, ~, T] = feval(fh_static,b,ys,exo_ss,params,T);
             end
         end
     else
-- 
GitLab