define mesh-type in Processing base class
parent
e843b6dcd3
commit
c3407c7730
|
@ -26,7 +26,6 @@ ProcessFields::ProcessFields(Operator* op, Engine* eng) : Processing(op, eng)
|
||||||
m_DumpType = E_FIELD_DUMP;
|
m_DumpType = E_FIELD_DUMP;
|
||||||
// vtk-file is default
|
// vtk-file is default
|
||||||
m_fileType = VTK_FILETYPE;
|
m_fileType = VTK_FILETYPE;
|
||||||
m_Mesh_Type = CARTESIAN_MESH;
|
|
||||||
SetSubSampling(1);
|
SetSubSampling(1);
|
||||||
SetPrecision(6);
|
SetPrecision(6);
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ public:
|
||||||
enum FileType { VTK_FILETYPE, HDF5_FILETYPE};
|
enum FileType { VTK_FILETYPE, HDF5_FILETYPE};
|
||||||
enum DumpType { E_FIELD_DUMP, H_FIELD_DUMP};
|
enum DumpType { E_FIELD_DUMP, H_FIELD_DUMP};
|
||||||
enum DumpMode { NO_INTERPOLATION, NODE_INTERPOLATE, CELL_INTERPOLATE};
|
enum DumpMode { NO_INTERPOLATION, NODE_INTERPOLATE, CELL_INTERPOLATE};
|
||||||
enum MeshType { CARTESIAN_MESH, CYLINDRICAL_MESH};
|
|
||||||
|
|
||||||
virtual void InitProcess();
|
virtual void InitProcess();
|
||||||
|
|
||||||
|
@ -76,7 +75,6 @@ public:
|
||||||
double CalcTotalEnergy() const;
|
double CalcTotalEnergy() const;
|
||||||
|
|
||||||
void SetFileType(FileType fileType) {m_fileType=fileType;}
|
void SetFileType(FileType fileType) {m_fileType=fileType;}
|
||||||
void SetMeshType(MeshType meshType) {m_Mesh_Type=meshType;}
|
|
||||||
|
|
||||||
static string GetFieldNameByType(DumpType type);
|
static string GetFieldNameByType(DumpType type);
|
||||||
static string GetInterpolationNameByType(DumpMode mode);
|
static string GetInterpolationNameByType(DumpMode mode);
|
||||||
|
@ -85,7 +83,6 @@ public:
|
||||||
protected:
|
protected:
|
||||||
DumpMode m_DumpMode;
|
DumpMode m_DumpMode;
|
||||||
DumpType m_DumpType;
|
DumpType m_DumpType;
|
||||||
MeshType m_Mesh_Type;
|
|
||||||
string filePattern;
|
string filePattern;
|
||||||
FileType m_fileType;
|
FileType m_fileType;
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ Processing::Processing(Operator* op, Engine* eng)
|
||||||
m_weight=1;
|
m_weight=1;
|
||||||
m_Flush = false;
|
m_Flush = false;
|
||||||
m_dualMesh = false;
|
m_dualMesh = false;
|
||||||
|
m_Mesh_Type = CARTESIAN_MESH;
|
||||||
}
|
}
|
||||||
|
|
||||||
Processing::~Processing()
|
Processing::~Processing()
|
||||||
|
|
|
@ -30,6 +30,8 @@ public:
|
||||||
Processing(Operator* op, Engine* eng);
|
Processing(Operator* op, Engine* eng);
|
||||||
virtual ~Processing();
|
virtual ~Processing();
|
||||||
|
|
||||||
|
enum MeshType { CARTESIAN_MESH, CYLINDRICAL_MESH};
|
||||||
|
|
||||||
virtual void SetName(string val) {m_Name=val;}
|
virtual void SetName(string val) {m_Name=val;}
|
||||||
|
|
||||||
virtual void InitProcess() {};
|
virtual void InitProcess() {};
|
||||||
|
@ -60,6 +62,8 @@ public:
|
||||||
virtual void FlushNext() {m_Flush = true;}
|
virtual void FlushNext() {m_Flush = true;}
|
||||||
virtual void FlushData() {};
|
virtual void FlushData() {};
|
||||||
|
|
||||||
|
void SetMeshType(MeshType meshType) {m_Mesh_Type=meshType;}
|
||||||
|
|
||||||
//! Set the dump precision
|
//! Set the dump precision
|
||||||
void SetPrecision(unsigned int val) {m_precision = val;}
|
void SetPrecision(unsigned int val) {m_precision = val;}
|
||||||
|
|
||||||
|
@ -72,6 +76,8 @@ public:
|
||||||
protected:
|
protected:
|
||||||
Operator* Op;
|
Operator* Op;
|
||||||
Engine* Eng;
|
Engine* Eng;
|
||||||
|
MeshType m_Mesh_Type;
|
||||||
|
|
||||||
unsigned int m_precision;
|
unsigned int m_precision;
|
||||||
|
|
||||||
string m_Name;
|
string m_Name;
|
||||||
|
|
|
@ -393,6 +393,8 @@ int openEMS::SetupFDTD(const char* file)
|
||||||
cerr << "openEMS::SetupFDTD: Warning: Probe type " << pb->GetProbeType() << " of property '" << pb->GetName() << "' is unknown..." << endl;
|
cerr << "openEMS::SetupFDTD: Warning: Probe type " << pb->GetProbeType() << " of property '" << pb->GetName() << "' is unknown..." << endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (CylinderCoords)
|
||||||
|
proc->SetMeshType(Processing::CYLINDRICAL_MESH);
|
||||||
proc->SetProcessInterval(Nyquist/m_OverSampling);
|
proc->SetProcessInterval(Nyquist/m_OverSampling);
|
||||||
proc->AddFrequency(pb->GetFDSamples());
|
proc->AddFrequency(pb->GetFDSamples());
|
||||||
proc->SetName(pb->GetName());
|
proc->SetName(pb->GetName());
|
||||||
|
@ -432,7 +434,7 @@ int openEMS::SetupFDTD(const char* file)
|
||||||
ProcTD->SetDumpMode((ProcessFields::DumpMode)db->GetDumpMode());
|
ProcTD->SetDumpMode((ProcessFields::DumpMode)db->GetDumpMode());
|
||||||
ProcTD->SetFileType((ProcessFields::FileType)db->GetFileType());
|
ProcTD->SetFileType((ProcessFields::FileType)db->GetFileType());
|
||||||
if (CylinderCoords)
|
if (CylinderCoords)
|
||||||
ProcTD->SetMeshType(ProcessFields::CYLINDRICAL_MESH);
|
ProcTD->SetMeshType(Processing::CYLINDRICAL_MESH);
|
||||||
for (int n=0;n<3;++n)
|
for (int n=0;n<3;++n)
|
||||||
ProcTD->SetSubSampling(db->GetSubSampling(n),n);
|
ProcTD->SetSubSampling(db->GetSubSampling(n),n);
|
||||||
ProcTD->SetFilePattern(db->GetName());
|
ProcTD->SetFilePattern(db->GetName());
|
||||||
|
|
Loading…
Reference in New Issue