preprocessor: add missing fill! statements to static/dynamic functions
parent
f284169248
commit
7d95539413
|
@ -2508,6 +2508,7 @@ DynamicModel::writeDynamicModel(ostream &DynamicOutput, bool use_dll, bool julia
|
||||||
|
|
||||||
DynamicOutput << "#=" << endl << comments.str() << "=#" << endl
|
DynamicOutput << "#=" << endl << comments.str() << "=#" << endl
|
||||||
<< " @assert size(g2) == (" << nrows << ", " << hessianColsNbr << ")" << endl
|
<< " @assert size(g2) == (" << nrows << ", " << hessianColsNbr << ")" << endl
|
||||||
|
<< " fill!(g2, 0.0)" << endl
|
||||||
<< " dynamic!(y, x, params, steady_state, it_, residual, g1)" << endl;
|
<< " dynamic!(y, x, params, steady_state, it_, residual, g1)" << endl;
|
||||||
if (second_derivatives.size())
|
if (second_derivatives.size())
|
||||||
DynamicOutput << model_local_vars_output.str()
|
DynamicOutput << model_local_vars_output.str()
|
||||||
|
@ -2531,6 +2532,7 @@ DynamicModel::writeDynamicModel(ostream &DynamicOutput, bool use_dll, bool julia
|
||||||
|
|
||||||
DynamicOutput << "#=" << endl << comments.str() << "=#" << endl
|
DynamicOutput << "#=" << endl << comments.str() << "=#" << endl
|
||||||
<< " @assert size(g3) == (" << nrows << ", " << ncols << ")" << endl
|
<< " @assert size(g3) == (" << nrows << ", " << ncols << ")" << endl
|
||||||
|
<< " fill!(g3, 0.0)" << endl
|
||||||
<< " dynamic!(y, x, params, steady_state, it_, residual, g1, g2)" << endl;
|
<< " dynamic!(y, x, params, steady_state, it_, residual, g1, g2)" << endl;
|
||||||
if (third_derivatives.size())
|
if (third_derivatives.size())
|
||||||
DynamicOutput << model_local_vars_output.str()
|
DynamicOutput << model_local_vars_output.str()
|
||||||
|
|
|
@ -1555,6 +1555,7 @@ StaticModel::writeStaticModel(ostream &StaticOutput, bool use_dll, bool julia) c
|
||||||
|
|
||||||
StaticOutput << "#=" << endl << comments.str() << "=#" << endl
|
StaticOutput << "#=" << endl << comments.str() << "=#" << endl
|
||||||
<< " @assert size(g2) == (" << equations.size() << ", " << g2ncols << ")" << endl
|
<< " @assert size(g2) == (" << equations.size() << ", " << g2ncols << ")" << endl
|
||||||
|
<< " fill!(g2, 0.0)" << endl
|
||||||
<< " static!(y, x, params, residual, g1)" << endl;
|
<< " static!(y, x, params, residual, g1)" << endl;
|
||||||
if (second_derivatives.size())
|
if (second_derivatives.size())
|
||||||
StaticOutput << model_local_vars_output.str()
|
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
|
StaticOutput << "#=" << endl << comments.str() << "=#" << endl
|
||||||
<< " @assert size(g3) == (" << nrows << ", " << ncols << ")" << endl
|
<< " @assert size(g3) == (" << nrows << ", " << ncols << ")" << endl
|
||||||
|
<< " fill!(g3, 0.0)" << endl
|
||||||
<< " static!(y, x, params, residual, g1, g2)" << endl;
|
<< " static!(y, x, params, residual, g1, g2)" << endl;
|
||||||
if (third_derivatives.size())
|
if (third_derivatives.size())
|
||||||
StaticOutput << model_local_vars_output.str()
|
StaticOutput << model_local_vars_output.str()
|
||||||
|
|
Loading…
Reference in New Issue