Warning for unused primitives

pull/1/head
Thorsten Liebig 2010-05-29 17:40:18 +02:00
parent 99e987b240
commit 27bf0aac7d
2 changed files with 9 additions and 1 deletions

View File

@ -956,6 +956,8 @@ bool Operator::CalcFieldExcitation()
curv->GetPoint(i-1,p1); curv->GetPoint(i-1,p1);
curv->GetPoint(i,p2); curv->GetPoint(i,p2);
path = FindPath(p1,p2); path = FindPath(p1,p2);
if (path.dir.size()>0)
prim->SetPrimitiveUsed(true);
for (size_t t=0;t<path.dir.size();++t) for (size_t t=0;t<path.dir.size();++t)
{ {
n = path.dir.at(t); n = path.dir.at(t);
@ -1064,6 +1066,8 @@ bool Operator::CalcPEC()
curv->GetPoint(i-1,p1); curv->GetPoint(i-1,p1);
curv->GetPoint(i,p2); curv->GetPoint(i,p2);
path = FindPath(p1,p2); path = FindPath(p1,p2);
if (path.dir.size()>0)
prim->SetPrimitiveUsed(true);
for (size_t t=0;t<path.dir.size();++t) for (size_t t=0;t<path.dir.size();++t)
{ {
// cerr << path.dir.at(t) << " " << path.posPath[0].at(t) << " " << path.posPath[1].at(t) << " " << path.posPath[2].at(t) << endl; // cerr << path.dir.at(t) << " " << path.posPath[0].at(t) << " " << path.posPath[1].at(t) << " " << path.posPath[2].at(t) << endl;

View File

@ -315,6 +315,7 @@ int openEMS::SetupFDTD(const char* file)
proc->SetProcessInterval(Nyquist/m_OverSampling); proc->SetProcessInterval(Nyquist/m_OverSampling);
proc->DefineStartStopCoord(start,stop); proc->DefineStartStopCoord(start,stop);
PA->AddProcessing(proc); PA->AddProcessing(proc);
prim->SetPrimitiveUsed(true);
} }
else else
delete proc; delete proc;
@ -351,12 +352,15 @@ int openEMS::SetupFDTD(const char* file)
ProcTD->DefineStartStopCoord(start,stop); ProcTD->DefineStartStopCoord(start,stop);
ProcTD->InitProcess(); ProcTD->InitProcess();
PA->AddProcessing(ProcTD); PA->AddProcessing(ProcTD);
prim->SetPrimitiveUsed(true);
} }
else else
delete ProcTD; delete ProcTD;
} }
} }
CSX.WarnUnusedPrimitves(cerr);
// dump all boxes (voltage, current, fields, ...) // dump all boxes (voltage, current, fields, ...)
if (m_debugBox) if (m_debugBox)
{ {