diff --git a/FDTD/operator_cylinder.cpp b/FDTD/operator_cylinder.cpp index b96c9f4..566f124 100644 --- a/FDTD/operator_cylinder.cpp +++ b/FDTD/operator_cylinder.cpp @@ -21,10 +21,11 @@ #include "operator_extension.h" #include "operator_ext_cylinder.h" -Operator_Cylinder* Operator_Cylinder::New() +Operator_Cylinder* Operator_Cylinder::New(unsigned int numThreads) { cout << "Create cylindrical FDTD operator" << endl; Operator_Cylinder* op = new Operator_Cylinder(); + op->setNumThreads(numThreads); op->Init(); return op; } diff --git a/FDTD/operator_cylinder.h b/FDTD/operator_cylinder.h index 1a7b63d..d9268bb 100644 --- a/FDTD/operator_cylinder.h +++ b/FDTD/operator_cylinder.h @@ -31,7 +31,7 @@ all special cases e.g. a closed alpha mesh or an included r=0 case is treated by class Operator_Cylinder : public __OP_CYLINDER_BASE_CLASS__ { public: - static Operator_Cylinder* New(); + static Operator_Cylinder* New(unsigned int numThreads = 0); virtual ~Operator_Cylinder(); virtual bool SetGeometryCSX(ContinuousStructure* geo); diff --git a/openems.cpp b/openems.cpp index 7e3439a..5f9893c 100644 --- a/openems.cpp +++ b/openems.cpp @@ -225,7 +225,7 @@ int openEMS::SetupFDTD(const char* file) //*************** setup operator ************// if (CylinderCoords) { - FDTD_Op = Operator_Cylinder::New(); + FDTD_Op = Operator_Cylinder::New(m_engine_numThreads); CSX.SetCoordInputType(1); //tell CSX to use cylinder-coords } else if (m_engine == EngineType_SSE)