From a7380816e8ffe80c4b41ea324c3a9cab99b90f26 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Mon, 17 Sep 2012 16:54:55 +0200 Subject: [PATCH] fix in handling extensions, delete/cleanup rejected extensions --- FDTD/operator_cylinder.cpp | 5 ++++- FDTD/operator_cylindermultigrid.cpp | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/FDTD/operator_cylinder.cpp b/FDTD/operator_cylinder.cpp index 0b5eefd..87f7c60 100644 --- a/FDTD/operator_cylinder.cpp +++ b/FDTD/operator_cylinder.cpp @@ -307,7 +307,10 @@ void Operator_Cylinder::ApplyMagneticBC(bool* dirs) void Operator_Cylinder::AddExtension(Operator_Extension* op_ext) { if (op_ext->IsCylinderCoordsSave(CC_closedAlpha, CC_R0_included)) - m_Op_exts.push_back(op_ext); + Operator_Multithread::AddExtension(op_ext); else + { + delete op_ext; cerr << "Operator_Cylinder::AddExtension: Warning: Operator extension \"" << op_ext->GetExtensionName() << "\" is not compatible with cylinder-coords!! skipping...!" << endl; + } } diff --git a/FDTD/operator_cylindermultigrid.cpp b/FDTD/operator_cylindermultigrid.cpp index 2758e66..f4f92c5 100644 --- a/FDTD/operator_cylindermultigrid.cpp +++ b/FDTD/operator_cylindermultigrid.cpp @@ -498,6 +498,7 @@ void Operator_CylinderMultiGrid::AddExtension(Operator_Extension* op_ext) //check whether extension is save to use in multi-grid if (op_ext->IsCylindricalMultiGridSave(false)==false) { + delete op_ext; cerr << "Operator_CylinderMultiGrid::AddExtension: Warning: Operator extension \"" << op_ext->GetExtensionName() << "\" is not compatible with cylindrical multi-grids!! skipping...!" << endl; return; }