introduced new (dummy) cylinder engine

This is mainly for completeness, this engine doesn't (yet) have any functionality
This commit is contained in:
Thorsten Liebig 2012-06-06 10:25:40 +02:00
parent 08328e62b0
commit 0cf527d74c
7 changed files with 92 additions and 5 deletions

38
FDTD/engine_cylinder.cpp Normal file
View File

@ -0,0 +1,38 @@
/*
* Copyright (C) 2012 Thorsten Liebig (Thorsten.Liebig@gmx.de)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "engine_cylinder.h"
Engine_Cylinder::Engine_Cylinder(const Operator_Cylinder* op) : Engine_Multithread(op)
{
m_Op_Cyl = op;
}
Engine_Cylinder::~Engine_Cylinder()
{
}
Engine_Cylinder* Engine_Cylinder::New(const Operator_Cylinder* op, unsigned int numThreads)
{
cout << "Create FDTD engine (cylindrical mesh using sse compression + multithreading)" << endl;
Engine_Cylinder* e = new Engine_Cylinder(op);
e->setNumThreads(numThreads);
e->Init();
return e;
}

36
FDTD/engine_cylinder.h Normal file
View File

@ -0,0 +1,36 @@
/*
* Copyright (C) 2012 Thorsten Liebig (Thorsten.Liebig@gmx.de)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ENGINE_CYLINDER_H
#define ENGINE_CYLINDER_H
#include "operator_cylinder.h"
#include "engine_multithread.h"
class Engine_Cylinder : public Engine_Multithread
{
public:
static Engine_Cylinder* New(const Operator_Cylinder* op, unsigned int numThreads = 0);
virtual ~Engine_Cylinder();
protected:
Engine_Cylinder(const Operator_Cylinder* op);
const Operator_Cylinder* m_Op_Cyl;
};
#endif // ENGINE_CYLINDER_H

View File

@ -28,7 +28,7 @@ Engine_CylinderMultiGrid* Engine_CylinderMultiGrid::New(const Operator_CylinderM
return e;
}
Engine_CylinderMultiGrid::Engine_CylinderMultiGrid(const Operator_CylinderMultiGrid* op) : Engine_Multithread(op)
Engine_CylinderMultiGrid::Engine_CylinderMultiGrid(const Operator_CylinderMultiGrid* op) : Engine_Cylinder(op)
{
Op_CMG = op;

View File

@ -18,17 +18,17 @@
#ifndef ENGINE_CYLINDERMULTIGRID_H
#define ENGINE_CYLINDERMULTIGRID_H
#include "engine_multithread.h"
#include "engine_cylinder.h"
class Operator_CylinderMultiGrid;
class Engine_CylinderMultiGrid_Thread;
class Engine_Ext_CylinderMultiGrid;
class Engine_CylinderMultiGrid : public Engine_Multithread
class Engine_CylinderMultiGrid : public Engine_Cylinder
{
friend class Engine_Ext_CylinderMultiGrid;
public:
Engine_CylinderMultiGrid();
// Engine_CylinderMultiGrid();
static Engine_CylinderMultiGrid* New(const Operator_CylinderMultiGrid* op, unsigned int numThreads = 0);
virtual ~Engine_CylinderMultiGrid();

View File

@ -16,6 +16,7 @@
*/
#include "engine.h"
#include "engine_cylinder.h"
#include "Common/processfields.h"
#include "operator_cylinder.h"
#include "extensions/operator_extension.h"
@ -39,6 +40,14 @@ Operator_Cylinder::~Operator_Cylinder()
{
}
Engine* Operator_Cylinder::CreateEngine() const
{
//! create a special cylindrical-engine
Engine_Cylinder* eng = Engine_Cylinder::New(this, m_numThreads);
return eng;
}
void Operator_Cylinder::Init()
{
CC_closedAlpha = false;

View File

@ -73,6 +73,8 @@ public:
virtual void AddExtension(Operator_Extension* op_ext);
virtual Engine* CreateEngine() const;
protected:
Operator_Cylinder();
virtual void Init();

View File

@ -82,13 +82,14 @@ DEFINES += H5_USE_16_API
#### SOURCES ################################################################
SOURCES += main.cpp \
openems.cpp
openems.cpp
# FDTD
SOURCES += FDTD/engine.cpp \
FDTD/operator.cpp \
FDTD/engine_multithread.cpp \
FDTD/operator_cylinder.cpp \
FDTD/engine_cylinder.cpp \
FDTD/engine_sse.cpp \
FDTD/operator_sse.cpp \
FDTD/operator_sse_compressed.cpp \
@ -152,6 +153,7 @@ HEADERS += FDTD/engine.h \
FDTD/operator.h \
FDTD/engine_multithread.h \
FDTD/operator_cylinder.h \
FDTD/engine_cylinder.h \
FDTD/engine_sse.h \
FDTD/operator_sse.h \
FDTD/excitation.h \