Fix end of line convention and copyright years

time-shift
Sébastien Villemot 2010-10-27 18:35:42 +02:00
parent 1aceb504fd
commit 0730213059
1 changed files with 72 additions and 71 deletions

View File

@ -1,72 +1,73 @@
function [x,info] = dynare_solve_block_or_bytecode(y, exo, params) function [x,info] = dynare_solve_block_or_bytecode(y, exo, params)
% Copyright (C) 1996-2010 Dynare Team % Copyright (C) 2010 Dynare Team
% %
% This file is part of Dynare. % This file is part of Dynare.
% %
% Dynare is free software: you can redistribute it and/or modify % Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by % it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or % the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version. % (at your option) any later version.
% %
% Dynare is distributed in the hope that it will be useful, % Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of % but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details. % GNU General Public License for more details.
% %
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
global options_ M_
info = 0; global options_ M_
x = y; info = 0;
if options_.block && ~options_.bytecode x = y;
for b = 1:size(M_.blocksMFS,1) if options_.block && ~options_.bytecode
n = size(M_.blocksMFS{b}, 1); for b = 1:size(M_.blocksMFS,1)
ss = x; n = size(M_.blocksMFS{b}, 1);
if n ~= 0 ss = x;
if options_.solve_algo <= 4 if n ~= 0
[y, check] = dynare_solve('block_mfs_steadystate', ... if options_.solve_algo <= 4
ss(M_.blocksMFS{b}), ... [y, check] = dynare_solve('block_mfs_steadystate', ...
options_.jacobian_flag, b, ss); ss(M_.blocksMFS{b}), ...
if check ~= 0 options_.jacobian_flag, b, ss);
error(['STEADY: convergence problems in block ' int2str(b)]) if check ~= 0
end error(['STEADY: convergence problems in block ' int2str(b)])
ss(M_.blocksMFS{b}) = y; end
else ss(M_.blocksMFS{b}) = y;
[ss, check] = solve_one_boundary([M_.fname '_static_' int2str(b)], ss, exo, ... else
params, M_.blocksMFS{b}, n, 1, 0, b, 0, options_.maxit_, ... [ss, check] = solve_one_boundary([M_.fname '_static_' int2str(b)], ss, exo, ...
options_.solve_tolf, options_.slowc, 0, options_.solve_algo, 1, 0, 0); params, M_.blocksMFS{b}, n, 1, 0, b, 0, options_.maxit_, ...
options_.solve_tolf, options_.slowc, 0, options_.solve_algo, 1, 0, 0);
end
end end
[r, g1, x] = feval([M_.fname '_static'], b, ss, ... end
exo, params); [r, g1, x] = feval([M_.fname '_static'], b, ss, ...
end exo, params);
elseif options_.bytecode end
if options_.solve_algo > 4 elseif options_.bytecode
[check, x] = bytecode('static', y, exo, params); if options_.solve_algo > 4
mexErrCheck('bytecode', check); [check, x] = bytecode('static', y, exo, params);
info = check; mexErrCheck('bytecode', check);
elseif options_.block info = check;
for b = 1:size(M_.blocksMFS,1) elseif options_.block
n = size(M_.blocksMFS{b}, 1); for b = 1:size(M_.blocksMFS,1)
if n ~= 0 n = size(M_.blocksMFS{b}, 1);
[y, check] = dynare_solve('block_bytecode_mfs_steadystate', ... if n ~= 0
x(M_.blocksMFS{b}), ... [y, check] = dynare_solve('block_bytecode_mfs_steadystate', ...
options_.jacobian_flag, b, x); x(M_.blocksMFS{b}), ...
if check ~= 0 options_.jacobian_flag, b, x);
error(['STEADY: convergence problems in block ' int2str(b)]) if check ~= 0
end error(['STEADY: convergence problems in block ' int2str(b)])
x(M_.blocksMFS{b}) = y; end
else x(M_.blocksMFS{b}) = y;
[check, x] = feval('bytecode', x, exo, params, 'static', ['block = ' int2str(b)]); else
end; [check, x] = feval('bytecode', x, exo, params, 'static', ['block = ' int2str(b)]);
end end;
else end
[x, check] = dynare_solve('bytecode_steadystate', ... else
y, ... [x, check] = dynare_solve('bytecode_steadystate', ...
options_.jacobian_flag); y, ...
if check ~= 0 options_.jacobian_flag);
error('STEADY: convergence problems') if check ~= 0
end error('STEADY: convergence problems')
end end
end
end end