Commit aa7f3631 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

some small changes in FileWriter

parent f161a986
...@@ -27,7 +27,7 @@ template<typename T=double> ...@@ -27,7 +27,7 @@ template<typename T=double>
struct Factor : public AbstractFunction<T,T> struct Factor : public AbstractFunction<T,T>
{ {
Factor(double fac_) : AbstractFunction<T,T>(1), fac(fac_) {} Factor(double fac_) : AbstractFunction<T,T>(1), fac(fac_) {}
T operator()(const T& x) const { return fac*x; }; T operator()(const T& x) const { return fac*x; }
private: private:
double fac; double fac;
}; };
......
...@@ -69,7 +69,7 @@ namespace AMDiS { ...@@ -69,7 +69,7 @@ namespace AMDiS {
FUNCNAME("FileWriterTemplated<T>::writeFiles()"); FUNCNAME("FileWriterTemplated<T>::writeFiles()");
if (timeModulo > 0.0) { if (timeModulo > 0.0) {
if ((adaptInfo->getTime() < lastWriteTime + timeModulo) && !force) if ((lastWriteTime != 0.0 && adaptInfo->getTime() < lastWriteTime + timeModulo) && !force)
return; return;
} else { } else {
if ((adaptInfo->getTimestepNumber() % tsModulo != 0) && !force) if ((adaptInfo->getTimestepNumber() % tsModulo != 0) && !force)
......
...@@ -180,7 +180,7 @@ namespace AMDiS { ...@@ -180,7 +180,7 @@ namespace AMDiS {
FUNCNAME("FileWriterTemplated<T>::writeFiles()"); FUNCNAME("FileWriterTemplated<T>::writeFiles()");
if (timeModulo > 0.0) { if (timeModulo > 0.0) {
if ((adaptInfo->getTime() < lastWriteTime + timeModulo) && !force) if ((lastWriteTime != 0.0 && adaptInfo->getTime() < lastWriteTime + timeModulo) && !force)
return; return;
} else { } else {
if ((adaptInfo->getTimestepNumber() % tsModulo != 0) && !force) if ((adaptInfo->getTimestepNumber() % tsModulo != 0) && !force)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment