operator_cylinder with flexible base class -> now sse-compressed
This commit is contained in:
parent
009eeef96a
commit
f868eb328c
@ -27,37 +27,30 @@ Operator_Cylinder* Operator_Cylinder::New()
|
|||||||
return op;
|
return op;
|
||||||
}
|
}
|
||||||
|
|
||||||
Operator_Cylinder::Operator_Cylinder()
|
Operator_Cylinder::Operator_Cylinder() : __OP_CYLINDER_BASE_CLASS__()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Operator_Cylinder::~Operator_Cylinder()
|
Operator_Cylinder::~Operator_Cylinder()
|
||||||
{
|
{
|
||||||
Operator::Reset();
|
__OP_CYLINDER_BASE_CLASS__::Reset();
|
||||||
}
|
|
||||||
|
|
||||||
Engine* Operator_Cylinder::CreateEngine() const
|
|
||||||
{
|
|
||||||
//!create a confentional engine... cylinder special operations will be dealt by engine extentions
|
|
||||||
Engine* eng = Engine::New(this);
|
|
||||||
return eng;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Operator_Cylinder::Init()
|
void Operator_Cylinder::Init()
|
||||||
{
|
{
|
||||||
CC_closedAlpha = false;
|
CC_closedAlpha = false;
|
||||||
CC_R0_included = false;
|
CC_R0_included = false;
|
||||||
Operator::Init();
|
__OP_CYLINDER_BASE_CLASS__::Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Operator_Cylinder::Reset()
|
void Operator_Cylinder::Reset()
|
||||||
{
|
{
|
||||||
Operator::Reset();
|
__OP_CYLINDER_BASE_CLASS__::Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Operator_Cylinder::InitOperator()
|
void Operator_Cylinder::InitOperator()
|
||||||
{
|
{
|
||||||
Operator::InitOperator();
|
__OP_CYLINDER_BASE_CLASS__::InitOperator();
|
||||||
|
|
||||||
if (CC_closedAlpha || CC_R0_included)
|
if (CC_closedAlpha || CC_R0_included)
|
||||||
this->AddExtension(new Operator_Ext_Cylinder(this));
|
this->AddExtension(new Operator_Ext_Cylinder(this));
|
||||||
@ -82,7 +75,7 @@ string Operator_Cylinder::GetDirName(int ny) const
|
|||||||
|
|
||||||
double Operator_Cylinder::GetMeshDelta(int n, const int* pos, bool dualMesh) const
|
double Operator_Cylinder::GetMeshDelta(int n, const int* pos, bool dualMesh) const
|
||||||
{
|
{
|
||||||
double delta = Operator::GetMeshDelta(n,pos,dualMesh);
|
double delta = __OP_CYLINDER_BASE_CLASS__::GetMeshDelta(n,pos,dualMesh);
|
||||||
if (delta==0) return delta;
|
if (delta==0) return delta;
|
||||||
if (n==1)
|
if (n==1)
|
||||||
{
|
{
|
||||||
@ -94,7 +87,7 @@ double Operator_Cylinder::GetMeshDelta(int n, const int* pos, bool dualMesh) con
|
|||||||
|
|
||||||
bool Operator_Cylinder::SetGeometryCSX(ContinuousStructure* geo)
|
bool Operator_Cylinder::SetGeometryCSX(ContinuousStructure* geo)
|
||||||
{
|
{
|
||||||
if (Operator::SetGeometryCSX(geo)==false) return false;
|
if (__OP_CYLINDER_BASE_CLASS__::SetGeometryCSX(geo)==false) return false;
|
||||||
|
|
||||||
double minmaxA = fabs(discLines[1][numLines[1]-1]-discLines[1][0]);
|
double minmaxA = fabs(discLines[1][numLines[1]-1]-discLines[1][0]);
|
||||||
if (fabs(minmaxA-2*PI) < (2*PI)/10/numLines[1]) //check minmaxA smaller then a tenth of average alpha-width
|
if (fabs(minmaxA-2*PI) < (2*PI)/10/numLines[1]) //check minmaxA smaller then a tenth of average alpha-width
|
||||||
@ -144,7 +137,7 @@ void Operator_Cylinder::ApplyElectricBC(bool* dirs)
|
|||||||
// no special treatment necessary
|
// no special treatment necessary
|
||||||
// operator for z-direction at r=0 will be calculated and set separately
|
// operator for z-direction at r=0 will be calculated and set separately
|
||||||
}
|
}
|
||||||
Operator::ApplyElectricBC(dirs);
|
__OP_CYLINDER_BASE_CLASS__::ApplyElectricBC(dirs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Operator_Cylinder::ApplyMagneticBC(bool* dirs)
|
void Operator_Cylinder::ApplyMagneticBC(bool* dirs)
|
||||||
@ -158,7 +151,7 @@ void Operator_Cylinder::ApplyMagneticBC(bool* dirs)
|
|||||||
{
|
{
|
||||||
dirs[0]=0; //no PMC in r_min directions...
|
dirs[0]=0; //no PMC in r_min directions...
|
||||||
}
|
}
|
||||||
Operator::ApplyMagneticBC(dirs);
|
__OP_CYLINDER_BASE_CLASS__::ApplyMagneticBC(dirs);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Operator_Cylinder::Calc_ECPos(int n, unsigned int* pos, double* inEC)
|
bool Operator_Cylinder::Calc_ECPos(int n, unsigned int* pos, double* inEC)
|
||||||
|
@ -18,21 +18,22 @@
|
|||||||
#ifndef OPERATOR_CYLINDER_H
|
#ifndef OPERATOR_CYLINDER_H
|
||||||
#define OPERATOR_CYLINDER_H
|
#define OPERATOR_CYLINDER_H
|
||||||
|
|
||||||
#include "operator.h"
|
//! define the base class for the cylindrical coordinate FDTD
|
||||||
|
#define __OP_CYLINDER_BASE_CLASS__ Operator_SSE_Compressed
|
||||||
|
|
||||||
|
#include "operator_sse_compressed.h"
|
||||||
|
|
||||||
//! This class creates an operator for a cylindrical FDTD.
|
//! This class creates an operator for a cylindrical FDTD.
|
||||||
/*!
|
/*!
|
||||||
This class creates an operator for a cylindrical FDTD. No special engine is necessary,
|
This class creates an operator for a cylindrical FDTD. No special engine is necessary,
|
||||||
all special cases e.g. a closed alpha mesh or an included r=0 case is treated by an operator/engine extension \sa operator_ext_cylinder.
|
all special cases e.g. a closed alpha mesh or an included r=0 case is treated by an operator/engine extension \sa operator_ext_cylinder.
|
||||||
*/
|
*/
|
||||||
class Operator_Cylinder : public Operator
|
class Operator_Cylinder : public __OP_CYLINDER_BASE_CLASS__
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static Operator_Cylinder* New();
|
static Operator_Cylinder* New();
|
||||||
virtual ~Operator_Cylinder();
|
virtual ~Operator_Cylinder();
|
||||||
|
|
||||||
virtual Engine* CreateEngine() const;
|
|
||||||
|
|
||||||
virtual bool SetGeometryCSX(ContinuousStructure* geo);
|
virtual bool SetGeometryCSX(ContinuousStructure* geo);
|
||||||
|
|
||||||
virtual void ApplyElectricBC(bool* dirs);
|
virtual void ApplyElectricBC(bool* dirs);
|
||||||
|
Loading…
Reference in New Issue
Block a user