count and show excitations per direction

pull/1/head
Thorsten Liebig 2010-08-16 13:22:40 +02:00
parent 2a9dc040dc
commit 0319c35f55
3 changed files with 16 additions and 6 deletions

View File

@ -244,7 +244,9 @@ void Excitation::setupVoltageExcitation( vector<unsigned int> const volt_vIndex[
vector<unsigned int> const& volt_vDelay, vector<unsigned int> 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<unsigned int> const volt_vIndex[
for (int n=0; n<3; n++)
for (unsigned int i=0; i<E_Count; i++)
E_index[n][i] = volt_vIndex[n].at(i);
for (unsigned int i=0; i<E_Count; i++) {
for (unsigned int i=0; i<E_Count; i++)
{
E_delay[i] = volt_vDelay.at(i);
E_amp[i] = volt_vExcit.at(i);
E_dir[i] = volt_vDir.at(i);
++Volt_Count_Dir[E_dir[i]];
}
}
@ -272,7 +276,9 @@ void Excitation::setupCurrentExcitation( vector<unsigned int> const curr_vIndex[
vector<unsigned int> const& curr_vDelay, vector<unsigned int> 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<unsigned int> const curr_vIndex[
for (int n=0;n<3;++n)
for (unsigned int i=0; i<Curr_Count; i++)
Curr_index[n][i] = curr_vIndex[n].at(i);
for (unsigned int i=0; i<Curr_Count; i++) {
for (unsigned int i=0; i<Curr_Count; i++)
{
Curr_delay[i] = curr_vDelay.at(i);
Curr_amp[i] = curr_vExcit.at(i);
Curr_dir[i] = curr_vDir.at(i);
++Curr_Count_Dir[Curr_dir[i]];
}
}

View File

@ -50,6 +50,7 @@ public:
//E-Field/voltage Excitation
unsigned int E_Count;
unsigned int Volt_Count_Dir[3];
unsigned int* E_index[3];
unsigned short* E_dir;
FDTD_FLOAT* E_amp; //represented as edge-voltages!!
@ -57,6 +58,7 @@ public:
//H-Field/current Excitation
unsigned int Curr_Count;
unsigned int Curr_Count_Dir[3];
unsigned int* Curr_index[3];
unsigned short* Curr_dir;
FDTD_FLOAT* Curr_amp; //represented as edge-currents!!

View File

@ -294,8 +294,8 @@ void Operator::ShowStat() const
cout << "Size of Operator\t: " << OpSize << " Byte (" << (double)OpSize/MBdiff << " MiB) " << endl;
cout << "Size of Field-Data\t: " << FieldSize << " Byte (" << (double)FieldSize/MBdiff << " MiB) " << endl;
cout << "-----------------------------------" << endl;
cout << "Voltage excitations\t: " << Exc->E_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;