From 594b38e34560ce7463aee0b821304dfb2bbd7967 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Thu, 19 Aug 2010 10:12:09 +0200 Subject: [PATCH] operator: set a forced timestep --- FDTD/operator.cpp | 13 ++++++++++++- FDTD/operator.h | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index 9ca0926..77d333d 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -35,6 +35,7 @@ Operator::Operator() { m_MeshType = ProcessFields::CARTESIAN_MESH; Exc = 0; + dT = 0; } Operator::~Operator() @@ -77,6 +78,7 @@ void Operator::Init() m_BC[n]=0; Exc = 0; + dT = 0; } void Operator::Reset() @@ -531,7 +533,16 @@ int Operator::CalcECOperator() if (Calc_EC()==0) return -1; - CalcTimestep(); + if (dT>0) + { + double save_dT = dT; + CalcTimestep(); + if (dT