excitation setup speedup
* get all excitation primitives inside a yz-slice only Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>pull/70/head
parent
46827dccb0
commit
9017d91594
|
@ -135,14 +135,13 @@ bool Operator_Ext_Excitation::BuildExtension()
|
|||
|
||||
CSPropExcitation* elec=NULL;
|
||||
CSProperties* prop=NULL;
|
||||
int priority=0;
|
||||
|
||||
unsigned int numLines[] = {m_Op->GetNumberOfLines(0,true),m_Op->GetNumberOfLines(1,true),m_Op->GetNumberOfLines(2,true)};
|
||||
|
||||
for (pos[2]=0; pos[2]<numLines[2]; ++pos[2])
|
||||
{
|
||||
for (pos[1]=0; pos[1]<numLines[1]; ++pos[1])
|
||||
{
|
||||
vector<CSPrimitives*> vPrims = m_Op->GetPrimitivesBoundBox(-1, pos[1], pos[2], CSProperties::EXCITATION);
|
||||
for (pos[0]=0; pos[0]<numLines[0]; ++pos[0])
|
||||
{
|
||||
//electric field excite
|
||||
|
@ -156,14 +155,12 @@ bool Operator_Ext_Excitation::BuildExtension()
|
|||
if (m_CC_R0_included && (n==1) && (pos[0]==0))
|
||||
continue;
|
||||
|
||||
for (size_t p=0; p<vec_prop.size(); ++p)
|
||||
CSProperties* prop = CSX->GetPropertyByCoordPriority(volt_coord, vPrims, true);
|
||||
if (prop)
|
||||
{
|
||||
prop = vec_prop.at(p);
|
||||
elec = prop->ToExcitation();
|
||||
if (elec==NULL)
|
||||
continue;
|
||||
if (prop->CheckCoordInPrimitive(volt_coord,priority,true))
|
||||
{
|
||||
if ((elec->GetActiveDir(n)) && ( (elec->GetExcitType()==0) || (elec->GetExcitType()==1) ))//&& (pos[n]<numLines[n]-1))
|
||||
{
|
||||
amp = elec->GetWeightedExcitation(n,volt_coord)*m_Op->GetEdgeLength(n,pos);// delta[n]*gridDelta;
|
||||
|
@ -184,7 +181,6 @@ bool Operator_Ext_Excitation::BuildExtension()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//magnetic field excite
|
||||
for (int n=0; n<3; ++n)
|
||||
|
@ -193,14 +189,12 @@ bool Operator_Ext_Excitation::BuildExtension()
|
|||
continue; //skip the last H-Line which is outside the FDTD-domain
|
||||
if (m_Op->GetYeeCoords(n,pos,curr_coord,true)==false)
|
||||
continue;
|
||||
for (size_t p=0; p<vec_prop.size(); ++p)
|
||||
CSProperties* prop = CSX->GetPropertyByCoordPriority(curr_coord, vPrims, true);
|
||||
if (prop)
|
||||
{
|
||||
prop = vec_prop.at(p);
|
||||
elec = prop->ToExcitation();
|
||||
if (elec==NULL)
|
||||
continue;
|
||||
if (prop->CheckCoordInPrimitive(curr_coord,priority,true))
|
||||
{
|
||||
if ((elec->GetActiveDir(n)) && ( (elec->GetExcitType()==2) || (elec->GetExcitType()==3) ))
|
||||
{
|
||||
amp = elec->GetWeightedExcitation(n,curr_coord)*m_Op->GetEdgeLength(n,pos,true);// delta[n]*gridDelta;
|
||||
|
@ -221,7 +215,6 @@ bool Operator_Ext_Excitation::BuildExtension()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue