summaryrefslogtreecommitdiff
path: root/openEMS/nf2ff/nf2ff_calc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'openEMS/nf2ff/nf2ff_calc.cpp')
-rw-r--r--openEMS/nf2ff/nf2ff_calc.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/openEMS/nf2ff/nf2ff_calc.cpp b/openEMS/nf2ff/nf2ff_calc.cpp
index 335dd9a..9c2aa4f 100644
--- a/openEMS/nf2ff/nf2ff_calc.cpp
+++ b/openEMS/nf2ff/nf2ff_calc.cpp
@@ -313,6 +313,10 @@ bool nf2ff_calc::AddPlane(float **lines, unsigned int* numLines, complex<float>*
if ((m_MirrorType[n]!=MIRROR_OFF) && (m_MirrorType[nP]==MIRROR_OFF) && (m_MirrorType[nPP]==MIRROR_OFF))
{
this->AddMirrorPlane(n, lines, numLines, E_field, H_field, MeshType);
+
+ for (unsigned int i=0;i<numLines[n];++i)
+ lines[n][i] = 2.0*m_MirrorPos[n] - lines[n][i];
+
break;
}
//check if two planes are on
@@ -321,6 +325,10 @@ bool nf2ff_calc::AddPlane(float **lines, unsigned int* numLines, complex<float>*
this->AddMirrorPlane(nP, lines, numLines, E_field, H_field, MeshType);
this->AddMirrorPlane(nPP, lines, numLines, E_field, H_field, MeshType);
this->AddMirrorPlane(nP, lines, numLines, E_field, H_field, MeshType);
+
+ for (unsigned int i=0;i<numLines[nPP];++i)
+ lines[nPP][i] = 2.0*m_MirrorPos[nPP] - lines[nPP][i];
+
break;
}
}
@@ -334,6 +342,10 @@ bool nf2ff_calc::AddPlane(float **lines, unsigned int* numLines, complex<float>*
this->AddMirrorPlane(0, lines, numLines, E_field, H_field, MeshType);
this->AddMirrorPlane(1, lines, numLines, E_field, H_field, MeshType);
this->AddMirrorPlane(0, lines, numLines, E_field, H_field, MeshType);
+
+ for (unsigned int i=0;i<numLines[2];++i)
+ lines[2][i] = 2.0*m_MirrorPos[2] - lines[2][i];
+
}
//cleanup E- & H-Fields
@@ -496,7 +508,7 @@ bool nf2ff_calc::AddSinglePlane(float **lines, unsigned int* numLines, complex<f
m_H_theta[tn][pn] += factor*(Np[tn][pn] - Lt[tn][pn]/Z0);
m_H_phi[tn][pn] -= factor*(Nt[tn][pn] + Lp[tn][pn]/Z0);
- m_P_rad[tn][pn] = m_radius*m_radius/(2*fZ0) * abs((m_E_theta[tn][pn]*conj(m_E_theta[tn][pn])+m_E_phi[tn][pn]*conj(m_E_phi[tn][pn])));
+ m_P_rad[tn][pn] = abs((m_E_theta[tn][pn]*conj(m_E_theta[tn][pn])+m_E_phi[tn][pn]*conj(m_E_phi[tn][pn])))/(2*fZ0);
if (m_P_rad[tn][pn]>P_max)
P_max = m_P_rad[tn][pn];
}