summaryrefslogtreecommitdiff
path: root/openEMS/FDTD/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'openEMS/FDTD/extensions')
-rw-r--r--openEMS/FDTD/extensions/operator_ext_lorentzmaterial.cpp6
-rw-r--r--openEMS/FDTD/extensions/operator_ext_tfsf.cpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/openEMS/FDTD/extensions/operator_ext_lorentzmaterial.cpp b/openEMS/FDTD/extensions/operator_ext_lorentzmaterial.cpp
index 9f386fc..21ad184 100644
--- a/openEMS/FDTD/extensions/operator_ext_lorentzmaterial.cpp
+++ b/openEMS/FDTD/extensions/operator_ext_lorentzmaterial.cpp
@@ -225,6 +225,9 @@ bool Operator_Ext_LorentzMaterial::BuildExtension()
// CSProperties* prop = m_Op->GetGeometryCSX()->GetPropertyByCoordPriority(coord,(CSProperties::PropertyType)(CSProperties::METAL | CSProperties::MATERIAL), true);
CSProperties* prop = m_Op->GetGeometryCSX()->GetPropertyByCoordPriority(coord, vPrims, true);
+
+ if (prop==NULL) continue;
+
if ((mat = prop->ToLorentzMaterial()))
{
w_plasma = mat->GetEpsPlasmaFreqWeighted(order,n,coord) * 2 * PI;
@@ -277,6 +280,9 @@ bool Operator_Ext_LorentzMaterial::BuildExtension()
// CSProperties* prop = m_Op->GetGeometryCSX()->GetPropertyByCoordPriority(coord,(CSProperties::PropertyType)(CSProperties::METAL | CSProperties::MATERIAL), true);
CSProperties* prop = m_Op->GetGeometryCSX()->GetPropertyByCoordPriority(coord, vPrims, true);
+
+ if (prop==NULL) continue;
+
if ((mat = prop->ToLorentzMaterial()))
{
w_plasma = mat->GetMuePlasmaFreqWeighted(order,n,coord) * 2 * PI;
diff --git a/openEMS/FDTD/extensions/operator_ext_tfsf.cpp b/openEMS/FDTD/extensions/operator_ext_tfsf.cpp
index 663dc1f..62fd580 100644
--- a/openEMS/FDTD/extensions/operator_ext_tfsf.cpp
+++ b/openEMS/FDTD/extensions/operator_ext_tfsf.cpp
@@ -159,7 +159,7 @@ bool Operator_Ext_TFSF::BuildExtension()
else
m_PhVel=m_Op->CalcNumericPhaseVelocity(m_Start,m_Stop,m_PropDir,m_Frequency);
- if ((m_PhVel<0) || (m_PhVel>__C0__/ref_index) || isnan(m_PhVel))
+ if ((m_PhVel<0) || (m_PhVel>__C0__/ref_index) || std::isnan(m_PhVel))
{
cerr << "Operator_Ext_TFSF::BuildExtension: Warning, invalid phase velocity found, resetting to c0! " << endl;
m_PhVel = __C0__/ref_index;