critical fixes in excitation extension

pull/1/head
Thorsten Liebig 2011-03-17 11:38:01 +01:00
parent 490288240a
commit caacbb9d9d
2 changed files with 5 additions and 5 deletions

View File

@ -101,7 +101,7 @@ void Engine_Ext_Excitation::Apply2Current()
{
case Engine::BASIC:
{
for (unsigned int n=0; n<m_Op_Exc->m_Exc->Volt_Count; ++n)
for (unsigned int n=0; n<m_Op_Exc->m_Exc->Curr_Count; ++n)
{
exc_pos = numTS - (int)m_Op_Exc->m_Exc->Curr_delay[n];
exc_pos *= (exc_pos>0 && exc_pos<=(int)m_Op_Exc->m_Exc->Length);
@ -115,7 +115,7 @@ void Engine_Ext_Excitation::Apply2Current()
}
case Engine::SSE:
{
for (unsigned int n=0; n<m_Op_Exc->m_Exc->Volt_Count; ++n)
for (unsigned int n=0; n<m_Op_Exc->m_Exc->Curr_Count; ++n)
{
Engine_sse* eng_sse = (Engine_sse*) m_Eng;
exc_pos = numTS - (int)m_Op_Exc->m_Exc->Curr_delay[n];
@ -130,7 +130,7 @@ void Engine_Ext_Excitation::Apply2Current()
}
default:
{
for (unsigned int n=0; n<m_Op_Exc->m_Exc->Volt_Count; ++n)
for (unsigned int n=0; n<m_Op_Exc->m_Exc->Curr_Count; ++n)
{
exc_pos = numTS - (int)m_Op_Exc->m_Exc->Curr_delay[n];
exc_pos *= (exc_pos>0 && exc_pos<=(int)m_Op_Exc->m_Exc->Length);

View File

@ -30,14 +30,14 @@ public:
Operator_Ext_Excitation(Operator* op, Excitation* exc);
~Operator_Ext_Excitation();
virtual Operator_Extension* Clone(Operator* op) {return NULL;}
virtual Operator_Extension* Clone(Operator* op) {UNUSED(op);return NULL;}
virtual bool BuildExtension();
virtual Engine_Extension* CreateEngineExtention();
virtual bool IsCylinderCoordsSave() const {return true;}
virtual bool IsCylindricalMultiGridSave(bool child) const {return true;}
virtual bool IsCylindricalMultiGridSave(bool child) const {UNUSED(child); return true;}
virtual string GetExtensionName() const {return string("Excitation Extension");}