Commit b291f4fc authored by Houtan Bastani's avatar Houtan Bastani
Browse files

small fix to implementation of second derivatives of jacobian w.r.t. parameters

parent 19c4f742
......@@ -2707,6 +2707,7 @@ DynamicModel::writeParamsDerivativesFile(const string &basename) const
{
if (!residuals_params_derivatives.size()
&& !jacobian_params_derivatives.size()
&& !jacobian_params_second_derivatives.size()
&& !hessian_params_derivatives.size())
return;
......@@ -2719,7 +2720,7 @@ DynamicModel::writeParamsDerivativesFile(const string &basename) const
cerr << "ERROR: Can't open file " << filename << " for writing" << endl;
exit(EXIT_FAILURE);
}
paramsDerivsFile << "function [rp, gp] = " << basename << "_params_derivs(y, x, params, it_)" << endl
paramsDerivsFile << "function [rp, gp, gpp, hp] = " << basename << "_params_derivs(y, x, params, it_)" << endl
<< "%" << endl
<< "% Warning : this file is generated automatically by Dynare" << endl
<< "% from model file (.mod)" << endl << endl;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment