diff --git a/FDTD/extensions/operator_ext_dispersive.cpp b/FDTD/extensions/operator_ext_dispersive.cpp index e5e9723..ffc4c01 100644 --- a/FDTD/extensions/operator_ext_dispersive.cpp +++ b/FDTD/extensions/operator_ext_dispersive.cpp @@ -19,7 +19,19 @@ #include "tools/array_ops.h" -Operator_Ext_Dispersive::Operator_Ext_Dispersive(Operator* op) : Operator_Extension(op) +Operator_Ext_Dispersive::Operator_Ext_Dispersive(Operator* op) : Operator_Extension(op) +{ + m_curr_ADE_On = NULL; + m_volt_ADE_On = NULL; + + m_LM_pos=NULL; + m_curr_ADE_On=NULL; + m_volt_ADE_On=NULL; + + m_Order = 0; +} + +Operator_Ext_Dispersive::Operator_Ext_Dispersive(Operator* op, Operator_Ext_Dispersive* op_ext) : Operator_Extension(op,op_ext) { m_curr_ADE_On = NULL; m_volt_ADE_On = NULL; diff --git a/FDTD/extensions/operator_ext_dispersive.h b/FDTD/extensions/operator_ext_dispersive.h index 02ca3fc..476d647 100644 --- a/FDTD/extensions/operator_ext_dispersive.h +++ b/FDTD/extensions/operator_ext_dispersive.h @@ -37,6 +37,8 @@ public: protected: Operator_Ext_Dispersive(Operator* op); + //! Copy constructor + Operator_Ext_Dispersive(Operator* op, Operator_Ext_Dispersive* op_ext); //! Dispersive order int m_Order; diff --git a/FDTD/extensions/operator_ext_lorentzmaterial.cpp b/FDTD/extensions/operator_ext_lorentzmaterial.cpp index 9b25419..8cea4db 100644 --- a/FDTD/extensions/operator_ext_lorentzmaterial.cpp +++ b/FDTD/extensions/operator_ext_lorentzmaterial.cpp @@ -28,6 +28,14 @@ Operator_Ext_LorentzMaterial::Operator_Ext_LorentzMaterial(Operator* op) : Opera i_ext_ADE = NULL; } +Operator_Ext_LorentzMaterial::Operator_Ext_LorentzMaterial(Operator* op, Operator_Ext_LorentzMaterial* op_ext) : Operator_Ext_Dispersive(op,op_ext) +{ + v_int_ADE = NULL; + v_ext_ADE = NULL; + i_int_ADE = NULL; + i_ext_ADE = NULL; +} + Operator_Ext_LorentzMaterial::~Operator_Ext_LorentzMaterial() { for (int i=0;i(this)==NULL) + return NULL; + return new Operator_Ext_LorentzMaterial(op, this); +} + bool Operator_Ext_LorentzMaterial::BuildExtension() { double dT = m_Op->GetTimestep(); diff --git a/FDTD/extensions/operator_ext_lorentzmaterial.h b/FDTD/extensions/operator_ext_lorentzmaterial.h index ee4386c..a77a648 100644 --- a/FDTD/extensions/operator_ext_lorentzmaterial.h +++ b/FDTD/extensions/operator_ext_lorentzmaterial.h @@ -28,17 +28,22 @@ public: Operator_Ext_LorentzMaterial(Operator* op); virtual ~Operator_Ext_LorentzMaterial(); + virtual Operator_Extension* Clone(Operator* op); + virtual bool BuildExtension(); virtual Engine_Extension* CreateEngineExtention(); virtual bool IsCylinderCoordsSave(bool closedAlpha, bool R0_included) const {return true;} + virtual bool IsCylindricalMultiGridSave(bool child) const {UNUSED(child); return true;} virtual string GetExtensionName() const {return string("Drude/Lorentz Dispersive Material Extension");} virtual void ShowStat(ostream &ostr) const; protected: + //! Copy constructor + Operator_Ext_LorentzMaterial(Operator* op, Operator_Ext_LorentzMaterial* op_ext); //ADE update coefficients, array setup: coeff[N_order][direction][mesh_pos_index] FDTD_FLOAT ***v_int_ADE; diff --git a/FDTD/extensions/operator_extension.cpp b/FDTD/extensions/operator_extension.cpp index dd8e189..5abb080 100644 --- a/FDTD/extensions/operator_extension.cpp +++ b/FDTD/extensions/operator_extension.cpp @@ -38,6 +38,8 @@ Operator_Extension::Operator_Extension(Operator* op, Operator_Extension* op_ext) UNUSED(op_ext); m_Op = op; m_Op_Cyl = dynamic_cast(op); + if (m_Op_Cyl) + m_CC_R0_included=m_Op_Cyl->GetR0Included(); } void Operator_Extension::ShowStat(ostream &ostr) const diff --git a/FDTD/extensions/operator_extension.h b/FDTD/extensions/operator_extension.h index 81c5b3e..5e5b7ca 100644 --- a/FDTD/extensions/operator_extension.h +++ b/FDTD/extensions/operator_extension.h @@ -62,7 +62,7 @@ public: protected: Operator_Extension(Operator* op); - //! Copy constructor, returns NULL if extension cannot be copied... + //! Copy constructor Operator_Extension(Operator* op, Operator_Extension* op_ext); //FDTD Operator