From 2799f19ae371244ec3b30d53968e9191539cfeb8 Mon Sep 17 00:00:00 2001 From: Detlef Conradin Date: Sat, 3 Mar 2018 13:36:15 +0100 Subject: [PATCH] nf2ff: restore mesh lines after mirroring This fixes a bug in nf2ff. When using mirror planes, fields and mesh lines are mirrored in place. Mesh lines must be restored after the calculation of a single frequency point. Otherwise, the far field at every even frequency point is incorrect. --- nf2ff/nf2ff_calc.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nf2ff/nf2ff_calc.cpp b/nf2ff/nf2ff_calc.cpp index 2bfd3b5..9c2aa4f 100644 --- a/nf2ff/nf2ff_calc.cpp +++ b/nf2ff/nf2ff_calc.cpp @@ -313,6 +313,10 @@ bool nf2ff_calc::AddPlane(float **lines, unsigned int* numLines, complex* 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* 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* 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