From ad7d3a5ca3e635a2cb21252d1b32fcc6f742c45e Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Fri, 23 Aug 2013 17:29:10 +0200 Subject: [PATCH] change in how the flag "CellConstantMaterial" is handled Signed-off-by: Thorsten Liebig --- openems.cpp | 8 +++++--- openems.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/openems.cpp b/openems.cpp index a3ffa79..7b9677c 100644 --- a/openems.cpp +++ b/openems.cpp @@ -72,6 +72,7 @@ openEMS::openEMS() m_DumpStats = false; endCrit = 1e-6; m_OverSampling = 4; + m_CellConstantMaterial=false; m_engine = EngineType_Multithreaded; //default engine type m_engine_numThreads = 0; @@ -654,9 +655,10 @@ int openEMS::SetupFDTD(const char* file) if (SetupOperator(FDTD_Opts)==false) return 2; - int cellConstantMaterial=0; - FDTD_Opts->QueryIntAttribute("CellConstantMaterial",&cellConstantMaterial); - if (cellConstantMaterial==1) + if (FDTD_Opts->QueryIntAttribute("CellConstantMaterial",&ihelp)==TIXML_SUCCESS) + m_CellConstantMaterial=(ihelp==1); + + if (m_CellConstantMaterial) { FDTD_Op->SetCellConstantMaterial(); if (g_settings.GetVerboseLevel()>0) diff --git a/openems.h b/openems.h index 30fd489..e8106f0 100644 --- a/openems.h +++ b/openems.h @@ -88,6 +88,7 @@ protected: double endCrit; int m_OverSampling; + bool m_CellConstantMaterial; Operator* FDTD_Op; Engine* FDTD_Eng; ProcessingArray* PA;