cylinder extensions: two critical bug fixes
This commit is contained in:
parent
f98314d55c
commit
25777f7f27
@ -21,11 +21,13 @@
|
|||||||
|
|
||||||
Engine_Ext_Cylinder::Engine_Ext_Cylinder(Operator_Ext_Cylinder* op_ext) : Engine_Extension(op_ext)
|
Engine_Ext_Cylinder::Engine_Ext_Cylinder(Operator_Ext_Cylinder* op_ext) : Engine_Extension(op_ext)
|
||||||
{
|
{
|
||||||
|
cyl_Op = op_ext;
|
||||||
|
|
||||||
CC_closedAlpha = op_ext->CC_closedAlpha;
|
CC_closedAlpha = op_ext->CC_closedAlpha;
|
||||||
CC_R0_included = op_ext->CC_R0_included;
|
CC_R0_included = op_ext->CC_R0_included;
|
||||||
|
|
||||||
for (int n=0;n<3;++n)
|
for (int n=0;n<3;++n)
|
||||||
numLines[n] = op_ext->m_Op->GetNumberOfLines(n);
|
numLines[n] = op_ext->m_Op->GetOriginalNumLines(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Engine_Ext_Cylinder::Apply2Voltages()
|
void Engine_Ext_Cylinder::Apply2Voltages()
|
||||||
|
@ -29,18 +29,18 @@ bool Operator_Ext_Cylinder::BuildExtension()
|
|||||||
if ((CC_R0_included==false) || (CC_closedAlpha==false))
|
if ((CC_R0_included==false) || (CC_closedAlpha==false))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
vv_R0 = new FDTD_FLOAT[m_Op->GetNumberOfLines(2)];
|
vv_R0 = new FDTD_FLOAT[m_Op->GetOriginalNumLines(2)];
|
||||||
vi_R0 = new FDTD_FLOAT[m_Op->GetNumberOfLines(2)];
|
vi_R0 = new FDTD_FLOAT[m_Op->GetOriginalNumLines(2)];
|
||||||
|
|
||||||
unsigned int pos[3];
|
unsigned int pos[3];
|
||||||
double inEC[4];
|
double inEC[4];
|
||||||
double dT = m_Op->GetTimestep();
|
double dT = m_Op->GetTimestep();
|
||||||
pos[0]=0;
|
pos[0]=0;
|
||||||
for (pos[2]=0;pos[2]<m_Op->GetNumberOfLines(2);++pos[2])
|
for (pos[2]=0;pos[2]<m_Op->GetOriginalNumLines(2);++pos[2])
|
||||||
{
|
{
|
||||||
double C=0;
|
double C=0;
|
||||||
double G=0;
|
double G=0;
|
||||||
for (pos[1]=0;pos[1]<m_Op->GetNumberOfLines(1)-1;++pos[1])
|
for (pos[1]=0;pos[1]<m_Op->GetOriginalNumLines(1)-1;++pos[1])
|
||||||
{
|
{
|
||||||
m_Op_Cyl->Calc_ECPos(2,pos,inEC);
|
m_Op_Cyl->Calc_ECPos(2,pos,inEC);
|
||||||
C+=inEC[0]*0.5;
|
C+=inEC[0]*0.5;
|
||||||
|
Loading…
Reference in New Issue
Block a user