diff --git a/FDTD/processfields.cpp b/FDTD/processfields.cpp index 1d65823..fc355e0 100644 --- a/FDTD/processfields.cpp +++ b/FDTD/processfields.cpp @@ -26,7 +26,6 @@ ProcessFields::ProcessFields(Operator* op, Engine* eng) : Processing(op, eng) m_DumpType = E_FIELD_DUMP; // vtk-file is default m_fileType = VTK_FILETYPE; - m_Mesh_Type = CARTESIAN_MESH; SetSubSampling(1); SetPrecision(6); diff --git a/FDTD/processfields.h b/FDTD/processfields.h index 3ff197a..6657a6b 100644 --- a/FDTD/processfields.h +++ b/FDTD/processfields.h @@ -30,7 +30,6 @@ public: enum FileType { VTK_FILETYPE, HDF5_FILETYPE}; enum DumpType { E_FIELD_DUMP, H_FIELD_DUMP}; enum DumpMode { NO_INTERPOLATION, NODE_INTERPOLATE, CELL_INTERPOLATE}; - enum MeshType { CARTESIAN_MESH, CYLINDRICAL_MESH}; virtual void InitProcess(); @@ -76,7 +75,6 @@ public: double CalcTotalEnergy() const; void SetFileType(FileType fileType) {m_fileType=fileType;} - void SetMeshType(MeshType meshType) {m_Mesh_Type=meshType;} static string GetFieldNameByType(DumpType type); static string GetInterpolationNameByType(DumpMode mode); @@ -85,7 +83,6 @@ public: protected: DumpMode m_DumpMode; DumpType m_DumpType; - MeshType m_Mesh_Type; string filePattern; FileType m_fileType; diff --git a/FDTD/processing.cpp b/FDTD/processing.cpp index 9df339d..90b4faf 100644 --- a/FDTD/processing.cpp +++ b/FDTD/processing.cpp @@ -35,6 +35,7 @@ Processing::Processing(Operator* op, Engine* eng) m_weight=1; m_Flush = false; m_dualMesh = false; + m_Mesh_Type = CARTESIAN_MESH; } Processing::~Processing() diff --git a/FDTD/processing.h b/FDTD/processing.h index 0d093bc..5908279 100644 --- a/FDTD/processing.h +++ b/FDTD/processing.h @@ -30,6 +30,8 @@ public: Processing(Operator* op, Engine* eng); virtual ~Processing(); + enum MeshType { CARTESIAN_MESH, CYLINDRICAL_MESH}; + virtual void SetName(string val) {m_Name=val;} virtual void InitProcess() {}; @@ -60,6 +62,8 @@ public: virtual void FlushNext() {m_Flush = true;} virtual void FlushData() {}; + void SetMeshType(MeshType meshType) {m_Mesh_Type=meshType;} + //! Set the dump precision void SetPrecision(unsigned int val) {m_precision = val;} @@ -72,6 +76,8 @@ public: protected: Operator* Op; Engine* Eng; + MeshType m_Mesh_Type; + unsigned int m_precision; string m_Name; diff --git a/openems.cpp b/openems.cpp index e4453a1..50caa4e 100644 --- a/openems.cpp +++ b/openems.cpp @@ -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; continue; } + if (CylinderCoords) + proc->SetMeshType(Processing::CYLINDRICAL_MESH); proc->SetProcessInterval(Nyquist/m_OverSampling); proc->AddFrequency(pb->GetFDSamples()); proc->SetName(pb->GetName()); @@ -432,7 +434,7 @@ int openEMS::SetupFDTD(const char* file) ProcTD->SetDumpMode((ProcessFields::DumpMode)db->GetDumpMode()); ProcTD->SetFileType((ProcessFields::FileType)db->GetFileType()); if (CylinderCoords) - ProcTD->SetMeshType(ProcessFields::CYLINDRICAL_MESH); + ProcTD->SetMeshType(Processing::CYLINDRICAL_MESH); for (int n=0;n<3;++n) ProcTD->SetSubSampling(db->GetSubSampling(n),n); ProcTD->SetFilePattern(db->GetName());