From 46f408455589d30fafa1c4bb8c726f3e1dbf0e8b Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Tue, 7 Sep 2021 16:56:08 +0200 Subject: [PATCH] fix line integral calc Signed-off-by: Thorsten Liebig --- FDTD/engine_interface_fdtd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FDTD/engine_interface_fdtd.cpp b/FDTD/engine_interface_fdtd.cpp index c81b811..ec8c326 100644 --- a/FDTD/engine_interface_fdtd.cpp +++ b/FDTD/engine_interface_fdtd.cpp @@ -199,7 +199,7 @@ double* Engine_Interface_FDTD::GetRawInterpolatedDualField(const unsigned int* p double Engine_Interface_FDTD::CalcVoltageIntegral(const unsigned int* start, const unsigned int* stop) const { - if ((start[0]!=stop[0] + start[1]!=stop[1] + start[2]!=stop[2])!=1) + if (((start[0]!=stop[0]) + (start[1]!=stop[1]) + (start[2]!=stop[2]))!=1) { cerr << "Engine_Interface_FDTD::CalcVoltageIntegral: Error, only a 1D/line integration is allowed" << endl; return 0;