From 12c26f834a26bf7215e8b9ed76fe1862b4b0ed7c Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Thu, 2 Sep 2010 22:12:03 +0200 Subject: [PATCH] always show the optimal timestep --- FDTD/operator.cpp | 7 ++++++- FDTD/operator.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index 77d333d..1e87285 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -304,7 +304,10 @@ void Operator::ShowStat() const cout << "in " << GetDirName(1) << " direction\t\t: " << m_Nr_PEC[1] << endl; cout << "in " << GetDirName(2) << " direction\t\t: " << m_Nr_PEC[2] << endl; cout << "-----------------------------------" << endl; - cout << "Timestep (s)\t\t: " << dT << endl; + cout << "Timestep (s)\t\t: " << dT ; + if (opt_dT) + cout <<"\t(" << opt_dT << ")"; + cout << endl; cout << "Timestep method name\t: " << m_Used_TS_Name << endl; cout << "Nyquist criteria (TS)\t: " << Exc->GetNyquistNum() << endl; cout << "Nyquist criteria (s)\t: " << Exc->GetNyquistNum()*dT << endl; @@ -533,10 +536,12 @@ int Operator::CalcECOperator() if (Calc_EC()==0) return -1; + opt_dT = 0; if (dT>0) { double save_dT = dT; CalcTimestep(); + opt_dT = dT; if (dT