diff --git a/Common/processfields.h b/Common/processfields.h index 3786fd8..49ece87 100644 --- a/Common/processfields.h +++ b/Common/processfields.h @@ -53,9 +53,11 @@ public: //! Used file pattern e.g. pattern="tmp/efield_" --> "tmp/efield_000045.vtk" for timestep 45 or "tmp/efield_2.40000e9.vtk" for 2.4GHz E-field dump. (VTK FileType only) \sa SetFileType() void SetFilePattern(string fp) {m_filename=filePattern=fp;} + string GetFilePattern() const {return filePattern;} //! Set the filename for a hdf5 data group file (HDF5 FileType only) \sa SetFileType() void SetFileName(string fn) {m_filename=fn;} + string SetFileName() const {return m_filename;} //! Define the Dump-Mode void SetDumpMode(Engine_Interface_Base::InterpolationType mode); diff --git a/Common/processing.cpp b/Common/processing.cpp index 3a40b34..272a8ed 100644 --- a/Common/processing.cpp +++ b/Common/processing.cpp @@ -273,6 +273,14 @@ void ProcessingArray::AddProcessing(Processing* proc) ProcessArray.push_back(proc); } +void ProcessingArray::InitAll() +{ + for (size_t i=0; iInitProcess(); + } +} + void ProcessingArray::FlushNext() { for (size_t i=0; i ProcessArray; diff --git a/openems.cpp b/openems.cpp index 9223af5..f079527 100644 --- a/openems.cpp +++ b/openems.cpp @@ -345,7 +345,6 @@ bool openEMS::SetupProcessing() proc->SetName(pb->GetName()); proc->DefineStartStopCoord(start,stop); proc->SetWeight(pb->GetWeighting()); - proc->InitProcess(); PA->AddProcessing(proc); prim->SetPrimitiveUsed(true); } @@ -424,7 +423,6 @@ bool openEMS::SetupProcessing() ProcField->SetFilePattern(db->GetName()); ProcField->SetFileName(db->GetName()); ProcField->DefineStartStopCoord(start,stop); - ProcField->InitProcess(); PA->AddProcessing(ProcField); prim->SetPrimitiveUsed(true); } @@ -686,6 +684,9 @@ void openEMS::RunFDTD() PA->AddProcessing(ProcField); double maxE=0,currE=0; + //init processings + PA->InitAll(); + //add all timesteps to end-crit field processing with max excite amplitude unsigned int maxExcite = FDTD_Op->Exc->GetMaxExcitationTimestep(); for (unsigned int n=0; nExc->Volt_Count; ++n)