From 35939584dffcf8d8c80d0465c80a9156e8c19311 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Mon, 16 Aug 2010 13:28:19 +0200 Subject: [PATCH] cleanup: renaming voltage excitation E_* to Volt_* --- FDTD/engine.cpp | 6 ++--- FDTD/engine_ext_mur_abc.cpp | 8 +++--- FDTD/excitation.cpp | 52 ++++++++++++++++++------------------- FDTD/excitation.h | 10 +++---- FDTD/operator.cpp | 6 ++--- FDTD/operator_sse.cpp | 4 +-- openems.cpp | 4 +-- 7 files changed, 45 insertions(+), 45 deletions(-) diff --git a/FDTD/engine.cpp b/FDTD/engine.cpp index 3476df5..147a332 100644 --- a/FDTD/engine.cpp +++ b/FDTD/engine.cpp @@ -126,12 +126,12 @@ void Engine::ApplyVoltageExcite() { int exc_pos; //soft voltage excitation here (E-field excite) - for (unsigned int n=0;nExc->E_Count;++n) + for (unsigned int n=0;nExc->Volt_Count;++n) { - exc_pos = (int)numTS - (int)Op->Exc->E_delay[n]; + exc_pos = (int)numTS - (int)Op->Exc->Volt_delay[n]; exc_pos *= (exc_pos>0 && exc_pos<=(int)Op->Exc->Length); // if (n==0) cerr << numTS << " => " << Op->ExciteSignal[exc_pos] << endl; - GetVolt(Op->Exc->E_dir[n],Op->Exc->E_index[0][n],Op->Exc->E_index[1][n],Op->Exc->E_index[2][n]) += Op->Exc->E_amp[n]*Op->Exc->Signal_volt[exc_pos]; + GetVolt(Op->Exc->Volt_dir[n],Op->Exc->Volt_index[0][n],Op->Exc->Volt_index[1][n],Op->Exc->Volt_index[2][n]) += Op->Exc->Volt_amp[n]*Op->Exc->Signal_volt[exc_pos]; } // write the first excitation into the file "et" diff --git a/FDTD/engine_ext_mur_abc.cpp b/FDTD/engine_ext_mur_abc.cpp index 7cb5a46..b9370b1 100644 --- a/FDTD/engine_ext_mur_abc.cpp +++ b/FDTD/engine_ext_mur_abc.cpp @@ -40,12 +40,12 @@ Engine_Ext_Mur_ABC::Engine_Ext_Mur_ABC(Operator_Ext_Mur_ABC* op_ext) : Engine_Ex //find if some excitation is on this mur-abc and find the max length of this excite, so that the abc can start after the excitation is done... int maxDelay=-1; - for (unsigned int n=0;nm_Op->Exc->E_Count;++n) + for (unsigned int n=0;nm_Op->Exc->Volt_Count;++n) { - if ( ((m_Op_mur->m_Op->Exc->E_dir[n]==m_nyP) || (m_Op_mur->m_Op->Exc->E_dir[n]==m_nyPP)) && (m_Op_mur->m_Op->Exc->E_index[m_ny][n]==m_LineNr) ) + if ( ((m_Op_mur->m_Op->Exc->Volt_dir[n]==m_nyP) || (m_Op_mur->m_Op->Exc->Volt_dir[n]==m_nyPP)) && (m_Op_mur->m_Op->Exc->Volt_index[m_ny][n]==m_LineNr) ) { - if ((int)m_Op_mur->m_Op->Exc->E_delay[n]>maxDelay) - maxDelay = (int)m_Op_mur->m_Op->Exc->E_delay[n]; + if ((int)m_Op_mur->m_Op->Exc->Volt_delay[n]>maxDelay) + maxDelay = (int)m_Op_mur->m_Op->Exc->Volt_delay[n]; } } m_start_TS = 0; diff --git a/FDTD/excitation.cpp b/FDTD/excitation.cpp index 0803e9b..bbd2f8e 100644 --- a/FDTD/excitation.cpp +++ b/FDTD/excitation.cpp @@ -25,15 +25,15 @@ Excitation::Excitation( double timestep ) { Signal_volt = 0; Signal_curr = 0; - E_delay = 0; - E_amp = 0; - E_dir = 0; + Volt_delay = 0; + Volt_amp = 0; + Volt_dir = 0; Curr_delay = 0; Curr_amp = 0; Curr_dir = 0; for (int n=0;n<3;++n) { - E_index[n] = 0; + Volt_index[n] = 0; Curr_index[n] = 0; } @@ -45,14 +45,14 @@ Excitation::~Excitation() { delete[] Signal_volt; delete[] Signal_curr; - delete[] E_delay; - delete[] E_dir; - delete[] E_amp; + delete[] Volt_delay; + delete[] Volt_dir; + delete[] Volt_amp; delete[] Curr_delay; delete[] Curr_dir; delete[] Curr_amp; for (int n=0;n<3;++n) { - delete[] E_index[n]; + delete[] Volt_index[n]; delete[] Curr_index[n]; } @@ -243,32 +243,32 @@ void Excitation::CalcSinusExcitation(double f0, int nTS) void Excitation::setupVoltageExcitation( vector const volt_vIndex[3], vector const& volt_vExcit, vector const& volt_vDelay, vector const& volt_vDir ) { - E_Count = volt_vIndex[0].size(); + Volt_Count = volt_vIndex[0].size(); for (int n=0; n<3; n++) { Volt_Count_Dir[n]=0; - delete[] E_index[n]; - E_index[n] = new unsigned int[E_Count]; + delete[] Volt_index[n]; + Volt_index[n] = new unsigned int[Volt_Count]; } - delete[] E_delay; - delete[] E_amp; - delete[] E_dir; - E_delay = new unsigned int[E_Count]; - E_amp = new FDTD_FLOAT[E_Count]; - E_dir = new unsigned short[E_Count]; + delete[] Volt_delay; + delete[] Volt_amp; + delete[] Volt_dir; + Volt_delay = new unsigned int[Volt_Count]; + Volt_amp = new FDTD_FLOAT[Volt_Count]; + Volt_dir = new unsigned short[Volt_Count]; -// cerr << "Excitation::setupVoltageExcitation(): Number of voltage excitation points: " << E_Count << endl; -// if (E_Count==0) +// cerr << "Excitation::setupVoltageExcitation(): Number of voltage excitation points: " << Volt_Count << endl; +// if (Volt_Count==0) // cerr << "No E-Field/voltage excitation found!" << endl; for (int n=0; n<3; n++) - for (unsigned int i=0; iE_Count << "\t (" << Exc->Volt_Count_Dir[0] << ", " << Exc->Volt_Count_Dir[1] << ", " << Exc->Volt_Count_Dir[2] << ")" << endl; + cout << "Voltage excitations\t: " << Exc->Volt_Count << "\t (" << Exc->Volt_Count_Dir[0] << ", " << Exc->Volt_Count_Dir[1] << ", " << Exc->Volt_Count_Dir[2] << ")" << endl; cout << "Current excitations\t: " << Exc->Curr_Count << "\t (" << Exc->Curr_Count_Dir[0] << ", " << Exc->Curr_Count_Dir[1] << ", " << Exc->Curr_Count_Dir[2] << ")" << endl; cout << "-----------------------------------" << endl; cout << "Number of PEC edges\t: " << m_Nr_PEC[0]+m_Nr_PEC[1]+m_Nr_PEC[2] << endl; @@ -339,8 +339,8 @@ void Operator::DumpOperator2File(string filename) FDTD_FLOAT**** exc = Create_N_3DArray(numLines); if (Exc) { - for (unsigned int n=0;nE_Count;++n) - exc[Exc->E_dir[n]][Exc->E_index[0][n]][Exc->E_index[1][n]][Exc->E_index[2][n]] = Exc->E_amp[n]; + for (unsigned int n=0;nVolt_Count;++n) + exc[Exc->Volt_dir[n]][Exc->Volt_index[0][n]][Exc->Volt_index[1][n]][Exc->Volt_index[2][n]] = Exc->Volt_amp[n]; } string names[] = {"vv", "vi", "iv" , "ii", "exc"}; diff --git a/FDTD/operator_sse.cpp b/FDTD/operator_sse.cpp index 4015e09..be6f24f 100644 --- a/FDTD/operator_sse.cpp +++ b/FDTD/operator_sse.cpp @@ -104,8 +104,8 @@ void Operator_sse::DumpOperator2File(string filename) FDTD_FLOAT**** exc = Create_N_3DArray(numLines); if (Exc) { - for (unsigned int n=0;nE_Count;++n) - exc[Exc->E_dir[n]][Exc->E_index[0][n]][Exc->E_index[1][n]][Exc->E_index[2][n]] = Exc->E_amp[n]; + for (unsigned int n=0;nVolt_Count;++n) + exc[Exc->Volt_dir[n]][Exc->Volt_index[0][n]][Exc->Volt_index[1][n]][Exc->Volt_index[2][n]] = Exc->Volt_amp[n]; } vv = Create_N_3DArray(numLines); diff --git a/openems.cpp b/openems.cpp index 01d5fe2..c15f557 100644 --- a/openems.cpp +++ b/openems.cpp @@ -498,8 +498,8 @@ void openEMS::RunFDTD() //add all timesteps to end-crit field processing with max excite amplitude unsigned int maxExcite = FDTD_Op->Exc->GetMaxExcitationTimestep(); - for (unsigned int n=0;nExc->E_Count;++n) - ProcField->AddStep(FDTD_Op->Exc->E_delay[n]+maxExcite); + for (unsigned int n=0;nExc->Volt_Count;++n) + ProcField->AddStep(FDTD_Op->Exc->Volt_delay[n]+maxExcite); double change=1; int prevTS=0,currTS=0;