preprocessor: add missing fill! statements to static/dynamic functions

time-shift
Houtan Bastani 2017-10-02 11:13:15 +02:00
parent f284169248
commit 7d95539413
2 changed files with 4 additions and 0 deletions

View File

@ -2508,6 +2508,7 @@ DynamicModel::writeDynamicModel(ostream &DynamicOutput, bool use_dll, bool julia
DynamicOutput << "#=" << endl << comments.str() << "=#" << endl
<< " @assert size(g2) == (" << nrows << ", " << hessianColsNbr << ")" << endl
<< " fill!(g2, 0.0)" << endl
<< " dynamic!(y, x, params, steady_state, it_, residual, g1)" << endl;
if (second_derivatives.size())
DynamicOutput << model_local_vars_output.str()
@ -2531,6 +2532,7 @@ DynamicModel::writeDynamicModel(ostream &DynamicOutput, bool use_dll, bool julia
DynamicOutput << "#=" << endl << comments.str() << "=#" << endl
<< " @assert size(g3) == (" << nrows << ", " << ncols << ")" << endl
<< " fill!(g3, 0.0)" << endl
<< " dynamic!(y, x, params, steady_state, it_, residual, g1, g2)" << endl;
if (third_derivatives.size())
DynamicOutput << model_local_vars_output.str()

View File

@ -1555,6 +1555,7 @@ StaticModel::writeStaticModel(ostream &StaticOutput, bool use_dll, bool julia) c
StaticOutput << "#=" << endl << comments.str() << "=#" << endl
<< " @assert size(g2) == (" << equations.size() << ", " << g2ncols << ")" << endl
<< " fill!(g2, 0.0)" << endl
<< " static!(y, x, params, residual, g1)" << endl;
if (second_derivatives.size())
StaticOutput << model_local_vars_output.str()
@ -1578,6 +1579,7 @@ StaticModel::writeStaticModel(ostream &StaticOutput, bool use_dll, bool julia) c
StaticOutput << "#=" << endl << comments.str() << "=#" << endl
<< " @assert size(g3) == (" << nrows << ", " << ncols << ")" << endl
<< " fill!(g3, 0.0)" << endl
<< " static!(y, x, params, residual, g1, g2)" << endl;
if (third_derivatives.size())
StaticOutput << model_local_vars_output.str()