From 0319c35f55dbabcc128440f45b8d14a48c6b574f Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Mon, 16 Aug 2010 13:22:40 +0200 Subject: [PATCH] count and show excitations per direction --- FDTD/excitation.cpp | 16 ++++++++++++---- FDTD/excitation.h | 2 ++ FDTD/operator.cpp | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/FDTD/excitation.cpp b/FDTD/excitation.cpp index 26677f3..0803e9b 100644 --- a/FDTD/excitation.cpp +++ b/FDTD/excitation.cpp @@ -244,7 +244,9 @@ void Excitation::setupVoltageExcitation( vector const volt_vIndex[ vector const& volt_vDelay, vector const& volt_vDir ) { E_Count = volt_vIndex[0].size(); - for (int n=0; n<3; n++) { + for (int n=0; n<3; n++) + { + Volt_Count_Dir[n]=0; delete[] E_index[n]; E_index[n] = new unsigned int[E_Count]; } @@ -261,10 +263,12 @@ void Excitation::setupVoltageExcitation( vector const volt_vIndex[ for (int n=0; n<3; n++) for (unsigned int i=0; i const curr_vIndex[ vector const& curr_vDelay, vector const& curr_vDir ) { Curr_Count = curr_vIndex[0].size(); - for (int n=0; n<3; n++) { + for (int n=0; n<3; n++) + { + Curr_Count_Dir[n]=0; delete[] Curr_index[n]; Curr_index[n] = new unsigned int[Curr_Count]; } @@ -289,10 +295,12 @@ void Excitation::setupCurrentExcitation( vector const curr_vIndex[ for (int n=0;n<3;++n) for (unsigned int i=0; iE_Count << endl; - cout << "Current excitations\t: " << Exc->Curr_Count << endl; + cout << "Voltage excitations\t: " << Exc->E_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; cout << "in " << GetDirName(0) << " direction\t\t: " << m_Nr_PEC[0] << endl;