Intel compiler errors in ForcingBody
The counter variable i
is used twice in nested loops leading to the compiler warning/error:
ForcingBody.cpp(156): error #823: reference is to variable "i" (declared at line 133) -- under old for-init scoping rules it would have been variable "i" (declared at line 149)
m_session->GetFunction(m_funcName, m_session->GetVariable(i))->
^
ForcingBody.cpp(157): error #823: reference is to variable "i" (declared at line 133) -- under old for-init scoping rules it would have been variable "i" (declared at line 149)
Evaluate(fielddata, m_Forcing[i]);
We should avoid shadowing variables in nested loops.