number of threads received by cylindrical operator & engine

Signed-off-by: Thorsten Liebig <thorsten.liebig@gmx.de>
pull/1/head
Thorsten Liebig 2010-06-06 01:50:58 +02:00
parent 08fd499194
commit ab0a4aaacb
3 changed files with 4 additions and 3 deletions

View File

@ -21,10 +21,11 @@
#include "operator_extension.h" #include "operator_extension.h"
#include "operator_ext_cylinder.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; cout << "Create cylindrical FDTD operator" << endl;
Operator_Cylinder* op = new Operator_Cylinder(); Operator_Cylinder* op = new Operator_Cylinder();
op->setNumThreads(numThreads);
op->Init(); op->Init();
return op; return op;
} }

View File

@ -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__ class Operator_Cylinder : public __OP_CYLINDER_BASE_CLASS__
{ {
public: public:
static Operator_Cylinder* New(); static Operator_Cylinder* New(unsigned int numThreads = 0);
virtual ~Operator_Cylinder(); virtual ~Operator_Cylinder();
virtual bool SetGeometryCSX(ContinuousStructure* geo); virtual bool SetGeometryCSX(ContinuousStructure* geo);

View File

@ -225,7 +225,7 @@ int openEMS::SetupFDTD(const char* file)
//*************** setup operator ************// //*************** setup operator ************//
if (CylinderCoords) if (CylinderCoords)
{ {
FDTD_Op = Operator_Cylinder::New(); FDTD_Op = Operator_Cylinder::New(m_engine_numThreads);
CSX.SetCoordInputType(1); //tell CSX to use cylinder-coords CSX.SetCoordInputType(1); //tell CSX to use cylinder-coords
} }
else if (m_engine == EngineType_SSE) else if (m_engine == EngineType_SSE)