From 1f6564877637b4725890959b35247ea23267525b Mon Sep 17 00:00:00 2001 From: Sebastian Held Date: Tue, 20 Jul 2010 11:42:47 +0200 Subject: [PATCH] added discretization info to processfields.cpp The coordinate snapping needs to be revised! --- FDTD/processfields.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/FDTD/processfields.cpp b/FDTD/processfields.cpp index 6314311..a44acb7 100644 --- a/FDTD/processfields.cpp +++ b/FDTD/processfields.cpp @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -#include "processfields.h" - #include #include +#include "tools/global.h" +#include "processfields.h" ProcessFields::ProcessFields(Operator* op, Engine* eng) : Processing(op, eng) { @@ -222,6 +222,18 @@ void ProcessFields::DefineStartStopCoord(double* dstart, double* dstop) discDLines[n][i] = lines.at(i); } } + + if (g_settings.showProbeDiscretization()) { + // FIXME the information E-Field / H-Field and therefore which mesh to use is missing + bool dualMesh = false; + cerr << m_filename << ": snapped coords: (" << Op->GetDiscLine( 0, start[0], dualMesh ) << "," + << Op->GetDiscLine( 1, start[1], dualMesh ) << "," << Op->GetDiscLine( 2, start[2], dualMesh ) << ") -> (" + << Op->GetDiscLine( 0, stop[0], dualMesh ) << ","<< Op->GetDiscLine( 1, stop[1], dualMesh ) << "," + << Op->GetDiscLine( 2, stop[2], dualMesh ) << ")"; + cerr << " [" << start[0] << "," << start[1] << "," << start[2] << "] -> [" + << stop[0] << "," << stop[1] << "," << stop[2] << "]" << endl; + } + } double ProcessFields::CalcTotalEnergy() const