diff --git a/FDTD/extensions/operator_ext_conductingsheet.cpp b/FDTD/extensions/operator_ext_conductingsheet.cpp index b7efca5..5f82cbf 100644 --- a/FDTD/extensions/operator_ext_conductingsheet.cpp +++ b/FDTD/extensions/operator_ext_conductingsheet.cpp @@ -25,6 +25,18 @@ Operator_Ext_ConductingSheet::Operator_Ext_ConductingSheet(Operator* op, double m_f_max = f_max; } +Operator_Ext_ConductingSheet::Operator_Ext_ConductingSheet(Operator* op, Operator_Ext_ConductingSheet* op_ext) : Operator_Ext_LorentzMaterial(op, op_ext) +{ + m_f_max = op_ext->m_f_max; +} + +Operator_Extension* Operator_Ext_ConductingSheet::Clone(Operator* op) +{ + if (dynamic_cast(this)==NULL) + return NULL; + return new Operator_Ext_ConductingSheet(op, this); +} + bool Operator_Ext_ConductingSheet::BuildExtension() { double dT = m_Op->GetTimestep(); diff --git a/FDTD/extensions/operator_ext_conductingsheet.h b/FDTD/extensions/operator_ext_conductingsheet.h index 7efdea3..9bd5200 100644 --- a/FDTD/extensions/operator_ext_conductingsheet.h +++ b/FDTD/extensions/operator_ext_conductingsheet.h @@ -32,6 +32,8 @@ class Operator_Ext_ConductingSheet : public Operator_Ext_LorentzMaterial public: Operator_Ext_ConductingSheet(Operator* op, double f_max); + virtual Operator_Extension* Clone(Operator* op); + virtual bool BuildExtension(); virtual bool IsCylinderCoordsSave(bool closedAlpha, bool R0_included) const {return true;} @@ -40,6 +42,8 @@ public: virtual string GetExtensionName() const {return string("Conducting Sheet Extension");} protected: + //! Copy constructor + Operator_Ext_ConductingSheet(Operator* op, Operator_Ext_ConductingSheet* op_ext); double m_f_max; };