init processings at a later time
parent
9619df7ec0
commit
277b746462
|
@ -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);
|
||||
|
|
|
@ -273,6 +273,14 @@ void ProcessingArray::AddProcessing(Processing* proc)
|
|||
ProcessArray.push_back(proc);
|
||||
}
|
||||
|
||||
void ProcessingArray::InitAll()
|
||||
{
|
||||
for (size_t i=0; i<ProcessArray.size(); ++i)
|
||||
{
|
||||
ProcessArray.at(i)->InitProcess();
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessingArray::FlushNext()
|
||||
{
|
||||
for (size_t i=0; i<ProcessArray.size(); ++i)
|
||||
|
|
|
@ -48,6 +48,7 @@ public:
|
|||
void SetEngineInterface(Engine_Interface_Base* eng_if);
|
||||
|
||||
virtual void SetName(string val) {m_Name=val;}
|
||||
virtual string GetName() const {return m_Name;}
|
||||
|
||||
//! Get the name for this processing, will be used in file description.
|
||||
virtual string GetProcessingName() const = 0;
|
||||
|
@ -159,6 +160,8 @@ public:
|
|||
|
||||
void AddProcessing(Processing* proc);
|
||||
|
||||
void InitAll();
|
||||
|
||||
//! Invoke this flag to flush all stored data to disk for all processings on next Process()
|
||||
void FlushNext();
|
||||
|
||||
|
@ -178,6 +181,10 @@ public:
|
|||
|
||||
void DumpBoxes2File( string vtkfilenameprefix ) const;
|
||||
|
||||
size_t GetNumberOfProcessings() const {return ProcessArray.size();}
|
||||
|
||||
Processing* GetProcessing(size_t number) {return ProcessArray.at(number);}
|
||||
|
||||
protected:
|
||||
unsigned int maxInterval;
|
||||
vector<Processing*> ProcessArray;
|
||||
|
|
|
@ -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; n<FDTD_Op->Exc->Volt_Count; ++n)
|
||||
|
|
Loading…
Reference in New Issue