avoid useless iteration in simulation of simple equations
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3025 ac1d8469-bf42-47a9-8791-bf33cf982152issue#70
parent
3ed36840f9
commit
faa1f2111a
|
@ -558,6 +558,8 @@ void
|
||||||
VariableNode::compile(ostream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx, bool dynamic, bool steady_dynamic) const
|
VariableNode::compile(ostream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx, bool dynamic, bool steady_dynamic) const
|
||||||
{
|
{
|
||||||
int i, lagl;
|
int i, lagl;
|
||||||
|
if(type==eModelLocalVariable || type==eModFileLocalVariable)
|
||||||
|
datatree.local_variables_table[symb_id]->compile(CompileCode, lhs_rhs, temporary_terms, map_idx, dynamic, steady_dynamic);
|
||||||
if (!lhs_rhs)
|
if (!lhs_rhs)
|
||||||
{
|
{
|
||||||
if(dynamic)
|
if(dynamic)
|
||||||
|
@ -629,7 +631,7 @@ VariableNode::compile(ostream &CompileCode, bool lhs_rhs, const temporary_terms_
|
||||||
case eModelLocalVariable:
|
case eModelLocalVariable:
|
||||||
case eModFileLocalVariable:
|
case eModFileLocalVariable:
|
||||||
//cout << "eModelLocalVariable=" << symb_id << "\n";
|
//cout << "eModelLocalVariable=" << symb_id << "\n";
|
||||||
datatree.local_variables_table[symb_id]->compile(CompileCode, lhs_rhs, temporary_terms, map_idx, dynamic, steady_dynamic);
|
|
||||||
break;
|
break;
|
||||||
case eUnknownFunction:
|
case eUnknownFunction:
|
||||||
cerr << "Impossible case: eUnknownFuncion" << endl;
|
cerr << "Impossible case: eUnknownFuncion" << endl;
|
||||||
|
@ -1237,12 +1239,14 @@ UnaryOpNode::eval_opcode(UnaryOpcode op_code, double v) throw (EvalException)
|
||||||
return(sinh(v));
|
return(sinh(v));
|
||||||
case oTanh:
|
case oTanh:
|
||||||
return(tanh(v));
|
return(tanh(v));
|
||||||
|
#ifndef WIN64
|
||||||
case oAcosh:
|
case oAcosh:
|
||||||
return(acosh(v));
|
return(acosh(v));
|
||||||
case oAsinh:
|
case oAsinh:
|
||||||
return(asinh(v));
|
return(asinh(v));
|
||||||
case oAtanh:
|
case oAtanh:
|
||||||
return(atanh(v));
|
return(atanh(v));
|
||||||
|
#endif
|
||||||
case oSqrt:
|
case oSqrt:
|
||||||
return(sqrt(v));
|
return(sqrt(v));
|
||||||
case oSteadyState:
|
case oSteadyState:
|
||||||
|
|
Loading…
Reference in New Issue