fix in handling extensions, delete/cleanup rejected extensions

pull/1/head
Thorsten Liebig 2012-09-17 16:54:55 +02:00
parent e1376be1e5
commit a7380816e8
2 changed files with 5 additions and 1 deletions

View File

@ -307,7 +307,10 @@ void Operator_Cylinder::ApplyMagneticBC(bool* dirs)
void Operator_Cylinder::AddExtension(Operator_Extension* op_ext) void Operator_Cylinder::AddExtension(Operator_Extension* op_ext)
{ {
if (op_ext->IsCylinderCoordsSave(CC_closedAlpha, CC_R0_included)) if (op_ext->IsCylinderCoordsSave(CC_closedAlpha, CC_R0_included))
m_Op_exts.push_back(op_ext); Operator_Multithread::AddExtension(op_ext);
else else
{
delete op_ext;
cerr << "Operator_Cylinder::AddExtension: Warning: Operator extension \"" << op_ext->GetExtensionName() << "\" is not compatible with cylinder-coords!! skipping...!" << endl; cerr << "Operator_Cylinder::AddExtension: Warning: Operator extension \"" << op_ext->GetExtensionName() << "\" is not compatible with cylinder-coords!! skipping...!" << endl;
}
} }

View File

@ -498,6 +498,7 @@ void Operator_CylinderMultiGrid::AddExtension(Operator_Extension* op_ext)
//check whether extension is save to use in multi-grid //check whether extension is save to use in multi-grid
if (op_ext->IsCylindricalMultiGridSave(false)==false) 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; cerr << "Operator_CylinderMultiGrid::AddExtension: Warning: Operator extension \"" << op_ext->GetExtensionName() << "\" is not compatible with cylindrical multi-grids!! skipping...!" << endl;
return; return;
} }