From 27bf0aac7df3c0c110a3e0c32045549d3683366b Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Sat, 29 May 2010 17:40:18 +0200 Subject: [PATCH] Warning for unused primitives --- FDTD/operator.cpp | 6 +++++- openems.cpp | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index 89b81b6..0feafb4 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -956,6 +956,8 @@ bool Operator::CalcFieldExcitation() curv->GetPoint(i-1,p1); curv->GetPoint(i,p2); path = FindPath(p1,p2); + if (path.dir.size()>0) + prim->SetPrimitiveUsed(true); for (size_t t=0;tGetPoint(i-1,p1); curv->GetPoint(i,p2); path = FindPath(p1,p2); + if (path.dir.size()>0) + prim->SetPrimitiveUsed(true); for (size_t t=0;tSetProcessInterval(Nyquist/m_OverSampling); proc->DefineStartStopCoord(start,stop); PA->AddProcessing(proc); + prim->SetPrimitiveUsed(true); } else delete proc; @@ -351,12 +352,15 @@ int openEMS::SetupFDTD(const char* file) ProcTD->DefineStartStopCoord(start,stop); ProcTD->InitProcess(); PA->AddProcessing(ProcTD); + prim->SetPrimitiveUsed(true); } else delete ProcTD; } } + CSX.WarnUnusedPrimitves(cerr); + // dump all boxes (voltage, current, fields, ...) if (m_debugBox) {