From 23b917be5fbf19abe73b736fc52115415af19800 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Wed, 19 May 2010 11:42:56 +0200 Subject: [PATCH] update to Operator::ShowStat and derived operators --- FDTD/excitation.cpp | 4 ++-- FDTD/operator.cpp | 3 +++ FDTD/operator.h | 2 +- FDTD/operator_sse_compressed.cpp | 11 +++++++++++ FDTD/operator_sse_compressed.h | 2 ++ 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/FDTD/excitation.cpp b/FDTD/excitation.cpp index 40953a5..290e254 100644 --- a/FDTD/excitation.cpp +++ b/FDTD/excitation.cpp @@ -258,7 +258,7 @@ void Excitation::setupVoltageExcitation( vector const volt_vIndex[ E_amp = new FDTD_FLOAT[E_Count]; E_dir = new unsigned short[E_Count]; - cerr << "Excitation::setupVoltageExcitation(): Number of voltage excitation points: " << E_Count << endl; +// cerr << "Excitation::setupVoltageExcitation(): Number of voltage excitation points: " << E_Count << endl; // if (E_Count==0) // cerr << "No E-Field/voltage excitation found!" << endl; for (int n=0; n<3; n++) @@ -286,7 +286,7 @@ void Excitation::setupCurrentExcitation( vector const curr_vIndex[ Curr_amp = new FDTD_FLOAT[Curr_Count]; Curr_dir = new unsigned short[Curr_Count]; - cerr << "Excitation::setupCurrentExcitation(): Number of current excitation points: " << Curr_Count << endl; +// cerr << "Excitation::setupCurrentExcitation(): Number of current excitation points: " << Curr_Count << endl; // if (Curr_Count==0) // cerr << "No H-Field/current excitation found!" << endl; for (int n=0;n<3;++n) diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index 30493dd..cdc6f4a 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -291,6 +291,9 @@ void Operator::ShowStat() const cout << "Size of Operator\t: " << OpSize << " Byte (" << (double)OpSize/MBdiff << " MB) " << endl; cout << "Size of Field-Data\t: " << FieldSize << " Byte (" << (double)FieldSize/MBdiff << " MB) " << endl; cout << "-----------------------------------" << endl; + cout << "Voltage excitations\t: " << Exc->E_Count << endl; + cout << "Current excitations\t: " << Exc->Curr_Count << 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; cout << "in " << GetDirName(1) << " direction\t\t: " << m_Nr_PEC[1] << endl; diff --git a/FDTD/operator.h b/FDTD/operator.h index 4ede0b5..157fc20 100644 --- a/FDTD/operator.h +++ b/FDTD/operator.h @@ -60,7 +60,7 @@ public: //! Returns the number of lines as needed for the engine etc. (for post-processing etc, use GetOriginalNumLines) virtual unsigned int GetOriginalNumLines(int ny) const {return numLines[ny];} - void ShowStat() const; + virtual void ShowStat() const; void DumpOperator2File(string filename); void DumpMaterial2File(string filename); diff --git a/FDTD/operator_sse_compressed.cpp b/FDTD/operator_sse_compressed.cpp index fb60756..ae624df 100644 --- a/FDTD/operator_sse_compressed.cpp +++ b/FDTD/operator_sse_compressed.cpp @@ -138,6 +138,17 @@ void Operator_SSE_Compressed::InitOperator() } } +void Operator_SSE_Compressed::ShowStat() const +{ + Operator_sse::ShowStat(); + + cout << "SSE compression enabled\t: " << m_Use_Compression << endl; + cout << "Unique SSE operator\t: " << m_Op_Count << endl; + cout << "Optimal compression\t: " << m_Max_Compression << endl; + cout << "-----------------------------------" << endl; +} + + bool Operator_SSE_Compressed::CompareOperators(unsigned int pos1[3], unsigned int pos2[3]) { // cerr << pos1[0] << " " << pos1[1] << " " << pos1[2] << endl; diff --git a/FDTD/operator_sse_compressed.h b/FDTD/operator_sse_compressed.h index 7d8c290..aa31e22 100644 --- a/FDTD/operator_sse_compressed.h +++ b/FDTD/operator_sse_compressed.h @@ -31,6 +31,8 @@ public: virtual int CalcECOperator(); + virtual void ShowStat() const; + void SetCompressionThreshold(double val) {m_Compression_Threshold = val;} void SetCacheSize(unsigned int size) {m_max_fifo = size;} bool CompressOperator();