From 3abe10848d30e015dd28962e24d75dd7a51fe953 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Fri, 27 Apr 2012 16:47:27 +0200 Subject: [PATCH] dispersive material: critical bug fixes --- FDTD/extensions/engine_ext_lorentzmaterial.cpp | 4 ++-- FDTD/extensions/operator_ext_dispersive.cpp | 2 +- FDTD/extensions/operator_ext_lorentzmaterial.cpp | 4 ++-- openems.cpp | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/FDTD/extensions/engine_ext_lorentzmaterial.cpp b/FDTD/extensions/engine_ext_lorentzmaterial.cpp index 40e006f..783829d 100644 --- a/FDTD/extensions/engine_ext_lorentzmaterial.cpp +++ b/FDTD/extensions/engine_ext_lorentzmaterial.cpp @@ -34,7 +34,7 @@ void Engine_Ext_LorentzMaterial::DoPreVoltageUpdates() { for (int o=0;om_volt_ADE_On==false) continue; + if (m_Op_Ext_Lor->m_volt_ADE_On[o]==false) continue; unsigned int **pos = m_Op_Ext_Lor->m_LM_pos[o]; @@ -93,7 +93,7 @@ void Engine_Ext_LorentzMaterial::DoPreCurrentUpdates() { for (int o=0;om_curr_ADE_On==false) continue; + if (m_Op_Ext_Lor->m_curr_ADE_On[o]==false) continue; unsigned int **pos = m_Op_Ext_Lor->m_LM_pos[o]; diff --git a/FDTD/extensions/operator_ext_dispersive.cpp b/FDTD/extensions/operator_ext_dispersive.cpp index 56c333f..e5e9723 100644 --- a/FDTD/extensions/operator_ext_dispersive.cpp +++ b/FDTD/extensions/operator_ext_dispersive.cpp @@ -57,7 +57,7 @@ void Operator_Ext_Dispersive::ShowStat(ostream &ostr) const ostr << " Max. Dispersion Order N = " << m_Order << endl; for (int i=0;iGetQtyPropertyType(CSProperties::LORENTZMATERIAL)>0) - FDTD_Op->AddExtension(new Operator_Ext_LorentzMaterial(FDTD_Op)); - double timestep=0; FDTD_Opts->QueryDoubleAttribute("TimeStep",×tep); if (timestep) FDTD_Op->SetTimestep(timestep); + if (m_CSX->GetQtyPropertyType(CSProperties::LORENTZMATERIAL)>0) + FDTD_Op->AddExtension(new Operator_Ext_LorentzMaterial(FDTD_Op)); + //check all properties to request material storage during operator creation... SetupMaterialStorages();