diff --git a/FDTD/operator.h b/FDTD/operator.h index 157fc20..8f5a1e7 100644 --- a/FDTD/operator.h +++ b/FDTD/operator.h @@ -62,8 +62,8 @@ public: virtual void ShowStat() const; - void DumpOperator2File(string filename); - void DumpMaterial2File(string filename); + virtual void DumpOperator2File(string filename); + virtual void DumpMaterial2File(string filename); //! Get the name for the given direction: 0 -> x, 1 -> y, 2 -> z virtual string GetDirName(int ny) const; diff --git a/FDTD/operator_sse.cpp b/FDTD/operator_sse.cpp index 3d3c366..0f4d92a 100644 --- a/FDTD/operator_sse.cpp +++ b/FDTD/operator_sse.cpp @@ -18,6 +18,7 @@ #include "engine_sse.h" #include "operator_sse.h" #include "tools/array_ops.h" +#include "processfields.h" Operator_sse* Operator_sse::New() { @@ -83,3 +84,55 @@ void Operator_sse::InitOperator() numVectors = ceil((double)numLines[2]/4.0); } +void Operator_sse::DumpOperator2File(string filename) +{ + ofstream file(filename.c_str(),ios_base::out); + if (file.is_open()==false) + { + cerr << "Operator_sse::DumpOperator2File: Can't open file: " << filename << endl; + return; + } + + FDTD_FLOAT**** exc = Create_N_3DArray(numLines); + if (Exc) { + for (unsigned int n=0;nE_Count;++n) + exc[Exc->E_dir[n]][Exc->E_index[0][n]][Exc->E_index[1][n]][Exc->E_index[2][n]] = Exc->E_amp[n]; + } + + vv = Create_N_3DArray(numLines); + vi = Create_N_3DArray(numLines); + iv = Create_N_3DArray(numLines); + ii = Create_N_3DArray(numLines); + + unsigned int pos[3]; + for (pos[0]=0;pos[0]DumpMaterial2File("material_dump.vtk"); } - if (DebugOp && (m_engine == EngineType_Standard)) + if (DebugOp) FDTD_Op->DumpOperator2File("operator_dump.vtk"); - if (DebugOp && (m_engine != EngineType_Standard)) - cerr << "openEMS - Warning: operator dump needs the standard engine." << endl; - time_t OpDoneTime=time(NULL);